Ask a Question

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

SOLVED
dmckay3200
New Contributor

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

6 REPLIES 6
8Kit
Frequent 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]

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?

8Kit
Frequent 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:

8Kit_1-1660840694929.png

 

In your example, is it possible to say /tags:"@Auth and @LoginPartnerPortal" to specify this feature file and this scenario?

8Kit
Frequent Contributor

Yes it is possible, but please read through the reference linked in my initial response - it tells you how to do everything you have asked. 

 

here it is again:

https://support.smartbear.com/testcomplete/docs/bdd/tags.html

Thank you for the information. I read through the page before but it was not clicking. The problem was I was not using tags properly in the feature file.

cancel
Showing results for 
Search instead for 
Did you mean: