Unit test issues

The unit test tools test all SAP development work that handles business object processing for the connector. Also, the unit test tools enable you to test the interaction of your work with the ABAP components of the connector. The test tools allow you to test your development work as an online user (real-time) only.

It is important to understand the differences between testing the connector as if operating as a background user and testing the connector as an online user. The main differences are as follows:

Memory
When testing a business object, the connector must log into the SAP application. In addition, logging in is required to test the business objects by generating events and using the test tools in IBM CrossWorlds Station.

The connector runs as a background user, so it processes in a single memory space that is never implicitly refreshed until the connector is stopped and then restarted (therefore it is critical in business object development to clear memory after processing is complete). Since you are an online user, memory is typically refreshed after each transaction you execute.

For more information, see Developing business objects for the ABAP Extension module. Any problems that may occur because of this (for example, return codes never being initialized) are not detected using the test tool; only testing with the connector reveals these issues.

Screen flow behavior
Screen flow behavior is relevant only when using the Call Transaction API. The precise screen and sequence of screens that a user interacts with is usually determined at runtime by the transaction's code. For example, if a user chooses to extend a material master record to include a sales view by checking the Sales view check box, SAP queries the user for the specific Sales Organization information by presenting an additional input field. So, the transaction source code at runtime determines the specific screen and its requirements based on the data input by the user. While the test tool can handle this type of test scenario, there is a related scenario that the test tool cannot handle.

SAP's transaction code may present different screens to background users and online users (usually for usability rather than performance). The test tool operates only as an online user. The connector operates only as a background user. Despite this difference, unit testing allows you to handle most testing situations.

Copyright IBM Corp. 1997, 2004