diff --git a/k6-tests/ncmp/common/utils.js b/k6-tests/ncmp/common/utils.js
new file mode 100644
index 0000000..1fb9b8e
--- /dev/null
+++ b/k6-tests/ncmp/common/utils.js
@@ -0,0 +1,63 @@
+/*
+ *  ============LICENSE_START=======================================================
+ *  Copyright (C) 2024 Nordix Foundation
+ *  ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+export const NCMP_BASE_URL = 'http://localhost:8883';
+export const DMI_PLUGIN_URL = 'http://ncmp-dmi-plugin-demo-and-csit-stub:8092';
+export const TOTAL_CM_HANDLES = 20000
+
+/**
+ * Generates a batch of CM-handle IDs based on batch size and number.
+ * @param {number} batchSize - Size of each batch.
+ * @param {number} batchNumber - Number of the batch.
+ * @returns {string[]} Array of CM-handle IDs, for example ['ch-201', 'ch-202' ... 'ch-300']
+ */
+export function makeBatchOfCmHandleIds(batchSize, batchNumber) {
+    const batchOfIds = [];
+    const startIndex = 1 + batchNumber * batchSize;
+    for (let i = 0; i < batchSize; i++) {
+        let cmHandleId = 'ch-' + (startIndex + i);
+        batchOfIds.push(cmHandleId);
+    }
+    return batchOfIds;
+}
+
+export function getRandomCmHandleId() {
+    return `ch-${Math.floor(Math.random() * TOTAL_CM_HANDLES) + 1}`;
+}
+
+function removeBracketsAndQuotes(str) {
+    return str.replace(/\[|\]|"/g, '');
+}
+
+export function makeCustomSummaryReport(data, options) {
+    const moduleName = `${__ENV.K6_MODULE_NAME}`;
+    let body = ``;
+    for (const condition in options.thresholds) {
+        let limit = JSON.stringify(options.thresholds[condition])
+        limit = removeBracketsAndQuotes(limit)
+        let limitKey = limit.split(' ')[0]
+        const actual = Math.ceil(data.metrics[condition].values[limitKey])
+        const result = data.metrics[condition].thresholds[limit].ok ? 'PASS' : 'FAIL'
+        const row = `${moduleName}\t${condition}\t${limit}\t${actual}\t${result}\n`;
+        body += row;
+    }
+    return body;
+}
+
