How do you Skip Test Case from execution?

Answer Posted / elakkiya

In Testng, we can skip method like below,

@test(enabled=false)
public void test()
{
// body
}


In JUnit, we can skip method and as well Class like below,

Class:
--------
@Ignore
public class IgnoreMe {
@Test public void test1() { ... }
@Test public void test2() { ... }
}

Method:
-----------
@Ignore
@Test
public void something() { ...

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of creating a reference variable- 'driver' of type webdriver instead of directly creating a firefoxdriver object or any other driver's reference in the statement webdriver driver = new firefoxdriver();?

597


Mention 5 different exceptions you had in selenium web driver?

568


How is driver.close()command different from driver.quit command?

593


How to export the tests from selenium ide to selenium rc in different languages?

559


How can the user get a text from a web element?

628






Explain selenium waitfor commands ?

608


What are the prerequisites to run selenium webdriver?

593


What do you mean by xpath?

570


how to handle staleelementreferenceexception?

589


When do you use selenium grid?

573


How can I read test data from excels?

570


Explain what are the limitations of selenium ide?

805


Can you run the tests registered with Selenium IDE in other browsers?

628


What are the different keyboard operations that can be performed in selenium?

579


How to check which option in the dropdown is selected?

644