Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
/.idea/
/.DS_Store
src/.DS_Store
.DS_Store
/target/
/AppTest.iml
/apache-maven-3.8.5/
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
/.idea/
/.DS_Store
src/.DS_Store
.DS_Store
/target/
/AppTest.iml
/apache-maven-3.8.5/
116 changes: 58 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
# LT-appium-java-testng

Sample repo to run app automation on real device on LambdaTest.

**Below is the curl request to upload the app for automation**

```
curl --location --request POST 'https://manual-api.lambdatest.com/app/upload/realDevice' \
--header 'Authorization: Basic <ENTER_BASIC_AUTH_TOKEN_HERE>' \
--form 'name="lambda1"' \
--form 'appFile=@"/path/to/file"'
```

### **Step-1: Upload your application**

```bash
curl -u "YOUR_LAMBDATEST_USERNAME":"YOUR_LAMBDATEST_ACCESS_KEY" \
--location --request POST 'https://manual-api.lambdatest.com/app/upload/realDevice' \
--form 'name="Android_App"' \
--form 'appFile=@"/Users/macuser/Downloads/proverbial_android.apk"'
```

> **Note:**
>
> - If you do not have any **.apk** or **.ipa** file, you can run your sample tests on LambdaTest by using our sample [Android app](https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_android.apk) or sample [iOS app](https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_ios.ipa).
> - Response of above cURL will be a **JSON** object containing the `App URL` of the format - <lt://APP123456789123456789> and will be used in the next step.

### **Step 2: Write Your Automation Script**

Write your automation script in the client language of your choice from the ones [supported by Appium](https://appium.io/downloads.html). In the sample automation script in Java for the sample app downloaded above. Ensure to update the `app_url`, `username` and `accesskey` in the below code.

### **Step 3: Execute Your Test Case**

Debug and run your code. Run iOSApp.java or AndroidApp.java in your editor.

**Android:**

```
mvn test -P android-single
```

```
mvn test -P android-parallel
```

**IOS:**

```
mvn test -P ios-single
```

```
mvn test -P ios-parallel
```

### **Step 4: View Test Execution**

Once you have run your tests, you can view the test execution along with logs. You will be able to see the test cases passing or failing. You can view the same at [LambdaTest Automation](https://accounts.lambdatest.com/login).
# LT-appium-java-testng
Sample repo to run app automation on real device on LambdaTest.
**Below is the curl request to upload the app for automation**
```
curl --location --request POST 'https://manual-api.lambdatest.com/app/upload/realDevice' \
--header 'Authorization: Basic <ENTER_BASIC_AUTH_TOKEN_HERE>' \
--form 'name="lambda1"' \
--form 'appFile=@"/path/to/file"'
```
### **Step-1: Upload your application**
```bash
curl -u "YOUR_LAMBDATEST_USERNAME":"YOUR_LAMBDATEST_ACCESS_KEY" \
--location --request POST 'https://manual-api.lambdatest.com/app/upload/realDevice' \
--form 'name="Android_App"' \
--form 'appFile=@"/Users/macuser/Downloads/proverbial_android.apk"'
```
> **Note:**
>
> - If you do not have any **.apk** or **.ipa** file, you can run your sample tests on LambdaTest by using our sample [Android app](https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_android.apk) or sample [iOS app](https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_ios.ipa).
> - Response of above cURL will be a **JSON** object containing the `App URL` of the format - <lt://APP123456789123456789> and will be used in the next step.
### **Step 2: Write Your Automation Script**
Write your automation script in the client language of your choice from the ones [supported by Appium](https://appium.io/downloads.html). In the sample automation script in Java for the sample app downloaded above. Ensure to update the `app_url`, `username` and `accesskey` in the below code.
### **Step 3: Execute Your Test Case**
Debug and run your code. Run iOSApp.java or AndroidApp.java in your editor.
**Android:**
```
mvn test -P android-single
```
```
mvn test -P android-parallel
```
**IOS:**
```
mvn test -P ios-single
```
```
mvn test -P ios-parallel
```
### **Step 4: View Test Execution**
Once you have run your tests, you can view the test execution along with logs. You will be able to see the test cases passing or failing. You can view the same at [LambdaTest Automation](https://accounts.lambdatest.com/login).
Loading