Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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 ?    2 Yes 0 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 7 No

How do you Skip Test Case from execution?..

Answer / shahid qureshi

by @Ignore annotations

Is This Answer Correct ?    0 Yes 1 No

Post New Answer



More Selenium Interview Questions

What are the advantages of selenium?

0 Answers  


What is webdriverbackedselenium?

0 Answers  


When should I use Selenium IDE?

0 Answers  


What are core extension?

0 Answers  


What is fluent wait in selenium?

0 Answers  






What do you know about selenium?

0 Answers  


Can you write the code to double click an element in selenium?

0 Answers  


What is desired capabilities?

0 Answers  


How do I start the browser using WebDriver?

0 Answers  


Can you explain the framework which you have used in your selenium project?

0 Answers  


What are some advantages of selenium grid?

0 Answers  


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

0 Answers  






Categories