How can I use Apickli for performance testing?

It would be great to reuse existing Apickli functional tests for performance testing or just use it for the performance test directly, has anyone done this?

I'm imagining delegating to a backend performance tool like JMeter via a step definition.

For example:

Given 1000 users are requesting an OAuth token
Then each user should get a token within 25ms

Maybe its not worth the effort, just a thought.

1 1 506
1 REPLY 1

Not applicable
Hmmm. Interesting. And I think it's doable and totally worth it! Apickli uses request module and its response is set by it self.httpResponse = response;. So, for instance for this assertResponseCode function this.getResponseObject will contain the time attributes, which could be evaluated for performance testing: 

https://github.com/apickli/apickli/blob/master/source/apickli/apickli.js#L156-L161

Apickli.prototype.assertResponseCode = function(responseCode) {
    responseCode = this.replaceVariables(responseCode);
    var realResponseCode = this.getResponseObject().statusCode;
    var success = (realResponseCode == responseCode);
    return getAssertionResult(success, responseCode, realResponseCode, this);
};

I think by setting time to true when setting options to the request here will achieve what it's described in request documentation.

time - If true, the request-response cycle (including all redirects) is timed at millisecond resolution.

Makes sense?