Wrong Input Data to Fields


Providing wrong input data to a program is an important test scenario. Let us see how we can do this.

First, let’s try to create a test scenario of XARISCAL with a valid input value given as a hexed value. Complete the following steps to create a test scenario of XARISCAL:

  1. From the repository view, find XARISCAL, right-click it, and select Create Total Test Scenario.
  2. Select the Component and click the Hexed cell for the age field.
  3. Enter 00F1F1 as value for age. This is hexed EBCDIC for 11, and enter 22 as expected risc factor.

    inset_0w.jpg

  4. Click the execute icon in the top right corner and see that you get the below result:
    inset_1w.jpg

As a next step, change the age value to an invalid age. Complete the following steps:

  1. Set the value to FF0101 which is not a valid value.
  2. Save the test Scenario and click the execute icon and see that the test scenario fails because the program abends.
    inset_2w.jpg
  3. This failure warning was expected, because the value was wrong. As the final step, let’s assume the program abends. Complete the following:
    1. Select the component in the test scenario and checkmark the Expect an abend option under the Properties tab.
    2. Delete the expected value for the risc field.
    3. Save the test scenario and see that the test scenario is now successful.
    4. From the execution log we can see that the program still abends.
      image2021-8-17_22-18-26.png

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*