Forum Discussion

SStapf's avatar
SStapf
New Contributor
12 years ago

Launch TestRunner problems

Hello,

I have the following problem and couldn't find out why this happens.

I have a generic SoapUI project. I have TestSuite which I want to execute. In TestCase I have a DataGen and Groovy script Step.
In DataGen I have some properties (Mode=READ) which are suppose to change each time somebody reads them (in my case in script).

So, when I'm executing the TestSuite with green Play button ("Run the selected TestCases") I got the correct ("different") values, each time I read them from the script.
But when I trying to run the TestSuite via "Launch TestRunner" or via command-line I always got the same values.

Could you please help me to understand what I'm doing wrong or maybe it is a known issue, since I couldn't found any relevant.

Thanks in advance,
Alex

5 Replies

  • Hi,

    This doesn't sound like a "known issue" from what I can tell. How are you running from Testrunner? Are there any errors occurring in the .log files in <SoapUI Pro install>\bin directory or in Applications/Soapui-Pro-<version>.app/Contents/ on Mac OSX when running with Testrunner?



    Regards,
    Marcus
    SmartBear Support
  • SStapf's avatar
    SStapf
    New Contributor
    Hi,

    No, there are no errors. I'm running TestRunner by right-click on the TestSuite and launching TestRunner. The same result is by executing the TestSuite via command-line.

    So, the scenario is the following:

    TestSuite1
    -- TestCase1
    -- DataGen (has variable with Mode=READ, type=Number, start=1000, end =1000000, shared=true)
    -- TestCase2
    -- Groovy Script1 (Runs the "TestSuite2->TestCase1->Groovy Script2" with its own context and testRunner)
    TestSuite2
    -- TestCase1
    -- Groovy Script2 (Gets the DataGen testStep read DataGen property by getPropertyValue writes it to the file)


    So, basically that pretty much it. In case of running TestSuite with Launch TestRunner or command-line the numbers are always the same. In case of running TestSuite via green Play button the numbers are different.

    Is there any significant difference in these running methods?

    Will appreciate any ideas or suggestions in this situation.

    Regards,
    Alex
  • SStapf's avatar
    SStapf
    New Contributor
    Hi,

    I create and attached a sample project. Could you please take a look.

    I have just the script, which reads the property from the previous TestCase

    def dataGen = testRunner.testCase.testSuite.testCases['TestCase 1'].testSteps['DataGen']

    log.info dataGen.getProperty('number').value

    So, the same result that I don't understand. The number variable incremented each time using green Run button and remains the same when using TestRunner.

    Regards,
    Alex