How to skip a method or a code block in TestNG?

Back to Questions
A)

@Test(enabled = true)

B)

@Test(enabled = false)

C)

@Test(disabled = false)

D)

@Test(disabled = true)

E)

None of the above

 

Author Explanation :

If you want to skip a particular test method, then you can set the ‘enabled’ parameter in test annotation to false.

Answers Posted

PostedBy By: Shyam Prakash Pemmaraju, at 06:46 AM on 24-April-2019

Answer Posted: B

Explanation: its correct

Result: Correct

PostedBy By: Saikiran K, at 03:33 AM on 24-April-2019

Answer Posted:

Explanation: test disable false

Result: Wrong Answer

PostedBy By: vamshi, at 09:21 AM on 23-April-2019

Answer Posted: B

Explanation: B

Result: Correct

Back to Questions

© Copyright 1997 - 2019 | www.bestdotnettraining.com | www.deccansoft.com | All Rights Reserved.
 
Bestdotnet google plus
Enquiry Now



Input symbols