@nsshunt/ststestrunner 1.1.158 → 1.1.160
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ststestrunner.cjs +24 -5
- package/dist/ststestrunner.cjs.map +1 -1
- package/dist/ststestrunner.mjs +24 -5
- package/dist/ststestrunner.mjs.map +1 -1
- package/package.json +1 -1
- package/types/libmodule/testCaseFhir02.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir03.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir04.d.ts.map +1 -1
- package/types/libmodule/testCaseFhirBase.d.ts +2 -0
- package/types/libmodule/testCaseFhirBase.d.ts.map +1 -1
- package/types/libmodule/workerFhirTestCases.d.ts +3 -0
- package/types/libmodule/workerFhirTestCases.d.ts.map +1 -1
package/dist/ststestrunner.cjs
CHANGED
|
@@ -1004,14 +1004,22 @@ var TestCaseFhirBase = class {
|
|
|
1004
1004
|
get runnerExecutionWorker() {
|
|
1005
1005
|
return this.#runnerExecutionWorker;
|
|
1006
1006
|
}
|
|
1007
|
+
GetMaxIteration(key) {
|
|
1008
|
+
return this.runnerExecutionWorker.GetMaxIteration(key);
|
|
1009
|
+
}
|
|
1010
|
+
SetMaxIteration(key, maxIteration) {
|
|
1011
|
+
this.runnerExecutionWorker.SetMaxIteration(key, maxIteration);
|
|
1012
|
+
}
|
|
1007
1013
|
ResetClient = () => {};
|
|
1008
1014
|
GetRandomSequenceFromIteration = () => {
|
|
1015
|
+
const prefix = this.runner.options.personPrefix;
|
|
1016
|
+
const maxIterations = this.GetMaxIteration(prefix);
|
|
1009
1017
|
if (this.runner.iteration === 0) {
|
|
1010
|
-
const
|
|
1011
|
-
|
|
1012
|
-
this.randomSequence = getRandomIterationOrder(this.runner.options.executionProfile.iterations, seedId);
|
|
1018
|
+
const seedId = prefix;
|
|
1019
|
+
this.randomSequence = getRandomIterationOrder(maxIterations, seedId);
|
|
1013
1020
|
}
|
|
1014
|
-
|
|
1021
|
+
const useIteration = this.runner.iteration % maxIterations;
|
|
1022
|
+
return this.randomSequence[useIteration];
|
|
1015
1023
|
};
|
|
1016
1024
|
Error = (message) => {
|
|
1017
1025
|
this.#runnerExecutionWorker.logger.error(message);
|
|
@@ -1471,6 +1479,7 @@ var TestCaseFhir02 = class extends TestCaseFhirQueryBase {
|
|
|
1471
1479
|
"entry": []
|
|
1472
1480
|
};
|
|
1473
1481
|
const personRecord = await this.GetPersonRecord(prefix, this.runner.iteration, "1");
|
|
1482
|
+
this.SetMaxIteration(prefix, this.runner.iteration);
|
|
1474
1483
|
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1475
1484
|
const foundIndexPersonRecords = this.personRecords.findIndex((p) => p.id?.localeCompare(personRecord.id) === 0);
|
|
1476
1485
|
const foundIndexBindlePersonRecords = this.bundleBatch.entry.findIndex((p) => p.resource.id?.localeCompare(personRecord.id) === 0);
|
|
@@ -1516,7 +1525,8 @@ var TestCaseFhir03 = class extends TestCaseFhirQueryBase {
|
|
|
1516
1525
|
const __snapshot1 = performance.now();
|
|
1517
1526
|
const client = await this.GetClient();
|
|
1518
1527
|
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1519
|
-
const
|
|
1528
|
+
const prefix = this.runner.options.personPrefix;
|
|
1529
|
+
const personRecord = await this.GetPersonRecord(prefix, this.GetRandomSequenceFromIteration(), "1");
|
|
1520
1530
|
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1521
1531
|
const retVal = await client.GetResource("Person", personRecord.id);
|
|
1522
1532
|
this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
@@ -1542,6 +1552,8 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
|
|
|
1542
1552
|
this.runner.instrumentData.requestCount++;
|
|
1543
1553
|
const compPersonRecord = { ...personRecord };
|
|
1544
1554
|
const loadedPersonRecorded = { ...retVal.body };
|
|
1555
|
+
console.log(` ==> version id: [${loadedPersonRecorded.meta.versionId}]`);
|
|
1556
|
+
console.log(` ==> tag: [${loadedPersonRecorded.meta.tag}]`);
|
|
1545
1557
|
delete compPersonRecord.meta;
|
|
1546
1558
|
delete loadedPersonRecorded.meta;
|
|
1547
1559
|
this.CheckReturnData(compPersonRecord, loadedPersonRecorded);
|
|
@@ -16855,6 +16867,7 @@ var WorkerFhirTestCases = class extends _nsshunt_stsrunnerframework.AbstractRunn
|
|
|
16855
16867
|
_id = crypto.randomUUID();
|
|
16856
16868
|
_clientHelper;
|
|
16857
16869
|
_authHelper;
|
|
16870
|
+
_maxIteration = {};
|
|
16858
16871
|
restFhirClient = null;
|
|
16859
16872
|
logPrefix = `WorkerFhirTestCases:[${this._id}]:`;
|
|
16860
16873
|
constructor(options) {
|
|
@@ -16969,6 +16982,12 @@ var WorkerFhirTestCases = class extends _nsshunt_stsrunnerframework.AbstractRunn
|
|
|
16969
16982
|
GetClient = async () => {
|
|
16970
16983
|
return this._clientHelper.GetClient();
|
|
16971
16984
|
};
|
|
16985
|
+
GetMaxIteration(key) {
|
|
16986
|
+
return this._maxIteration[key];
|
|
16987
|
+
}
|
|
16988
|
+
SetMaxIteration(key, maxIteration) {
|
|
16989
|
+
this._maxIteration[key] = maxIteration;
|
|
16990
|
+
}
|
|
16972
16991
|
};
|
|
16973
16992
|
//#endregion
|
|
16974
16993
|
exports.WorkerFhirTestCases = WorkerFhirTestCases;
|