Appium Studio for Eclipse provides a simple way to configure your Java project.
Once applying the configuration/nature, to your project the following changes will take place:
- Java classpath container will be added so that all of the needed jar files will be available.
- BaseTest class will be generated. This class will provide some basic framework services to your test initialization.
- AndroidDemoTest and IOSDemoTest will be generated which will contain boilerplate code for Android and iOS platforms respectively.
Gradle project's build.gradle and a Java properties file naming cloud.properties will be generated and added for simple integration into CI environments like Jenkins.
To apply configuration do the following:
- Create a new Java project (or use an existing one).
- Right-click on the Java project, select 'Configuration' then select 'Mobile Nature'.
- Set project nature of Mobile nature
Once the configuration is applied your project should look like the following:
In order to add gradle nature to the project (this is optional), do the following:
- Add gradle nature
- Add gradle run configuration with tasks 'clean' and 'build'.
- Click Run. This should build the project successfully.
- Refresh project.
After refresh classes should have Javadoc attached.
To verify your environment configuration (TestNG) right click on the 'testng.xml' and execute it. It will execute both the AndroidDemoTest as well as the IOSDemoTest in parallel.
The cloud.properties file hold the information needed to connect to the server during runtime.
#Mon Sep 04 12:59:25 IDT 2017
In the example above the cloud.properties file directs the execution to Experitest Cloud Platform for user user1
The authentication is performed using Access Key, which was used to connect to the cloud. If there is a change in the Access Key, cloud.properties file need to be updated with it.
Please see more information about using the access key in Obtaining Access Key.
The cloud.properties file is for CI while running a test from Eclipse, the parameters set in the Plugin will override it.