Call an API test as a test step

Hi,

Here is my scenario:

1 - I create a WEB test case to change a setting on Front-end;
2 - I create a MOBILE test to validate that the Front-End setting is reflecting correctly on the Mobile;

Since there is no possibility to run Web and Mobile tests on a same Job (I am avoiding running the web tests on the mobile browser), apparently one possible solution is to call the WEB test done on step 1 to the mobile test, as a step, using the API.

Can someone tell me how to do this, please?

Thank you.

Miguel Morgado

Hi @miguel.morgado, and welcome to our community :slight_smile:

Can you please elaborate on your intention in this sentence “to call the WEB test done on step 1 to the mobile test, as a step, using the API” ?
It will be beneficial.

Hi Alex, thank you.

Yes, I can give an example. Perhaps that helps:

Imagine that I create a test on front-end to activate a flag on some setting (for example, “Operation A”) so that the Operation A becomes available on the mobile.

Then I create a test on the Mobile to check that the Operation A is in fact available.

I want to to run both test cases (Web and Mobile) on the same job, but apparently that is not possible yet, so I need an alternative.

If I understand correctly, its possible to do the following:

While creating the Mobile test to validate the Operation A, its possible to create a step that “calls” the Web test with the Operation A setting activation.

If its not possible like that, it would be great that you can give me a solution.

Thank you in Advance.

Miguel Morgado

Hi @miguel.morgado ,

It is possible, and you can follow this guide to understand fully how to do it:

  1. First I will run the web test from the testproject swagger:
    amXc02PTWo

  2. Then you have to copy the request URL(project ID, and test ID included inside the URL):

  3. Now I will add a new step manually with the Post API:
    iWhm7oZfda

  4. I will add all the inputs that are required:

  5. And that’s it, it should work well.
    Let me know if you managed, I’d be happy to help :slight_smile:

Great. I will try that,

Thank you very much for your answer.

Best Regards,

Miguel Morgado

@miguel.morgado Sure no problem, let me know if you managed :slight_smile: