How to Use Kobiton's Appium Export Script

What Is Appium Script Export?

Kobiton's Appium Script Export has two workflows, giving you the flexibility to use the script export to best suit your testing needs. You can either download the script immediately after completing a manual session or generate the script to create scriptless revisit sessions (revisits are automated executions of your manual tests across real devices, run by NOVA, Kobiton's AI). A script generated for revisit sessions can also be used on multiple devices to trigger automated revisit sessions in parallel, reducing your testing workload. (Please note that an Appium script exported from a manual session can, by the nature of the session, only target a single device. Exporting an Appium script from a scriptless revisit session targeting multiple devices will include the device IDs of all the targeted devices; however, these targets cannot be modified, and a user launching this script will not be able to change the target devices.)

In either case, manual or scriptless, the test will have to be successfully completed before an Appium script can be exported. In the case of a manual test, this simply means completing your test steps and exiting the device view/live session; for an automated test, you must wait for the session information to report that the test is complete. Please note to use Appium Script Export on an automated session, any UI remediations must be completed first. Any sessions with failed navigation assertions will not be considered complete and will therefore not be able to generate an Appium script.


How to Use Appium Script Export - Manual

  1. Complete your manual test, and exit the session. When prompted to run NOVA, select No.
  2. Access the Session Details page and click on the Appium icon.export-appium-button.png
  3. On the Export Appium Script popup, under Action, click Request to generate the Manual test case script.
  4. Under action, the download icon will indicate your script is ready for export. It may take some time for your script to be generated once it has been requested.


How to Use Appium Script Export - Automated

How to Generate the Script for Revisit Executions: 

  1. After your manual test, on the NOVA prompt, select Yes.
  2. Define your scriptless Test Execution Plan:  i.e., DDT, selecting your device bundle, etc.
  3. Trigger scriptless automation by clicking Run scriptless automation.

Notes: You may see a few variations on the Appium Script Export icon depending on the status of your tests. If the icon is present and fully colored (not greyed out), an Appium script can successfully be requested and generated for your test. If the icon is greyed out, the script is not yet ready to export, likely due to an automation still running or some lingering issues in need of UI remediation. As with the manual script export, it takes some time for the script to be prepared upon request, and will be listed as ‘Unavailable’ until the script is ready; the script generation process can take a little time. If the export icon does not appear at all on the session’s information page, the session is not qualified for a script export. In this case we recommend creating another manual session and trying again.


How to Execute an Appium Script from an Automated Session


  • Install Java JDK 1.8 (found here)
  • Install Maven (found here)
  • Install IntelliJ IDEA (Community Edition) (found here)

Note: we recommend at least JDK version 1.8 or higher for better testing experience. Lower JDK versions may lead to errors during test run due to incompatibilities between the JDK version and the project package, and may require you to manually configure a connection between IntelliJ and JDK. Please also note that in this use case we assume your automated revisit session has targeted multiple devices.

  1. Open IntelliJ IDEA and open a test project
  2. On the project directory sidebar, navigate to src/test/java/com/kobiton/scriptlessautomation/Greenshot_2021-10-25_13.16.03.png

The file will be your main test case, including all generated test steps based on a manual session.

Note: To access your credentials needed for your automation scripting (username and API key), access the Kobiton portal. Once you have your credentials, update KOBITON_USERNAME and KOBITON_API_KEY in the file. (For more information, you can reference our Automation Test Script Setup document here.)

  1. Run your project: Navigate to the ‘Run’ menu within IntelliJ and select “Run”.intellij_run.png
  2. Your project will be executed (you can view your test process at the bottom of the IDE).

You will see the targeted devices of your script running your test. After the test has finished, navigate to the URL to get your test results.

Was this article helpful?
0 out of 0 found this helpful