Forum Discussion

Taylor_Pack's avatar
Taylor_Pack
Occasional Contributor
16 years ago

Testrunner: running specific tests

This post was never answered and seems to have been deleted. If there is a reason for that I would like to know. I will reask the question.

You can run a specific test with the following line:
testrunner.sh -sNewBindingTestSuite -cGetCreditCardTestCase -r -a -j -f /home/Automation/tmp2/report /home/Automation/SOAPUI/billing

but how to you specify multiple tests from the command line?

4 Replies

  • Hello,

    I'm sorry for inconvenience we run at some issues regarding forum, we are working on it. Regarding your question,
    if you just specify testsuite name than all testcases in that testsuite will be run, or if you just specify project file name
    ( do not set test suite or test case ) all test suites and test cases in project will be run.

    Does this helps you,
    robert
  • Taylor_Pack's avatar
    Taylor_Pack
    Occasional Contributor
    Thanks for the reply. I would like to target the tests to run more specifically. The command line options say:
    # s : The TestSuite to run, used to narrow down the tests to run
    # c : The TestCase to run, used to narrow down the tests to run

    They both use plural "tests" but I can only get one test to run. What is the syntax for specifying a set of tests?
    -ctest1 test2 test3
    -c'test1 test2 test3'
    -c(test1 test2 test3)

    None of those seem to work.
  • Hi,

    I'm sorry, this is currently not possible (please add a feature request in the corresponding board here at the forum). If you really need this you could create a project onLoad script that checks for a provided system property and disables/enables testcases accordingly, for example if you add

    -DenabledTestSuites=TestSuite 1,TestSuite 2

    to the command-line invocation, then you could add an onLoad script (in the project window);

    // check for flag
    def ets = System.getProperty( "enabledTestSuites" )
    if( ets != null )
    {
    // first disable all
    for( ts in project.testSuiteList )
    ts.disabled = true

    // now enable those specified
    for( testSuite in ets.split( "," ) )
    {
    def ts = project.testSuites[testSuite.trim()]
    if( ts != null )
    ts.disabled = false
    }
    }


    Does that make sense?

    regards!

    /Ole
    eviware.com