Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] No surefire report if I have test failures

Hi Lars,

I have a couple of places that I need to do that outside of Jenkins and I use a similar grep to you:

grep -e "Failures: [^0]" -e "Errors: [^0]" */target/surefire-reports/*.txt

The way Jenkins marks builds as unstable is that the JUnit plugin does simply look for failures in the XML files and marking the build as unstable.

I do not know of a way to do it within maven strictly - but I imagine you could code something in a pom file to run a command at the end of the build to do a grep like above.

HTH,
Jonah



On Mon., May 18, 2020, 10:14 Lars Vogel, <lars.vogel@xxxxxxxxxxx> wrote:
Hi Jonah,

Thank you for the answer.

I still want the build to fail (think in terms of Gerrit) but would
like to have a nice way to see the failing test. So far I have to grep
for Errors: (?!0) in *.txt files.

If someone knows a way to create the HTML test report AND fail the
build, please let me know.

Best regards, Lars


On Fri, May 15, 2020 at 5:06 PM Jonah Graham <jonah@xxxxxxxxxxxxxxxx> wrote:
>
> Hi Lars,
>
> My guess is adding
>
> -Dmaven.test.failure.ignore=true
>
> Will solve your problem. This means that maven will say success for the build. It also means you don't need -fae
>
> HTH,
> Jonah
>
> On Fri., May 15, 2020, 11:01 Lars Vogel, <lars.vogel@xxxxxxxxxxx> wrote:
>>
>> Hi,
>>
>> If I run with Tycho with the following command I get html test reports
>> generated in the target/site/surefire-report.html if the build is
>> successful and has no test failures.
>>
>> mvn clean verify surefire-report:report -fae
>>
>> But this only works if there are no test failures. If I have a test
>> failure the surefire-report.html file is not generated.
>>
>> Can I still generate these reports even if I have a test failure or a
>> combine error for all test plug-ins?
>>
>> I find it surprising that the aggregated report is not generated, when
>> it is most useful (test errors exist).
>>
>> Best regards, Lars
>>
>> --
>> Eclipse Platform project co-lead
>> CEO vogella GmbH
>>
>> Haindaalwisch 17a, 22395 Hamburg
>> Amtsgericht Hamburg: HRB 127058
>> Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
>> USt-IdNr.: DE284122352
>> Fax (040) 5247 6322, Email: lars.vogel@xxxxxxxxxxx, Web: http://www.vogella.com
>> _______________________________________________
>> tycho-user mailing list
>> tycho-user@xxxxxxxxxxx
>> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tycho-user
>
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tycho-user



--
Eclipse Platform project co-lead
CEO vogella GmbH

Haindaalwisch 17a, 22395 Hamburg
Amtsgericht Hamburg: HRB 127058
Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
USt-IdNr.: DE284122352
Fax (040) 5247 6322, Email: lars.vogel@xxxxxxxxxxx, Web: http://www.vogella.com
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tycho-user

Back to the top