concept Maven in category system administration

appears as: Maven, Maven
SOA Governance in Action

This is an excerpt from Manning's book SOA Governance in Action.

  • Maven— To make it easier to run the examples, Maven projects are provided for all the examples. This allows you to easily run the examples from the command line or from Eclipse.
  • In this section you’ll take a different approach. You’ll record a scenario that can be easily played back. This allows you, for instance, to run your integration tests against your “acceptance” environment to quickly determine whether everything is deployed correctly, before your testers start with their functional tests. For our integration tests you’ll use SoapUI to record a scenario, and I’ll show you how you can run this SoapUI scenario directly from Maven.

    Using the SoapUI Test Case from Maven

    If you have many integration tests and want to run those, doing that manually from SoapUI isn’t very effective. You’d have to manually start the test cases and analyze the results. Luckily though, SoapUI allows you to run test cases from Maven. This means you can create a Maven project that stores all the integration tests and run these tests at your convenience. To run the SoapUI test case from this example using Maven, you have to add an extra element to the pom.xml file. For this example I’ve added this configuration to the pom.xml file for the chapter2/traffic-service-general project. The following listing shows these additions.

    Listing 6.11. Configure a Maven project to run SoapUI test cases

    You need to add two different elements. The first one is the <pluginRepositories> element. This element is needed to specify where Maven should get the SoapUI plug-in from. The other element you add is the SoapUI plug-in configuration. The interesting part of this configuration is the <projectFile> element. This element points to a SoapUI configuration file. If you run a Maven build with the correct goals on this pom.xml, all the test suites in that SoapUI configuration file will be executed. You can use the following Maven command: