Setup and installation in junit

To start using JUnit, you will need below tools.
  • JDK
  • Intellij IDEA
  • Build tools like Maven or Gradle
  • JUnit dependency
  • Junit plug-ins are available for popular IDEs like Eclipse and Intellij IDEA. In Intellij IDEA, the JUnit plug-in is installed by default.
To add JUnit dependency in maven project, you need to add below xml block in POM.xml file.
 
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>

To add JUnit dependency in Gradle project, you need to add below lines in build.gradle file.
 
dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.11'
}   

Web development and Automation testing

solutions delivered!!