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>