Created
April 3, 2014 22:46
-
-
Save rymizuki/9964411 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config | |
.request [ | |
{id: 1, method: "GET", path: "/admin/reset", params: {}} | |
] | |
.test [ | |
{id: 1, to_be: [{code: 204}]} | |
] | |
.calcurator | |
success: 10 | |
failed: -10 | |
not_implemented: 0 | |
request: (spec) -> | |
method = spec.req.method | |
path = spec.req.path | |
params = spec.req.params | |
new Client({scheme: @schema, host: @host, port: @port}) | |
.on "start", @benchmark.start | |
.on "start", @calcurator.start | |
.on "start", @test.start | |
.on "finish", @benchmark.resolve | |
.on "finish", @calcurator.resolve | |
.on "finish", @test.resolve | |
.request method, path, params | |
execute: () -> | |
tasks = @specs.map @request | |
async.parallel tasks, @finish; | |
finish: (err, results) -> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment