Converting Robotium as Maven Project
We can run robotium tests directly from jenkins, but to integrate it with testlink, better we can convert it into Maven project.
To convert robotium as maven project, make sure that your eclipse has Maven-Android plugin.
Step - 1:
Upload your existing robotium project into eclipse, Create a pom.xml file and add required dependencies. (Including your source project)
Step - 2 :
Right click the project and convert it as maven project.
Step - 3:
Now you can run robotium tests by,
mvn clean install
Step - 4:
Create a custom field " Java Class " and assign it your testlink project.
Enter the test project package name in the custom field.
Step - 5:
Create a jenkins job and configure the following properties,
Step - 6 :
You can now build the job it will automatically update the testlink testcase and will attach junit test report with the testcase.
Note:
Here, i have specified my project name and package (com.example.calculator.test). modify this according to your project name.
deploy your android project to your local maven repository.
[ To deploy the apk file into maven repository, you can use
mvn install:install-file -Dfile= -DgroupId=com.example.calculator -DartifactId=Calculator -Dversion=1.0 -Dpackaging=apk ]
In maven command specify the local m2 repository path, so that jenkins will look into local repository for android application. Otherwise it will browse global repository.
Hi Anitha,
ReplyDeleteI have few doubts. Can you please clarify.
1. Is your java class a Junit/TestNG class?
2. Can you please share com.example.calculator.test code snippet.
3. Have you written test case name inside @Test annotation.
Hi Venky,
ReplyDelete1. My Java class is a junit class
Here, Testcase name is nothing but your junit class name. You need to create a custom field in Testlink, And in that custom field you need to enter the class name along with the package name.