Forum Discussion

jmcwhinney's avatar
jmcwhinney
Contributor
10 years ago

Can a project call another project and pass it parameters?

I have created a framework of sorts for my AUT, a library of somewhat universal scripts for common actions:

- Click Option in file menu (File, New)

- Set Form Field value (Customer #, 12345)

etc, etc

I have done this to make the code managable, and set things up such that if the AUT changes, I only need to update the framework rather than hundreds of test scripts.

 

 

I have a project titled "Create Service Order" which calls on these scripts to run through the process of creating a service order etc.

 

 

Now what I need is a higher level project to call on sub projects to test entire end to end processes

eg.

- Call Project "Create Service Order" with parameters "Customer #", "machine #", etc

- Call Project "Invoice Service Order" with parameters "Order #", etc

etc, etc

 

I know I could make my project "Create Service Order" into a script instead, and only make projects for "End to End" tests, but I would preffer not to so things are more manageable.  It would be nice to be able to maintain the individual processes using the GUI rather than purely by code.

 

Can this be done?

Can a project call on other projects and pass them parameters?

 

Thanks!

- James

 

 

 

  • Marsha_R's avatar
    Marsha_R
    10 years ago

    We have something similar.  Just make another keyword test called Create Service Order with all the little ones under it.  Then you can copy the one keyword test around instead of the many.

  • cunderw's avatar
    cunderw
    Community Hero

    You can add your KWT tests and Scripts from the other project as existing items to use them. Then you if you cange it in the master project all sub projects that use them will reflect the change.

     

    This works really well actually.

    • jmcwhinney's avatar
      jmcwhinney
      Contributor

      Im not sure what you mean.

       

      Are you suggesting re-adding all of the test items from another project into the current project.

      That seems very inefficient.

       

      Also, if I add a test item to the original project, it will not appear in the "master project". 

      I will have to add it in both places.  Correct?

      • Marsha_R's avatar
        Marsha_R
        Moderator

        Projects are stand alone and don't have access to each other's tests.  cunderw's suggestion is the way to go.

         

        Use Add Existing to put a pointer in the current project to whatever other test you want in there.  It will then run in either project but you only have to update the test in the project where the original lives.

         

        See screenshots...