Forum Discussion

dmckay3200's avatar
dmckay3200
New Contributor
3 years ago

Issue when trying to run a specific scenario file and tag when calling through command line

Hello,

 

I am trying to run specific scenarios in a feature file via command line. However, it appears that all the scenarios are being run in the feature file regardless of the tag.

 

Command being used:

TestComplete.exe <path to project> "/project:project_name" /test:"Scenarios|example1" /tags:"@featuretag" /r

  • Try using either '/test:' OR /tags:' instead of both:

     

     

    TestComplete.exe project-suite-file /project:project-name /test:"@tag1" /run
    
    ā€“ or ā€“
    
    TestComplete.exe project-suite-file /project:project-name /tags:"@tag1" /run

     

    [TestComplete reference]

  • Kitt's avatar
    Kitt
    Regular Contributor

    Try using either '/test:' OR /tags:' instead of both:

     

     

    TestComplete.exe project-suite-file /project:project-name /test:"@tag1" /run
    
    ā€“ or ā€“
    
    TestComplete.exe project-suite-file /project:project-name /tags:"@tag1" /run

     

    [TestComplete reference]

    • dmckay3200's avatar
      dmckay3200
      New Contributor

      For this, I will need to be able to specify the feature file and only specific scenarios based on their tags. Is there a way to combine the two using /test?

      • Kitt's avatar
        Kitt
        Regular Contributor

        The tag is just going to reference and run anything with that tag: scenarios or features or examples. So there is no reason to explicitly state in the command what feature or scenario the tag is in - just the tag. Please reference my previous link, it covers all of this information - including combining tags and scripting examples.

         
        here's my own example: