In my script I have added "TestResult => Test description => Pass" and "TestResult => Test Description => Fail" as per the need. As part of the post build , the lines start with TestResult and contains => should be displayed. I added post build groovy script but the result is not showing post build output.
Below is my sample execute shell
below is my post build groovy script
But in the result ,I am not seeing groovy file post build output at all
What am I missing?
CodePudding user response:
This is indeed a bit tricky to find, but if you check out the last example in the Official Documentation of the Groovy Post Build plugin you will find it:
Example 10 (thanks to Frank Merrow).
Trivial, but hard to find the first time: Write a line to the job's Console > Output:
manager.listener.logger.println("I want to see this line in my job's output");
So just change your println
statements to manager.listener.logger.println
:
def result = ...
manager.listener.logger.println(result.toString());
manager.listener.logger.println("Sample Groovy Line");