Forum Discussion

vsumathi's avatar
vsumathi
Occasional Contributor
4 years ago
Solved

How to Automate Tests in TestComplete

Hi,

 

I am trying to automate tests in TestComplete. I want to run my tests at a scheduled time (eg: 07: 00 PM every Thursday ) . Can anyone tell me how to accomplish this? My application is in C#

  • tristaanogre's avatar
    tristaanogre
    4 years ago

    One more note:

     

    In Windows Task Scheduler, you should actually make your program/script the CMD.EXE and then, in your arguements, put in the full commandline as per the documentation but proceeded with a /c.  

     

    So, again, program/Script is CMD.EXE and commandline should look like this.

    /c "C:\Program Files (x86)\SmartBear\TestComplete 14\x64\Bin\TestComplete.exe" "C:\Users\fciappadmin02\Documents\TestComplete 14 Projects\AutoSchedule\AutoSchedule.PJS" /Run /Exit /SilentMode

9 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Once you have your tests developed, the execution of them can be done in MANY different ways.

     

    We use WIndows Task Schedular to set up designated times to run projects.

    Some people use Jenkins

    Some use Jira

    Some use QA Complete

    some use.... some other tool.

     

    MOST of them start, in some way, with using the Command line execution of TestExecute (note.. NOT TestComplete... TestExecute... although they use the same command lines)

     

    Start here

     

    https://support.smartbear.com/testcomplete/docs/working-with/automating/index.html

    • vsumathi's avatar
      vsumathi
      Occasional Contributor

      I am trying to use Windows Scheduler and was not successful.  See the steps below

       

      1. Created a test project in TestComplete as  'Auto Schedule'. Added one keyword test 'Test2' under this.

      2. Created a new Task under Task Scheduler.

      3. Under Actions set the 'Program/Script' as ""C:\Program Files (x86)\SmartBear\TestComplete 14\x64\Bin\TestComplete.exe" 

      4. 'Add arguments' as " "C:\Users\fciappadmin02\Documents\TestComplete 14 Projects\AutoSchedule\"

       

      But when I tried to run the scheduler, it's showing me the message 'Launch Failure' . 

       

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        The project is either a PJS or MDS file.  So, you passed it the folder for AutoSchedule but you didn't specify which file in that folder to open?  Is there an AutoSchedule.MDS file or AutoSchedule.PJS file in that folder?  That should be part of your parameters.

         

        Additionally, as the documentation I linked to you mentioned, you need some other switches as well.  You need the /Run switch to actually execute the project.  Also, you'll need the /Exit switch to make sure that, once the project is executed, TestComplete is shut down.

         

        Also, you need to make sure that your project is prepared properly.  While you have the test created, is it added as a Test Item in your project?  If so, just running the project should be fine.  If not, you may need to include additional switches to indicate what test (Keyword test, script module, etc) you want to execute.

         

        It's all in the documentation.