= TestNG
:page-aliases: TestNG_TestFramework.adoc


Provides support for https://testng.org[TestNG].

To use TestNG as test framework, you need to add it to the `TestModule.testFramework` property.

.`build.mill`
[source,scala]
----
package build
import mill.scalalib.*

object project extends ScalaModule {
  object test extends ScalaTests {
    def testFramework = "mill.testng.TestNGFramework"
    def mvnDeps = super.mvnDeps ++ Seq(
      mvn"com.lihaoyi:mill-contrib-testng:${mill.BuildInfo.millVersion}"
    )
  }
}
----

You can also use the more convenient `TestModule.TestNg` trait.

.`build.mill`
[source,scala]
----
package build
import mill.scalalib.*

object project extends ScalaModule {
  object test extends ScalaTests with TestModule.TestNg
}
----
