Ghost Inspector is a powerful but simple tool for automated website testing. Ghost Inspector tests check specific functionality in your website or application and execute continuously from the cloud and alert you if anything breaks.
Runscope customers are eligible for a free Ghost Inspector account with increased limits. Claim this offer.
From your API test, select Integrations and click Connect Ghost Inspector. You will be prompted to complete the authorization flow to grant Runscope access to your Ghost Inspector account. If you have multiple Ghost Inspector accounts you can create multiple connected services.
Once connected a new option will appear in the Test Steps editor allowing you to add a Ghost Inspector test step as part of your API test. After adding the step, select the test you want to execute from the dropdown list.
Assertions can be created on the data generated by the Ghost Inspector test step. A JSON object containing data from the test run can be evaluated using the JSON syntax used in assertions for HTTP request steps. An assertion for the status of the UI test run is created by default.
Data from the test run can be extracted and stored in a Variable for use in subsequent requests. The same syntax for extracting data from HTTP request steps can be used for extracting data from the Ghost Inspector test run result JSON.
To evaluate the Ghost Inspector test run result JSON with a Script, access the
// parse JSON result data into object var data = JSON.parse(request.body);
The start URL of your Ghost Inspector test can be optionally overridden with an alternate URL. You can enter a URL, or pass variables from Runscope into your Ghost Inspector test as a start URL. Learn more about reusing Ghost Inspector tests across different environments.