OverviewFeature:
- Scenario:
- Given:
- When:
- Then:
Content per phase
Given:
- I am using the tsung parameters from "foo" specify the base configuration for tsung foo is a reference to a configuration file
Options from the configuration file:
- loglevel="warning"
- dumptraffic="protocol"
- controller = host1
- clients="host1:1 host2:1 host3:1" values are of the form hostname:cpu with cpu the number of cpu/cores we want to use on hostname
- use_controller_vm = true if controller is not in the clients list then false, otherwise true
- maxusers="30000" global number, dispatch to clients according to their weight value
- monitoring = "host1 host2 host3 host4"
- target = hostname the target hostname
When:
- use a "jquery"-like syntax to design dom objects, i-e $("h1").text() == "movie" or $("div.clickable").size() > 0 or $(“#submit”).is(‘.disabled’)
- TODO: establish a list of all actions natively doable by tsung
load test description:
- with load 'foo' foo is either a reference to a load test description or a complete load test description (phase, user, etc)
- with users from the table 'foo' below
- with users from file 'myfile.csv'
- with load 'foo' as … use a reference to a described ‘foo’ load test. It will be usable in other features.
Then:
This is where we express the results expected from the load/unit test
2 sorts of expected results:###
unit test results
- the page should load correctly the page should return either 2xx or 3xx+2xx
- I should get return code 'foo' [,'bar'] or I should not get return code 'foo' http return code should either be or not be the given argument
- the page should load in less than x second gets the html page only, doesn't follow any links
- the whole page should load in less than x second gets the page plus all the images, scripts etc
- the page should load in less than x second with 95 centile of less than ''
- the page should contain the word "devops" we use this value for the match tag
- the page should match the regex "/[a]/"
- the page should contain a $(input[class=foo])
- md5sum for the page should be XXX
- the content type should be ‘foo/bar’
- I should have
$(“#submit”).is(‘.enabled’) and not $ (“#submit”).is(‘.disabled’)
#### load test results could be expressed as: ####
- all connections should succeed
- all connections should succeed within 'x' seconds
- average time should be less than 'x' seconds
- 95 centile should be less than 'x' seconds
- 'user' should get 'result' in $(field) with user | result foo | bar toto | tata