
Status of eCATT Test Results
The execution of automated tests with the eCATT tool can result in the following status:
Green: Test passed
Yellow: Test not executed
Red: Test failed
Preprocessing in Tests
Business objects in SAP systems and their behavior depend on the customizing of the system and on the existence of other business objects (master data or dependent objects) prior in the business process chain to the object to be tested.
These dependent objects are usually checked for existence or created as preprocessing steps before executing an actual test.
eCATT provides functions for integrating preprocessing steps and regular test steps in one execution flow.
Preprocessing steps can be implemented as modules, which can be invoked using eCATT's REF command.
If an error occurs during the preprocessing steps of a test run, you might not want to treat the whole test as "Failed". To be able to differentiate between errors in the actual test and errors occurring during test preparation, eCATT provides options to declare preprocessing steps as such.
If an error occurs in a preprocessing step, the test result will be "Precondition Not Fulfilled". This is indicated with yellow icons in the eCATT log and reported as "Test not executed" to the SAP Test Workbench.
Standard Use - REF with PRECONDITION
This function turns "Failed" into "Precondition failed". The function is used to report errors of the preparation modules as not being the complete "failure" of the test. You can use this function to migrate existing test script modules, and use them as preparation modules with less strict error reporting.
Script developers can mark the preprocessing block at a REF command using the option PRECONDITION.
If PRECONDITION is set to " S" at an REF command, and an error or aborting message inside the REF sets the status "Test Failed", the REF is given the status "Precondition failed".
The REF itself and all its enclosing blocks will be marked with the icon for "Precondition failed" (if this is the first "unsuccessful" status).
The abort handling is the same as usual.
eCATT's REF command is structured as follows:
|
Node |
Description |
|---|---|
|
TESTCONFIG |
REF with import data of this test configuration |
|
VARIANT |
REF with import data of this test configuration's variant |
|
PRECONDITION |
Precondition behavior, if errors occur in this REF Possible values: Space= No Precondition Handling S= Treat errors inside REF as "Precondition Not Fulfilled" I= Ignore all settings of "Precondition = S" inside the REF |
|
IMPORTING |
Import parameters of the REF |
|
EXPORTING |
Export parameters from the REF |
In contrast to the log of an error at actual testing, all levels from the REF with "Precondition = S" up to the test configuration are marked with yellow icons in the case of an error inside a REF with "Precondition = S".
REF with IGNORE PRECONDITION
This function turns "Precondition failed" back to "Failed". The purpose of the function is to report errors from modules reused from other test development areas, where these modules use the "Precondition" feature, but this is not acceptable for the actual test.
Using REF with "PRECONDITION = I" turns off the precondition handling for the module referenced.
If "PRECONDITION" is set to " I", any "Precondition failed" status occurring inside that REF will be treated as "Failed".
The REF itself and all its enclosing blocks will be marked with the icon for "Failed".
The abort handling is the same as usual.
Precondition Failure with LOGTEXT
You can set a status "Precondition Not Fulfilled" directly from the script by using the eCATT command LOGTEXT.
Use the value ' P' for the first parameter of LOGTEXT:
L OGTEXT ( 'P' , 'Error in Test Preparation')
The log displays a yellow icon at the LOGTEXT command and all enclosing blocks. The "Precondition Ignore" feature and the start options are taken into account if they have been set.
Start Options
On the eCATT start screen you can configure some runtime options for each test.
The start screen offers the option of disabling precondition handling. In this case, all errors (including those inside preparation scripts and from LOGTEXT 'P') are reported with red icons.