Skip to content

Debugging Xappium

Dan Siegel edited this page Apr 5, 2021 · 1 revision

It can be pretty confusing how to actually debug Xappium. Luckily there are a couple of options that we have.

CLI

From the CLI you can execute the run-iostests.sh or run-androidtests.sh on macOS or Run-AndroidTests.ps1 on Windows. These scripts simply wrap dotnet run to make it a little easier to test the CLI.

Visual Studio

Sometimes you may really want to setup some breakpoints and step through the code. To do this you'll want to set the Xappium.Cli project as the startup project. Next you'll want to edit the project's Debug settings. In the Application arguments you will want to the following arguments:

-uitest sample/TestApp.UITests/TestApp.UITests.csproj -app sample/TestApp.Android/TestApp.Android.csproj

Note that you can add any arguments here that you want or need to test, and you can change the project paths that you're testing. Next you should set the Working directory to the solution's root path for example: /Users/dansiegel/repos/Xappium.UITest.

You may optionally pass any environment variables here that you may need for testing.

Clone this wiki locally