Sample - Appium Job

The following is a sample Python code for calling QDC public APIs to conduct Appium test.

  • Available chipsets

Appium jobs have no chipset restrictions. To get the list of available targets, call this QDC public API.

  • Artifacts limitation
TypeArtifacts NumberSuffix
test packageoptionalAll chipsets support .zip, Android OS support .apk, Windows OS support .msi
test scriptrequired.zip
  • Sample code is similar to Monkey Job except Section (1) part
# Section (1): preparing the parameters and submitting the job
job_device_target = "SM8650" # target chipset
test_script_file = r"./AppiumTestExample.zip" # same name as the test script prepared
test_script_response = qdc_api.upload_file(public_api_client, test_script_file, ArtifactType.TESTSCRIPT)
job_target_id = qdc_api.get_target_id(public_api_client, job_device_target)
job_id = qdc_api.submit_job(public_api_client=public_api_client,
target_id=job_target_id,
job_name="Example Job",
external_job_id="ExJobId001",
job_type=JobType.AUTOMATED,
job_mode=JobMode.APPLICATION,
timeout=600,
test_framework=TestFramework.APPIUM,
entry_script=None,
job_artifacts=[test_script_response],
monkey_events=None,
monkey_session_timeout=None,
job_parameters=[])
  • Sample Test Packages

Test packages and scripts can be prepared by referring to Preparing Appium Test Packages.