How to test a workflow when the actual result changes per run

Hello,
I’m trying to test a workflow where the out_arg from the main (actual value) is an id that changes per each run. Its a post request that generates an ID after a 200 (success).

I’m having challenges on how to test because I wont know the actual value of the automation until it runs.

Suggestions will be appreciated.

Hi,

Why there is a need of checking ID when you will get ID after success of the POST? and ID will be always unique then you have to consider POST output status as the success.

Thanks,
Kalpesh

@Yomi_Oluwadara

  1. You can check the response status value
  2. You can check if a response number or id is returned or not as you would get only when the call is successful

Cheers

1 Like

You can save it in queues once you get the response and then test it after that by retrieving the value from queue

Cheers @Yomi_Oluwadara

1 Like

An option is to just use Not String.IsNullOrWhitespace to check if you got a value. Or you can use Mocks, if you need the value further in the invoking sequence. Studio - Mock Testing - https://docs.uipath.com/

1 Like

@Palaniyappan @Anil_G @Kalpesh_Chaudhari @efelantti Thank you all

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.