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: 

ECATT not stable

Former Member
0 Kudos

Hello,

I created ECATT script for transaction ME51N - Create purchase requisition using SAPGUI REC interface.

In transaction ME51N I jumped to necesary fields using mouse positioning. The script was sucessfully saved.

When executing the script it sometimes works and sometimes does not work. When it is not working, it stops usually at one of

the first script lines with one of the messages:

Transaction ME51N not found

GUI element "Shell" not found

I have the impression this happens when the session of the former ECATT run is not completely closed. But I can not verify this.

What can I do to verify if there is really a not completely closed session on system under test?

How can I improve the script to make it stable?

Dieter Biela

Germany

1 REPLY 1

Former Member
0 Kudos

Hi Dieter,

Transaction behavior and session state might be reasons for SAPGUI automation to stop or to fail to control the UI. The screen flow and other behaviour of a transaction like ME51N depends on many preconditions. Running other steps in same UI session is only one of them.

It's a good idea to isolate independend automation tasks and to process different tests each in it's own environment.

To do so, you have a number of options in eCATT:

- use command RESCON to close the currently used RFC session in SUT (system under test) and to close the SAP GUI Scripting session at same time -> Restarts the controled SAP GUI

or

- in the first SAPGUI command of the new sequence use the field ResetGUI = 'X', which will stop the previously running transaction in the current SAPGUI session and restart the transaction code given in the same SAPGUI command (similar to    /N<TCODE>  in OK Code field)  -> Restarts the transaction but controled SAP GUI window will stay

or

- use start option "Close RFC Connection" when starting your tests, which would close RFC and SAP GUI sessions between each test configuration and test configuration variant of a test package run

Beside a new and clean SAP GUI session or transaction context you can also check the influence of SPA/GPA parameters on ME51N.

Maybe this can help to make your automation more stable.

Kind regards

Jens