Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
>mvn test
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Maven Integration Tests
[INFO]    task-segment: [test]
[INFO] ----------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] No sources to compile
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Compiling 1 source file to E:\svn\Maven\maven-it-tests\test\artifact\target\test-classes
[INFO] [surefire:test]
[INFO] Surefire report directory: E:\svn\Maven\maven-it-tests\test\artifact\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running mypackage.MavenITmngXXXXDescriptionOfProblemTest
mngXXXXDescriptionOfProblem(testitMNGxxxx).. Ok
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 16.802 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25 seconds
[INFO] Finished at: Wed Aug 08 22:47:44 EDT 2007
[INFO] Final Memory: 4M/10M
[INFO] ------------------------------------------------------------------------


...

Submitting your IT

...

Test

Now that your IT is complete, create a zip, tgz or some other *normal* archive of your test and attach it 's time to integrate it to your Jira issue.

If you are a Maven committer, read the next section to see how to integrate your test into the core, or to apply someone else's test.

Integrating an IT into the core

...

-integration-tests

First, check out the core-integration-tests 

The sample project maps directly to the core-integration-tests structure. Assuming you have named your test the test has been named uniquely, you can copy the contents of src/test directly over to core-integration-tests (don't copy from the root or you'll overwrite the pom). 

...

Now add your test to the testSuite by adding a new line to "src\test\java\org\apache\maven\integrationtests\IntegrationTestSuite.java"

No Format
 suite suite.addTestSuite( MavenItmngXXXXDescriptionOfProblemTest.class );

...

Don't panic if some tests fail. That's probably normal. Only Panic if your test doesn't fail and it was supposed to (especially if you didn't write it).

Now add all those new files to svn (you can figure this one out on your own by now...you're an expert...and its late here) Create a patch from the root of core-integration-tests

...

and commit.