Selenium QA

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

Which of the following is not a valid TestNG annotation?

1. @Parameters
2. @BeforeSuite
3. @AfterSuite
4. @DataSource

Ans : 4

TestNG has a more elegant way of handling parameterized tests with the data-
provider concept. Is it true or false?

1. true
2. false

Ans : 1

Which of the following features TestNG doesn�t support?

1. None
2. Support for parameters.
3. Supports dependent methods testing.
4. Supports powerful execution model.

Ans :1

Which is not a valid setUp/tearDown level in TestNG framework?

1. @Before/AfterGroup
2. @Before/AfterClass
3. @Before/AfterTest
4. @Before/AfterSuite

Ans :2

TestNG framework allows us to generate test reports in both HTML and XML
formats. Is it true or false?

1. false
2. true

Ans :2

TestNG doesn�t make it mandatory to declare @BeforeClass and @AfterClass, which


is present in JUnit. Is it true or false?

1. false
2. true

Ans :2

Parallel execution of Selenium test cases is possible in TestNG. Is it true or


false?

1. false
2. true

Ans :2

What is the correct way to exclude a test in TestNG?

1. Using @Test(exclude = true) annotation.


2. Using @Test(include = false) annotation.
3. None
4. Using @Test(enabled = false) annotation.

Ans :4

Which of the following statements is false in the context of TestNG framework?

1. The @DataProvider annotation accepts single string attribute and yields back
an array of objects.
2. TestNG doesn't need to extend any class whereas JUnit does.
3. None
4. TestNG permits to define the dependent test cases. Each test case is
independent of other test cases.

Ans :3

Which of the following statements is correctly defining the Time-out test in


TestNG?

1. None
2. It's the time duration to wait for a test to finish its execution.
3. It's the time duration to wait for a test suite to finish its execution.
4. It's the time duration to wait for a test group to finish its execution.

Ans :2

https://www.guru99.com/automation-testing-interview-questions.html

You might also like