Forum Discussion

abrar22's avatar
abrar22
Frequent Contributor
10 years ago

Loading up NameMapping File in Script

Hi All,

 

I have a requirenment where i need to load up name mapping file from my local directory in my project. Does some have implemented this for the project and share the idea or psedo code how to do it?

 

Thanks

a

4 Replies

  • djadhav's avatar
    djadhav
    Regular Contributor

    Can you add some more specific details about what you're trying to do? TestComplete automatically loads NameMapping from local project file anyways.

    e.g. for my project residing in C:\TC11Projects\VER it'll automatically load name mapping from the C:\TC11Projects\VER\..\NameMapping\NameMapping.tcNM file.

    • abrar22's avatar
      abrar22
      Frequent Contributor

      In our project we have different modules so depending on the module i want to pick up the NameMapping file for that Module from Common Directory.

       

      Example: Project- Module A and Module B

       

      Module A uses NameMapping File A

      Module B uses NameMapping File B

       

      So depending on Module I want to load up the Copy the nameMapping file  as from 

       

      C:\Users\ab84953\Documents\

      to 

      C:\FXQA\TestComplete_Projects\Project1\NameMapping

      • djadhav's avatar
        djadhav
        Regular Contributor

        The only way I know to do it is before you run the tests in testcomplete. I don't think there is a TestComplete feature that let's you do that during test execution.

        The other option is to run your tests using TestExecute and between running of different modules programmatically replace the NameMapping files.

         

        This should help you do that.

        https://support.smartbear.com/viewarticle/67557/