mirror of
https://github.com/usebruno/bruno.git
synced 2024-12-13 18:21:28 +01:00
40 lines
475 B
Plaintext
40 lines
475 B
Plaintext
|
meta {
|
||
|
name: getResponseTime
|
||
|
type: http
|
||
|
seq: 5
|
||
|
}
|
||
|
|
||
|
post {
|
||
|
url: {{host}}/api/echo/json
|
||
|
body: json
|
||
|
auth: none
|
||
|
}
|
||
|
|
||
|
auth:basic {
|
||
|
username: asd
|
||
|
password: j
|
||
|
}
|
||
|
|
||
|
auth:bearer {
|
||
|
token:
|
||
|
}
|
||
|
|
||
|
body:json {
|
||
|
{
|
||
|
"hello": "bruno"
|
||
|
}
|
||
|
}
|
||
|
|
||
|
assert {
|
||
|
res.status: eq 200
|
||
|
}
|
||
|
|
||
|
tests {
|
||
|
test("res.getResponseTime()", function() {
|
||
|
const responseTime = res.getResponseTime();
|
||
|
expect(typeof responseTime).to.eql("number");
|
||
|
expect(responseTime > 0).to.be.true;
|
||
|
});
|
||
|
|
||
|
}
|