Skip to content

Commit bb2246a

Browse files
Updated junit README.md
I have read the CLA Document and I hereby sign the CLA
1 parent 517f28b commit bb2246a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

examples/junit/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# **JUnit Test Evidence Example**
22

3-
This repository provides a working example of a GitHub Actions workflow that automates Java Maven project testing using **JUnit**. It then attaches the resulting test report as signed, verifiable evidence to the package in **JFrog Artifactory**.
3+
This repository provides a working example of a GitHub Actions workflow that automates the testing of a Java Maven project using JUnit. It then attaches the resulting consolidated test report as signed, verifiable evidence to the build information in JFrog Artifactory.
44

5-
This workflow is an essential pattern for DevSecOps, creating a traceable, compliant, and secure software supply chain with comprehensive test coverage validation.
5+
This workflow creates an essential quality gate,
66

77
### **Key Features**
88

@@ -117,6 +117,7 @@ Once the workflow completes successfully, you can navigate to your repository in
117117
* **Build and Deploy Maven Package:**
118118

119119
```bash
120+
The workflow compiles and packages the Java application using Maven. It then uploads the resulting `.jar` file directly to Artifactory using the JFrog CLI and publishes the associated build information.
120121
cd examples/junit/src
121122
mvn clean compile
122123
mvn deploy -DaltDeploymentRepository=artifactory::default::$REGISTRY_DOMAIN/$REPO_NAME
@@ -130,6 +131,7 @@ mvn test
130131
```
131132

132133
* **Generate Test Reports:**
134+
The workflow executes the standard Maven test lifecycle. The Surefire plugin runs all JUnit tests and generates XML reports. Additional Maven commands are run to create a user-friendly HTML site with the test results.
133135

134136
```bash
135137
cd examples/junit/src
@@ -138,6 +140,7 @@ mvn site:site
138140
```
139141

140142
* **Consolidate Test Results:**
143+
The XML reports generated by Maven are not ideal for evidence. This step runs custom shell scripts to merge all individual XML test reports into one, and then converts that consolidated report into a single `consolidated-test-report.json` file.
141144

142145
```bash
143146
cd examples/junit/src
@@ -153,6 +156,7 @@ python ../junit_json_to_markdown_helper.py target/consolidated-test-report.json
153156
```
154157

155158
* **Attach Evidence:**
159+
This final step uses `jf evd create --build-name` to attach the consolidated JSON test report to the **build information** that was published in the first step. This creates a verifiable link between the CI process and its resulting test quality.
156160

157161
```bash
158162
jf evd create \
@@ -199,4 +203,4 @@ The workflow generates a consolidated JSON test report with the following struct
199203
* [JUnit 5 Documentation](https://junit.org/junit5/docs/current/user-guide/)
200204
* [Maven Surefire Plugin](https://maven.apache.org/surefire/maven-surefire-plugin/)
201205
* [JFrog Evidence Management](https://jfrog.com/help/r/jfrog-artifactory-documentation/evidence-management)
202-
* [JFrog CLI Documentation](https://jfrog.com/getcli/)
206+
* [JFrog CLI Documentation](https://jfrog.com/getcli/)

0 commit comments

Comments
 (0)