How do you Skip Test Case from execution?

Answer Posted / naazneen

There are two ways to skip a test case :

1. By using testNg annotation , enabled=false

Eg: @Test(enabled=false)
Public void testCase(){
// code
}

2. By using "Skip Exception"

Eg: @Test
public void testCase1(){
throw Skip Exception(" skipping the test ");
}

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does @test(invocationcount=?) And @test(threadpoolsize=?) Indicate.

3410


How can we handle web-based pop-up?

541


What are the different types of wait statements in selenium webdriver?

3214


How do you get the attribute of the web element?

484


What are its advantages of pom?

517






What is the difference between @factory and @data provider annotation?

533


Could you explain the line of code webdriver driver = new firefoxdriver()?

486


Explain xpath absolute and xpath attributes.

517


What selenese command and argument can be used to transfer the value of a javascript variable into a side variable?

4257


Do you know what are the main advantages of selenium grid?

499


How would you test your element locator?

488


What is object repository in selenium webdriver?

518


Explain the difference between assert and verify commands?

496


What are the languages supported by webdriver?

510


Describe a framework. List some of the common automation frameworks.

509