I'm about to script performance tests for a system with REST interface. I'm looking for a performance tool that let me prepare XHR requests dynamically, i.e. simulate what JavaScript application does. For instance, to request a CSRF token from one REST endpoint and include it in a header of a subsequent HTTP request. The tool should also handle cookie-management just like any Web browser does.
Additional nice-to-have requirements:
- the tool should allow scripting tests in Java, as most of the team is skilled in Java
So far I have considered multiple tool but each of them has some drawbacks:
- JMeter, apart from nice GUI, provides also an API but it seems quite rusty and cumbersome to use. Also, I'm not sure if I can define requests dynamically, based on the results of previous request. Does it?
- Grinder is Java framework, but test cases must be scripted in Jython. This requires the team to learn Python and also introduces some incompatibility problems: I had hard time to reuse some existing Python libraries. On the other side, I needed to pay some more attention when casting Java objects into Python. Why, the hack, guys couldn't make Java framework with Java test cases?
- Gatling has quite intuitive DSL for defining requests programmatically (almost like REST-Assured), but is in Scala. That's a cool language but again we're not proficient in it.
- I wanted to reuse framework for functional REST tests, REST-Assured, but I've read, it introduces much overhead to the performance tests + I would need to add support for reporting myself.
Any other alternative I missed?