Forum Discussion

hiepwork08's avatar
hiepwork08
Contributor
4 years ago
Solved

Setting Store to have relative paths

For stores in general, how does one store the images to a relative path.

 

For example, but keyword tests uses Region checkpoints which include some .png images stored at say:

C:\Data\Regions

 

What I am finding is that when the tests are run on a different machine is uses a relative path, test execute continues to look for the .png files stored at C:\Data\Regions.

How do I direct is to look at the relative path which is already defined.

  • Hi hkim5 

    That problem looks to be solved now. I used the testcomplete GUI to add the image files to the Regions folder, then from there my keyword tests references those image files.

    Cheers.

5 Replies

  • Hi,

    What I do with data-driven testing is keep the data in sub folders inside the project hierarchy. You can get the path to your project folder by.

    var path=Project.Path

    This will work regardless of where you run it. 

    Thanks

    • hiepwork08's avatar
      hiepwork08
      Contributor

      Hi Reshail,

      Thank you your reply.

      Currently I have the region images under Stores\Regions\image.png.

      Is that what you mean by inside the project hierarchy?

      I have used the TestComplete GUI to add the png images to the regions folder.

      Once the image is added by testComplete into this folder it looks like testcomplete is adding it by reference rather copy.

       

      Cheers

      • hkim5's avatar
        hkim5
        Staff

        Hi hiepwork08 

         

        How are you getting your testcomplete projects on to your remote machines for execution?

        Are you using a CICD pipeline?

        Are you using an SCM to securely store and pull the files to your remote execution machines?

        If so, when you do a "git pull" and run the tests that have the region checkpoints in them, you should not be seeing any failures attributed to path errors since the region checkpoint is referencing the Aliases.someObject which has a corresponding png located in your Stores item within that project. 

        Could you also attach screenshots of the operation parameters of the region checkpoint that is failing, along with the test log (details tab) of the failed region checkpoint?