Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How do you Skip Test Case from execution?

Answers were Sorted based on User's Feedback



How do you Skip Test Case from execution?..

Answer / 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

How do you Skip Test Case from execution?..

Answer / 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

How do you Skip Test Case from execution?..

Answer / shahid qureshi

by @Ignore annotations

Is This Answer Correct ?    0 Yes 1 No

How do you Skip Test Case from execution?..

Answer / anagha

In testNg there is annotation
enabled =true

so it can be like this

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

Is This Answer Correct ?    6 Yes 8 No

Post New Answer

More Selenium Interview Questions

What is page factory?

0 Answers  


In selenium ide how you can generate random numbers and dates for test data?

1 Answers  


Is it possible to automate the captcha using selenium?

0 Answers  


Is there an htmlunitdriver for .net?

0 Answers  


List the different types of drivers available in web drivers.

0 Answers  


What are the different exceptions you got when working with webdriver?

0 Answers  


What evaluation can selenium do?

0 Answers  


What are desiredcapabilities in selenium webdriver?

0 Answers  


How can you prepare customized html report using testng in hybrid framework?

0 Answers  


Which of the selector ID, name, XPath or CSS should I use?

0 Answers  


How can we deal with pop-up windows based on?

0 Answers  


How does one store the current url using selenium 2.0?

0 Answers  


Categories