简体   繁体   English

在maven中使用pom.xml执行单元测试后,如何停止android仿真器?

[英]How to stop android emulator after executing the unit tests using pom.xml in maven?

您可以指定使用pom.xml运行单元测试后停止android仿真器的方法吗

Check out the maven-failsafe-plugin and the integration test-related phases of the Maven lifecycle. 检查Maven生命周期中与maven-failsafe-plugin和集成测试相关的阶段。 When you configure your POM: 配置POM时:

  • Bind the Maven goals to start the Android emulator to the pre-integration-test phase. 将Maven目标绑定到启动Android模拟器到pre-integration-test阶段。
  • Run tests with the Failsafe plugin integration-test goal, bound to the integration-test phase. 使用绑定到integration-test阶段的Failsafe插件integration-test目标运行测试。
  • Bind goals to shut down the emulator to the post-integration-test phase. 将目标绑定以将仿真器关闭到post-integration-test阶段。
  • Verify test output with the Failsafe plugin verify goal, bound to the verify phase. 使用绑定到verify阶段的Failsafe插件verify目标来验证测试输出。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM