Code Monkey home page Code Monkey logo

debuggingappiumscripts's Introduction

Debugging Appium Scripts

Artifacts

Several artifacts are available for helping you to deduce when something goes wrong with a test. Sauce Labs makes the following available:

  • Video of the recorded test to replay what happened
  • Screenshots of every detected change
  • Metadata to recreate the test settings
  • Command history to reproduce the test steps
  • Appium server log and Device log

Additional features

Sauce Labs also has some features available to assist with debugging:

  • manual override to take over an automated session by clicking on a running video.

  • sauce:break to pause tests at a specified time using the Sauce Javascript Executor injected in the browser

  • sauce:context to add comments in the command history

  • test status, test name, build tag, & custom tags can be set in capabilities, during a test via JS executor, or afterwards via the Sauce REST API.

  • extended debugging (currently available for chrome sessions only)

There are some other things you can do to help with debugging:

  • logging good client side logging is essential
  • stack traces throw exceptions when you code is not in an expected state (e.g. not on the page you expected)
  • debugging step through your code with
  • synchronization using proper wait strategies
  • code structure make sure you are using easy to follow abstractions such as the Page Object Pattern

And a few tricks:

Common issues

Issues beyond your control

  • Appium issues
  • WebDriverAgent (IOS)
  • Android or IOS platform issues
  • Sauce Labs issues
  • Network issues

Collecting Data

  • Run the same tests over time under the same conditions (build, environment, capabilities)
  • Try different settings to see if the problem persists (is it IOS only, iPhone 8 only, Simulator only, Sauce Only, etc.)
  • Sauce Analytics dashboard -- especially helpful if you've been setting test name & build tag
  • Statistical data with Sauce Errors API

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.