summaryrefslogtreecommitdiffstats
path: root/k6-tests/ncmp/common
diff options
context:
space:
mode:
Diffstat (limited to 'k6-tests/ncmp/common')
-rw-r--r--k6-tests/ncmp/common/passthrough-crud.js (renamed from k6-tests/ncmp/common/passthrough-read.js)12
-rw-r--r--k6-tests/ncmp/common/utils.js1
2 files changed, 12 insertions, 1 deletions
diff --git a/k6-tests/ncmp/common/passthrough-read.js b/k6-tests/ncmp/common/passthrough-crud.js
index 89ed15af79..43a215fdf8 100644
--- a/k6-tests/ncmp/common/passthrough-read.js
+++ b/k6-tests/ncmp/common/passthrough-crud.js
@@ -19,7 +19,7 @@
*/
import http from 'k6/http';
-import { NCMP_BASE_URL, getRandomCmHandleId } from './utils.js';
+import { NCMP_BASE_URL, CONTENT_TYPE_JSON_PARAM, getRandomCmHandleId } from './utils.js';
export function passthroughRead() {
const cmHandleId = getRandomCmHandleId();
@@ -30,3 +30,13 @@ export function passthroughRead() {
const response = http.get(url);
return response;
}
+
+export function passthroughWrite() {
+ const cmHandleId = getRandomCmHandleId();
+ const resourceIdentifier = 'my-resource-identifier';
+ const datastoreName = 'ncmp-datastore:passthrough-running';
+ const url = `${NCMP_BASE_URL}/ncmp/v1/ch/${cmHandleId}/data/ds/${datastoreName}?resourceIdentifier=${resourceIdentifier}`
+ const body = `{"neType": "BaseStation"}`
+ const response = http.post(url, JSON.stringify(body), CONTENT_TYPE_JSON_PARAM);
+ return response;
+}
diff --git a/k6-tests/ncmp/common/utils.js b/k6-tests/ncmp/common/utils.js
index 54b4c3a099..75c4ec763e 100644
--- a/k6-tests/ncmp/common/utils.js
+++ b/k6-tests/ncmp/common/utils.js
@@ -59,6 +59,7 @@ export function makeCustomSummaryReport(data, options) {
summaryCsv += makeSummaryCsvLine(3, 'CM-handle ID search with Module filter', 'milliseconds', 'http_req_duration{scenario:id_search_module}', data, options);
summaryCsv += makeSummaryCsvLine(4, 'CM-handle search with Module filter', 'milliseconds', 'http_req_duration{scenario:cm_search_module}', data, options);
summaryCsv += makeSummaryCsvLine(5, 'Synchronous single CM-handle pass-through read', 'milliseconds', 'http_req_duration{scenario:passthrough_read}', data, options);
+ summaryCsv += makeSummaryCsvLine(6, 'Synchronous single CM-handle pass-through write', 'requests/second', 'http_reqs{scenario:passthrough_write}', data, options);
return summaryCsv;
}