Forum Discussion

hiepwork08's avatar
hiepwork08
Contributor
5 years ago

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

 

  • hiepwork08's avatar
    hiepwork08
    5 years ago

    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()}"/>

  • 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

     

     

    • hkim5's avatar
      hkim5
      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.

      • hiepwork08's avatar
        hiepwork08
        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