Tracking usage coverage

The core idea of Gravity is to help you build an end-to-end test suite that covers the most critical features and paths for your users. The Usages section of Gravity allows watching how your application is used and informs your testing decisions.

#What is a usage?

In Gravity, a usage is an ordered sequence of user actions within the same page or across multiple pages. When a user or test session goes through all the steps of usage, it is considered fulfilled (for a user session) or covered (for a test session).

For example, a "sign in" usage looks like this:

A sign in usage is defined as fill in a username and password field on the /signin page

#Define new usages

You can define a new usage from a session page:

Define a usage from a session page

A new screen is displayed, allowing you to build the sequence of actions that will be the different steps of the usage:

Usage definition screen
  • You can select a whole page and no actions within. It will add an "Any action" event in the usage, meaning that a simple visit of the page will fulfill this step
  • You can modify the page address of a usage step to make it dynamic. In the following example, the step is fulfilled on any /transactions/... page.
Set a segment of a URL as dynamic

#Browse usages

You can find all the usages you defined for you application under the Usages section of Gravity.

List of defined usages

For each of them, you can see:

  • The steps a session has to go through to consider the usage as fulfilled or covered
  • Metrics on the user and test sessions that fulfill or cover the usage

Use these metrics to learn which usages need more tests and which ones could be less tested.