我有一个 Maven 项目,我不想更改 POM,以便当我构建项目(Clean + Install)时,在编译部分之后,将启动一组量角器测试(打开 selenium 并做几件事),并且仅如果测试通过,则构建本身也通过。
我似乎找不到能为我提供这种功能的东西。有可能吗?如果是这样,我该如何使用它?
我们目前正在使用“com.github.eirslett”maven 插件进行构建,我想知道是否可以将量角器测试添加为该插件中的一个阶段。我可以看到它支持使用“Karma”进行单元测试,但不支持与量角器相关的任何内容。
任何帮助都感激不尽!!谢谢 :)
您可以使用以下 Maven 插件https://github.com/greengerong/maven-ng-protractor
你可以像这样使用它
<plugin>
<groupId>com.github.greengerong</groupId>
<artifactId>maven-ng-protractor</artifactId>
<version>0.0.2</version>
<configuration>
<protractor>protractor</protractor>
<configFile>yourconfig.js</configFile>
</configuration>
<executions>
<execution>
<id>ng-protractor</id>
<phase>integration-test</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)