Prevent broken or draft tests from running

Disabling your test is a convenient way to make sure a test that is currently being drafted or being refactored does not run inadvertently. You can also disable broken tests until any underlying issues are resolved.

Disabling a test prevents it from running even if it is run as part of a feature, run group, saved filter, or test list selection.

How to Disable and Enable a Test from the individual test view

To disable a test:

  1. Navigate to the test view 
  2. Click disable icon, the circle with "pause" sign in it

To enable a test:

  1. Navigate to the test view
  2. Click the enable icon, the circle with the "play" sign OR select Enable test from the yellow banner at the top of the test

How to Disable and Enable a test from the All Tests view

To disable a test:

  1. Select the check box(es) next to the test(s) you wish to disable.
  2. Select the Disable icon at the top of the page (a circular arrow with "pause" sign in it)

To enable a test:

  1. Select the check box(es) next to the test(s) you wish to disable.
  2. Select the enable icon at the top of the page (a circular arrow with "play" sign in it)

To see all disabled tests:

  1. Go to All Tests
  2. Select filter for “State” 
  3. Select “Disabled”

When a test is disabled, it is shown as grey and has a yellow disable icon next to it (a circular arrow with "pause" sign in it). These tests will not run until enabled.

NOTE: A draft icon that is very similar (a square with a pencil sign in it). Draft tests  will not run until enabled. The difference between a draft and disabled test is that a draft test is in the process of being created, a disabled test is purposefully not being run.  

NOTE: Disabled tests have a yellow bar on the test view to indicate that they will not run. They are also greyed out on any test lists.

NOTE: Draft tests won't run as a part of a group until enabled (published).

Best Practice - Disable Embedded Tests

Embedded tests should be set to Disabled. Rainforest has logic that will allow embedded disabled tests to run if they are included in a main test.  

Why? This allows you to group all your tests including the embedded test into a filter, feature or run group. When you run the filter, feature or run group, you won't want the embedded test to run independently and excessively. By disabling the test, it won't run unless it is part of a main test that is enabled.

If for some reason you do want a test that is embedded to also run independently, you may set it to enabled - however as it will be run as part of a main test, this is not necessary under most circumstances.

Did this answer your question?