Cargo : Adding a Samples Test
This page last changed on Feb 13, 2009 by adriancole.
updating samples test cases. 1. find the test case you wish to copy. copy recursively resources/testdata/<you_want_to_copy>-war to a new folder (ex. resources/testdata/NEW-war ) edit core/samples/pom.xml <dependency> <groupId>org.codehaus.cargo</groupId> <artifactId>NEW-war</artifactId> <version>${cargo.resources.version}</version> <type>war</type> </dependency> under Location of testdata dependencies..., add <property> <name>cargo.testdata.NEW-war</name> <value>org/codehaus/cargo/NEW-war/${cargo.resources.version}/simple-NEW-${cargo.resources.version}.war</value> </property> this will create a property that an implementation of AbstractDataSourceWarCapabilityContainerTestCase can understand add a new test class that does what you want, extending AbstractDataSourceWarCapabilityContainerTestCase or a subclass of it. Make sure you use an appropriate Validator for the configuration type you are concerned with. Otherwise you may end up testing invalid containers. finally, execute mvn -P<container_to_test> install from the root of Cargo. |
![]() |
Document generated by Confluence on Apr 08, 2009 13:39 |