
eCATT is a test tool that supports automatic testing by running test scripts. Test scripts contain algorithms made up of eCATT commands. Individual commands act on objects that are to be tested in a target system.
eCATT has a feature that allows testers to test Web services offered by any service provider in the network. eCATT makes use of the Web Service runtime and generated ABAP proxy classes to call Web services.
In Web service standard definitions there is no common definition for reporting on the business logic level, for example for reporting logical application errors and other information that the application providing the service must give the service consumer.
Web services provided by SAP software often use a shared message structure in the export parameter LOG of the Web service. The message structure is defined as a table of message entries, each of which contains fields. These fields include the following:
|
Field Name |
Data Type |
Content |
|---|---|---|
|
TYPE_ID |
CHAR40 |
Msgnr(msgid) |
|
SEVERITY_CODE |
CHAR1 |
3, 2, or 1 |
|
NOTE |
CHAR200 |
Message text including all variable parts |
If the structure of the message contains the fields described above, eCATT processes the messages reported by Web service calls in the export parameter LOG, using eCATT's standard message handling.
eCATT's message structure (ETMSG_RES) is filled according to the following mapping rules:
|
WS Log Field |
ETMSG_RES Field |
Transformation Rule |
|---|---|---|
|
SEVERITY_CODE |
MSGTYP |
3=E; 2=W; 1=I or any other |
|
TYPE_ID |
MSGID |
Value inside ( ) from msgnr(msgid) |
|
TYPE_ID |
MSGNR |
Value before ( ) from msgnr(msgid) |
|
MSGTEXT |
NOTE |
No transformation; the message text is used as it is |
Standard Use
Message Handling Without MESSAGE/ENDMESSAGE
There is no special behavior at runtime for WEBSERVICE commands unless an error message occurs.
If a message with MSGTYP = E (SEVERITY_CODE = 3) occurs, the eCATT command WEBSERVICE is marked as FAILED (Red icon) in the eCATT log.
The message itself is displayed in the eCATT log at the WEBSERVICE command.
Message Handling With MESSAGE/ENDMESSAGE
Test developers can use rules in the MESSAGE command to influence further test execution and the test result, if one of the assigned messages occurs.
In the selection part of a rule, you can define which messages are to be selected using the message type, the message ID, or the message number as criteria.
In the action part of a rule, a message can be defined as Allowed or Required. You can set the status Failure when certain messages occur. You can set the status Success if a specific message occurs as expected.