Forum Discussion

S_Seydel's avatar
S_Seydel
Contributor
8 years ago

Scripting equivalent of Test Items tab

Hi,

 

in my first test suite I had many dependencies between tests, tests could only be run if all tests which were run before were completed successfully. Of course this made a major rework necessary.

 

To resolve all test dependencies I added a project “World Builder” which contains scripts to set the tested application to the specific state needed by the different test projects of the suite to be run.

 

For example if the process of customer orders is to be tested, scripts can be run, to create needed users, a shop, customers and products. After all this is done the test project “order process” can be started.

 

My problem is that it seems I’m not able to call the “world builder” project from the test project to be run. Is there really no way to accomplish this?

 

I know I could add all needed “world builder” scripts to the test project to be run, but then I would have to merge all name mapping files, this would be weeks of work to do.

 

What I’m really looking for is a possibility to call a project from a script outside of the project to be called. If you will a scripting equivalent of the test suite’s and projects’ “Test Items” tab plus “run” command.

 

4 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    Projects are self contained.  You can share scripts between projects by adding them as Existing Items but you can't call from one project to another to run a script.

     

    We have similar setup scripts but we included each set in the project that it applies to.  

     

    Would the name mapping for your customer orders world building be very different from your customer orders tests?  I can make suggestions for merging just the needed pieces for each section if you decide to break the world building apart.

  • Thank you for your reply.

     

    To be honest name mapping of my world building project is very different from that of my early projects, just for the reason that at the beginning my name mapping wasn't of best quality and improved much since then.

     

    I hesitate to break up the world building and integrate the needed parts in the other projects, because for most projects you need the world building scripts of all projects run before plus one more.

     

    An example:

    To test the creation of users you don't need a world building script, just a fresh instance of the application.

    To test the creation of shops you need to run a world building script, which creates the needed users.

    To test the creation of customers, you need to run world building scripts to create needed users and a shop.

    And so on.

     

    For that reason I tend to rework the whole suite's name mapping into one name mapping file for the application shared between all projects. Plenty of work, but perhaps the most robust way to maintain all tests during future development and to add new ones.

     

  • After some research let me add that it would be nice, if the properties of the objects "Project" and "ProjectSuite" wouldn't be read only and some execute method existed.