<commit_before># Appium Sample Tests for AWS Device Farm Sample App
This is a collection of example Appium TestNG tests written for the AWS Device Farm [Android](https://github.com/awslabs/aws-device-farm-sample-app-for-android) sample app. Please use these tests as a reference for your own AWS Device Farm Appium TestNG tests.

**This test suite uses the [Appium page model](http://appium.io/slate/en/tutorial/android?java#page-object-pattern) in order to separate the tests from the logic.**

# Android
## Getting Started
1. Follow the **[official Appium getting started guide](http://appium.io/slate/en/tutorial/android.html?java#getting-started-with-appium)** and install the Appium server and dependencies. 

	**AWS Device Farm supports Appium version 1.6.5. Using a different version locally may cause unexpected results when running Appium tests on AWS Device Farm.**
2. In order to use 1.6.5, download Appium through NPM with this command: 
	```
	npm install -g appium@1.6.5
	```
3. Verify that you have Appium installed with this command: 
	```
	appium -v
	```
   You should get "1.6.5" as the output

## Creating a new Java Appium Test Project Using Maven
1. Create a new Maven project using a Java IDE. **The example in this tutorial is for [IntelliJ IDEA Community Edition](http://www.jetbrains.com/idea/download/)**.

2. Set up your POM file using the official AWS Device Farm documentation for [TestNG](http://docs.aws.amazon.com/devicefarm/latest/developerguide/test-types-android-appium-java-testng.html)
	- You will need the following dependencies in your POM file
		
        ```
	    <dependencies>
    	    <dependency>
        	    <groupId>org.testng</groupId>
            	<artifactId>testng</artifactId>
	            <version>6.11</version>
    	        <scope>test</scope>
        	</dependency>
	        <dependency>
    	        <groupId>io.appium</groupId>
        	    <artifactId>java-client</artifactId>
            	<version>4.1.2</version>
	        </dependency>
    	</dependencies>
        ```
	
### Running Your Tests Locally
First, make sure that you have followed all the steps in the [Appium getting started guide](http://appium.io/slate/en/tutorial/android.html?java#getting-started-with-appium). 

Use the script [start-appium-android.sh](https://github.com/awslabs/aws-device-farm-appium-tests-for-sample-app/blob/master/start-appium-android.sh) to run the Appium server locally. Once the server has started, run the TestNG tests within your IDE.

For example, if your package name is **com.appium.example**, your main activity name is **.Activities.MainActivity**, and the absolute filepath to your APK is **~/Desktop/appium/app.apk**, you would run the following command.
<commit_msg>Updated README for latest Appium version 1.7.2<commit_after># Appium Sample Tests for AWS Device Farm Sample App
This is a collection of example Appium TestNG tests written for the AWS Device Farm [Android](https://github.com/awslabs/aws-device-farm-sample-app-for-android) sample app. Please use these tests as a reference for your own AWS Device Farm Appium TestNG tests.

**This test suite uses the [Appium page model](http://appium.io/slate/en/tutorial/android?java#page-object-pattern) in order to separate the tests from the logic.**

# Android
## Getting Started
1. Follow the **[official Appium getting started guide](http://appium.io/slate/en/tutorial/android.html?java#getting-started-with-appium)** and install the Appium server and dependencies. 

	**AWS Device Farm supports Appium version 1.7.2. Using a different version locally may cause unexpected results when running Appium tests on AWS Device Farm.**
2. In order to use 1.7.2, download Appium through NPM with this command: 
	```
	npm install -g appium@1.7.2
	```
3. Verify that you have Appium installed with this command: 
	```
	appium -v
	```
   You should get "1.7.2" as the output

## Creating a new Java Appium Test Project Using Maven
1. Create a new Maven project using a Java IDE. **The example in this tutorial is for [IntelliJ IDEA Community Edition](http://www.jetbrains.com/idea/download/)**.

2. Set up your POM file using the official AWS Device Farm documentation for [TestNG](http://docs.aws.amazon.com/devicefarm/latest/developerguide/test-types-android-appium-java-testng.html)
	- You will need the following dependencies in your POM file
		
        ```
	    <dependencies>
    	    <dependency>
        	    <groupId>org.testng</groupId>
            	<artifactId>testng</artifactId>
	            <version>6.11</version>
    	        <scope>test</scope>
        	</dependency>
	        <dependency>
    	        <groupId>io.appium</groupId>
        	    <artifactId>java-client</artifactId>
            	<version>4.1.2</version>
	        </dependency>
    	</dependencies>
        ```
	
### Running Your Tests Locally
First, make sure that you have followed all the steps in the [Appium getting started guide](http://appium.io/slate/en/tutorial/android.html?java#getting-started-with-appium). 

Use the script [start-appium-android.sh](https://github.com/awslabs/aws-device-farm-appium-tests-for-sample-app/blob/master/start-appium-android.sh) to run the Appium server locally. Once the server has started, run the TestNG tests within your IDE.

For example, if your package name is **com.appium.example**, your main activity name is **.Activities.MainActivity**, and the absolute filepath to your APK is **~/Desktop/appium/app.apk**, you would run the following command.

{'fraction_non_alphanumeric': 0.10566587720896338, 'fraction_numerical': 0.008926944798688285, 'mean_word_length': 3.4963144963144965, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5226991', 'n_tokens_mistral': 1678, 'n_tokens_neox': 1568, 'n_words': 562}