Forum Discussion

heidi_n's avatar
heidi_n
Regular Contributor
9 years ago

Can I reuse the same test in multiple project suites?

Can I reuse the same test in multiple project suites? If so, how?

 

When I tried this, and added my test from "add existing", it just saved over my original test.

 

For example, my test creates a sales order:

 

Project Suite A

Test - Create order for Customer A

 

Project Suite B

Test - Create order for Customer B (I'd like to reuse the test from above and just tweak it a bit to change it to a different customer.) When I "added existing" and used the test from above, I changed the test to use Customer B.

 

Result: My original test was saved over and now Project A creates a test for Customer B. I didn't want this... how can I reuse tests successfully without the original being overwritten?

2 Replies

  • NisHera's avatar
    NisHera
    Valued Contributor

    you can do like............

     

    Project Suite A

    Variable = X

    Test - Create order for Customer X

    in test run time write X=A

     

    Project Suite B

    Test - Create order for Customer X

    in test run time write X=B

     

    So you do not necessarily change Project A but assign customer detail at run time

    • asmatullah's avatar
      asmatullah
      Contributor

      You can create shared library (scripts)and make some function for Order_Creation(client) inside it .

      Then call this function inside the project script or any where you want it .