Download

Current Release Version

Maven

<dependency>
    <groupId>org.testng</groupId>
    <artifactId>testng</artifactId>
    <version>7.9.0</version>
    <scope>test</scope>
</dependency>

Gradle

dependencies {
    testCompile 'org.testng:testng:7.9.0'
}

Snapshots

TestNG automatically uploads snapshots to Sonatype which you can access by adding the following repository:

repositories {
    maven {
        url 'https://oss.sonatype.org/content/repositories/snapshots'
    }
}

Eclipse plug-in

Build TestNG from source code

TestNG is also hosted on GitHub, where you can download the source and build the distribution yourself:

$ git clone git://github.com/testng-team/testng.git
$ cd testng
$ ./gradlew build

You will then find the jar file in the testng/build/libs directory

Some useful tasks:

  • ./gradlew tasks - to see what all tasks are available

  • ./gradlew test - to kick off the tests (incremental build)

  • ./gradlew clean test - if you want to have a clean build.

  • ./gradlew autostyleApply - Applies code formatting steps to sourcecode in-place.

  • ./gradlew autostyleCheck - Checks that sourcecode satisfies formatting steps.

  • ./gradlew check - Runs the below checks:

    • "Applies code formatting steps to sourcecode in-place." and

    • "Checks that sourcecode satisfies formatting steps.".

Build the TestNG Eclipse Plugin from source code

TestNG Eclipse Plugin is hosted on GitHub, you can download the source code and build by ourselves.