cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Store to have relative paths

SOLVED
Highlighted
Occasional Contributor

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Occasional Contributor

Re: Setting Store to have relative paths

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.

View solution in original post

5 REPLIES 5
Highlighted
Community Manager

Re: Setting Store to have relative paths

Let's ask the Community!

 

@Wamboo  @tristaanogre @Reshail @cunderw 

Any ideas?


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
Highlighted
Contributor

Re: Setting Store to have relative paths

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

Highlighted
Occasional Contributor

Re: Setting Store to have relative paths

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

Highlighted
Staff

Re: Setting Store to have relative paths

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?

Best,
Justin Kim
Highlighted
Occasional Contributor

Re: Setting Store to have relative paths

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.

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

Changing options from outside of TestComplete

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!
Top Kudoed Authors