JUnit Tutorial
Introduction to Junit JUnit Set up JUnit Architecture JUnit Annotations JUnit Fixtures Junit Assertions Junit Categories @Test Annotation Parameters Verification of Exceptions Ignoring tests Time out in JUnit tests Parameterizing tests Test Suite TestWatcher TemporaryFolder ExternalResource Theories in JUnit JUnit Test Runners Execution order of JUnit tests Assumptions in JUnit JUnit and Hamcrest Matchers Running JUnit tests in parallel JUnit and Maven Integration JUnit and Gradle Integration Executing Selenium tests using JUnit test framework Method interceptor and usage JUnit in Intellij IDEA JUnit in EclipseSetup 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.
<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!!