Forum Discussion

MadGrb's avatar
MadGrb
Contributor
4 years ago

reload NameMapping

Good day,

how can I during Test runing, Reload new NameMapping.tcNM file in my running project.

 

I want use several NameMapping file in my Project.

Thanks.

  • MadGrb's avatar
    MadGrb
    4 years ago

    Marsha_R Thanks for Reply.

    I find myself one way to change the NameMapping during a Test by using a some Batch file and Python.

     

    That is a bit Complicated to explain, I remove a NM then Write a script in .bat File then terminate the TC and run it again after finishing test with ex-NM then return back all file in their place.

3 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    Unfortunately that's like trying to swap your car engine while you are driving down the road.  You can refresh the current name mapping but not switch the files.

     

    I suggest building separate projects with the individual name mappings and using this

    https://support.smartbear.com/testcomplete/docs/working-with/managing-projects/project-items/adding-and-removing.html

     

    Note this section.  You'll still only have one copy of each test, but all the projects will be sharing the tests

    To add an existing project item from a file

    • MadGrb's avatar
      MadGrb
      Contributor

      Marsha_R Thanks for Reply.

      I find myself one way to change the NameMapping during a Test by using a some Batch file and Python.

       

      That is a bit Complicated to explain, I remove a NM then Write a script in .bat File then terminate the TC and run it again after finishing test with ex-NM then return back all file in their place.

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        I understand what you did but that's not replacing it while the test is running either, since you've stopped TC each time.