Send output from tests to Jenkins (console out), is it possible?

724 views
Skip to first unread message

Flavio Campana

unread,
Dec 23, 2016, 1:53:36 PM12/23/16
to NUnit-Discuss
Hi,
I'm running some test with Jenkins, and using a script to run the compiled test dll (something simple like this nunit3-console.exe %WORKSPACE%\%JOB_BASE_NAME%\bin\Debug\%JOB_BASE_NAME%.dll -v --result=TestResult.xml;format=nunit2 --result=NTestResult.xml;format=nunit3 --out=%WORKSPACE%\TestResult.xml --params=%testParams%).
I'm trying to output some text to console out so i can better follow execution in jenkins, but this:
Console.Out.WriteLine("Console.Out.WriteLine");
System.Diagnostics.Trace.WriteLine("System.Diagnostics.Trace.WriteLine");
System.Diagnostics.Debug.WriteLine("System.Diagnostics.Debug.WriteLine");

is not showing up at all in jenkins console out.

Is this even possible?
What should i do?

Thanks

Charlie Poole

unread,
Dec 23, 2016, 2:03:17 PM12/23/16
to NUnit-Discuss
Your command-line option --out is sending the text to TestResult.xml.
This is problematic, since it's not xml, but text. However, the file
name is the same name used for your nunit2 format report, so when that
xml report is produced at the end of the run any prior content of the
file is removed.

I don't know how jenkins works. Does it normally intercept the console
output or does it look for it in some particular file?
Obviously, we have to make the output go wherever jenkins wants it to be.

Charlie
> --
> You received this message because you are subscribed to the Google Groups
> "NUnit-Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nunit-discus...@googlegroups.com.
> To post to this group, send email to nunit-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/nunit-discuss.
> For more options, visit https://groups.google.com/d/optout.

Flavio Campana

unread,
Dec 28, 2016, 3:38:06 AM12/28/16
to NUnit-Discuss
Jenkins nromally intercept console output, removing the --out switch solved.
Many thanks, i didn't notice that wrong switch
Reply all
Reply to author
Forward
0 new messages