Web Automation Using Selenium
  • About The Book
  • Selenium
    • Introduction
      • What is testing and why?
      • What is Selenium and Why?
    • Getting Started
      • Audience
      • Prerequisite
      • Set up
      • Getting Started - Hello World..!!
      • What are drivers
    • Locators
      • CSS Selectors
      • XPath Selector
    • WebDriver
      • WebDriver Methods
      • WebDriver Types
    • WebElement(s)
      • WebElement Methods
      • Looping Through WebElements
    • Waits In Selenium
  • TestNG
    • Introduction
    • TestNG Setup
    • First Test Script
    • Some of the features of TestNG
    • TestNG Annotations
      • @Test
      • @DataProvider
  • Maven
    • Introduction
  • Framework Development
    • Introduction
    • Building Framework
      • Technology Stack
      • Page Object Model (POM)
      • Setup
      • What our framework contain
      • Packages
        • Context
        • Factory
        • Listeners
        • Pages
      • Creating first automation test
  • Common Interview Questions
    • Selenium-Related
Powered by GitBook
On this page
  • Some of the features of TestNG
  • 1. Ability to enable or disable a test method:

Was this helpful?

  1. TestNG

Some of the features of TestNG

Some of the features of TestNG

1. Ability to enable or disable a test method:

We can manually set disable a particular test method or all the test methods in a class by providing a parameter to @Test annotation

Example:

//To disable all test methods in a class
@Ignore
public class FirstTest { ...
@Test(enabled = false)
	public void ignoredTestCase(String name) { ...

PreviousFirst Test ScriptNextTestNG Annotations

Last updated 2 years ago

Was this helpful?