Creating and running a unit test case for application debugging

As part of developing and maintaining an application that runs on IMS, you can create unit test cases and provide input message data in human readable format for debugging. After you create a unit test case, you can create variations of it with different input message data, to easily exercise different code paths in the IMS transaction.

About this task

To test a transaction, define the transaction and message layout. Then, develop a script of the dialog between an application and one or more transactions that run in IMS.

Procedure

To create a unit test case:

  1. Create a transaction test project by clicking File > New > IMS Explorer Transaction Test Project.
  2. Optional: In the test project, create a new transaction by right-clicking the Test Cases folder and clicking New > IMS Transaction.
  3. Define the input and output messages in the transaction.
  4. Create a test case by right-clicking the Test Cases folder and clicking New > IMS Transaction Test Case.
  5. Develop a script of the dialog between an existing or future front-end application and one or more transactions running in IMS.
  6. Define a new IMS transaction server connection. Right-click in the Servers view and click New > Server. In the New Server wizard, click IBM > IMS Transaction Server.
  7. From the test project, right-click and click Run As > Run Configurations.
  8. Define your runtime configuration.
  9. In the Run Configurations wizard, select the configuration that you created in 8 and click Run.
    Tip: From the Eclipse toolbar, select the Run As list and click the configuration that you created in step 8.
  10. Run the test case.




© Copyright IBM Corporation 2010, 2017.