adoptium / adoptium/STF

Provide an ability to output what has happened during a passing test

Open
#61 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
10
Forks
42
Avg merge
3d 8h
Merged PRs (30d)
1

Description

During PD it can be very helpful to see what happens with a test when it passes, particularly when wanting to compare differing passing/failing between different JVMs, JDK levels etc ...
Currently, the framework only outputs from failing tests.

The following "hack" was utilised during such PD efforts with a load test recently ...

```
diff --git a/stf.load/src/stf.load/net/adoptopenjdk/loadTest/LoadTestRunner.java b/stf.load/src/stf.load/net/adoptopenjdk/loadTest/LoadTestRunner.java
index 6acc040..e46286c 100644
--- a/stf.load/src/stf.load/net/adoptopenjdk/loadTest/LoadTestRunner.java
+++ b/stf.load/src/stf.load/net/adoptopenjdk/loadTest/LoadTestRunner.java
@@ -201,6 +201,9 @@ class LoadTestRunner {
// Keep in-memory count of pass/fail result
if (testPassed) {
numberPassingTests.incrementAndGet();
+ originalSystemOut.println("BW PASSING TEST >");
+ originalSystemOut.println(new String(executionTracker.getCapturedOutput().toByteArray()));
+ originalSystemOut.println("< BW PASSING TEST");
} else {
// Produce java dumps for only the first test failure if flag for creating dump is set by user
long failureNum = numberFailingTests.incrementAndGet();
@@ -418,4 +421,4 @@ class LoadTestRunner {

return total;
}
-}
\ No newline at end of file
+}
```

This should be generalised, as necessary for non-load runner testing, and formalised so that it can be controlled through parameters or similar.

Contributor guide

Open the contributing guide

Research direction

Start with stf.load/src/stf.load/net/adoptopenjdk/loadTest/LoadTestRunner.java, especially the captured-output handling shown in the issue. Trace how other STF runners report failing tests and how runner parameters are defined, then determine the control for passing-test output. Done means passing output is formalized, configurable, and available beyond load-runner testing without changing default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.