简体   繁体   English

在 Android Maven 项目中实现 Robotium

[英]Implementation Robotium in Android Maven Project

I created Android Maven Project with android-quickstart-archetype ( https://github.com/akquinet/android-archetypes/wiki/android-quickstart-archetype )我使用 android-quickstart-archetype ( https://github.com/android-quinet/android-archetypes/wiki )

I need to use Robotium ( http://code.google.com/p/robotium/ ) GUI Unit testing library.我需要使用 Robotium ( http://code.google.com/p/robotium/ ) GUI 单元测试库。

I added dependencies in pom.xml.我在 pom.xml 中添加了依赖项。

How can i implement this library in my project.我如何在我的项目中实现这个库。 Can anybody helps me?有人可以帮助我吗?

To implement Robotium in Android Maven project you need to:要在 Android Maven 项目中实现 Robotium,您需要:

  1. Add dependency in pom.xml.在 pom.xml 中添加依赖。 Dependensy you can get here: http://code.google.com/p/robotium/wiki/Maven依赖你可以在这里: http://code.google.com/p/robotium/wiki/Maven

  2. Use android-with-test archetype.使用 android-with-test 原型。 https://github.com/akquinet/android-archetypes/wiki/android-with-test-archetype https://github.com/akquinet/android-archetypes/wiki/android-with-test-archetype

From the link :链接

Getting started入门

... ...

When you have created a new test project you need to add the Robotium jar to the build path.创建新测试项目后,您需要将 Robotium jar 添加到构建路径。 In Eclipse that is done by right clicking on the test project --> Properties --> Java Build Path --> Add (external) Jar.在 Eclipse 中,右键单击测试项目 --> 属性 --> Java 构建路径 --> 添加(外部)Jar。

Basically, to get the library running in your project, you simply need to add the jar to the classpath.基本上,要让库在您的项目中运行,您只需将 jar 添加到类路径中。

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

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