Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ben-walsh opened this issue Apr 9, 2019 · 0 comments
Open

Comments

@ben-walsh
Copy link

ben-walsh commented Apr 9, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants