Skip to content

sidharth8891/iOSAppium-LambdaTest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pre-requisites


Before you can start performing App automation testing with Appium, you would need to follow these steps:

  • You will need a LambdaTest username and access key. To obtain your access credentials, purchase a plan or access the automation dashboard.
  • Ensure you have Appium’s Java client library installed.
  • Ensure you have Maven installed:
    • If Maven is not downloaded, you can download it from here
    • For installation steps, follow the instructions here

Clone The Sample Project

Step-1: Clone the repo as shown below

git clone https://github.com/sidharth8891/iOSAppium-LambdaTest
cd <projectPath>

Setting Up Your Authentication

Make sure you have your LambdaTest credentials with you to run test automation scripts on LambdaTest. To obtain your access credentials, purchase a plan or access the Automation Dashboard.

Step-2: Set LambdaTest Username and Access Key in environment variables.

export LT_USERNAME="YOUR_LAMBDATEST_USERNAME"
export LT_ACCESS_KEY="YOUR_LAMBDATEST_ACCESS_KEY"

Upload Your Application

Step-3: Upload your iOS application (.ipa file) or Android application (.apk file) to the LambdaTest servers using our REST API. You need to provide your Username and AccessKey in the format Username:AccessKey in the cURL command for authentication. Make sure to add the path of the appFile in the cURL request. Here is an example cURL request to upload your app using our REST API:

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 or sample iOS app.
  • 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.

Executing The Tests

Step-4: Install the dependencies, by running the following command in the project's base folder

mvn clean install

Step-5: Run the following command in the directory where your project has been saved to execute your build.

  • Android
mvn compile exec:java -Dexec.mainClass=vanilla_android -Dexec.classpathScope="test"
  • iOS
mvn compile exec:java -Dexec.mainClass=vanilla_ios -Dexec.classpathScope="test"

Your test results would be displayed on the test console (or command-line interface if you are using terminal/cmd) and on the LambdaTest App Automation Dashboard.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages