Log Results

ReadyAPI allows you to use Groovy scripts to log your test results, extract information about test steps that meet certain conditions, and so on.

This topic describes several ways to enable logging with the Groovy script.

Example 1 – Save results of every test step

Where to use

You can run this script as the TestRunListener.afterStep event handler.

Example

Example 2 – Save results of all test steps in failed test cases

Where to use

As a teardown script on the test suite level.

Example

The following sample demonstrates how to log results of all test steps in all the failed test cases of the test suite:

See Also

Publication date: