Forum Discussion

cissy's avatar
cissy
Occasional Contributor
14 years ago

How to use ANT to start TestComplete

I will do automation test by using TestComplete and I want to use ANT to create some target.

So my question is that I want to create a target in build.xml of ANT, in the target, I want to start TestComplete.exe



<target name="runTEProjects">

    <exec executable="C:\Program Files\Automated QA\TestComplete 8\Bin\TestComplete.exe">

         <arg value="start"/>

      <arg value="/wait"/>

      <arg value="D:\MyProject\MyProject.pjs"/>

      <agr value="/run"/>

      <agr value="/exit"/>

    </exec>

</target>



But it can not work, so I want to know whether ANT can identify TestComplete and how to create the target?



Thanks!
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Your last two argument calls are misspelled.  See what happens if you correct those from "agr" to "arg"
  • cissy's avatar
    cissy
    Occasional Contributor
    Hi,



    I just change the agr to arg, and I ran again, it still cannot work, it cannot call TestComplete.



    Thanks!
  • cissy's avatar
    cissy
    Occasional Contributor
    Hi,



    Now ANT can call TestComplete, it works well.

    I found there were some parameter wrong in build.xml, it was my fault.

    I will be careful.



    Thanks!
  • cissy's avatar
    cissy
    Occasional Contributor
    Function: use ANT to call TC

    My build.xml

    <project name="AutomatedCoverage" basedir=".">

        <property name="TestComplete.home" value="C:\Program Files\Automated QA\TestComplete 8\Bin"/>



        <target name="runTCProjects">

            <exec executable="${TestComplete.home}\TestComplete.exe">

             <arg value="start"/>

              <arg value="/wait"/>

              <arg value="D:\MyProject\MyProject.pjs"/>

               <arg value="/run"/>

              <arg value="/exit"/>

            </exec>

       </target> 

    </project>



    And I have a question, on the above project, TC just could run one project one time, and I want to know wether TC could run several project suits one time?