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/common/search-base.js b/k6-tests/ncmp/common/search-base.js
new file mode 100644
index 0000000..f833a53
--- /dev/null
+++ b/k6-tests/ncmp/common/search-base.js
@@ -0,0 +1,68 @@
+/*
+ *  ============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, TOTAL_CM_HANDLES } from './utils.js';
+
+const SEARCH_PARAMETERS_PER_SCENARIO = {
+    'no-filter': {},
+    'module': {
+        'cmHandleQueryParameters': [
+            {
+                'conditionName': 'hasAllModules',
+                'conditionParameters': [{'moduleName': 'ietf-yang-types-1'}]
+            }
+        ]
+    },
+    'property': {
+        'cmHandleQueryParameters': [
+            {
+                'conditionName': 'hasAllProperties',
+                'conditionParameters': [{'Color': 'yellow'}]
+            }
+        ]
+    }
+};
+
+export function executeCmHandleSearch(scenario) {
+    executeSearchRequest('searches', scenario);
+}
+
+export function executeCmHandleIdSearch(scenario) {
+    executeSearchRequest('id-searches', scenario);
+}
+
+function executeSearchRequest(searchType, scenario) {
+    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,
+    });
+    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/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;
+}
+
