‎2011 Mar 10 9:18 AM
We have implemented the following mechanism for our automated tests.
The SETUP method of our unit test classes creates a few entries in our tables, these are used for the tests.
The TEARDOWN method does a ROLLBACK WORK to get rid of the entries. No COMMIT is performed by any of the tested routines or by the tests themselves.
Problem: When I run the tests from ECA and abort the transaction when the tests are running, the test entries are persisted in the tables. This can only be the case if a COMMIT is issued somewhere. The question is where?
When I let the tests run to completion then the entries are rolled back - no problems.
RFC colleagues tell me that no COMMIT is issued when a connection is aborted.
Appeciate any help!
Steps to recreate the problem: run test catalog SEPM_EPM_UNIT_TESTS from ECA as is (the tests run against YI3). Abort the transaction when the tests are running. See table SNWD_PO - you will find exactly 3 test entries.
Thx + Regards
srini
epm/dev
‎2011 Mar 16 7:43 PM
Hello,
I would suggest to use for example ST05 to trace whole run. Then you'll be able to see where in code commit was executed.
Best regards
Marcin Cholewczuk
‎2011 Mar 23 10:29 AM
A quick update.
I can confirm that the problem has nothing to do with eCATT / ECA. I shall therefore mark the question as answered.
FWIW, here is a quick summary.
Try the simple test routine below - this is the basic structure of our eCATT tests. We create some test data in the setup method of every test, then execute the test, finally trigger a rollback in the teardown method.
When the endless loop is running, select 'stop transaction' from SAPGui, check <table name> whether the test entry is persisted. We discovered that rollback does not work on some (WIN) app servers - on Linux app servers, the rollback is correct. The problem has been adressed and will be fixed.
do.
<fill wa here>
insert <database table name> from <wa>.
rollback work.
enddo.
Regards
srini