Forum Discussion

TBQA1's avatar
TBQA1
New Contributor
11 years ago

Command Line: Run a selection of Test Suites SoapUI Pro 5.1.2

If I had a project that had 5 suites in it, but wanted to customise which ones ran by using ANT, say running suites 1 and 3 only. How can I pass multiple arguments for -s when running from the command line? Is there a delimiter?

 

I can pass a single value fine like -sTestSuite1 but cannot pass something like -sTestSuite1,TestSuite3 or multiple instances of -s like:

-sTestSuite1

-sTestSuite3

 

I basically have an instance where I want to run all of the tests as part of a build over night and another where some tests cannot be run due to an environment constraint.

 

Not sure if this is the correct forum as there is no SoapUI Pro one here...

 

Thanks in advance!

 

2 Replies

  • TBQA1's avatar
    TBQA1
    New Contributor

    I have also tried using the disable suite but the properties overide gets done AFTER the Project Load script gets run, so the values that are passed from the command line overides are not available to the Load Script. Any ideas on how to either to the same thing later (like a control Test Suite with just a groovy script step) or to load the property overrides earlier?

     

    Here is my code:

     

    def TSuiteTrimTrigger=context.expand('${#Project#TSuiteTrimTrigger}')
    
    if (TSuiteTrimTrigger=="thiswillwork") { 
    for( testSuite in project.testSuiteList ) {
    testSuite.disabled = (
    testSuite.name != "TestSuite1" &&
    testSuite.name != "TestSuite1"
    )
    }
    }

     

  • nmrao's avatar
    nmrao
    Icon for Champion Level 1 rankChampion Level 1

    Here is one way to do it.

    1. Define a macro which takes input as project name, suite name.

    2. Define a target for each of the suite and call the macro by passing value for suite and project

    3. Finall invoke from command : ant target1(suite1) target3(suite3)