Modularizing Tests - Reusing Test Steps

Separate our test steps into reusable modules

Search our documentation:

Toggle Documentation Menu

Modularizing Tests - Reusing Test Steps

Ghost Inspector gives you the ability to modularize your tests. You can import the steps of one test into another by using the “Import steps from test” option. This allows you to segment out certain operations and easily reuse them. For instance, if most of your tests require a login at the beginning, you could create a “Login” test and insert it as the first step of those tests. This saves you from having to repeat those operations across multiple tests and makes things much more maintainable. Instead, you’ll have them in one spot.

Import test steps in test editor

You can import multiple tests within a single test. You can also nest tests multiple levels deep. For instance, “Test A” could include “Test B” as it’s first step, and “Test B” could include “Test C” as it’s first step. You can currently go up to 5 levels deep with nesting.

Note #1: When importing a test, the system is effectively including it’s steps into your current test. It is not executing the selected test within a separate scope, nor does it navigate to the start URL of the included test.
Note #2: You must have at least one other test in your account for this option to appear.