Forum Discussion

Prudential_UK_A's avatar
Prudential_UK_A
Frequent Contributor
15 years ago

[SOLVED]SoapUI Pro Maven2 plugin questions

Hi,

We are incorporating SoapUI pro into our Maven build and need to do the following:
1) run multiple project files. What is the best way to set this up?
2) generate JUnit style reports. What settings do we need to enable this? Looking at the plugin settings in user guide it looks like reportFormat is the one we need. What values can we put in here?
Examples of these solutions would be nice 

Kind Regards
Peter

9 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    hello,

    Did you check this: http://www.soapui.org/plugin/maven2/properties.html

    For junit reports set junitReport.

    for maven check this: http://maven.apache.org/plugins/maven-e ... actor.html

    And here is some example:


    <project>
      <modelVersion>4.0.0</modelVersion>
      <groupId>STC2009</groupId>
      <artifactId>CurrencyConvertor</artifactId>
      <version>1</version>
      <pluginRepositories>
        <pluginRepository>
          <id>eviwarePluginRepository</id>
          <url>http://www.eviware.com/repository/maven2</url>
      </pluginRepository>
      </pluginRepositories>
      <dependencies>
      <dependency>
        <groupId>eviware</groupId>
        <artifactId>maven-soapui-pro-plugin</artifactId>
        <version>3.0</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>eviware</groupId>
        <artifactId>soapui-pro</artifactId>
        <version>3.5-beta2</version>
      </dependency>
    </dependencies>
    <build>
    <plugins>
      <plugin>
      <groupId>eviware</groupId>
      <artifactId>maven-soapui-pro-plugin</artifactId>
      <version>3.5-beta2</version>
      <configuration>
        <projectFile>/home/robert/CurrencyConvertor-soapui-project.xml</projectFile>
        <junitReport>true</junitReport>
        <outputFolder>.</outputFolder>
        <testFailIgnore>true</testFailIgnore>
      <soapuiProperties>
          <property>
            <name>soapui.home</name>
            <value>/home/robert/eviware/soapUI-Pro-3.5-beta2/bin</value>
          </property>
        </soapuiProperties>
      </configuration>
      <executions>
        <execution>
          <id>soapUI</id>
          <!--Run as part of the test phase in the Maven lifecycle-->
          <phase>test</phase>
          <goals>
          <!--Run the test phase of eviware:maven-soapui-plugin-->
            <goal>test</goal>
          </goals>
        </execution>
      </executions>
      </plugin>
    </plugins>
    </build>
    </project>



    Let me know does it helps,
    robert
  • Prudential_UK_A's avatar
    Prudential_UK_A
    Frequent Contributor
    Robert,

    Thanks for your reply.  Can you tell me what are the valid values for the reportFormat and reportName properties as these are not specified on the manual page?

    Regards,

    Julian
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi Julian,

    sorry for the delay, the parameters are as follows:

    R - Selects which report to generate for the test objects executed, for example if running the entire project, this could specify the name of a test-suite-level report that would be generated for each TestSuite. The report is saved as specified with the -F option to the folder specified with the -f option. (soapUI Pro only)

    F - Sets the format of the report specified with the -R option, for Printable reports this is one of PDF, XLS, HTML, RTF, CSV, TXT, and XML. For Data Export this is either XML or CSV (soapUI Pro only)

    (taken from http://www.soapui.org/userguide/command ... unner.html)

    regards!

    /ole
    eviware.com
  • Prudential_UK_A's avatar
    Prudential_UK_A
    Frequent Contributor
    Thanks again.  But I'm not sure what are the valid values for the reportName property?  Also, I am not using testcaserunner but the maven plugin so assume the values you stated for testcaserunner report format are the ones to use in the maven plugin reportFormat property.

    Regards,

    Julian
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hello,

    Yes, you are right about format. Valid names are report names you are able to see in "Project view", "Reporting" tab, under "Available reports". So, by default they are : "LoadTest Report", "Project Report", TestSuite Report" and "TestCase Report". Of course, you need to run appropriate item with each of them, for example you'll run project for project report, test suite for test suite report etc..

    Hope this helps, let me know,
    robert
  • Prudential_UK_A's avatar
    Prudential_UK_A
    Frequent Contributor
    Thanks Robert.  I have given the following a go.  The SOAPUI project is picked and runs successfully but not results report is generated.  The following is what is contained in the section of the pom.xml.  Can you advise what I need to change to get this working?


    eviware
    maven-soapui-pro-plugin
    3.0

    https://xxxx/xxxxxx-soapui-project.xml
    127.0.0.1:9090
    SOAPUIResults
    Project Report
    PDF

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hello,

    Please check an example I posted , there is :

    <soapuiProperties>
          <property>
            <name>soapui.home</name>
            <value>/home/robert/eviware/soapUI-Pro-3.5-beta2/bin</value> <- here goes where you installed sopaui plus bin dir
          </property>
        </soapuiProperties>


    This is needed so that soapui detect where report templates are. We do not keep them in memory so they needs to be loaded before used and cashed.

    Let me know does this helps,
    robert
  • Hi Robert,

    Could you please clarify me whether do i need SOAPUI tool installation when i use SOAPUI maven plug-in?

    Thanks,
    Gopi