-
Patch
-
Resolution: Fixed
-
Major
-
None
-
maven2 + flexmojos > 3.5.0 + flex unit testing libraries
When running flex related test cases in a maven2 build hudson will not retrieve the test results because it will only listen to surefire:test mojo. Flexmojos will behave similarly with surefire:test (put the results to target/surefire-results folder in the proper format) but Hudson will not pick the results after a build.
One fix is to unconditionally run surefire:test on the project but in this way when the build fails the surefire:test mojos will not be run and the tests will not be picked up.
This patch fixed the list of mojos observed by hudson for a maven build to treat flexmojos-maven-plugin:test-run mojo the same way it will treat a surefire:test mojo execution.
The behaviour is the expected one:
on a successfull build the test results are picked
on a failed build the test results are picked too.
- is duplicated by
-
JENKINS-2367 JUnit style reports from FlexUnit not aggregated
-
- Resolved
-
- is related to
-
JENKINS-31258 Jenkins Maven plug-in ignores JUnit-format test results from unknown Maven plug-ins
-
- Resolved
-
[JENKINS-6893] Fix flexmojos testing results reporting when running a maven2 build for flex projects
Attachment | New: enable_test_results_collection_from_flexmojos_testing.patch [ 19552 ] | |
Description |
Original:
Index: src/main/java/hudson/maven/reporters/SurefireArchiver.java =================================================================== --- src/main/java/hudson/maven/reporters/SurefireArchiver.java (revision 32408) +++ src/main/java/hudson/maven/reporters/SurefireArchiver.java (working copy) @@ -135,6 +135,7 @@ private boolean isSurefireTest(MojoInfo mojo) { if ((!mojo.is("com.sun.maven", "maven-junit-plugin", "test")) + && (!mojo.is("org.sonatype.flexmojos", "flexmojos-maven-plugin", "test-run")) && (!mojo.is("org.apache.maven.plugins", "maven-surefire-plugin", "test"))) return false; @@ -168,6 +169,13 @@ return false; } } + else if (mojo.is("org.sonatype.flexmojos", "flexmojos-maven-plugin", "test-run")) { + Boolean skipTests = mojo.getConfigurationValue("skipTest", Boolean.class); + + if (((skipTests != null) && (skipTests))) { + return false; + } + } } catch (ComponentConfigurationException e) { return false; |
New:
When running flex related test cases in a maven2 build hudson will not retrieve the test results because it will only listen to surefire:test mojo. Flexmojos will behave similarly with surefire:test (put the results to target/surefire-results folder in the proper format) but Hudson will not pick the results after a build. One fix is to unconditionally run surefire:test on the project but in this way when the build fails the surefire:test mojos will not be run and the tests will not be picked up. This patch fixed the list of mojos obeserved by hudson for a maven build to treat flexmojos-maven-plugin:test-run mojo the same way it will treat a surefire:test mojo execution. The behaviour is the expected one: on a successfull build the test results are picked on a failed build the test results are picked too. |
Description |
Original:
When running flex related test cases in a maven2 build hudson will not retrieve the test results because it will only listen to surefire:test mojo. Flexmojos will behave similarly with surefire:test (put the results to target/surefire-results folder in the proper format) but Hudson will not pick the results after a build. One fix is to unconditionally run surefire:test on the project but in this way when the build fails the surefire:test mojos will not be run and the tests will not be picked up. This patch fixed the list of mojos obeserved by hudson for a maven build to treat flexmojos-maven-plugin:test-run mojo the same way it will treat a surefire:test mojo execution. The behaviour is the expected one: on a successfull build the test results are picked on a failed build the test results are picked too. |
New:
When running flex related test cases in a maven2 build hudson will not retrieve the test results because it will only listen to surefire:test mojo. Flexmojos will behave similarly with surefire:test (put the results to target/surefire-results folder in the proper format) but Hudson will not pick the results after a build. One fix is to unconditionally run surefire:test on the project but in this way when the build fails the surefire:test mojos will not be run and the tests will not be picked up. This patch fixed the list of mojos observed by hudson for a maven build to treat flexmojos-maven-plugin:test-run mojo the same way it will treat a surefire:test mojo execution. The behaviour is the expected one: on a successfull build the test results are picked on a failed build the test results are picked too. |
Component/s | New: core [ 15593 ] |
Assignee | New: mtoader [ mtoader ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Link |
New:
This issue is duplicated by |
Component/s | New: maven-plugin [ 16033 ] | |
Component/s | Original: maven2 [ 15487 ] |
Link |
New:
This issue is related to |
Workflow | Original: JNJira [ 136989 ] | New: JNJira + In-Review [ 187337 ] |