How do you Skip Test Case from execution?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
What do you know about Selenium IDE?
What types of cases can be automated with Selenium?
How to do drag and drop in selenium?
Write the code to right click an element in selenium?
List some of the programming languages that are strongly supported by selenium webdriver.
Explain me how to execute javascript in selenium?
Tell us what selenium components do you know?
How is assert command different from verify command?
Using web driver how you can store a value which is text box?
Tell us how can you run selenium server other than the default port 4444?
To generate pdf reports mention what java api is required?
What’s selenese?