Results 1 to 8 of 8
  1. #1

    project script access boundary?

    If a project suite has a few projects, can script of one project access scripts from other projects?

    If we can do this, I am thinking of structure our test framework with several test projects, with each project for one feature area. The features are not purely isolated. For example, we may complete some steps from other projects before we do the tests under current project.

    I know one possible approach is to put everything in one project, so any scripts (eg. methods) can be accessed easily. I am wondering if any issue with this.

    Any tips? I would appreciate if you could share how you structure your automation framework for a medium complex web application?

  2. #2

    Re: project script access boundary?

    Hi YellowPerch,

    You can add a reference to a unit with the needed script routines without copying. For more information, refer to the Calling Routines Declared in Another Project help topic.

    Also, we have a suggestion in our database to make it possible to call routines from another project, and your request has increased its rating.
    Allen - SmartBear Support

  3. #3

    Re: project script access boundary?

    Thanks a lot. I am able to reference scripts from other projects. I am not sure if I fully understand it. Below is one simple example:

    1. Project1 ->Feature 1
    2. Project2 ->Feature 2
    3. Project3 ->shared routines

    I expect to put some shared routines (such as the login route) under Project3, so that routines in Project1 and Project2 can reuse it. Is this being supported by TC now?

  4. #4

    Re: project script access boundary?

    You cannot directly call shared routines in Project3 from Project1 and Project2. Those shared routines/code units need to be added to those projects by following the information that Allen posted. With that info, Project3 is unnecessary because Project1 and Project2 would be reading files from a common directory.
    -Robert Martin
    Automated Testing Evangelists
    TestComplete "expert"
    Definition expert - noun - Unknown drip under pressure

  5. #5

    Re: project script access boundary?

    Thanks for the help. I tried below yesterday.

    Project3 -> created a login routine. in the project; environment data (name mappings, testedapp etc) were created also

    Project1 -> an empty project (no name mapping etc); and referenced the login routine from Project3

    The login routine worked if it was started in Project3 directly
    The login routine didn't work if it was started from Project1

    If I have to replicate all the environment data (name mapping etc) from Project3 to Project1, then it looks that I don't really need to create Project3.

    The purpose I wanted to do this is that: if I need to update the shared routines, such as the login routine, at later time, I only need to modify one place (or Project3), but not all the projects (Project1 & Project2) that have used it.

  6. #6

    Re: project script access boundary?

    The NameMapping file can be linked in to multiple projects as well. The effect would be, then, that if you update NameMapping in Project 1 and NameMapping is shared with Project 2, then Project 2 will automatically get those updates. There is no need to update in a 3rd project.

    Have you read the article Allen posted (http://smartbear.com/support/viewarticle/11306/)? This describes exactly what you want to do.
    -Robert Martin
    Automated Testing Evangelists
    TestComplete "expert"
    Definition expert - noun - Unknown drip under pressure

  7. #7

    Re: project script access boundary?

    How to link NameMapping file from another project?

    I have read the article. But it appears it tells how to link scripting files (from other projects), but not for namemapping files.

    I also found there is "Merge with..." item in the context menu when right-clicking the NameMapping node. But it appears the namemapping file after the merge is isolated from the original.

    I am new to TestComplete. Would you give more detail about this?

  8. #8

    Re: project script access boundary?

    Anything that shows up in the project explorer is actually a file that can be either created new (Add New) or linked to an existing (Add Existing).

    So, for example, with NameMapping. If your project currently does not have a NameMapping item and you right click on the Project node in the project explorer, you have the option to select Add with sub-options for "New Item" and "Existing Item". If you select "New Item", it will create a unique NameMapping file specifically for the project. However, if you select "Existing Item", you will be presented with a browser window to search your hard drives to find specific files that you want to add.

    Please see http://smartbear.com/support/viewarticle/11217/ for how to add and remove project items.

    Additionally, you can read http://smartbear.com/support/viewarticle/11307/ for additional information on sharing project items.
    -Robert Martin
    Automated Testing Evangelists
    TestComplete "expert"
    Definition expert - noun - Unknown drip under pressure



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 03:38 PM.

Copyright BetaSoft Inc.