Skip to content

Latest commit

 

History

History
57 lines (23 loc) · 1.62 KB

README.textile

File metadata and controls

57 lines (23 loc) · 1.62 KB

Loadtest tool

Tool could be used to test load your web application using different scenarios. Scripts are written in groovy using special test environment.

Run

Copy one loadtest-1.0.jar and Example*.groovy from repository to one of directories on your computer. Use java to run it from commandline:

java -jar loadtest-1.0.jar Example1.groovy

Environment

For groovy scripts following classes avialable: HTTP and Variations. HTTP class could be used to create load. Variation helps to create non-deterministic behavior. Look groovy documentation and src/main/resources/org/loadtest/Classes.groovy for details.

Variations

select(prob1, closure1, prob2, closure2, prob3, closure3, …)

Select one of the closures to execute depending on probability. Probabilites could be not normalized: i.e. sum(prob~i~) != 1.0

any(arguments…);

Select one of arguments with equal probability.

HTTP

get([Closure reporter, ]String …urls)

Gets value of one(!randomly selected) of urls and reads line by line calling reporter(line). If reporter is not specified returns array of strings – lines of this file.

parse(Pattern regex, String …html)

Process text throught regular expression and selects regular expression groups. Returns 2-d array if several groups used and 1-d if one.

resolve(String url, String path)

Resolves path relative to url.

License

Load test tool is distributed on terms of BSD-license. Look at src/main/resources/BSD-LICENSE.txt for details.

Groovy used internally by load test tool is licensed under the Apache 2 license:

http://www.apache.org/licenses/LICENSE-2.0.html