https://github.com/rife2/bld-extensions-testing-helpers
Collection of Testing Helpers for bld Extensions
https://github.com/rife2/bld-extensions-testing-helpers
bld build build-system build-tool java junit testing testing-helper
Last synced: 3 months ago
JSON representation
Collection of Testing Helpers for bld Extensions
- Host: GitHub
- URL: https://github.com/rife2/bld-extensions-testing-helpers
- Owner: rife2
- License: apache-2.0
- Created: 2025-08-13T23:57:18.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2026-03-02T23:05:43.000Z (3 months ago)
- Last Synced: 2026-03-03T01:53:22.223Z (3 months ago)
- Topics: bld, build, build-system, build-tool, java, junit, testing, testing-helper
- Language: Java
- Homepage:
- Size: 534 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](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-extensions-testing-helpers)
[](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-extensions-testing-helpers)
[](https://github.com/rife2/bld-extensions-testing-helpers/actions/workflows/bld.yml)
# Testing Helpers for [bld Extensions](https://github.com/rife2/bld/wiki/Extensions)
This project provides a collection of testing helpers used by various
[bld extensions](https://github.com/rife2/bld/wiki/Extensions).
To use, include the following in your `bld` build file:
```java
repositories = List.of(RIFE2_SNAPSHOTS, RIFE2_RELEASES);
scope(test).include(
dependency("com.uwyn.rife2", "bld-extensions-testing-helpers", version(0, 9, 6, "SNAPSHOT"))
);
```
Please check the [documentation](https://rife2.github.io/bld-extensions-testing-helpers)
for more information.
## JUnit Annotations
The following annotations are provided:
| Annotation | Description |
|:------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------|
| [`CaptureOutput`](https://rife2.github.io/bld-extensions-testing-helpers/rife/bld/extension/testing/CaptureOutput.html) | Capture stdout and stderr output |
| [`CouldFail`](https://rife2.github.io/bld-extensions-testing-helpers/rife/bld/extension/testing/CouldFail.html) | Allows a test to fail |
| [`DisabledOnCi`](https://rife2.github.io/bld-extensions-testing-helpers/rife/bld/extension/testing/DisabledOnCi.html) | Disables a test when running in a CI/CD environment |
| [`EnabledOnCi`](https://rife2.github.io/bld-extensions-testing-helpers/rife/bld/extension/testing/EnabledOnCi.html) | Enables a test when running in a CI/CD environment |
| [`RandomRange`](https://rife2.github.io/bld-extensions-testing-helpers/rife/bld/extension/testing/RandomRange.html) | Generates a random integer within a specified range |
| [`RandomString`](https://rife2.github.io/bld-extensions-testing-helpers/rife/bld/extension/testing/RandomString.html) | Generates a random string |
| [`RetryTest`](https://rife2.github.io/bld-extensions-testing-helpers/rife/bld/extension/testing/RetryTest.html) | Retry test on failure |
## JUnit Extensions
The following extensions are provided:
| Extension | Description |
|:------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------|
| [`LoggingExtension`](https://rife2.github.io/bld-extensions-testing-helpers/rife/bld/extension/testing/LoggingExtension.html) | Configures console logging for test suites |
## Helpers
The following helper classes are provided:
| Helper | Description |
|:--------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------|
| [`TestLogHandler`](https://rife2.github.io/bld-extensions-testing-helpers/rife/bld/extension/testing/TestLogHandler.html) | A log handler that captures log messages |
## Utilities
The following static methods are provided:
| Utility | Description |
|:----------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------|
| [`generateRandomInt(int, int)`](https://rife2.github.io/bld-extensions-testing-helpers/rife/bld/extension/testing/TestingUtils.html#generateRandomInt(int,int)) | Generates a random integer |
| [`generateRandomString()`](https://rife2.github.io/bld-extensions-testing-helpers/rife/bld/extension/testing/TestingUtils.html#generateRandomString()) | Generates a random string |