Added support for JaCoCo extension. Closes #2
This commit is contained in:
parent
63635f408b
commit
4d4479bf23
6 changed files with 36 additions and 36 deletions
29
README.md
29
README.md
|
@ -1,6 +1,5 @@
|
|||
# [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)
|
||||
|
@ -13,29 +12,11 @@ To install, please refer to the [extensions documentation](https://github.com/ri
|
|||
To run the tests with TestNG, add the following to your build file:
|
||||
|
||||
```java
|
||||
@BuildCommand(summary = "Tests the project with TestNG")
|
||||
public void testng() throws Exception {
|
||||
new TestNgOperation()
|
||||
.fromProject(this)
|
||||
.packages("com.example")
|
||||
.execute();
|
||||
}
|
||||
```
|
||||
|
||||
```console
|
||||
./bld compile testng
|
||||
```
|
||||
|
||||
You could also override the default `test` command:
|
||||
|
||||
```java
|
||||
@BuildCommand(summary = "Tests the project with TestNG")
|
||||
public void test throws Exception {
|
||||
new TestNgOperation()
|
||||
.fromProject(this)
|
||||
.suites("src/test/resources/testng.xml")
|
||||
.verbose(2)
|
||||
.execute();
|
||||
@Override
|
||||
public TestOperation<?, ?> testOperation() {
|
||||
return new TestNgOperation()
|
||||
.fromProject(this)
|
||||
.packages("com.example");
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue