Skip to main content

Test Setup And Execution


After uploading the app to the LambdaTest cloud through REST API, you need to configure different capabilities for the uploaded app in your Appium test scripts. After that, you can run app automation tests using Appium on LambdaTest.

The LambdaTest Desired Capabilities Generator will help in auto-generating the capabilities class required to run your app automation scripts on the LambdaTest Appium Grid. The Desired capabilities generator will generate the entire code of the capabilities class for the selected setups and programming languages.

This documentation guides you how to configure the desired capability for app, device, group tests, debugging, and mark tests passed/failed etc.

Configure App


In order to fetch and install apps on LambdaTest cloud, you will need to use the app capability to connect with your uploaded apps.

KeyValuesDescriptionDesired Capability
applt://APP10051525539885437397Configure the app to test on"app":"lt://APP10051525539885437397"

Select Device And OS


To perform Appium mobile testing on real Android and iOS devices, you need to define the deviceName, platformName, and platformVersion capabilities in your Appium automation scripts.

KeyValuesDescriptionDesired Capability
deviceNameGalaxy Tab S4Specify the device to test oncapabilities.setCapability (deviceName","Galaxy Tab S4)
platformNameAndroidSpecify the platform namecapabilities.setCapability("platformName", "Android")
platformVersion10Specify the platform versioncapabilities.setCapability("platformVersion", "10")

Group Tests


For better analysis, you can name your test cases and organize your builds by build name and project. To organize Appium automated tests, you will need to use name, build and projectName capability.

KeyValuesDescriptionDesired Capability
build5.1Represent the build number for your testcapabilities.setCapability("build", "5.1")
nameDemoRepresents the name of a testcapabilities.setCapability("name", "Demo")
projectNameTest1Represent the name of a projectcapabilities.setCapability("projectName", "Test1")

Debugging


By specifying the capabilities for the debugging tools, you can debug and fix your failed Appium test sessions using Appium logs, device logs, network logs, crash logs, screenshots, video logs, or app profiling data.

Note: Appium logs are enabled by default.

KeyValuesDescriptionDesired Capability
networktrue/falseEnable network logscapabilities.setCapability("network", "true")
devicelogtrue/falseEnable device logscapabilities.setCapability("devicelog", "true")
visualtrue/falseEnable Visual logs to capture screenshots.capabilities.setCapability("visual", "true")
videotrue/falseEnable Video recording of the entire screencapabilities.setCapability("video", "true")

Viewing Appium Test Results


You can view the results of your app automation tests on the LambdaTest App Automation dashboard and using the REST API. Configure build and project capabilities to segregate your test sessions into distinct builds and projects.

KeyValuesDescriptionDesired Capability
buildMy_TestName of the build to group testscapabilities.setCapability("build", "My_Test")
projectSprintName of the project to group testscapabilities.setCapability("project", "Sprint")

Mark Tests As Passed Or Failed


While performing mobile app automation on LambdaTest Appium Grid, you may encounter a scenario in which a test that you labeled as failed in your local instance turns out to be performed successfully on LambdaTest. It's crucial to mark an automated test as Passed or Failed based on your testing requirements for validating expected behavior.

By default, the Status of each test that runs successfully is marked as Completed, and if there are any issues, the Status is marked as Error.

You can mark a test status as failed/passed using JavaScript executer on LambdaTest.

  1. To mark test status as failed.

driver.executeScript('lambda-status=failed')

  1. To mark test status as passed.

driver.executeScript('lambda-status=passed')

In case you have any questions or need any additional information, drop them at our 24X7 Chat Support or mail us directly at support@lambdatest.com.

Test across 3000+ combinations of browsers, real devices & OS.

Book Demo

Help and Support

Related Articles