Home All courses
Online TrainingContact UsAbout Us
Over lay
Table of Contents

TestNG Tutorial

Introduction to TestNG Configuration and set up of TestNG project Simple TestNG project in IntelliJ IDEA TestNG annotations Assertions in TestNG Difference between assertEquals and assertSame Ignoring the tests in TestNG Grouping the tests timeOut tests in TestNG Exception tests in TestNG dependsOnMethods dependsOnGroups Hard and Soft dependencies Passing parameters using XML file Passing parameters using Data providers Dynamic Data Providers group-by-instances attribute in TestNG XML suite file Test priorities in TestNG invocationCount in TestNG Executing Selenium tests using TestNG Executing TestNG tests using main method Executing JUnit tests from within TestNG Running tests in Parallel in TestNG Executing only failed tests in TestNG TestNG integration with Maven TestNG integration with Gradle Reporter class in TestNG TestNG Reports Execution Listener Test Listener Comparison between JUnit and TestNG

Ignoring the tests in testng

We can ignore the tests using parameter enabled = false in @Test annotation as shown in below example. The tests that have the parameter enabled = false would not be executed by TestNG.
 
package org.softpost;

import org.testng.annotations.Test;

/**
 * Created by Sagar on 25-06-2016.
 */
public class IgnoreTests {

    @Test(enabled = false)
    public void test1(){
        System.out.println("This test will not be executed as it is disabled");
    }
} 

Web development and Automation testing

solutions delivered!!

Logo
Courses
  • Automation Testing
About
  • About Me
Social Media
Copyright 2024 @ www.softpost.org