test: Add JS CodeNode benchmark scenario (#10632)

This commit is contained in:
Tomi Turtiainen
2024-09-02 12:21:41 +03:00
committed by GitHub
parent 7cfe56d727
commit 56354151d4
3 changed files with 116 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import http from 'k6/http';
import { check } from 'k6';
const apiBaseUrl = __ENV.API_BASE_URL;
export default function () {
const res = http.post(`${apiBaseUrl}/webhook/code-node-benchmark`, {});
check(res, {
'is status 200': (r) => r.status === 200,
'has items in response': (r) => JSON.parse(r.body).length === 5,
});
}