I have a requirement as below. Please suggest how we can implement it using TestNG and annotations.
1. Create a Custom annotation and value will be passed in it. Then, it will invoke one method which will perform some work and will have Asserts in it as well.
2. @Test will be used as TestRunner mainly and Pass/Fail of this TestMethod will appear in reports based on outcome of above method.
Note: @Test method will not contain any code.
@Test
@CustomAnnotation(abc.json)
public void test() {
// No Code Here
}
Thanks,
Ashish