cancel
Showing results for 
Search instead for 
Did you mean: 

Setting default project folder as a relative path

SOLVED
Contributor

Setting default project folder as a relative path

Spoiler
Hi,

I have a use case where I need to integration testcomplete/testexecute with BAMBOO for a continuous testing.

The testcomplete project and associated tests which needs to be run is source code configured in GIT.

When testExecute runs its needs a folder folder, how do I set the default project folder to be "relative". 

What I am finding is that when the project is loaded to be executed by BAMBOO is wont runs because the project folder is fixed to a folder e.g. C:\Data\TestComplete. How would I set it to be relative such as, .../src/test/testcomplete. where the ... is relative to the GIT folder.



Cheers

 

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Contributor

It turns out the based directory created by BAMBOO can be obtained using the get-base-directory() function.

I have embedded the testcomplete tests to be executed in BAMBOO build script which has defined the GIT root path:

 

<property name="root.dir"   value="${project::get-base_directory()}"/>

View solution in original post

4 REPLIES 4
Highlighted
Contributor

Further to my initial question, with reference to the link:

https://support.smartbear.com/testcomplete/docs/working-with/integration/bamboo/requirements.html

 

"You can store your test projects to a source control. Configure your build plan to get the needed files from the repository to the needed folder on the agent.

– or –

You can store your test projects to a shared network folder."

 

If the test projects are stored to a source control, when test execute comes to execute the project how does it know which folder to look for?

 

Or if I opt for the alternative: "Configure your build plan to get the needed files from the repository to the needed folder on the agent" how is this done?

 

Cheers

 

 

Highlighted
Staff

this is more of a procedural question related to how you are using Bamboo.

where you store your TestComplete files on your development machine is entirely unrelated to your test execution, since I'm assuming that you are using Git in order to have it as a part of your execution process so that you can pull the files as needed on your execution machines. the logic here is that you will pull the files as a part of a build in a CI framework later, on those other execution machines. The files are usually stored in a predefined workspace, or a build directory when you pull from SCM via a CI framework as a part of your build step.

 

 

a simple build without any triggers will look like this:

1. Bamboo pulls the TestComplete Project Suite you want to run from Git. (This is pulled to a default build directory).

2. you point to the TestComplete project suite you want to run, and this will always be using the same predefined dynamic variables (this is referring to the default build directory that Bamboo pull the files into in step 1.)

 

https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html

this is a list of all of the different predefined variables offered by atlassian bamboo. My intuition tells me that its most likely going to be 

bamboo.agentWorkingDirectory  

so the path of the pjs that you point to will look something like bamboo.agentWorkingDirectory\myProject.pjs

If you are having trouble configuring this, I'd suggest looking into Atlassian support, or browsing their channels for anything related to dynamic predefined variables, agent based execution of SCM files, etc.

Best,
Justin Kim
Highlighted
Contributor

Hi @hkim5,

Thanks for the reply. 

A further question, if the Default project folder is set to a relative path as described, how does testComplete auto flow that path to other areas of the tests that might be using a different location.

For example I have Regions under the Stores, which contains images files at a location different to the default project folder, would I have to manually re-point all the images files to the new default project folder.

 

Cheers

Highlighted
Contributor

It turns out the based directory created by BAMBOO can be obtained using the get-base-directory() function.

I have embedded the testcomplete tests to be executed in BAMBOO build script which has defined the GIT root path:

 

<property name="root.dir"   value="${project::get-base_directory()}"/>

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

Get properties of a web page element

Participate!

Compare images using the Region Checkpoint

See replies!

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

Participate!

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

Participate!
Top Kudoed Authors