Part 16
73 : How to gear upwardly priority of @Test method? What Is Its usage?
Answer : In your software spider web application's exam case, yous tin gear upwardly priority for TestNG @Test annotated methods every bit bellow.
@Test(priority=0)
Using priority, We tin control @Test method execution fashion every bit per our requirement. That means @Test method amongst priority = 0 volition hold upwardly executed 1st too @Test method amongst priority = i volition hold upwardly executed 2nd too and hence on. VIEW PRACTICAL EXAMPLE to know how to usage It.
74 : Tell me whatsoever v assertions of TestNG which nosotros tin usage In selenium webdriver software testing tool.
Answer : There are many dissimilar assertions available In TestNG but mostly I am using bellow given assertions In my exam cases.
- assertEquals VIEW EXAMPLE
- assertNotEquals VIEW EXAMPLE
- assertTrue VIEW EXAMPLE
- assertFalse VIEW EXAMPLE
- assertNull VIEW EXAMPLE
- assertNotNull VIEW EXAMPLE
75 : Can yous say me usage of TestNG Soft Assertion In selenium webdriver software testing tool?
Answer : Using TestNG soft assertion, We tin maintain our exam execution fifty-fifty if assertion fails. That agency on failure of soft assertion, remaining purpose of @Test method volition hold upwardly executed too assertion failure volition hold upwardly reported at the halt of @Test method. VIEW PRACTICAL EXAMPLE.
76 : How to write regular facial expression In testng.xml file to search @Test methods containing "product" keyword.
Answer : Regular facial expression to find @Test methods containing keyword "product" Is every bit bellow In selenium webdriver software testing tool.
<methods> <include name=".*product.*"/> </methods>
VIEW EXAMPLE OF USING REGULAR EXPRESSION
77 : Which fourth dimension unit of measurement nosotros render In fourth dimension test? minutes? seconds? milliseconds? or hours? Give Example.
Answer : Time unit of measurement nosotros render on @Test method degree or exam suite level Is In milliseconds.You tin VIEW FULL EXAMPLE to know how to gear upwardly fourth dimension out.