Forum Discussion

skynetbbs's avatar
skynetbbs
Occasional Contributor
15 years ago

loadtest with 5 threads and DataGen variable

Hi,

we've created a datagen "numbergenerator" that should go from 000 to 999 sequently ...this works;

we've done a loadtest with 1 thread and see all numbers passing by once... : OK

now we've changed it to 5 threads and notice sometimes thesame number is passed more than once : NOK

how can we correct this?

Tested on a 3.5 soapui pro trial licence...
is this a bug? a feature? a misconfiguration? a limitation?
  • skynetbbs's avatar
    skynetbbs
    Occasional Contributor
    name=test
    type=number
    mode=step
    shared = [x] <--- this is enabled... good ? bad?

    start : 000
    end : 999
    step : 1
    pattern: '    32486'###000
    Random : [ ]  <--- to have no random collisions we do it sequently
    Persist : [ ] <--- to start allways at 0 when we run our test
  • Hi!

    this is ok.. how are you referencing the property in your test?

    The problem is that the mode is set to "step", which means that the value is increased every time the teststep is run (in any of the threads of your loadtest), what is happening that the property is being used more than once before any of the threads executes the teststep to increment the value. If you set the mode the "read" you should get unique values but need to make sure that the property is only read once for each fixed value you want to use.

    Does that make sense?

    regards!

    /Ole
    eviware.com
  • skynetbbs's avatar
    skynetbbs
    Occasional Contributor
    in modus "read"
    every test step will get a new number from the datagenerator object...
    which is not my intention... it has to keep thesame number during 1 testrun.
    But it should be unique for every thread...

    1) numbergenerator
    2) Createobject 1
    3) InitiateObject 1
    4) ExtendObject 1
    5) TerminateObject 1

    1) Numbergenerator
    2) CreateObject 2
    3) InitiateObject 2
    4) ExtendObject 2
    5) TerminateObject 2

    ...

    and when we change threads from 1 into a 5.... we notice it tries to run on 100 testruns at least a few times thesame teststep with thesame value.... which should not happen (no duplicates allowed)
  • Hi!

    then try setting this up as follows:

    1) DataGen TestStep with mode set to read and shared
    2) Property transfers that reads the property once and transfers its value to a property:
    3) Properties TestStep that holds the property from the transfer
    4) etc.. your existing teststeps that should read from the properties teststep instead of from the datagen directly

    does that help?

    regards!

    /Ole
    eviware.com
  • skynetbbs's avatar
    skynetbbs
    Occasional Contributor
    no...
    out of 1000 tests with 10 threads I have 86 doublegenerated numbers
    a 2nd run even gave me 499 errors
    1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,... every 3 numbers an error?