<https://lh4.googleusercontent.com/-nMXLBcUj92A/UsXQYKY-xbI/AAAAAAAAABE/ZyHuhbKjdZs/s1600/plot1.png>
Thank you, Kevin!! That's the reason! It's because I always used a static
xml containing a hard coded failure.
And I got the plot working (See the attached screen shot). Though it's not
a pie chart I want, it still serves my purpose.
Now I have some follow-up questions:
1) As it's shown in the attached screen shot, there were two passes & one
fail. Is there a way to display it as 67% passed and 33% failed, instead?
The xml file I am using now is list below:
<testsuite tests="4">
<testcase classname="foo" name="ASuccessfulTest"/>
<testcase classname="foo" name="AnotherSuccessfulTest"/>
<testcase classname="foo" name="AFailingTest">
<failure type="NotEnoughFoo"> <a href="log.html">details about
failure</a></failure>
</testcase>
</testsuite>
2) What is the appropriate way to the failed log file in the link, e.g.
<failure type="NotEnoughFoo"> <a href="log.html">details about
failure</a></failure>?
3) How to construct the xml file to include skipped tests, if any?
Thanks.
On Thursday, January 2, 2014 2:53:43 PM UTC-5, Kevin Fleming wrote:
>
> The status of the job (stable/unstable/failed) is based on the contents of
> the test result file, not the exit status of your script. If any of the
> test results you emit in the file don't indicate 'success', then Jenkins
> will consider the job unstable (which means the build was successful, but
> one or more tests failed).
>
> ----- Original Message -----
> From: [email protected] <javascript:>
> To: [email protected] <javascript:>
> At: Jan 2 2014 14:51:36
>
> Below is my piece of perl code. I made it always exit gracefully.
>
> Line numbers are also included here. Could you please tell me which
> line(s) would cause a test result failure?
>
> Thanks.
>
>
> 1 #!/usr/bin/perl
> 2
> 3 use strict;
> 4 use warnings;
> 5 use File::Path;
> 6 use File::Copy;
> 7 use FindBin '$Bin';
> 8
> 9 my $org_rslt = "$Bin/TEST-results.xml.org"; *# a predefined static
> xml file*
> 10 my $rslt = "$Bin/TEST-results.xml";
> 11 rmtree($rslt) if(-e $rslt);
> 12
> 13 if(-e $org_rslt) {
> 14 if(!copy($org_rslt, $rslt)) { *# To create a fresh xml file*
> 15 print "Failed to copy '$org_rslt' to '$rslt'!\n";
> 16 }
> 17 }
> 18 else {
> 19 print "===--->>>The original result file '$org_rslt' does not
> exist!!\n";
> 20 }
> 21
> 22 if(-e $rslt) {
> 23 print "The NEW result file '$rslt' exists!\n";
> 24 }
> 25 else {
> 26 print "===--->>>The NEW result file '$rslt' does not exists!\n";
> 27 }
> 28 exit 0; *# always exit gracefully no matter what*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.