Targets

Each test case has to have at least one target. A target specifies the endpoint you want to test, including the host name, port and protocol (http or https). The targets must be publicly reachable via HTTP by our clusters.

Defining Targets

You can provide targets using definition.addTarget(), definition.setTarget() or definition.setTargets() as follows:

definition.addTarget("https://api.example.com");
definition.addTarget("https://api2.example.com:8081");
// or
definition.setTarget("https://api.example.com");
// or
definition.setTargets(["https://api.example.com", "https://api2.example.com:8081"]);

Please note that the last two variants overwrite any previously specified targets.

NOTE: If you define multiple targets, you need to specify the full URL as part of your request:

definition.session("index", function(session) {
  session.get("https://otherapi.example.com/index");
});

Defining HTTPS targets

StormForger assumes a HTTP target if no protocol is specified. If you want to test a HTTPS target, you have to specify the https:// protocol in the target or use full URLs for all request definitions.

Relative URLs

If you define only one target in your test case, you can drop the hostname in your URLs:

definition.setTarget("https://api.example.com");
definition.session("index", function(session) {
  session.get("/index");
});
Icon Support Are you stuck? Or do you have any feedback? Get in touch with us – we are happy to help you.
Icon Schedule a demo Schedule a personal, customized demo. We'll show you around and introduce you to StormForger.
Icon Talk to a human To build and run reliable applications is complex – we know. Schedule a call and we’ll figure things out.

We are using cookies to give you the best online experience. If you continue to use this site, you agree to our use of cookies. By declining we will disable all but strictly required cookies. Please see our privacy policy for more details.


Accept Decline