1

The documentation for robotframework:run goal says it binds to the integration-test lifecycle of maven. This should mean if I simply run mvn integration-test, my robot test cases should execute. However, this is not happening. The command mvn integration-test robotframework:run works though.

Here is how I've declared the plugin in my POM.xml

        <plugin>
            <groupId>org.robotframework</groupId>
            <artifactId>robotframework-maven-plugin</artifactId>
            <dependencies>
                <dependency>
                    <groupId>org.robotframework</groupId>
                    <artifactId>robotframework</artifactId>
                    <version>2.8.4</version>
                </dependency>
            </dependencies>
            <configuration>
                <testCasesDirectory>src/test/resources/robotframework/acceptance</testCasesDirectory>             
            </configuration>
        </plugin>

1 Answer 1

0

The plugin by default binds to the integration-test phase. That means that in your execution, if you omit the phase element, it will be integration-test by default. You still need an execution to get the plugin to do anything during a phase automatically. Try adding the executions part to your existing configuration, which is in the getting started example.

   <plugin>
        <groupId>org.robotframework</groupId>
        <artifactId>robotframework-maven-plugin</artifactId>
        <executions>
            <execution>
               <goals>
                   <goal>run</goal>
                </goals>
            </execution>
        </executions>
        <dependencies>
            <dependency>
                <groupId>org.robotframework</groupId>
                <artifactId>robotframework</artifactId>
                <version>2.8.4</version>
            </dependency>
        </dependencies>
        <configuration>
            <testCasesDirectory>src/test/resources/robotframework/acceptance</testCasesDirectory>             
        </configuration>
    </plugin>
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.