Maven 整合 robot framework 进行测试

1. 在maven pom.xml中先配置robot framework的plugin:  

   <plugin>
        <!-- integration test runner (robot-framework) -->
        <groupId>org.robotframework</groupId>
        <artifactId>robotframework-maven-plugin</artifactId>
        <version>1.4.7</version>
        <dependencies>
            <!-- Can specify the robot framework version if required -->
            <dependency>
              <groupId>org.robotframework</groupId>
              <artifactId>robotframework</artifactId>
              <version>2.8.7</version>
            </dependency>
            <!-- Can add self developed robot test library -->
            <dependency>
                <groupId>com.abc.robottest</groupId>
                <artifactId>robottestinglib</artifactId>
                <version>1.0.0</version>
            </dependency>
        </dependencies>
        <executions>
            <execution>
                <!-- default execution phase is 'verify' -->
                <goals>
                    <goal>verify</goal>
                </goals>
            </execution>
        </executions>
        <configuration>
            <testCasesDirectory>./src/test/robotframework/acceptance</testCasesDirectory>
            <libdoc/>
            <testdoc/>
        </configuration>
    </plugin>

2. 在上面的testCasesDirectory路径中编写*.robot文件,参考官方正常robot文件的编写方法: http://robotframework.org/#examples

原文地址:https://www.cnblogs.com/pekkle/p/9618044.html