Versions Compared

Key

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

Naming your Test

In the past, tests were numbered sequentially (it001,it002, etc). This becomes problematic because it's not always obvious what the issue is related to the test. More importantly, it's hard to create and submit sequential tests via patches because non-committers have no way to reserve the next number. This leads to extra work to apply the patch.

 New tests should be named using the Jira Issue id along with a meaningful name. This name should typically be the subject of the issue or a subset. It should be informative of the issue but not excessively long. Therefore a good name would be: mng1234-groupIdOrderIsBackwards.

This name is typically used in several places of the test: the folder in core-integration-tests/src/test/resources/ that contains the sample project along with the name of the junit class used to invoke the sample project and check the results.

Sample IT Project

A sample project has been created to aid in IT test creation. It can be retrieved using svn hereor viewed with your browser here.

This project has also been converted into an archetype to make it even easier to use. (NOTE: This is currently not deployed -Brianf 8/8/07)

 Using ArchetypeNG To create a sample from the archetype

The maven-archetypeng-plugin is currently a snapshot. You will need to add the snapshot repository to your settings to be able to retreive the plugin and the archetype (when it gets deployed).

No Format

<settings>
...
  <profiles>
    <profile>
       <id>maven-snapshots</id> 
       <repositories> 
         <repository>
           <id>Maven Snapshots</id>
	   <url>http://people.apache.org/repo/m2-snapshot-repository</url>
	   <snapshots>
	     <enabled>true</enabled>
	   </snapshots>
	   <releases>
	     <enabled>false</enabled>
            </releases>
	</repository>
      <repositories> 
    <profile> 
  <profiles> 
  <activeProfiles> 
     <activeProfile>maven-snapshots</activeProfile>
   </activeProfiles> 
</settings> 

Finding the next IT number (We should probably just start using the Issue ID and an issue must be created for the IT)

Selecting a meaningful name

Linking with the correct Issue ID (if we use the issue id to start with then we don't have this problem)

...

How you should execute for integration test to validate

...