Applies to ReadyAPI 2.4, last modified on June 7, 2018

A test case is a collection of test steps that are assembled to test some specific aspect of your service. Test cases provide clearly identifiable units of the functionality that can be tested independently.

The test case can contain any number of test steps. When you run tests, ReadyAPI runs them in sequence. The test case run is successful when none of the test steps fail.

You can arrange any number of test cases in a test suite and even modularize them to call each other for complex testing scenarios.

Use the test case editor to manage test cases: configure their behavior, examine the test run history, debug tests, and so on.

Test case editor

Click the image to enlarge it.

Toolbar

The test case toolbar contains quick access to the most frequently used commands.

Test case editor toolbar

Click the image to enlarge it.

TestSteps Page

The main purpose of the TestSteps page is managing test steps. To learn how to do it, see Managing Test Steps.

Besides that, panels of the page help you modify various test case aspects:

  • Description – Specifies the text description of the test case.

  • Properties – Manages the list of test case properties. See the Test Case Properties section.

  • Setup Script – Specifies a script that is run at the start of a test case run. To learn more, see Setup, TearDown, and Report Scripts.

  • TearDown Script – Specifies a script that is run when the test case run finishes. To learn more, see Setup, TearDown, and Report Scripts.

  • Report Script – Specifies a script that is run when you generate a report. To learn more, see Script Extensions.

  • Report Parameters – Manages the list of parameters used for report creation. To learn more, see Script Extensions.

Other Editor Pages

To learn about See
Transaction Log Transaction Log Page
Compare Compare Page
History Test History Page
Coverage Coverage Testing
Requirements Requirements Compliance
Step-by-Step Run About Debugging Tests
Test On Demand Run Tests On Demand

Test Case Properties

Besides editor panels, you can adjust test case behavior by using its properties.

Name Description
Name

The name of the test case.

By using the Custom Property and Properties panels, you can create any number of properties. These properties are available to other test cases in your project. To manage the property list, use the toolbar:

Test Case Options

Use test case options to configure test case behavior according to your needs.

The test case options are grouped into three tabs, according to aspects they relate to:

Basic

The Basic Options define general behavior for the test case.

Basic options
Option Description
Search Properties Collect properties from previous test steps. This option provides scripting access to all test step properties.
Session By default, ReadyAPI closes the session after each request. Enable this option to prevent ReadyAPI from closing the session for the entire test case. In this case, ReadyAPI stores cookies received from the server and sends them back in the subsequent requests. This helps you create tests that simulate real user behavior.
Abort on Error Stops the test run when a test step fails.
Fail Test Case on Error Marks the test case as failed if a test step fails.
Note: This option does not stop the test run.
Discard Successful Results Discards all successful results after the test step execution is complete. Enable this option to use less memory in your tests.
Make sure to keep this option disabled if you use the Assertion test step, otherwise, you will not get the expected result.
Tip: This option is identical to the Discard PASS Results within Loop option available for the Data Source Loop test step, though the latter affects only the steps within the loop.
Socket Timeout The duration (ms) of a connection socket. The empty value or 0 sets the timeout to 1 minute.
Default value: 0.
Test Case Timeout The duration (ms) until TestCase times out. The empty value or 0 sets the timeout to 1 minute.
Default value : 0.
Max Results The maximum number of results to keep. Older results are discarded and cannot be asserted with the Assertion test step.
The empty value or 0 means no results are discarded.
Default value: 5.

WS-RM Options

When running a test case containing many requests, it may need to run all requests in the same WS-RM Sequence instead of creating a new one for each request.

The WS-RM Options tab is used to enable WS-RM (Web Services Reliable Messaging) for requests in the test case.

WS-RM
Option Description
WS-RM Enabled Enables the WS-RM Sequence
WS-RM Version A version of WS-RM used by the target service
WS-RM AcksTo Required. WS-Addressing Endpoint for SequenceAcknowledgement
WS-RM Expires Defines the duration for the Sequence.
Note: If empty never expires = "PT0S"

The authorized WS-RM Sequence is shared among all test steps in the test case. The credentials will be used to connect before the first test step and disconnect after the last test step in the test case.

Enabling WS-RM here will generate a WS-RM Sequence for all requests in the test case instead of one for each.

AMF Options

The AMF Options tab is used for settings related to the AMF (Adobe's ActionScript Messaging Format used by Flash/Flex applications to interact with a server backend) remote calls over HTTP.

AMF
Option Description
AMF Session Enables the AMF session. If it is enabled, ReadyAPI reuses the connection in the test case.
Endpoint The AMF endpoint to connect to.
Note: Used when running a test case.
Login The AMF service user.
Note: Used when running a test case.
Password The AMF user password.
Note: Used when running a test case.

The authorized AMF connection is shared among all AMF test steps in the test case. The credentials will be used to log in to the specified AMF service before the first test step and log out after the last test step in the test case.

Examples

Here are several sample test cases:

Login and Logout Test Case

XML DataSource Test Case

See Also

Project Editor
Test Suite Editor
Running a Test Case
Test Steps