TestNG Annotation in Selenium Framework:- Annotation :- It is used to provide extra functionality during application flow in selenium program . Annotation always will be started from @ symbol in Java programming language. TestNG provide multiple annotation to implement Test Script. 1) @Test:- this is the mandatory annotation in TESTNG Program ,it is used to write Multiple TestScript in Single Test Class. @Test void fun1() { } @Test void fun2() { } @Test void fun3() { } Example of TestNG :- import org.testng.annotations.Test; public class AnnotationExample { @Test public void f1() { System.out.print("Test1"); } @Test public void f2() { System.out.print("Test2"); } @Test public void f3() { System.out.print("Test3"); } } ........................................................................................................................
Hi, I'm Shiva Gautam. With over 15 years of diverse experience in various IT domains, I am now an entrepreneur focusing on both training and software development. My expertise spans across multiple technologies, and I've authored numerous articles on subjects including Java, Python, REACT, NODE, ANGULAR, Cloud, software testing, Django framework, C#, Flutter, Salesforce, Ruby on Rails, .NET, and more. For additional information, please visit shivaconceptsolution.com and kangaroosoftware.net.