04-04-2011 3:18 AM
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
04-04-2011 6:57 AM
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
04-04-2011 7:50 PM
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
04-06-2011 7:59 AM
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