0
votes

I am checking correctness about behaviour of setUp/tearDown Thread Group when "Run Thread Groups consecutively" into "Test Plan" is checked and NOT checked.

Suppose that we take as example below "Test Plan" structure

enter image description here

  • Without checking "Run Thread Groups consecutively" we have

    1. Thread Groups "Iterate Over Dump" and "Iterate Over Tmp Result" are executed concurrently.
    2. setUp/tearDown Thread Group are executed each one two time respectively before and after of each Thread Group.
  • With checking "Run Thread Groups consecutively" we have

    1. Thread Groups "Iterate Over Dump" and "Iterate Over Tmp Result" are executed sequentially as shown into "Test Plan".
    2. setUp Thread Group is executed one time before "Iterate Over Dump" and tearDown Thread Group is executed one time after "Iterate Over Tmp Result".

I have causally discovered this difference using "Run Thread Groups consecutively", because I need senquential execution, but I don't find any direct description of this behaviour with setUp/tearDown.

If I suppose correctly I can remove the "If controller" that I have placed to avoid double setUp/tearDown execution. Is it correct?

Regards

1
"setUp/tearDown Thread Group are executed each one two time" - It shouldn't be the case, can you show setup thread group settings?user7294900
Hi @user7294900 do you mean that with or without "Run Thread Groups consecutively" setUp/tearDown are always executed twice? I leave default setUp Thread Group setting except for "Stop Test Now" in case of Sample error.Vincenzo Marrazzo
setUp/tearDown show execute exactly as defined in its Number of Threadsuser7294900

1 Answers

1
votes

setUp Thread Group will be executed as the first thread group but it is a normal Thread Group and will be execute number of times as defined in Number of Threads.

The difference is that these type of threads execute before the test proceeds to the executing of regular Thread Groups.

tearDown Thread Group will act the same except it will be executed as the last thread group.

execute after the test has finished executing its regular Thread Groups.

Otherwise it might be consider a bug.