-
What is
TestNG Annotations?
- Special meaning for a Java method
- At Symbol (@) denote an annotation.
- Control the execution order.
-
View
-
Pre-Conditions
- Set Up Before we start our test.
- Begin with @Before.
-
Condition
- Our Test
- @Test it performs our test.
-
Post-Condition
- After Our Test
- Start with @After.
-
How To
Add TestNG
Annotations
- Just type it on the line above method you'd like to associate it with.
-
Another way
- Right-click on package in which class resides
- Select New
- Select Other
- Type TestNG
- Select TestNG class
- Click Next
- Select all annotations except for DataProvider
- Change Class Name to Configuration_Annotations
- Click Finish