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?

Not sure whether I correctly understand your hint regarding 'mvn test', but if I perform that command on the root of the CDT tree (e.g. ~/git/cdt-releng/org.eclipse.cdt) it seems that the tests are *not* being executed. I assume they're not executed because of the following reasons:
 - No surefire-reports dirs are created
 - The stdout does not mention anything about tests
But maybe the tests actually did run and I'm just expecting the wrong thing?!

Here's the cut version of the output of 'svn test' (after having run 'mvn install' before):

--- snip ---
[INFO] ------------------------------------------------------------------------
[INFO] Building org.eclipse.cdt.managedbuilder.core.tests 8.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------ [INFO] --- tycho-packaging-plugin:0.13.0:build-qualifier (default-build-qualifier) @ org.eclipse.cdt.managedbuilder.core.tests --- [INFO] --- tycho-packaging-plugin:0.13.0:validate-id (default-validate-id) @ org.eclipse.cdt.managedbuilder.core.tests --- [INFO] --- tycho-packaging-plugin:0.13.0:validate-version (default-validate-version) @ org.eclipse.cdt.managedbuilder.core.tests --- [INFO] --- maven-resources-plugin:2.4.1:resources (default-resources) @ org.eclipse.cdt.managedbuilder.core.tests ---
[INFO] Using 'ISO-8859-1' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/raphael/projects/git/cdt-releng/org.eclipse.cdt/build/org.eclipse.cdt.managedbuilder.core.tests/src/main/resources [INFO] --- tycho-compiler-plugin:0.13.0:compile (default-compile) @ org.eclipse.cdt.managedbuilder.core.tests ---
[INFO] Using compile source roots from build.properties
[INFO] Nothing to compile - all classes are up to date
[INFO] --- maven-resources-plugin:2.4.1:testResources (default-testResources) @ org.eclipse.cdt.managedbuilder.core.tests ---
[INFO] Using 'ISO-8859-1' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/raphael/projects/git/cdt-releng/org.eclipse.cdt/build/org.eclipse.cdt.managedbuilder.core.tests/src/test/resources [INFO] --- tycho-compiler-plugin:0.13.0:testCompile (default-testCompile) @ org.eclipse.cdt.managedbuilder.core.tests ---
[INFO] Using compile source roots from build.properties
[INFO] Nothing to compile - all classes are up to date
[INFO] ------------------------------------------------------------------------
[INFO] Building org.eclipse.cdt.managedbuilder.ui.tests 8.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
--- snip ---
[INFO] Reactor Summary:
[INFO]
[INFO] CDT Parent ........................................ SUCCESS [0.024s]
[INFO] org.eclipse.cdt ................................... SUCCESS [0.463s]
[INFO] org.eclipse.cdt.core .............................. SUCCESS [0.339s]
[INFO] org.eclipse.cdt.core.linux ........................ SUCCESS [0.016s]
--- snip ---
[INFO] org.eclipse.cdt.codan.core.test ................... SUCCESS [0.034s]
[INFO] org.eclipse.cdt.repo .............................. SUCCESS [0.100s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3:55.896s
[INFO] Finished at: Wed Jan 18 11:28:23 CET 2012
[INFO] Final Memory: 80M/337M
[INFO] ------------------------------------------------------------------------


On 18.01.2012 10:54, Alex Blewitt wrote:
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.

Alex

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 http://wiki.eclipse.org/CDT/release_engineering 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. https://hudson.eclipse.org/hudson/job/cdt-nightly/934/testReport/)? 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
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev




Back to the top