saucelabs/extended_debugging_demo

Name: extended_debugging_demo

Owner: Sauce Labs

Description: Demo to show off extended debugging functionality

Created: 2017-09-28 08:32:08.0

Updated: 2018-05-15 19:57:02.0

Pushed: 2018-05-15 19:56:58.0

Homepage: null

Size: 247

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Extended Debugging Demo

This project is a simple demo on how to utilize the extended debugging functionality on Sauce Labs. It runs a test suite that fails 75% of of the time due to a failing backend response. To use the local server you need to run your tests locally with SauceConnect.

This readme will guide you through running the demos with NodeJS.

For Python examples, check out test/python/README.md

For Java examples, check out test/java/README.md

Requirements

To run the demo you need the following preinstalled on your system:

Install

To install the demo you first need to download the project:

a git
t clone git@github.com:saucelabs/extended_debugging_demo.git

Then jump into the folder and install the dependencies:

 extended_debugging_demo
m install

Run Demo

To run the demo make sure you have SAUCE_USERNAME and SAUCE_ACCESS_KEY set in your environment variables. If not you can set these via:

port SAUCE_USERNAME=<your-sauce-username>
port SAUCE_ACCESS_KEY=<your-access-key>

There are several Demos prepared:

Analytics Check

Some companies need to make sure that analytics request are made properly so they are paid correctly, e.g. for advertisement. This demo enters a Todo and and checks if a Google Analytics request was made successfuly.

Used Features: Execute via
m run demo:analytics
Blocked Demo

The demo app tries to load a third party script that takes up to 5 seconds to load. This demo uses the intercept command to block the script from being load in order to make sure the app loads faster.

Used Features: Execute via
m run demo:blocked
Offline Demo

The demo app is offline ready, so it works when the user has no internet connection. This demo disables all network throughput and tries to reach the page.

Used Features: Execute via
m run demo:offline
Pageload Demo

This demo checks if the page loads under 5 seconds. Since the third party scripts slows down the page load this test will always fail. It logs all request and shows how long each one took to load.

Used Features: Execute via
m run demo:pageload
Populate Demo

This demo shows how slow and brittle it can be to use the UI to bring the application into a certain state (e.g. have 10 Todos entered in DB).

Execute via
m run demo:populate
Prepopulate Demo

This demo fixes the flaw of the Populate Demo by setting the state of the app using a custom command. It shows that the test executes way quicker than doing it the old way.

Used Features: Execute via
m run demo:prepopulate

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.