Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Best practices to run and analyze CDT JUnit tests?

Doing a mvn package will do the same thing as mvn install, except that it won't copy the generated JARs into your local maven repository. You can also do mvn test, if you just want to run the tests for a single one.

It is possible to generate a 'site' which then collates all the test runs in a single place, but I don't think one has been set up for CDT. Note that if any tests fail, unless the -DskipTests is given it will actually halt the build at the point of the test that failed.


On 18 Jan 2012, at 08:50, Raphael Zulliger wrote:

> Hi
> I'm playing around with running the CDT JUnit tests. I followed the instructions here in order to build CDT on a 64Bit Ubuntu 11.10 machine. Building (which includes running all tests) succeeded. I also figured out that a subsequent 'mvn install' does (among others) re-run the tests. Moreover, I found the test results, which are spread all over the filesystem:
>    ./codan/org.eclipse.cdt.codan.core.test/target/surefire-reports
>    ./xlc/org.eclipse.cdt.core.lrparser.xlc.tests/target/surefire-reports
>    ./core/org.eclipse.cdt.ui.tests/target/surefire-reports
>    ./core/org.eclipse.cdt.core.tests/target/surefire-reports
>    ./build/org.eclipse.cdt.managedbuilder.core.tests/target/surefire-reports
>    ./build/org.eclipse.cdt.managedbuilder.ui.tests/target/surefire-reports
>    ./lrparser/org.eclipse.cdt.core.lrparser.tests/target/surefire-reports
>    ./upc/org.eclipse.cdt.core.parser.upc.tests/target/surefire-reports
> My main question is: How do I best analyze these reports? Is there a (simple) way to get an overview of all tests similar what hudson offers (e.g. One of the main reasons for me to run these tests is to compare several runs with each other (after having applied patches) to verify that nothing got damaged. I guess that this is a common use case and therefore I ask myself how others perform this task? (just using a simple diff tool?!)
> Other questions would be:
> - Is 'mvn install' the best available option if I only want to run all unit tests? Or is there another command that simply executes all tests?
> - How do you deal with the huge output of maven/tycho? Is there some kind of tool that gets rid of 'unimportant information', or do you simply do a 'grep -v "[INFO]" or similar?
> Thanks
> Raphael
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx

Back to the top