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 EclipseTest annotation parameters in junit
Here is the list of parameters that can be passed to @Test Annotation in JUnit.
@Test(expected=IOException.class)
@Test(timeout=100)
@Test(dataProvider = “WordPressdata”)
expected parameter is used to verify that specific exception is thrown by the test. timeout parameter is used to specify the timeout of the test. If the test takes more time than given timeout, test fails. dataprovider is used to pass the test data to test from data source.Web development and Automation testing
solutions delivered!!