Printer FriendlyEmail Article Link

Avalanche: Is it possible to configure two MATCH commands were the 2nd MATCH only happens when the 1st MATCH is successful?

Environment/Versions
  • Avalanche 4.xx
  • HTTP
  • MATCH
Answer
  • No, not directly.
  • Avalanche MATCH commands will parse a server response and execute all configured MATCH commands
  • One possible workaround would be to do something as follows:

    Goal: Only do a MATCH for 'ABC' in the body if the server response is a '200' ok http status code
              1 GET http://192.168.1.1
              MATCHNOT <"200" 1 1 HEADER>
              STOP USER
              1 GET http://192.168.1.1
              MATCH <"ABC" 1 1 BODY>
              #Requests URI once, if 200 ‘ok’ is not matched in the header that simuser stops and does not request the URI again 
              #If a ‘200’ is matched the simuser will request the URI again and attempt a match for 'ABC' 

Product : App Testing,Avalanche,HTTP