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 evaluation can selenium do?

507


How to switch between frames in selenium?

502


How to perform drag and drop action in selenium webdriver?

421


What is the command to connect a node to the selenium grid?

532


How to fetch the current page url in selenium?

655






How to check whether a text is underlined or not?

484


What is the object repository?

554


What the webdriver supported mobile testing drivers do you know?

471


How you can login into any site if it’s showing any authentication popup for password and username?

533


What are the advantages and disadvantages of selenium ?

466


How to login to any site if it’s showing any authentication popup for

525


How to clear the text in the text box using selenium webdriver?

457


What are junit annotations?

508


How can we handle web-based pop-up?

535


What do we mean by selenium 1 and selenium 2?

500