Hulken is a stress testing tool for everything speaking HTTP.

Hulken is a stress testing tool for everything speaking HTTP.

Hulken is a stress testing tool for everything speaking HTTP. Hulken supports multiple urls, GETs and POSTs, static and dynamic payloads, multiple agents and more. Hulken is highly configurable but defaults to some reasonable settings. Hulken works both as a library and a stand-alone command line tool. Hulken is swedish for The Hulk.

Examples Hulken Dynamic payload

Examples Hulken Dynamic payload

Released v-1.0.3 (non breaking changes only):
+ only cleaned up some bad markdown in README.md

Quick Examples
as a library:

the requestsFilePath points to a json file like this:

Settings :

When you use hulken as a library you override these settings in the options object you pass in. When you use hulken as a command line tool you override these settings in the options file.
setting name (default value) | explanation

+ targetUrl (“http://localhost”) | url to application under test
+ numberOfHulkenAgents (1) | number of agents sending requests
+ timesToRunEachRequest (1) | number of times to execute each request per agent
+ requestsFilePath (“./hulkenRequests.json”) | path to requestsFile (including file name)
+ tokensSkippingRequest ([‘:’]) | requests with urls containing one or more of these chars gets ignored
+ requestsToSkip ([‘/logout’, ‘signoff’]) | requests with urls matching one of the provided urls gets ignored
+ loginRequired (false) | is a login required to execute the requests?
+ username (“”) | mandatory if loginRequired is true … the username
+ password (“”) | mandatory if loginRequired is true … the password
+ usernamePostName (“username”) | the username post name
+ passwordPostName (“password”) | the password post name
+ loginUrl (“/login”) | the url to post to when logging in
+ loginResponseExpectedText (“”) | a text which hulken searches for in the response to the login post (if non is provided hulken will consider http 200 OK good enough)
+ happyTimeLimit (10) | max test suite duration (in seconds). If the whole test takes longer than this value hulken gets angry.
+ slowRequestsTimeLimit (3) | response times (in seconds) over this value are considered slow
+ angryOnFailedRequest (false) | Hulken gets angry (calls error callback) if a single request fails
chatty (true) | set to false to make Hulken less chatty
+ happyMessage (“HULKEN PLEASED WITH RESULT, NO ONE NEEDS TO GET HURT TODAY!”) | pass in what you want Hulken to say when Hulken is happy with a result
+ angryMessage (“…. BAD RESULT… HULKEN ANGRY!”) | pass in what you want Hulken to say when Hulken is angry with a result
+ minWaitTime (1000) | minimum wait time in milliseconds (every request waits for a random time before executing)
+ maxWaitTime (6000) | maximum wait time in milliseconds (every request waits for a random time before executing)
+ returnAllRequests (false) | If true the stats object will contain all executed requests (stats.allRequests)
+ headers ({}) | set HTTP headers in a simple object: { “key1”: “value1”, “key2”: “value2”, “accept-encoding”: “Overriden” }. These headers will be set for every request in the test.
+ requestValueLists ({}) | insert value lists in a simple object: { usernames: [‘john’, ‘jessica’,’admin’], cities: [‘Stockholm’, ‘London’, ‘Berlin’, ‘New York’] }

Dynamic payloads
POSTs require a payload.
Besides hard coded values you can let hulken generate random post values consisting of letters, numbers or letters and numbers. The syntax is as follows:

available value types are numbers [0-9], letters [A-Za-z] and lettersandnumbers [A-Za-z0-9].

For example, the request below will send a POST to the url /random with a payload consisting of 3 generated property values. random will be a 10 characters long string of letters and numbers. random2 will be a 15 characters long string of numbers. random3 will be a 20 characters long string of letters.

You can also pass in value lists with your options file/object and have hulken pick randomly from these when executing the requests.

The syntax in your request is as follows:

 

in options pass in:

 

and then in your requests file have a post that looks like this:

The stats

When you use hulken as a library you get callbacks with stats. This is what this stats object looks like. This object can also contain allRequests

Command line tricks
Hulken can generate an example options file for you, all you have to do is provide the target url.

Smash responsibly!
Hulken knows no limits! Be it number of agents, times to execute each request or the length of a randomly generated post value. IT IS YOUR FOOT! =) Seriously though – how could hulken enforce any reasonable limits? What is reasonable depends on the application under test and the machine executing the test.

Download Latest Version : hulken-1.0.3.zip  | Mirror
Source : https://github.com/hellgrenj