diff --git a/k6-tests/ncmp/common/cmhandle-crud.js b/k6-tests/ncmp/common/cmhandle-crud.js
index 8f53c9b..aa3beb3 100644
--- a/k6-tests/ncmp/common/cmhandle-crud.js
+++ b/k6-tests/ncmp/common/cmhandle-crud.js
@@ -32,7 +32,7 @@
         "dmiPlugin": DMI_PLUGIN_URL,
         "createdCmHandles": cmHandleIds.map((cmHandleId, index) => ({
             "cmHandle": cmHandleId,
-            "alternateId": `alt-${cmHandleId}`,
+            "alternateId": cmHandleId.replace('ch-', 'alt-'),
             "moduleSetTag": MODULE_SET_TAGS[index % MODULE_SET_TAGS.length],
             "cmHandleProperties": {"neType": "RadioNode"},
             "publicCmHandleProperties": {
@@ -70,4 +70,4 @@
     const response = executeCmHandleIdSearch('readyCmHandles');
     const arrayOfCmHandleIds = JSON.parse(response.body);
     return arrayOfCmHandleIds.length;
-}
\ No newline at end of file
+}
diff --git a/k6-tests/ncmp/common/passthrough-crud.js b/k6-tests/ncmp/common/passthrough-crud.js
index 5617f9d..c5f2ddd 100644
--- a/k6-tests/ncmp/common/passthrough-crud.js
+++ b/k6-tests/ncmp/common/passthrough-crud.js
@@ -19,38 +19,24 @@
  */
 
 import http from 'k6/http';
-import {
-    CONTENT_TYPE_JSON_PARAM,
-    getRandomCmHandleId,
-    NCMP_BASE_URL,
-    TOPIC_DATA_OPERATIONS_BATCH_READ
-} from './utils.js';
+import { randomIntBetween } from 'https://jslib.k6.io/k6-utils/1.2.0/index.js';
+import { TOTAL_CM_HANDLES, CONTENT_TYPE_JSON_PARAM, NCMP_BASE_URL, TOPIC_DATA_OPERATIONS_BATCH_READ } from './utils.js';
 
-export function passthroughRead() {
-    const cmHandleId = getRandomCmHandleId();
+export function passthroughRead(useAlternateId) {
+    const cmHandleReference = getRandomCmHandleReference(useAlternateId);
     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 url = `${NCMP_BASE_URL}/ncmp/v1/ch/${cmHandleReference}/data/ds/${datastoreName}?resourceIdentifier=${resourceIdentifier}&include-descendants=${includeDescendants}`
     const response = http.get(url);
     return response;
 }
 
-export function passthroughReadWithAltId() {
-    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/alt-${cmHandleId}/data/ds/${datastoreName}?resourceIdentifier=${resourceIdentifier}&include-descendants=${includeDescendants}`
-    const response = http.get(url);
-    return response;
-}
-
-export function passthroughWrite() {
-    const cmHandleId = getRandomCmHandleId();
+export function passthroughWrite(useAlternateId) {
+    const cmHandleReference = getRandomCmHandleReference(useAlternateId);
     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 url = `${NCMP_BASE_URL}/ncmp/v1/ch/${cmHandleReference}/data/ds/${datastoreName}?resourceIdentifier=${resourceIdentifier}`
     const body = `{"neType": "BaseStation"}`
     const response = http.post(url, JSON.stringify(body), CONTENT_TYPE_JSON_PARAM);
     return response;
@@ -72,4 +58,9 @@
     };
     const response = http.post(url, JSON.stringify(payload), CONTENT_TYPE_JSON_PARAM);
     return response;
-}
\ No newline at end of file
+}
+
+function getRandomCmHandleReference(useAlternateId) {
+    const prefix = useAlternateId ? 'alt' : 'ch';
+    return `${prefix}-${randomIntBetween(1, TOTAL_CM_HANDLES)}`;
+}
diff --git a/k6-tests/ncmp/common/search-base.js b/k6-tests/ncmp/common/search-base.js
index a7d0c92..beb3aad 100644
--- a/k6-tests/ncmp/common/search-base.js
+++ b/k6-tests/ncmp/common/search-base.js
@@ -22,19 +22,23 @@
 import { NCMP_BASE_URL, CONTENT_TYPE_JSON_PARAM } from './utils.js';
 
 const SEARCH_PARAMETERS_PER_SCENARIO = {
-    'module': {
-        'cmHandleQueryParameters': [
+    "module-and-properties": {
+        "cmHandleQueryParameters": [
             {
-                'conditionName': 'hasAllModules',
-                'conditionParameters': [{'moduleName': 'ietf-yang-types'}]
+                "conditionName": "hasAllModules",
+                "conditionParameters": [{"moduleName": "ietf-yang-types"}]
+            },
+            {
+                "conditionName": "hasAllProperties",
+                "conditionParameters": [{"Color": "yellow"}]
             }
         ]
     },
-    'readyCmHandles': {
-        'cmHandleQueryParameters': [
+    "readyCmHandles": {
+        "cmHandleQueryParameters": [
             {
-                'conditionName': 'cmHandleWithCpsPath',
-                'conditionParameters': [{'cpsPath': '//state[@cm-handle-state="READY"]'}]
+                "conditionName": "cmHandleWithCpsPath",
+                "conditionParameters": [{"cpsPath": "//state[@cm-handle-state='READY']"}]
             }
         ]
     }
diff --git a/k6-tests/ncmp/common/utils.js b/k6-tests/ncmp/common/utils.js
index 98c9eb8..d216f7f 100644
--- a/k6-tests/ncmp/common/utils.js
+++ b/k6-tests/ncmp/common/utils.js
@@ -38,17 +38,8 @@
  * @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}`;
+    return Array.from({ length: batchSize }, (_, i) => `ch-${startIndex + i}`);
 }
 
 export function makeCustomSummaryReport(data, options) {
@@ -61,7 +52,8 @@
         makeSummaryCsvLine('4', 'CM-handle search with Module filter', 'milliseconds', 'cm_search_duration', data, options),
         makeSummaryCsvLine('5a', 'NCMP overhead for Synchronous single CM-handle pass-through read', 'milliseconds', 'ncmp_overhead_passthrough_read', data, options),
         makeSummaryCsvLine('5b', 'NCMP overhead for Synchronous single CM-handle pass-through read with alternate id', 'milliseconds', 'ncmp_overhead_passthrough_read_alt_id', data, options),
-        makeSummaryCsvLine('6', 'NCMP overhead for Synchronous single CM-handle pass-through write', 'milliseconds', 'ncmp_overhead_passthrough_write', data, options),
+        makeSummaryCsvLine('6a', 'NCMP overhead for Synchronous single CM-handle pass-through write', 'milliseconds', 'ncmp_overhead_passthrough_write', data, options),
+        makeSummaryCsvLine('6b', 'NCMP overhead for Synchronous single CM-handle pass-through write with alternate id', 'milliseconds', 'ncmp_overhead_passthrough_write_alt_id', data, options),
         makeSummaryCsvLine('7', 'Data operations batch read', 'events/second', 'data_operations_batch_read_cmhandles_per_second', data, options),
     ];
     return summaryCsvLines.join('\n') + '\n';
diff --git a/k6-tests/ncmp/ncmp-kpi.js b/k6-tests/ncmp/ncmp-kpi.js
index 3fc138c..ef3d0c6 100644
--- a/k6-tests/ncmp/ncmp-kpi.js
+++ b/k6-tests/ncmp/ncmp-kpi.js
@@ -26,11 +26,7 @@
     makeCustomSummaryReport, makeBatchOfCmHandleIds, DATA_OPERATION_READ_BATCH_SIZE,
     TOPIC_DATA_OPERATIONS_BATCH_READ, KAFKA_BOOTSTRAP_SERVERS, REGISTRATION_BATCH_SIZE
 } from './common/utils.js';
-import {
-    createCmHandles,
-    deleteCmHandles,
-    waitForAllCmHandlesToBeReady
-} from './common/cmhandle-crud.js';
+import { createCmHandles, deleteCmHandles, waitForAllCmHandlesToBeReady } from './common/cmhandle-crud.js';
 import { executeCmHandleSearch, executeCmHandleIdSearch } from './common/search-base.js';
 import { passthroughRead, passthroughReadWithAltId, passthroughWrite, batchRead } from './common/passthrough-crud.js';
 
@@ -39,6 +35,7 @@
 let passthroughReadNcmpOverheadTrend = new Trend('ncmp_overhead_passthrough_read', true);
 let passthroughReadNcmpOverheadTrendWithAlternateId = new Trend('ncmp_overhead_passthrough_read_alt_id', true);
 let passthroughWriteNcmpOverheadTrend = new Trend('ncmp_overhead_passthrough_write', true);
+let passthroughWriteNcmpOverheadTrendWithAlternateId = new Trend('ncmp_overhead_passthrough_write_alt_id', true);
 let idSearchDurationTrend = new Trend('id_search_duration', true);
 let cmSearchDurationTrend = new Trend('cm_search_duration', true);
 let dataOperationsBatchReadCmHandlePerSecondTrend = new Trend('data_operations_batch_read_cmhandles_per_second', false);
@@ -56,32 +53,38 @@
     scenarios: {
         passthrough_read: {
             executor: 'constant-vus',
-            exec: 'passthrough_read',
-            vus: 9,
+            exec: 'executePassthroughReadScenario',
+            vus: 4,
             duration: DURATION,
         },
         passthrough_read_alt_id: {
             executor: 'constant-vus',
-            exec: 'passthrough_read_alt_id',
-            vus: 1,
+            exec: 'executePassthroughReadAltIdScenario',
+            vus: 4,
             duration: DURATION,
         },
         passthrough_write: {
             executor: 'constant-vus',
-            exec: 'passthrough_write',
-            vus: 10,
+            exec: 'executePassthroughWriteScenario',
+            vus: 4,
             duration: DURATION,
         },
-        id_search_module: {
+        passthrough_write_alt_id: {
             executor: 'constant-vus',
-            exec: 'id_search_module',
-            vus: 3,
+            exec: 'executePassthroughWriteAltIdScenario',
+            vus: 4,
             duration: DURATION,
         },
-        cm_search_module: {
+        cm_handle_id_search: {
             executor: 'constant-vus',
-            exec: 'cm_search_module',
-            vus: 3,
+            exec: 'executeCmHandleIdSearchScenario',
+            vus: 5,
+            duration: DURATION,
+        },
+        cm_handle_search: {
+            executor: 'constant-vus',
+            exec: 'executeCmHandleSearchScenario',
+            vus: 5,
             duration: DURATION,
         },
         data_operation_send_async_http_request: {
@@ -105,11 +108,12 @@
         'http_req_failed': ['rate == 0'],
         'cmhandles_created_per_second': ['avg >= 22'],
         'cmhandles_deleted_per_second': ['avg >= 22'],
-        'ncmp_overhead_passthrough_read': ['avg <= 100'],
-        'ncmp_overhead_passthrough_read_alt_id': ['avg <= 100'],
-        'ncmp_overhead_passthrough_write': ['avg <= 100'],
-        'id_search_duration': ['avg <= 625'],
-        'cm_search_duration': ['avg <= 13000'],
+        'ncmp_overhead_passthrough_read': ['avg <= 40'],
+        'ncmp_overhead_passthrough_write': ['avg <= 40'],
+        'ncmp_overhead_passthrough_read_alt_id': ['avg <= 40'],
+        'ncmp_overhead_passthrough_write_alt_id': ['avg <= 40'],
+        'id_search_duration': ['avg <= 2000'],
+        'cm_search_duration': ['avg <= 15000'],
         'data_operations_batch_read_cmhandles_per_second': ['avg >= 150'],
     },
 };
@@ -148,40 +152,48 @@
     cmHandlesDeletedPerSecondTrend.add(TOTAL_CM_HANDLES / totalDeregistrationTimeInSeconds);
 }
 
-export function passthrough_read() {
-    const response = passthroughRead();
+export function executePassthroughReadScenario() {
+    const response = passthroughRead(false);
     if (check(response, { 'passthrough read status equals 200': (r) => r.status === 200 })) {
         const overhead = response.timings.duration - READ_DATA_FOR_CM_HANDLE_DELAY_MS;
         passthroughReadNcmpOverheadTrend.add(overhead);
     }
 }
 
-export function passthrough_read_alt_id() {
-    const response = passthroughReadWithAltId();
+export function executePassthroughReadAltIdScenario() {
+    const response = passthroughRead(true);
     if (check(response, { 'passthrough read with alternate Id status equals 200': (r) => r.status === 200 })) {
         const overhead = response.timings.duration - READ_DATA_FOR_CM_HANDLE_DELAY_MS;
         passthroughReadNcmpOverheadTrendWithAlternateId.add(overhead);
     }
 }
 
-export function passthrough_write() {
-    const response = passthroughWrite();
+export function executePassthroughWriteScenario() {
+    const response = passthroughWrite(false);
     if (check(response, { 'passthrough write status equals 201': (r) => r.status === 201 })) {
         const overhead = response.timings.duration - WRITE_DATA_FOR_CM_HANDLE_DELAY_MS;
         passthroughWriteNcmpOverheadTrend.add(overhead);
     }
 }
 
-export function id_search_module() {
-    const response = executeCmHandleIdSearch('module');
+export function executePassthroughWriteAltIdScenario() {
+    const response = passthroughWrite(true);
+    if (check(response, { 'passthrough write with alternate Id status equals 201': (r) => r.status === 201 })) {
+        const overhead = response.timings.duration - WRITE_DATA_FOR_CM_HANDLE_DELAY_MS;
+        passthroughWriteNcmpOverheadTrendWithAlternateId.add(overhead);
+    }
+}
+
+export function executeCmHandleIdSearchScenario() {
+    const response = executeCmHandleIdSearch('module-and-properties');
     if (check(response, { 'CM handle ID search status equals 200': (r) => r.status === 200 })
      && check(response, { 'CM handle ID search returned expected CM-handles': (r) => r.json('#') === TOTAL_CM_HANDLES })) {
         idSearchDurationTrend.add(response.timings.duration);
     }
 }
 
-export function cm_search_module() {
-    const response = executeCmHandleSearch('module');
+export function executeCmHandleSearchScenario() {
+    const response = executeCmHandleSearch('module-and-properties');
     if (check(response, { 'CM handle search status equals 200': (r) => r.status === 200 })
      && check(response, { 'CM handle search returned expected CM-handles': (r) => r.json('#') === TOTAL_CM_HANDLES })) {
         cmSearchDurationTrend.add(response.timings.duration);
