Generating mobile tests
After you create a mobile test, Klarent turns the plain English instructions into logical steps, each with code to run it on a device. The final successfully generated code is used every time the test runs.

Test steps are generated one-by-one, like in web tests:
Launch the appis where every mobile test starts, opening the selected app build on a device.- Analyze the current screen. The agent reads the app’s UI to find buttons, input fields and labels.
- Generate the next step title and description to continue with the test instructions.
- Generate the code for this step (mobile tests use Appium).
- Execute the code on the device. If there’s an error, regenerate or rework the code and execute again.
- When the code runs without error, take a screenshot and verify that it matches the expected step outcome.
- Repeat until the instructions are fulfilled, or cannot be completed (failure).
Some steps are added by the agent on its own, like Hide keyboard to reach a field behind the on-screen keyboard.
Use the Screenshots and Code tabs to look at the device screen and the generated code for each step.

Fixing mobile tests
Section titled “Fixing mobile tests”The tools in Fixing test cases work for mobile tests, except for one:
- Force click is not applicable to mobile tests.
If the agent keeps tapping the wrong element, edit the step to describe the element more precisely, like the label you see on screen and where it is. You can also add a Coder hint.