Writing and Running Integration Tests

The integration test suite is one of the best ways to ensure ongoing compatibility of NMaven with various types of projects.

Running Integration Tests During the Build

The default way to run the integration tests for the current version is during the overall build, like this when run from the top level of the checkout:

mvn clean install -Prun-its

If there are any failures, you will find them in components/maven-dotnet-core-it-runner/target/surefire-reports. The individual projects will be in %TEMP%/it-path-name. Within that directory you will find log.txt that contains the actual build output.

Running Integration Tests Standalone

During development, you may wish to run the suite for a different version to the current one. To do this, switch to the core-integration-tests directory and run the following command:

mvn test -Dtest=IntegrationTestSuite -Dnmaven.version=0.15

If the nmaven.version is omitted, the latest release version will be used.

When running the tests standalone, the individual projects will be found in target/test-classes/it-path-name where it-path-name will be replaced by the test's resource directory.

If you'd prefer to run just one or more tests, you can use the test argument as above to select the tests to run. For example:

mvn test -Dtest=MavenITmng0000CSharpCompileLibrary