https://github.com/rife2/bld-testng
bld Extension for Running Tests with TestNG
https://github.com/rife2/bld-testng
bld build-system build-tool build-tool-plugin extension testing testng
Last synced: 4 months ago
JSON representation
bld Extension for Running Tests with TestNG
- Host: GitHub
- URL: https://github.com/rife2/bld-testng
- Owner: rife2
- License: apache-2.0
- Created: 2023-08-15T01:07:29.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2026-01-30T23:04:06.000Z (4 months ago)
- Last Synced: 2026-01-30T23:33:12.590Z (4 months ago)
- Topics: bld, build-system, build-tool, build-tool-plugin, extension, testing, testng
- Language: Java
- Homepage:
- Size: 593 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# [bld](https://rife2.com/bld) Extension to Run Tests with [TestNG](https://testng.org/)
[](https://opensource.org/licenses/Apache-2.0)
[](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
[](https://rife2.com/bld)
[](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-testng)
[](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-testng)
[](https://github.com/rife2/bld-testng/actions/workflows/bld.yml)
To install the latest version, add the following to the `lib/bld/bld-wrapper.properties` file:
```properties
bld.extension-testng=com.uwyn.rife2:bld-testng
```
For more information, please refer to the [extensions](https://github.com/rife2/bld/wiki/Extensions) documentation.
## Test with TestNG
To run the tests with TestNG, add the following to your build file:
```java
@Override
public TestOperation, ?> testOperation() {
return new TestNgOperation()
.fromProject(this)
.packages("com.example");
}
```
```console
./bld compile test
./bld compile test -testclass=com.example.Test,com.sample.Test
./bld compile test -methods=com.example.Test.foo,com.example.Test.bar
./bld compile test -testnames=Test1,Test2
./bld compile test -groups=group1,group2
./bld compile test -excludegroups=group1,group3
```
- [View Examples Project](https://github.com/rife2/bld-testng/tree/master/examples)
Please check the [TestNgOperation documentation](https://rife2.github.io/bld-testng/rife/bld/extension/TestNgOperation.html#method-summary) for all available configuration options.
### TestNG Dependency
Don't forget to add a TestNG `test` dependency to your build file, as it is not provided by the extension. For example:
```java
repositories = List.of(MAVEN_CENTRAL);
scope(test).include(dependency("org.testng", "testng", version(7, 12, 0)));
```