Forum Discussion

Kevin902's avatar
Kevin902
New Contributor
8 years ago

Is it possible to give a teststep response outcome to a next teststep? i.e. increased amount

Example. I test a POST method of creating an account which increases the amount of accounts by 1. To test this function I also have a count (GET) function which should show me that the amount has increased by one. Now I can check this manually, but I want to be able to create a next teststep that validates that an extra account has been created so I dont have to check it manually. Is this possible? I am using the free version at the moment.

3 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Yes it is possible to do so with the help of scripting.

    If you provide more details, that would be helpful.
    • Kevin902's avatar
      Kevin902
      New Contributor

      Hey Rao,

       

       I have a GET function to count all active accounts of my login webservice. I want to build a check that checks the amount of accounts after a new account has been added. So I want it to validate a +1 scenario after the POST function has been successfully completed. For now I have a contains assertion in place with RegEx \d+ so I can atleast check if I am getting a number back. The response is in JSON btw.

       

      Another problem I am facing is with a conditional goto. I have a connection check in place to validate access to the webservice. When it returns 'true', the testrun should continue. I do not want it to hog resources running the full script when the first step fails.

       

      As you can see I am still missing some fundamental knowledge of scripting. Any help would be greatly appreciated.

       

      Kevin