TestNG allows you to specify the order of test method execution using attributes like priority, dependsOnMethods, and dependsOnGroups. Ensure that your test methods are annotated correctly to define their execution order and dependencies.
KeyPoints to remember!
Do not forget to add depends on each method of working class , if you do not like to add on every method then go for TestNG Xml execution ,where you can perform same operation by Include and Exclude attribute.
Here I have attached the Two video based demonstration by working two different URL , I have just worked DependsOnMethods attribute and will work rest of two attributes in sooner session.
Comments
Post a Comment