Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Using eCATT for Negative Test

Former Member
0 Kudos

Hi Everyone,

Would like to check the feasibility of using eCATT for negative test.

e.g. Would like to do a negative test for invoice posting via FB01.

- Test scenario would be G/L account provided is locked for posting.

- Would eCATT be able to show this as a 'successful' result so that no investigation is required?

Thanks in advance.

- Jason

3 REPLIES 3

uwe_schieferstein
Active Contributor
0 Kudos

Hello Jason

I assume that if you execute FB01 to post against a locked account the system will issue an error message.

If so then you can capture this specific error message using the MESSAGE interface:


MESSAGE.
  TCD ( FB01, FB01_1 ).
ENDMESSAGE ( MSG_1 ).

Before executing the transaction I would first check whether the account is indeed locked. Perhaps there is another transaction available for locking the account.



TCD ( xxxx, xxxx_1 ).  " Recording to lock G/L account

MESSAGE.
  TCD ( FB01, FB01_1 ).
ENDMESSAGE ( MSG_1 ).

In general, if you have a specific negative output that is repeatable than you can use eCATT for testing.

Regards

Uwe

AjayHS
Product and Topic Expert
Product and Topic Expert
0 Kudos

When there is a negative test being carried out , there should be corresponding message displayed in the application mentioning the wrong doing.

Then this message can be handled using the message ... endmessage block.

Either you can expect the message in that case your Log would be red provided the message is an error message then you will have to allow the error message and exit the recording in the message handling.

If there is no message then its an application issue as every invalid operation has to be handled with appropriate message.

Thanks

Ajay

Former Member
0 Kudos

Hi Jason,

Note the msg id and msg number for the error message - 'G/L account blocked for posting'

Upon having the above information, do your recording and ensure that you place the recording between MESSAGE and ENDMESSAGE block.

Double click on MESSAGE and create an expected message record with the above msg id and msg number.

This ensures that the error message is always expected by the recording and thus can perform negative testing but note that the execution with give you GREEN