If you're using the Maven project type, it publishes the test results 
automatically, so there's nothing else to configure. If you're using a 
freestyle project, all you need to do is check the appropriate publish test 
report post-build action, and it will automatically downgrade a successful 
build to unstable if there are test failures in the test files. (My 
experience is with the built in "Publish JUnit Test Report", but I believe 
the xUnit plugin works the same way.)

It's all about the format of the test results. There are many many plugins 
that can parse different test result formats, so hopefully one would work 
for you. The xUnit plugin is handy if your test format can be transformed 
into Junit format; you'd just need to supply an XSL stylesheet that 
describes the transformation rules.

  -- Dean

On Monday, May 6, 2013 10:41:15 AM UTC-7, Rob Campbell wrote:
>
> Aha. Thank you, Dean. That's a good first step. I can add some Maven 
> configuration and change my test runner to return zero as needed. And then 
> to indicate to Jenkins that I want to downgrade the build from successful 
> to unstable? I'll look into outputting test results in a format consumable 
> by the xUnit plugin, but is there another hook I could use?
>
> On Monday, May 6, 2013 1:19:45 PM UTC-4, Dean Yu wrote:
>>
>> Hi Rob,
>>   Usually, build steps that return with a non-zero exit code is what 
>> marks a build as failed. Test reporters, like the built in Junit reporter, 
>> can downgrade a build from successful to unstable if it discovers failed 
>> tests in the test results. It sounds like the maven-nar-plugin might be 
>> returning a non-zero result on test failures.
>>
>>   -- Dean
>>
>>
>> On Monday, May 6, 2013 8:24:16 AM UTC-7, Rob Campbell wrote:
>>>
>>> I'm attempting to use Jenkins for CI of a C++ project which is built 
>>> using the maven-nar-plugin. I'd like to know how I could better integrate 
>>> the nar-plugin with Jenkins so that failed tests do not cause a broken 
>>> build, but instead cause an unstable build, as with JUnit tests for Java. 
>>> The nar plugin has its own test execution goal and doesn't use the surefire 
>>> plugin.
>>>
>>> Any ideas where I would start? Will I need to create a Jenkins plugin? 
>>> or use an existing Jenkins plugin? or modify the maven-nar-plugin?
>>>
>>> Much appreciated,
>>> Rob
>>
>>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to