0

I have a project in Eclipse with Maven, Cucumber, SoapUI and JUnit.I have been able to successfully build it without errors (Yay! I am new to Maven, SoapUI and Cucumber). This project has a Cucumber feature file with two scenarios. I have the following configuration for SoapUI in pom.xml file

   .
   .
   <pluginRepositories>
        <pluginRepository>
            <id>smartbear-sweden-plugin-repository</id>
            <url>http://www.soapui.org/repository/maven2/</url>
        </pluginRepository>
   </pluginRepositories>
   <build>
     <plugins>
       <plugin>
          <groupId>com.smartbear.soapui</groupId>
          <artifactId>soapui-pro-maven-plugin</artifactId>
          <version>4.6.1</version>
       <executions>
          <execution>
           <phase>test</phase>
           <goals>
               <goal>test</goal>
           </goals>
           <configuration>
               <projectFile>soapui-project.xml</projectFile>
               <outputFolder>soapuiOut</outputFolder>
               <junitReport>true</junitReport>
              <exportwAl>true</exportwAl>
               <printReport>false</printReport>
           </configuration>
          </execution>
       </executions>
     </plugin>
     .
     .

Currently when I build it with maven, it runs the whole SoapUI project with all test cases in it. I want to link the two test cases in SoapUI to the two scenarios in the feature file. Is it possible to run a single testcase from SoapUI test suite in test step definition for a scenario? The scenario should pass only if the SoapUI testcase related to it passes.

FaMa
  • 1
  • 1
  • 1

1 Answers1

0

Q: Is it possible to run a single testcase from SoapUI test suite in test step definition for a scenario?

A: Sure, use testCase in your configuration, as per documentation here: http://www.soapui.org/Test-Automation/maven-2x.html#5-1-test-settings

One small comment: You mentioned you are new to Maven. If you wish to make you project much more Maven-ized, place your soapui-project.xml in src/test/soapui, and adjust your pom.xml accordingly.

SiKing
  • 10,003
  • 10
  • 39
  • 90
  • I also landed on that URL while searching for a solution. Using testCase in the configuration only runs a particular test case from a project instead of running the whole test suite. I want to run it so that cucumber scenarios are linked to test cases in test suites. Thank you for the suggestion to Maven-ize. I'll make the changes – FaMa May 22 '14 at 14:03