diff --git a/k6-tests/ncmp/1-create-cmhandles.js b/k6-tests/ncmp/1-create-cmhandles.js
index 60594c7..9a5c22a 100644
--- a/k6-tests/ncmp/1-create-cmhandles.js
+++ b/k6-tests/ncmp/1-create-cmhandles.js
@@ -18,16 +18,9 @@
  *  ============LICENSE_END=========================================================
  */
 
-import http from 'k6/http';
 import exec from 'k6/execution';
-import { check } from 'k6';
-import {
-    NCMP_BASE_URL,
-    DMI_PLUGIN_URL,
-    TOTAL_CM_HANDLES,
-    makeBatchOfCmHandleIds,
-    makeCustomSummaryReport
-} from './utils.js';
+import { TOTAL_CM_HANDLES, makeBatchOfCmHandleIds, makeCustomSummaryReport } from './common/utils.js';
+import { createCmHandles } from './common/cmhandle-crud.js';
 
 const BATCH_SIZE = 100;
 export const options = {
@@ -40,25 +33,9 @@
 };
 
 export default function () {
-    const nextBatchOfCmHandleIds = makeBatchOfCmHandleIds(BATCH_SIZE, exec.scenario.iterationInTest);
-    const payload = {
-        "dmiPlugin": DMI_PLUGIN_URL,
-        "createdCmHandles": nextBatchOfCmHandleIds.map(cmHandleId => ({
-            "cmHandle": cmHandleId,
-            "cmHandleProperties": {"neType": "RadioNode"},
-            "publicCmHandleProperties": {
-                "Color": "yellow",
-                "Size": "small",
-                "Shape": "cube"
-            }
-        })),
-    };
-    const response = http.post(NCMP_BASE_URL + '/ncmpInventory/v1/ch', JSON.stringify(payload), {
-        headers: {'Content-Type': 'application/json'},
-    });
-    check(response, {
-        'status equals 200': (r) => r.status === 200,
-    });
+    const batchNumber = exec.scenario.iterationInTest;
+    const nextBatchOfCmHandleIds = makeBatchOfCmHandleIds(BATCH_SIZE, batchNumber);
+    createCmHandles(nextBatchOfCmHandleIds);
 }
 
 export function handleSummary(data) {
diff --git a/k6-tests/ncmp/10-mixed-load-test.js b/k6-tests/ncmp/10-mixed-load-test.js
index 4bb0297..afa91af 100644
--- a/k6-tests/ncmp/10-mixed-load-test.js
+++ b/k6-tests/ncmp/10-mixed-load-test.js
@@ -18,10 +18,9 @@
  *  ============LICENSE_END=========================================================
  */
 
-import http from 'k6/http';
-import { check } from 'k6';
-import { NCMP_BASE_URL, getRandomCmHandleId, makeCustomSummaryReport } from './utils.js'
-import { executeCmHandleSearch, executeCmHandleIdSearch } from './search-base.js';
+import { makeCustomSummaryReport } from './common/utils.js'
+import { executeCmHandleSearch, executeCmHandleIdSearch } from './common/search-base.js';
+import { passthroughRead } from './common/passthrough-read.js';
 
 export const options = {
     scenarios: {
@@ -56,13 +55,7 @@
 };
 
 export function passthrough_read() {
-    const cmHandleId = getRandomCmHandleId();
-    const datastoreName = 'ncmp-datastore%3Apassthrough-operational';
-    const url = `${NCMP_BASE_URL}/ncmp/v1/ch/${cmHandleId}/data/ds/${datastoreName}?resourceIdentifier=x&include-descendants=true`
-    const response = http.get(url);
-    check(response, {
-        'status equals 200': (r) => r.status === 200,
-    });
+    passthroughRead();
 }
 
 export function id_search_module() {
diff --git a/k6-tests/ncmp/11-delete-cmhandles.js b/k6-tests/ncmp/11-delete-cmhandles.js
index 073d1d0..534b3de 100644
--- a/k6-tests/ncmp/11-delete-cmhandles.js
+++ b/k6-tests/ncmp/11-delete-cmhandles.js
@@ -18,10 +18,9 @@
  *  ============LICENSE_END=========================================================
  */
 
-import http from 'k6/http';
 import exec from 'k6/execution';
-import { check } from 'k6';
-import { NCMP_BASE_URL, TOTAL_CM_HANDLES, makeBatchOfCmHandleIds, makeCustomSummaryReport } from './utils.js';
+import { TOTAL_CM_HANDLES, makeBatchOfCmHandleIds, makeCustomSummaryReport } from './common/utils.js';
+import { deleteCmHandles } from './common/cmhandle-crud.js';
 
 const BATCH_SIZE = 100;
 export const options = {
@@ -34,17 +33,9 @@
 };
 
 export default function () {
-    const nextBatchOfCmHandleIds = makeBatchOfCmHandleIds(BATCH_SIZE, exec.scenario.iterationInTest);
-    const payload = {
-        "dmiPlugin": "http://ncmp-dmi-plugin-demo-and-csit-stub:8092",
-        "removedCmHandles": nextBatchOfCmHandleIds,
-    };
-    const response = http.post(NCMP_BASE_URL + '/ncmpInventory/v1/ch', JSON.stringify(payload), {
-        headers: {'Content-Type': 'application/json'},
-    });
-    check(response, {
-        'status equals 200': (r) => r.status === 200,
-    });
+    const batchNumber = exec.scenario.iterationInTest;
+    const nextBatchOfCmHandleIds = makeBatchOfCmHandleIds(BATCH_SIZE, batchNumber);
+    deleteCmHandles(nextBatchOfCmHandleIds);
 }
 
 export function handleSummary(data) {
diff --git a/k6-tests/ncmp/2-wait-for-cmhandles-to-be-ready.js b/k6-tests/ncmp/2-wait-for-cmhandles-to-be-ready.js
index 5d54c60..cce85ab 100644
--- a/k6-tests/ncmp/2-wait-for-cmhandles-to-be-ready.js
+++ b/k6-tests/ncmp/2-wait-for-cmhandles-to-be-ready.js
@@ -18,9 +18,8 @@
  *  ============LICENSE_END=========================================================
  */
 
-import http from 'k6/http';
-import { sleep, fail } from 'k6';
-import { makeCustomSummaryReport, NCMP_BASE_URL, TOTAL_CM_HANDLES } from './utils.js';
+import { makeCustomSummaryReport } from './common/utils.js';
+import { waitForCmHandlesToBeReady } from './common/cmhandle-crud.js';
 
 export const options = {
     vus: 1,
@@ -32,35 +31,8 @@
 };
 
 export default function () {
-    waitForCmHandlesToBeReady(TOTAL_CM_HANDLES);
-}
-
-function waitForCmHandlesToBeReady(totalCmHandles) {
     const timeOutInSeconds = 6 * 60;
-    const pollingIntervalInSeconds = 10;
-    const maxRetries = Math.ceil(timeOutInSeconds / pollingIntervalInSeconds);
-    let cmHandlesReady = 0;
-    for (let currentTry = 0; currentTry <= maxRetries; currentTry++) {
-        sleep(pollingIntervalInSeconds);
-        try {
-            cmHandlesReady = getNumberOfReadyCmHandles();
-        } catch (error) {
-            console.error(`Attempt ${currentTry + 1} - Error fetching CM handles: ${error.message}`);
-        }
-        console.log(`Attempt ${currentTry + 1} - ${cmHandlesReady}/${totalCmHandles} CM handles are READY`);
-        if (cmHandlesReady === totalCmHandles) {
-            console.log(`All ${totalCmHandles} CM handles are READY`);
-            return;
-        }
-    }
-    fail(`Timed out after ${timeoutInSeconds} seconds waiting for ${totalCmHandles} CM handles to be READY`);
-}
-
-function getNumberOfReadyCmHandles() {
-    const endpointUrl = `${NCMP_BASE_URL}/cps/api/v2/dataspaces/NCMP-Admin/anchors/ncmp-dmi-registry/node?xpath=/dmi-registry&descendants=all`;
-    const jsonData = http.get(endpointUrl).json();
-    const cmHandles = jsonData[0]["dmi-reg:dmi-registry"]["cm-handles"];
-    return cmHandles.filter(cmhandle => cmhandle['state']['cm-handle-state'] === 'READY').length;
+    waitForCmHandlesToBeReady(timeOutInSeconds);
 }
 
 export function handleSummary(data) {
diff --git a/k6-tests/ncmp/3-passthrough-read.js b/k6-tests/ncmp/3-passthrough-read.js
index 84050b8..39eb4ad 100644
--- a/k6-tests/ncmp/3-passthrough-read.js
+++ b/k6-tests/ncmp/3-passthrough-read.js
@@ -18,10 +18,9 @@
  *  ============LICENSE_END=========================================================
  */
 
-import http from 'k6/http';
-import { check } from 'k6';
-import { Trend } from "k6/metrics";
-import { NCMP_BASE_URL, getRandomCmHandleId, makeCustomSummaryReport } from './utils.js'
+import { Trend } from 'k6/metrics';
+import { passthroughRead } from './common/passthrough-read.js'
+import { makeCustomSummaryReport } from './common/utils.js'
 
 let ncmpOverheadTrend = new Trend("ncmp_overhead");
 
@@ -36,14 +35,7 @@
 
 // The function that defines VU logic.
 export default function () {
-    const cmHandleId = getRandomCmHandleId();
-    const datastoreName = 'ncmp-datastore%3Apassthrough-operational';
-    const url = `${NCMP_BASE_URL}/ncmp/v1/ch/${cmHandleId}/data/ds/${datastoreName}?resourceIdentifier=x&include-descendants=true`
-    const response = http.get(url);
-    check(response, {
-        'status equals 200': (r) => r.status === 200,
-    });
-
+    const response = passthroughRead();
     // Calculate overhead assuming DMI data delay is 2500ms.
     const dmiDelay = 2500; // This should be same as value DATA_FOR_CM_HANDLE_DELAY_MS in docker-compose.yml
     const overhead = response.timings.duration - dmiDelay;
diff --git a/k6-tests/ncmp/4-id-search-no-filter.js b/k6-tests/ncmp/4-id-search-no-filter.js
index ed8d77f..3863b5d 100644
--- a/k6-tests/ncmp/4-id-search-no-filter.js
+++ b/k6-tests/ncmp/4-id-search-no-filter.js
@@ -18,8 +18,8 @@
  *  ============LICENSE_END=========================================================
  */
 
-import { executeCmHandleIdSearch } from './search-base.js';
-import { makeCustomSummaryReport } from "./utils.js";
+import { executeCmHandleIdSearch } from './common/search-base.js';
+import { makeCustomSummaryReport } from './common/utils.js';
 
 export const options = {
     vus: 5,
diff --git a/k6-tests/ncmp/5-search-no-filter.js b/k6-tests/ncmp/5-search-no-filter.js
index 73fa827..67c9d59 100644
--- a/k6-tests/ncmp/5-search-no-filter.js
+++ b/k6-tests/ncmp/5-search-no-filter.js
@@ -18,8 +18,8 @@
  *  ============LICENSE_END=========================================================
  */
 
-import { executeCmHandleSearch } from './search-base.js';
-import { makeCustomSummaryReport } from "./utils.js";
+import { executeCmHandleSearch } from './common/search-base.js';
+import { makeCustomSummaryReport } from './common/utils.js';
 
 export const options = {
     vus: 4,
diff --git a/k6-tests/ncmp/6-id-search-public-property.js b/k6-tests/ncmp/6-id-search-public-property.js
index 543ee1a..25bffaf 100644
--- a/k6-tests/ncmp/6-id-search-public-property.js
+++ b/k6-tests/ncmp/6-id-search-public-property.js
@@ -18,8 +18,8 @@
  *  ============LICENSE_END=========================================================
  */
 
-import { executeCmHandleIdSearch } from './search-base.js';
-import { makeCustomSummaryReport } from "./utils.js";
+import { executeCmHandleIdSearch } from './common/search-base.js';
+import { makeCustomSummaryReport } from './common/utils.js';
 
 export const options = {
     vus: 5,
diff --git a/k6-tests/ncmp/7-search-public-property.js b/k6-tests/ncmp/7-search-public-property.js
index cb39b54..53f069d 100644
--- a/k6-tests/ncmp/7-search-public-property.js
+++ b/k6-tests/ncmp/7-search-public-property.js
@@ -18,8 +18,8 @@
  *  ============LICENSE_END=========================================================
  */
 
-import { executeCmHandleSearch } from './search-base.js';
-import { makeCustomSummaryReport } from "./utils.js";
+import { executeCmHandleSearch } from './common/search-base.js';
+import { makeCustomSummaryReport } from './common/utils.js';
 
 export const options = {
     vus: 4,
diff --git a/k6-tests/ncmp/8-id-search-module.js b/k6-tests/ncmp/8-id-search-module.js
index d058a1b..8200ea2 100644
--- a/k6-tests/ncmp/8-id-search-module.js
+++ b/k6-tests/ncmp/8-id-search-module.js
@@ -18,8 +18,8 @@
  *  ============LICENSE_END=========================================================
  */
 
-import { executeCmHandleIdSearch } from './search-base.js';
-import { makeCustomSummaryReport } from "./utils.js";
+import { executeCmHandleIdSearch } from './common/search-base.js';
+import { makeCustomSummaryReport } from './common/utils.js';
 
 export const options = {
     vus: 5,
diff --git a/k6-tests/ncmp/9-search-module.js b/k6-tests/ncmp/9-search-module.js
index c6bbb06..eafef99 100644
--- a/k6-tests/ncmp/9-search-module.js
+++ b/k6-tests/ncmp/9-search-module.js
@@ -18,8 +18,8 @@
  *  ============LICENSE_END=========================================================
  */
 
-import { executeCmHandleSearch } from './search-base.js';
-import { makeCustomSummaryReport } from "./utils.js";
+import { executeCmHandleSearch } from './common/search-base.js';
+import { makeCustomSummaryReport } from './common/utils.js';
 
 export const options = {
     vus: 4,
diff --git a/k6-tests/ncmp/common/cmhandle-crud.js b/k6-tests/ncmp/common/cmhandle-crud.js
new file mode 100644
index 0000000..0c3e116
--- /dev/null
+++ b/k6-tests/ncmp/common/cmhandle-crud.js
@@ -0,0 +1,90 @@
+/*
+ *  ============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=========================================================
+ */
+
+import http from 'k6/http';
+import { check, sleep, fail } from 'k6';
+import { NCMP_BASE_URL, DMI_PLUGIN_URL, TOTAL_CM_HANDLES } from './utils.js';
+
+export function createCmHandles(cmHandleIds) {
+    const url = `${NCMP_BASE_URL}/ncmpInventory/v1/ch`;
+    const payload = {
+        "dmiPlugin": DMI_PLUGIN_URL,
+        "createdCmHandles": cmHandleIds.map(cmHandleId => ({
+            "cmHandle": cmHandleId,
+            "cmHandleProperties": {"neType": "RadioNode"},
+            "publicCmHandleProperties": {
+                "Color": "yellow",
+                "Size": "small",
+                "Shape": "cube"
+            }
+        })),
+    };
+    const params = {
+        headers: {'Content-Type': 'application/json'}
+    };
+    const response = http.post(url, JSON.stringify(payload), params);
+    check(response, {
+        'status equals 200': (r) => r.status === 200,
+    });
+    return response;
+}
+
+export function deleteCmHandles(cmHandleIds) {
+    const url = `${NCMP_BASE_URL}/ncmpInventory/v1/ch`;
+    const payload = {
+        "dmiPlugin": DMI_PLUGIN_URL,
+        "removedCmHandles": cmHandleIds,
+    };
+    const params = {
+        headers: {'Content-Type': 'application/json'}
+    };
+    const response = http.post(url, JSON.stringify(payload), params);
+    check(response, {
+        'status equals 200': (r) => r.status === 200,
+    });
+    return response;
+}
+
+export function waitForCmHandlesToBeReady(timeOutInSeconds) {
+    const pollingIntervalInSeconds = 10;
+    const maxRetries = Math.ceil(timeOutInSeconds / pollingIntervalInSeconds);
+    let cmHandlesReady = 0;
+    for (let currentTry = 0; currentTry <= maxRetries; currentTry++) {
+        sleep(pollingIntervalInSeconds);
+        try {
+            cmHandlesReady = getNumberOfReadyCmHandles();
+        } catch (error) {
+            console.error(`Attempt ${currentTry + 1} - Error fetching CM handles: ${error.message}`);
+        }
+        console.log(`Attempt ${currentTry + 1} - ${cmHandlesReady}/${TOTAL_CM_HANDLES} CM handles are READY`);
+        if (cmHandlesReady === TOTAL_CM_HANDLES) {
+            console.log(`All ${TOTAL_CM_HANDLES} CM handles are READY`);
+            return;
+        }
+    }
+    fail(`Timed out after ${timeOutInSeconds} seconds waiting for ${TOTAL_CM_HANDLES} CM handles to be READY`);
+}
+
+function getNumberOfReadyCmHandles() {
+    const endpointUrl = `${NCMP_BASE_URL}/cps/api/v2/dataspaces/NCMP-Admin/anchors/ncmp-dmi-registry/node?xpath=/dmi-registry&descendants=all`;
+    const jsonData = http.get(endpointUrl).json();
+    const cmHandles = jsonData[0]["dmi-reg:dmi-registry"]["cm-handles"];
+    return cmHandles.filter(cmhandle => cmhandle['state']['cm-handle-state'] === 'READY').length;
+}
diff --git a/k6-tests/ncmp/common/passthrough-read.js b/k6-tests/ncmp/common/passthrough-read.js
new file mode 100644
index 0000000..e4e937c
--- /dev/null
+++ b/k6-tests/ncmp/common/passthrough-read.js
@@ -0,0 +1,36 @@
+/*
+ *  ============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=========================================================
+ */
+
+import http from 'k6/http';
+import { check } from 'k6';
+import { NCMP_BASE_URL, getRandomCmHandleId } from './utils.js';
+
+export function passthroughRead() {
+    const cmHandleId = getRandomCmHandleId();
+    const resourceIdentifier = 'my-resource-identifier';
+    const includeDescendants = true;
+    const datastoreName = 'ncmp-datastore:passthrough-operational';
+    const url = `${NCMP_BASE_URL}/ncmp/v1/ch/${cmHandleId}/data/ds/${datastoreName}?resourceIdentifier=${resourceIdentifier}&include-descendants=${includeDescendants}`
+    const response = http.get(url);
+    check(response, {
+        'status equals 200': (r) => r.status === 200,
+    });
+    return response;
+}
diff --git a/k6-tests/ncmp/search-base.js b/k6-tests/ncmp/common/search-base.js
similarity index 83%
rename from k6-tests/ncmp/search-base.js
rename to k6-tests/ncmp/common/search-base.js
index 04b6444..f833a53 100644
--- a/k6-tests/ncmp/search-base.js
+++ b/k6-tests/ncmp/common/search-base.js
@@ -51,14 +51,18 @@
 }
 
 function executeSearchRequest(searchType, scenario) {
-    const searchParameter = JSON.stringify(SEARCH_PARAMETERS_PER_SCENARIO[scenario]);
-    const response = http.post(NCMP_BASE_URL + '/ncmp/v1/ch/' + searchType, searchParameter, {
-        headers: {'Content-Type': 'application/json'},
-    });
+    const searchParameters = SEARCH_PARAMETERS_PER_SCENARIO[scenario];
+    const payload = JSON.stringify(searchParameters);
+    const url = `${NCMP_BASE_URL}/ncmp/v1/ch/${searchType}`;
+    const params = {
+        headers: {'Content-Type': 'application/json'}
+    };
+    const response = http.post(url, payload, params);
     check(response, {
         'status equals 200': (r) => r.status === 200,
     });
-    check(JSON.parse(response.body), {
+    const responseData = JSON.parse(response.body);
+    check(responseData, {
         'returned list has expected CM-handles': (arr) => arr.length === TOTAL_CM_HANDLES,
     });
 }
diff --git a/k6-tests/ncmp/utils.js b/k6-tests/ncmp/common/utils.js
similarity index 86%
rename from k6-tests/ncmp/utils.js
rename to k6-tests/ncmp/common/utils.js
index 18a8940..1fb9b8e 100644
--- a/k6-tests/ncmp/utils.js
+++ b/k6-tests/ncmp/common/utils.js
@@ -22,9 +22,11 @@
 export const DMI_PLUGIN_URL = 'http://ncmp-dmi-plugin-demo-and-csit-stub:8092';
 export const TOTAL_CM_HANDLES = 20000
 
-/*
- * Makes a batch of CM-handle IDs.
- * Given a batchSize=100 and batchNumber=2, it will generate ['ch-201', 'ch-202' ... 'ch-300']
+/**
+ * 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 = [];
@@ -37,7 +39,7 @@
 }
 
 export function getRandomCmHandleId() {
-    return 'ch-' + (Math.floor(Math.random() * TOTAL_CM_HANDLES) + 1);
+    return `ch-${Math.floor(Math.random() * TOTAL_CM_HANDLES) + 1}`;
 }
 
 function removeBracketsAndQuotes(str) {
