Forum Discussion

SanthoshShetty's avatar
SanthoshShetty
Occasional Contributor
6 years ago

Execution using Tags - How to trigger multiple tags (test suites) from command line arguments?

Hello All,

 

We are automating our APIs using the SOAP UI Pro version. We have tagged the testsuites with some tag names and when I am trying to execute the suite by selecting multiple tags, system is executing only if all the selected tags are tagged to the test suite, I mean there are 6 suites and I tagged each to a tag say - a, b, c, d, e, f.

 

Now during the execution I want the suite 1 and 5 to execute, so I selected the tag name as 'a' and 'e' and triggered the launch, but I don't see any execution happening. After going through the documentation I found the below details.  

 

---Ready API documentation - Start--

-T: Specifies test suites or test cases to be executed by their tags.

Usage: -T"TestCase tag1[, tag2 ...]"

If you specify one or several tags, the test runner will run only those test suites or test cases that have all the tags you have specified. For example, if you specify -T"TestCase tag1, tag2", it will not run test cases that have tag1 or tag2, but it will run test cases that have both tag1 and tag2.

It is also possible to specify both test suites and test cases for execution by using the -T argument twice: -T"TestSuite suiteTag" -T"TestCase caseTag".

-------Ready API documentation --End--------

 

At the same time when executed from editor, I found an option called "At least one tag" which will execute if the tag is present at least once at the suite. 

We need this kind of feature, can some one please help me how to achieve this using command line arguments.  

 

As mentioned about the tags in the beginning of my post, if I select tags 'a' and 'e' => 1 and 5 test suites should get triggered.

 

Thanks alot.

 

Regards,

Santhosh.G

2 Replies

  • Hello Santhosh,

     

    We already have a corresponding improvement in our DB (RIA-1369) for allowing the "OR" condition for tags for command-line execution. 

     

    In the meantime, you can try implementing this approach: 

    Create a Project Setup script -

    • which checks the values of the TestSuiteTags Global Properties (they are passed as command-line arguments and their format is "tag1,tag2,tagN");
    • and which disables the corresponding items, which don't contain any of the listed tags. 

     

    • Olga_T's avatar
      Olga_T
      SmartBear Alumni (Retired)

      Hi everyone,

       

      Natalie, thank you for your assistance, it's great to have you on the team!

       

      SanthoshShetty, did the reply that Natalie provided answer your question? Did you try the suggested approach?