TestProject Forum
Powered by leading experts in the test automation community

Share output parameters from Test inside Test

Almost the same topik capture the parameters from the recorded tests and use them in Coded tests.

Decided to create folder with API standalone tests to re-use them inside my UI tests.

For ex.:

  1. API test: Get “User Status” with output parameter “status”;
  2. Recorded UI test: “Login”;
  3. Inside “Login” test I want to use my API test “User Status” using Add step -> Type = Test -> “User Status” and check that the “status” parameter is “logged in” so I need to compare it using next step;
  4. Compare “status” = “logged in”.

Result: “status” string is empty, but in “User Status” test results I see that I got “status”, the same with coded test as I mentioned above, tried different actions but nothing.

A bit different screenshots example:
API Test


6th Step (Api)

7th Step

Reason: A lot of statuses with different pre-conditions and I don’t want to validate “status” inside API test, better to re-use one test I think.

Hi @sivanchenko91, i think i see your issue. although in API test the response is in “output parameters” this is the STEP output parameter and not the TEST output parameter. i have created a similar test and took some screenshots:
after creating the first step and defining the parameter like you did, you need to add it as a test parameter-


then click the + icon like so and add the parameter as output parameter. (you dont need anything else, so you can delete other input/output parameters to keep it clean)

once this is done, go to the recorded UI test much like you did, and recreate that step. now that you have defined the output parameter, the recorder will prompt you to add it like so:

click yes, and create the step. now you can use that parameter and it will work!


Thank you so much for posting on our forum! this is an excellent question and will help many others!

1 Like

@tomerkalmovich,
Thanks a lot, it works. :+1:

1 Like