Defining logic tests

In WSim, you can create simulations that interact effectively with the system under test by coding the IF message generation statement. As discussed in Basic concepts, the IF statement defines a logic test based on messages transmitted or received by simulated resources. With the IF statement, you can also define logic tests that WSim evaluates immediately. These logic tests are not dependent on message traffic with the system under test.

An IF statement logic test performs the following functions in your message generation decks:
  • Specifies comparisons that WSim performs on data sent or received by simulated resources
  • Specifies comparisons that WSim performs with counters, switches, and save or user areas
  • Specifies tests to determine whether events were completed
  • Tests the current location of the cursor
  • Alters the message generation process depending on the results of specified comparisons
  • Sets switches, overrides normal SNA responses, cancels current delays, saves data, and logs messages.
In addition to IF statements in your message generation decks, you can include IF statements in your network definition. The IF statements in your network definition enable you to test messages sent or received for all devices in your network. This chapter describes the differences between network-level and message-level IF statements. It also describes how to code the IF message generation statement to include logic testing in your message generation decks.
Information provided in this chapter includes the following:
  • Understanding network-level and message-level logic tests
  • Coding IF statement operands
  • Understanding logic test processing
  • Understanding logic test examples
  • Using logic tests to create self-checking scripts.
This chapter provides detailed examples throughout to help you understand how logic tests work and how you code logic tests in your message generation decks.