jmeter - TestKichen, Serverspec and out-of-order command execution -
inside testkitchen describe blocks i'm running command, loading output variable running multiple expect statements on output validating different parts of it. end goal using part of ci builds blackbox testing.
in instance i'm calling jmeter (using run remote agent perform off-dut tests) running through results returns checking each test (yeah yeah... it's little nasty works treat):
describe "test transparent proxy (jmeter)" $jmeter_run = command("/usr/local/apache-jmeter-2.13/bin/jmeter -n -t /root/jmx/mytest.jmx -r -jremote_hosts=192.168.7.252 -gdut_ip=#$internal_ip -x -l /dev/stdout 2>&1").stdout 'test1' expect($jmeter_run).to match /text_to_match/ end 'test2' expect($jmeter_run).to match /more_text match/ end end
the tests run fine, i'm finding i'm getting multiple jmeter runs (different test sets) being run out-of-order how they're defined in test spec. have other blocks being executed around jmeter tests. here flow:
block 1 block 2 block 3 (jmeter1) block 4 block 5 (jmeter2)
what i'm getting though this:
block5 block3 block1 block2 block4
none of documentation i've found seems give me clues how avoid this. don't want put command execution inside should/expect chunk of own want/need able tell if individual test has failed. avoid running 50-odd individual jmeter tests (they're 5 secs each avg of 20 tests in each run).
help? :d
well managed resolve issue myself.
after lot of tinkering ended running command inside test:
'jmeter executed correctly' $jmeter_run1 = command("/usr/local/apache-jmeter-2.13/bin/jmeter -n -t /root/jmx/mytest.jmx -r -jremote_hosts=192.168.7.252 -gdut_ip=#$internal_ip -x -l /dev/stdout 2>&1").stdout expect($jmeter_run1).not_to be_empty end
everything runs nicely in order supposed , happy.
Comments
Post a Comment