Forum Discussion

kaivi's avatar
kaivi
Contributor
6 years ago
Solved

compare a response with a json file

Hey,   first of all i have a GET request with a response... now i wanna save the response in a JSON file to compare this with a existing JSON file.   HOW can i do this?   best regards k...
  • Lucian's avatar
    Lucian
    6 years ago

    You can use the following code:

     

    ...
    if (!(it.value == outputResp[it.key]))
        {
            log.info ("File Mismatch at : " + it.key)
            testRunner.fail( "File mismatch..." )
        }
    ...