Skip to main content

Posts

Showing posts from July, 2020

Usages of TestNG Annotations on the Automation Framework

Before explaining the difference, first this is some testing terminologies Test suite – Consists of one or more test tags. Test tag - Consists of one or more test classes. Test class – Consists of one or more methods. for examble: <suite name="suit1"> <test name="TestTag1"> <classes> <class name="TestClass1"/> </classes> </test> <test name="TestTag2"> <classes> <class name="TestClass2"/> <class name="TestClass3"/> </classes> </test> </suite> @BeforeTest : It will be called Only one time before any test tag, no matter how many test classes inside that tag or how many method annotated with @Test , it will be called only one time for each test tag,in the previous XML example @BeforeTest will be called twice, one time before TestTag1 the second time before TestTag2 so it can be used to in...