After months of work, I want to introduce you to something new: Web Performance Legion. Legion is a new open-source research product. It’s an attempt to create a powerful load testing tool that can handle difficult and or esoteric use cases while still being easy-to-understand at its core. It’s still in the early phases of development, but if you happen to love working with Node, or you need to test a complex RESTful API, Legion might be the tool for you.
Legion lets you:
* Quickly describe a testcase entirely in JavaScript.
* Easily instrument arbitrary JavaScript functions to measure their performance.
* Attach setup and shutdown hooks to your testcase.
* Run testcases from the command line.
* Get results in a machine-readable JSON format.
Example:
.testcase(L.of()
.chain(rest.post(host + '/ticket/new'))
.chain(assertSuccess)
.chain(response => rest.post(host + '/ticket/redeem?ticket='+ response.json.ticket))
.chain(assertSuccess))
.main();
If this sounds like something you’re interested in, start with our introductory guide, the starter project, or you can fork the source code on github.