com.github.automatedowl:testng-disabled-tests

Java library which allows to collect disabled TestNG tests in given TestNG project.

License

License

Categories

Categories

TestNG Unit Testing Auto Application Layer Libs Code Generators
GroupId

GroupId

com.github.automatedowl
ArtifactId

ArtifactId

testng-disabled-tests
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

com.github.automatedowl:testng-disabled-tests
Java library which allows to collect disabled TestNG tests in given TestNG project.
Project URL

Project URL

https://github.com/AutomatedOwl
Source Code Management

Source Code Management

https://github.com/AutomatedOwl/testng-disabled-tests

Download testng-disabled-tests

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.automatedowl/testng-disabled-tests/ -->
<dependency>
    <groupId>com.github.automatedowl</groupId>
    <artifactId>testng-disabled-tests</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.automatedowl/testng-disabled-tests/
implementation 'com.github.automatedowl:testng-disabled-tests:1.0.0'
// https://jarcasting.com/artifacts/com.github.automatedowl/testng-disabled-tests/
implementation ("com.github.automatedowl:testng-disabled-tests:1.0.0")
'com.github.automatedowl:testng-disabled-tests:jar:1.0.0'
<dependency org="com.github.automatedowl" name="testng-disabled-tests" rev="1.0.0">
  <artifact name="testng-disabled-tests" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.automatedowl', module='testng-disabled-tests', version='1.0.0')
)
libraryDependencies += "com.github.automatedowl" % "testng-disabled-tests" % "1.0.0"
[com.github.automatedowl/testng-disabled-tests "1.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.testng : testng jar 6.14.3

Project Modules

There are no modules declared in this project.

testng-disabled-tests

Java library which allows to collect disabled TestNG tests in given TestNG project, using simple annotation.

Example of common usage:

@Listeners(DisabledTestsListener.class)
public class InventoryTests {

    @Test
    @DisabledTestsCollector(testsPath = "/src/test/java")
    void getDisabledTest() {
        // This test would collect all disabled tests in TestNG project.
    }

    @Test
    void enabledTest() {
        Assert.assertTrue(true);
    }

    @Test(enabled = false)
    void firstDisabledTest() {
        Assert.assertTrue(true);
    }

    @Test(enabled = false)
    void secondDisabledTest() {
        Assert.assertTrue(true);
    }
}

Received output

Jul 14, 2018 11:57:28 AM com.github.automatedowl.tools.DisabledTestsListener afterInvocation
INFO: You have 2 disabled TestNG tests in your project.
Jul 14, 2018 11:57:28 AM com.github.automatedowl.tools.DisabledTestsListener afterInvocation
INFO: ---------------------------------------------
Jul 14, 2018 11:57:28 AM com.github.automatedowl.tools.DisabledTestsListener lambda$afterInvocation$0
INFO:  firstDisabledTest is a TestNG test which currently disabled.
Jul 14, 2018 11:57:28 AM com.github.automatedowl.tools.DisabledTestsListener lambda$afterInvocation$0
INFO: ---------------------------------------------
Jul 14, 2018 11:57:28 AM com.github.automatedowl.tools.DisabledTestsListener lambda$afterInvocation$0
INFO:  secondDisabledTest is a TestNG test which currently disabled.
Jul 14, 2018 11:57:28 AM com.github.automatedowl.tools.DisabledTestsListener lambda$afterInvocation$0
INFO: ---------------------------------------------

Annotation values

DisabledTestsCollector annotation has just one String value, 'testsPath'. You would have to locate your tests classes and define it as 'testPath' value, in order to direct the collector to the java test classes files. The trivial path in java project would be '/src/test/java', but you may adjust it for your needs. You would not have to write any code in the test itself. The listener would parse your tests path and do the job of collecting your disabled tests.

    @Test
    @DisabledTestsCollector(testsPath = "/src/test/java")
    void getDisabledTest() {
        // This test would collect all disabled tests in TestNG project.
    }

Maven dependencies

    <dependency>
        <groupId>com.github.automatedowl</groupId>
        <artifactId>testng-disabled-tests</artifactId>
        <version>1.0.0</version>
    </dependency>

Versions

Version
1.0.0