Forum Discussion

mshantan's avatar
mshantan
Occasional Contributor
16 years ago

Multiple Projects and TestSuites in Maven Plugin.

Hello All,

I am trying to run multiple soapUI projects in my Maven build. In order to keep my pom.xml file to a minimum I was looking for a way to run multiple projects in the same configuration using multiple "projectFile" elements and also can you specify if it is possible to run multiple test suites from a project using multiple "testSuite" elements. Many thanks in advance.

Shantan.

5 Replies

  • bmgriner's avatar
    bmgriner
    Frequent Contributor
    I have the same question. How do you run multiple projects or multiple suites in a maven build? There seems to be very little support for the maven soapui plugin.

    mshanton posted this back in May and still no response. Could we get a response on this?
  • xjeth's avatar
    xjeth
    New Contributor
    I would also very like to know if multiple projects in Maven plugin is supported.
    I have 10+ project files, and are forced to make Hudson call Maven one time for each project.

    I guess that the "testFailIgnore" flag in the maven plugin then could let all the projects run through even if one of them fail.

    -Jesper
  • Hello,


    ...
    <configuration>
    <projectFile>${my.project}</projectFile>
    ....
    </configuration>
    ...


    and invoke plug in with :

    mvn soapui-pro:test -Dmy.project=<project path>


    this way you can have universal pom for maven. Same approach could be used for setting a test suite name, test case etc...property my.project could have another name. Now all is needed to do is to create some script that will invoke maven with different parameters. Unfortunately you have to call maven each time.

    If you want that maven plugin can handle multiple projects please add a post to feature request forum.

    Let me know does this helps,
    robert
  • bmgriner's avatar
    bmgriner
    Frequent Contributor
    Another temporary solution I am playing with is to have multiple executions of the plugin and then just connect it to a phase of the main lifecycle. This makes it easier to automate. I am also adding my soapUI test results in with my regular JUnit test results by adding them into the surefire-reports folder.

    For example:
    <build>
    <plugins>
    ...
    <plugin>
    <groupId>eviware</groupId>
    <artifactId>maven-soapui-plugin</artifactId>
    <version>3.5.1</version>
    <configuration>
    <outputFolder>target/surefire-reports/</outputFolder>
    <printReport>true</printReport>
    <junitReport>true</junitReport>
    <testFailIgnore>true</testFailIgnore>
    </configuration>
    <executions>
    <execution>
    <phase>test</phase>
    <id>soapui-tests1</id>
    <configuration>
    <projectFile>${basedir}/src/test/soapui/some-soapui-project.xml</projectFile>
    </configuration>
    <goals>
    <goal>test</goal>
    </goals>
    </execution>
    <execution>
    <phase>test</phase>
    <id>soapui-tests2</id>
    <configuration>
    <projectFile>${basedir}/src/test/soapui/some-other-soapui-project.xml</projectFile>
    </configuration>
    <goals>
    <goal>test</goal>
    </goals>
    </execution>
    </executions>
    </plugin>
    ...
    </plugins>
    </build>