Forum Discussion

chaarim's avatar
chaarim
Occasional Contributor
9 years ago

TestExecute run by test case

Hello,

 

Is it possible to run a single test with TestExecute ?

The only mode we could use now, is to run a whole project suite.

 

Thanks for your help.

 

 

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Currently, in TestExecute via command line, you cannot run a TestItem under the Projects -> TestItems panel.  

    If the test item points to a keyword test or a script routine, you can call it like:

    //For keyword tests
    TestExecute MyProjectSuite.pjs /project:MyProject /test:KeywordTests|Test1
    
    //For script routines
    
    TestExecute MyProjectSuite.pjs /project:MyProject /test:Script|Unit1|Main
    
    //or
    
    TestExecute MyProjectSuite.pjs /project:MyProject /unit:Unit1 /routine:Main

     Reference: https://support.smartbear.com/testcomplete/docs/working-with/automating/command-line-and-exit-codes/command-line.html

    • chaarim's avatar
      chaarim
      Occasional Contributor

      Hello,

       

      Thank you for the reply.

      It will be very useful to use the command line.

       

      I have another question, when we run a whole project suite with TestExecute, and a test case fails during the run, is it possible to resume the tests with TestExecute ?

       

      Thanks

      • Colin_McCrae's avatar
        Colin_McCrae
        Community Hero

        Yes.

         

        You can uncheck "Stop On Error" in the project settings tab. (And also alter the other "Stop on" settings if need be)

         

        But be careful if you're going to allow tests to run on after a failure. If the failure affects the application state for the next test, it can cause all sorts of knock-on failures and problems down the line. If each test does it's own setup and tear down, then it should be less of an issue.