@nsshunt/ststestrunner 1.1.86 → 1.1.87
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 +196 -254
- package/dist/ststestrunner.cjs.map +1 -1
- package/dist/ststestrunner.mjs +196 -254
- package/dist/ststestrunner.mjs.map +1 -1
- package/package.json +1 -1
- package/types/libmodule/testCaseFhir01.d.ts +1 -1
- package/types/libmodule/testCaseFhir01.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir02.d.ts +1 -4
- package/types/libmodule/testCaseFhir02.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir03.d.ts +1 -1
- package/types/libmodule/testCaseFhir03.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir04.d.ts +1 -1
- package/types/libmodule/testCaseFhir04.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir05.d.ts +1 -1
- package/types/libmodule/testCaseFhir05.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir06.d.ts +1 -1
- package/types/libmodule/testCaseFhir06.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir07.d.ts +1 -1
- package/types/libmodule/testCaseFhir07.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir08.d.ts +1 -1
- package/types/libmodule/testCaseFhir08.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir09.d.ts +1 -1
- package/types/libmodule/testCaseFhir09.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir10.d.ts +1 -1
- package/types/libmodule/testCaseFhir10.d.ts.map +1 -1
- package/types/libmodule/testCaseFhirBase.d.ts +9 -1
- package/types/libmodule/testCaseFhirBase.d.ts.map +1 -1
- package/types/libmodule/testCaseFhirQueryBase.d.ts +0 -5
- package/types/libmodule/testCaseFhirQueryBase.d.ts.map +1 -1
package/dist/ststestrunner.mjs
CHANGED
|
@@ -391,6 +391,8 @@ var TestCaseFhirBase = class {
|
|
|
391
391
|
#resetSocketClientTrigger = 50;
|
|
392
392
|
#clientSocketFetchCount = 0;
|
|
393
393
|
#authAgentManager;
|
|
394
|
+
retryCount = 0;
|
|
395
|
+
maxAuthRetryCount = 5;
|
|
394
396
|
runnerDurationList = [];
|
|
395
397
|
_authMaxTimeout = 5e3;
|
|
396
398
|
accessTokenTime = performance.now();
|
|
@@ -900,32 +902,12 @@ var TestCaseFhirBase = class {
|
|
|
900
902
|
await this.#ForcePublishTelemetryData();
|
|
901
903
|
return true;
|
|
902
904
|
};
|
|
903
|
-
};
|
|
904
|
-
//#endregion
|
|
905
|
-
//#region src/libmodule/testCaseFhirQueryBase.ts
|
|
906
|
-
var TestCaseFhirQueryBase = class extends TestCaseFhirBase {
|
|
907
|
-
_longExecTimeoutVal = 5e3;
|
|
908
|
-
_durationList = [];
|
|
909
|
-
constructor(workerInstance, runner) {
|
|
910
|
-
super(workerInstance, runner);
|
|
911
|
-
}
|
|
912
905
|
GetClient = async () => {
|
|
913
906
|
let client;
|
|
914
907
|
if (this.runner.options.fhirOptions.stsfhirsocketclientmode === "no-socket-client") client = await this.GetRESTClient();
|
|
915
908
|
else client = await this.GetFhirSocketClient();
|
|
916
909
|
return client;
|
|
917
910
|
};
|
|
918
|
-
ExecuteQuery = async () => {
|
|
919
|
-
return null;
|
|
920
|
-
};
|
|
921
|
-
#ResetClient = (reason) => {
|
|
922
|
-
this.ResetClient();
|
|
923
|
-
};
|
|
924
|
-
#CheckResetClient = () => {
|
|
925
|
-
if (this.runner.instrumentData.requestCount > 0) {
|
|
926
|
-
if (this.runner.instrumentData.requestCount % this.runner.options.clientResetMod === 0) this.#ResetClient("#ResetClient triggered");
|
|
927
|
-
}
|
|
928
|
-
};
|
|
929
911
|
_GetDetail = () => {
|
|
930
912
|
return `testType: [${this.runner.options.testType}], description: [${this.runner.options.description}], workerManagerId: [${this.runner.workerManagerId}], Iteration: [${this.runner.iteration}]`;
|
|
931
913
|
};
|
|
@@ -938,6 +920,48 @@ var TestCaseFhirQueryBase = class extends TestCaseFhirBase {
|
|
|
938
920
|
}
|
|
939
921
|
return snapShotEnd;
|
|
940
922
|
};
|
|
923
|
+
ExecuteQuery = async () => {
|
|
924
|
+
this.retryCount = 0;
|
|
925
|
+
return this._ExecuteQuery();
|
|
926
|
+
};
|
|
927
|
+
_ExecuteQuery = async () => {
|
|
928
|
+
try {
|
|
929
|
+
return await this.PerformExecuteQuery();
|
|
930
|
+
} catch (error) {
|
|
931
|
+
this.runner.instrumentData.errorCount++;
|
|
932
|
+
if (this.HandleError(error) === true) if (this.retryCount < this.maxAuthRetryCount) {
|
|
933
|
+
this.retryCount++;
|
|
934
|
+
this.runner.instrumentData.authenticationRetryCount++;
|
|
935
|
+
const message = `TestCaseFhir02:ExecuteQuery(): Retry auth attempt: retryCount: [${this.retryCount}], maxAuthRetryCount: [${this.maxAuthRetryCount}]`;
|
|
936
|
+
this.Error(message);
|
|
937
|
+
await Sleep(this.retryCount * 1e3);
|
|
938
|
+
return this._ExecuteQuery();
|
|
939
|
+
} else {
|
|
940
|
+
const message = `TestCaseFhir02:ExecuteQuery(): Max auth retries exceeded: retryCount: [${this.retryCount}], maxAuthRetryCount: [${this.maxAuthRetryCount}], Error: [${error}]`;
|
|
941
|
+
this.Error(message);
|
|
942
|
+
error.message = message;
|
|
943
|
+
throw error;
|
|
944
|
+
}
|
|
945
|
+
else throw error;
|
|
946
|
+
}
|
|
947
|
+
};
|
|
948
|
+
};
|
|
949
|
+
//#endregion
|
|
950
|
+
//#region src/libmodule/testCaseFhirQueryBase.ts
|
|
951
|
+
var TestCaseFhirQueryBase = class extends TestCaseFhirBase {
|
|
952
|
+
_longExecTimeoutVal = 5e3;
|
|
953
|
+
_durationList = [];
|
|
954
|
+
constructor(workerInstance, runner) {
|
|
955
|
+
super(workerInstance, runner);
|
|
956
|
+
}
|
|
957
|
+
#ResetClient = (reason) => {
|
|
958
|
+
this.ResetClient();
|
|
959
|
+
};
|
|
960
|
+
#CheckResetClient = () => {
|
|
961
|
+
if (this.runner.instrumentData.requestCount > 0) {
|
|
962
|
+
if (this.runner.instrumentData.requestCount % this.runner.options.clientResetMod === 0) this.#ResetClient("#ResetClient triggered");
|
|
963
|
+
}
|
|
964
|
+
};
|
|
941
965
|
ExecuteRunner = async () => {
|
|
942
966
|
if (this.runner.iteration % 100 === 0) this.Debug(`TestCaseFhirQueryBase:ExecuteRunner(): ${this._GetDetail()}`);
|
|
943
967
|
const start = performance.now();
|
|
@@ -1000,197 +1024,139 @@ var TestCaseFhirQueryBase = class extends TestCaseFhirBase {
|
|
|
1000
1024
|
//#endregion
|
|
1001
1025
|
//#region src/libmodule/testCaseFhir01.ts
|
|
1002
1026
|
var TestCaseFhir01 = class extends TestCaseFhirQueryBase {
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
return null;
|
|
1010
|
-
} catch (error) {
|
|
1011
|
-
this.runner.instrumentData.errorCount++;
|
|
1012
|
-
this.Error(`TestCaseFhir01:ExecuteQuery(): Error: [${error}]`);
|
|
1013
|
-
throw error;
|
|
1014
|
-
}
|
|
1027
|
+
PerformExecuteQuery = async () => {
|
|
1028
|
+
const __snapshot1 = performance.now();
|
|
1029
|
+
await this.GetAccessToken();
|
|
1030
|
+
this._CheckOutputLongDurationError(__snapshot1, "await this.GetAccessToken()");
|
|
1031
|
+
this.accesssToken = null;
|
|
1032
|
+
return null;
|
|
1015
1033
|
};
|
|
1016
1034
|
};
|
|
1017
1035
|
//#endregion
|
|
1018
1036
|
//#region src/libmodule/testCaseFhir02.ts
|
|
1019
1037
|
var TestCaseFhir02 = class extends TestCaseFhirQueryBase {
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
this.
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
_ExecuteQuery = async () => {
|
|
1031
|
-
try {
|
|
1032
|
-
const __snapshot1 = performance.now();
|
|
1033
|
-
const client = await this.GetClient();
|
|
1034
|
-
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1035
|
-
const prefix = this.runner.options.personPrefix;
|
|
1036
|
-
const personRecord = await this.GetPersonRecord(prefix, this.runner.iteration, "1");
|
|
1037
|
-
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1038
|
-
const retVal = await client.PostResource("Person", personRecord);
|
|
1039
|
-
this._CheckOutputLongDurationError(__snapshot3, "await this.PostResource()");
|
|
1040
|
-
return retVal.body;
|
|
1041
|
-
} catch (error) {
|
|
1042
|
-
this.runner.instrumentData.errorCount++;
|
|
1043
|
-
if (this.HandleError(error) === true) if (this.retryCount < this.maxAuthRetryCount) {
|
|
1044
|
-
this.retryCount++;
|
|
1045
|
-
this.runner.instrumentData.authenticationRetryCount++;
|
|
1046
|
-
const message = `TestCaseFhir02:ExecuteQuery(): Retry auth attempt: retryCount: [${this.retryCount}], maxAuthRetryCount: [${this.maxAuthRetryCount}]`;
|
|
1047
|
-
this.Error(message);
|
|
1048
|
-
await Sleep(this.retryCount * 1e3);
|
|
1049
|
-
return this._ExecuteQuery();
|
|
1050
|
-
} else {
|
|
1051
|
-
const message = `TestCaseFhir02:ExecuteQuery(): Max auth retries exceeded: retryCount: [${this.retryCount}], maxAuthRetryCount: [${this.maxAuthRetryCount}], Error: [${error}]`;
|
|
1052
|
-
this.Error(message);
|
|
1053
|
-
error.message = message;
|
|
1054
|
-
throw error;
|
|
1055
|
-
}
|
|
1056
|
-
else throw error;
|
|
1057
|
-
}
|
|
1038
|
+
PerformExecuteQuery = async () => {
|
|
1039
|
+
const __snapshot1 = performance.now();
|
|
1040
|
+
const client = await this.GetClient();
|
|
1041
|
+
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1042
|
+
const prefix = this.runner.options.personPrefix;
|
|
1043
|
+
const personRecord = await this.GetPersonRecord(prefix, this.runner.iteration, "1");
|
|
1044
|
+
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1045
|
+
const retVal = await client.PostResource("Person", personRecord);
|
|
1046
|
+
this._CheckOutputLongDurationError(__snapshot3, "await this.PostResource()");
|
|
1047
|
+
return retVal.body;
|
|
1058
1048
|
};
|
|
1059
1049
|
};
|
|
1060
1050
|
//#endregion
|
|
1061
1051
|
//#region src/libmodule/testCaseFhir03.ts
|
|
1062
1052
|
var TestCaseFhir03 = class extends TestCaseFhirQueryBase {
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
return retVal.body;
|
|
1078
|
-
} catch (error) {
|
|
1079
|
-
this.runner.instrumentData.errorCount++;
|
|
1080
|
-
this.Error(`TestCaseFhir03:ExecuteQuery(): Error: [${error}]`);
|
|
1081
|
-
throw error;
|
|
1082
|
-
}
|
|
1053
|
+
PerformExecuteQuery = async () => {
|
|
1054
|
+
const __snapshot1 = performance.now();
|
|
1055
|
+
const client = await this.GetClient();
|
|
1056
|
+
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1057
|
+
const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "1");
|
|
1058
|
+
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1059
|
+
const retVal = await client.GetResource("Person", personRecord.id);
|
|
1060
|
+
this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
1061
|
+
delete personRecord.meta;
|
|
1062
|
+
delete retVal.body.meta;
|
|
1063
|
+
const p1 = JSON.stringify(personRecord);
|
|
1064
|
+
const p2 = JSON.stringify(retVal.body);
|
|
1065
|
+
if (p1.localeCompare(p2) !== 0) this.runner.instrumentData.errorCount++;
|
|
1066
|
+
return retVal.body;
|
|
1083
1067
|
};
|
|
1084
1068
|
};
|
|
1085
1069
|
//#endregion
|
|
1086
1070
|
//#region src/libmodule/testCaseFhir04.ts
|
|
1087
1071
|
var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1105
|
-
this.runner.instrumentData.errorCount++;
|
|
1106
|
-
return retVal.body;
|
|
1107
|
-
}
|
|
1108
|
-
const originalPersonRecord = retVal.body;
|
|
1109
|
-
if (originalPersonRecord && originalPersonRecord.text) {
|
|
1110
|
-
originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration}`;
|
|
1111
|
-
const retVal = await client.PutResource("Person", originalPersonRecord, `W/"1"`);
|
|
1112
|
-
this._CheckOutputLongDurationError(__snapshot4, "await this.PutResource()");
|
|
1113
|
-
const updatedRecord = { ...retVal.body };
|
|
1114
|
-
delete updatedRecord.meta;
|
|
1115
|
-
delete originalPersonRecord.meta;
|
|
1116
|
-
const p1 = JSON.stringify(updatedRecord);
|
|
1117
|
-
const p2 = JSON.stringify(originalPersonRecord);
|
|
1118
|
-
if (p1.localeCompare(p2) !== 0) this.runner.instrumentData.errorCount++;
|
|
1119
|
-
return retVal.body;
|
|
1120
|
-
} else {
|
|
1121
|
-
this.runner.instrumentData.errorCount++;
|
|
1122
|
-
return null;
|
|
1123
|
-
}
|
|
1124
|
-
} catch (error) {
|
|
1072
|
+
PerformExecuteQuery = async () => {
|
|
1073
|
+
const __snapshot1 = performance.now();
|
|
1074
|
+
const client = await this.GetClient();
|
|
1075
|
+
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1076
|
+
const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "1");
|
|
1077
|
+
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1078
|
+
const retVal = await client.GetResource("Person", personRecord.id);
|
|
1079
|
+
const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
1080
|
+
this.runner.instrumentData.requestCount++;
|
|
1081
|
+
const compPersonRecord = { ...personRecord };
|
|
1082
|
+
const loadedPersonRecorded = { ...retVal.body };
|
|
1083
|
+
delete compPersonRecord.meta;
|
|
1084
|
+
delete loadedPersonRecorded.meta;
|
|
1085
|
+
const p1 = JSON.stringify(compPersonRecord);
|
|
1086
|
+
const p2 = JSON.stringify(loadedPersonRecorded);
|
|
1087
|
+
if (p1.localeCompare(p2) !== 0) {
|
|
1125
1088
|
this.runner.instrumentData.errorCount++;
|
|
1126
|
-
|
|
1127
|
-
|
|
1089
|
+
return retVal.body;
|
|
1090
|
+
}
|
|
1091
|
+
const originalPersonRecord = retVal.body;
|
|
1092
|
+
if (originalPersonRecord && originalPersonRecord.text) {
|
|
1093
|
+
originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration}`;
|
|
1094
|
+
const retVal = await client.PutResource("Person", originalPersonRecord, `W/"1"`);
|
|
1095
|
+
this._CheckOutputLongDurationError(__snapshot4, "await this.PutResource()");
|
|
1096
|
+
const updatedRecord = { ...retVal.body };
|
|
1097
|
+
delete updatedRecord.meta;
|
|
1098
|
+
delete originalPersonRecord.meta;
|
|
1099
|
+
const p1 = JSON.stringify(updatedRecord);
|
|
1100
|
+
const p2 = JSON.stringify(originalPersonRecord);
|
|
1101
|
+
if (p1.localeCompare(p2) !== 0) this.runner.instrumentData.errorCount++;
|
|
1102
|
+
return retVal.body;
|
|
1103
|
+
} else {
|
|
1104
|
+
this.runner.instrumentData.errorCount++;
|
|
1105
|
+
return null;
|
|
1128
1106
|
}
|
|
1129
1107
|
};
|
|
1130
1108
|
};
|
|
1131
1109
|
//#endregion
|
|
1132
1110
|
//#region src/libmodule/testCaseFhir05.ts
|
|
1133
1111
|
var TestCaseFhir05 = class extends TestCaseFhirQueryBase {
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
} else {
|
|
1153
|
-
this.runner.instrumentData.errorCount++;
|
|
1154
|
-
return null;
|
|
1155
|
-
}
|
|
1156
|
-
} catch (error) {
|
|
1112
|
+
PerformExecuteQuery = async () => {
|
|
1113
|
+
const __snapshot1 = performance.now();
|
|
1114
|
+
const client = await this.GetClient();
|
|
1115
|
+
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1116
|
+
const originalPersonRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "2");
|
|
1117
|
+
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1118
|
+
if (originalPersonRecord && originalPersonRecord.text) {
|
|
1119
|
+
originalPersonRecord.text.div = `Put record TestCaseFhir05 ${this.runner.iteration}`;
|
|
1120
|
+
const retVal = await client.PutResource("Person", originalPersonRecord, `W/"2"`);
|
|
1121
|
+
this._CheckOutputLongDurationError(__snapshot3, "await this.PutResource()");
|
|
1122
|
+
const updatedRecord = { ...retVal.body };
|
|
1123
|
+
delete updatedRecord.meta;
|
|
1124
|
+
delete originalPersonRecord.meta;
|
|
1125
|
+
const p1 = JSON.stringify(updatedRecord);
|
|
1126
|
+
const p2 = JSON.stringify(originalPersonRecord);
|
|
1127
|
+
if (p1.localeCompare(p2) !== 0) this.runner.instrumentData.errorCount++;
|
|
1128
|
+
return retVal.body;
|
|
1129
|
+
} else {
|
|
1157
1130
|
this.runner.instrumentData.errorCount++;
|
|
1158
|
-
|
|
1159
|
-
throw error;
|
|
1131
|
+
return null;
|
|
1160
1132
|
}
|
|
1161
1133
|
};
|
|
1162
1134
|
};
|
|
1163
1135
|
//#endregion
|
|
1164
1136
|
//#region src/libmodule/testCaseFhir06.ts
|
|
1165
1137
|
var TestCaseFhir06 = class extends TestCaseFhirQueryBase {
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
this._CheckOutputLongDurationError(__snapshot3, "await this.GetResources()");
|
|
1187
|
-
}
|
|
1188
|
-
return retVal.body;
|
|
1189
|
-
} catch (error) {
|
|
1190
|
-
this.runner.instrumentData.errorCount++;
|
|
1191
|
-
this.Error(`TestCaseFhir06:ExecuteQuery(): Error: [${error}]`);
|
|
1192
|
-
throw error;
|
|
1138
|
+
PerformExecuteQuery = async () => {
|
|
1139
|
+
const __snapshot1 = performance.now();
|
|
1140
|
+
const client = await this.GetClient();
|
|
1141
|
+
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1142
|
+
const baseUrl = this.runner.options.fhirOptions.stsfhirbaseurl;
|
|
1143
|
+
const prefix = this.runner.options.personPrefix;
|
|
1144
|
+
const personRecord = await this.GetPersonRecord(prefix, this.runner.iteration, "3");
|
|
1145
|
+
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1146
|
+
const url = new URL(`${baseUrl}/Person?family=${personRecord.name[0].family}`);
|
|
1147
|
+
let retVal;
|
|
1148
|
+
if (this.runner.options.useDirectQuery === true) {
|
|
1149
|
+
const data = {
|
|
1150
|
+
queryTestingMode: this.runner.options.queryTestingMode,
|
|
1151
|
+
family: personRecord.name[0].family
|
|
1152
|
+
};
|
|
1153
|
+
retVal = await client.GenericSearchTesting("Person", data);
|
|
1154
|
+
this._CheckOutputLongDurationError(__snapshot3, "await this.GenericSearchTesting()");
|
|
1155
|
+
} else {
|
|
1156
|
+
retVal = await client.GetResources(url);
|
|
1157
|
+
this._CheckOutputLongDurationError(__snapshot3, "await this.GetResources()");
|
|
1193
1158
|
}
|
|
1159
|
+
return retVal.body;
|
|
1194
1160
|
};
|
|
1195
1161
|
};
|
|
1196
1162
|
//#endregion
|
|
@@ -1843,96 +1809,72 @@ var fast_json_patch_default = Object.assign({}, core_exports, duplex_exports, {
|
|
|
1843
1809
|
//#endregion
|
|
1844
1810
|
//#region src/libmodule/testCaseFhir07.ts
|
|
1845
1811
|
var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
return retValPatched.body;
|
|
1862
|
-
} catch (error) {
|
|
1863
|
-
this.runner.instrumentData.errorCount++;
|
|
1864
|
-
this.Error(`TestCaseFhir07:ExecuteQuery(): Error: [${error}]`);
|
|
1865
|
-
throw error;
|
|
1866
|
-
}
|
|
1812
|
+
PerformExecuteQuery = async () => {
|
|
1813
|
+
const __snapshot1 = performance.now();
|
|
1814
|
+
const client = await this.GetClient();
|
|
1815
|
+
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1816
|
+
const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "3");
|
|
1817
|
+
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1818
|
+
const retVal = await client.GetResource("Person", personRecord.id);
|
|
1819
|
+
const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
1820
|
+
const resource = retVal.body;
|
|
1821
|
+
const observer = fast_json_patch_default.observe(resource);
|
|
1822
|
+
resource.text.div = `Json Patched record TestCaseFhir07 ${this.runner.iteration}`;
|
|
1823
|
+
const patchRecord = fast_json_patch_default.generate(observer);
|
|
1824
|
+
const retValPatched = await client.PatchResource("Person", personRecord.id, patchRecord, `application/json-patch+json`, `W/"3"`);
|
|
1825
|
+
this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
|
|
1826
|
+
return retValPatched.body;
|
|
1867
1827
|
};
|
|
1868
1828
|
};
|
|
1869
1829
|
//#endregion
|
|
1870
1830
|
//#region src/libmodule/testCaseFhir08.ts
|
|
1871
1831
|
var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
return retValPatched.body;
|
|
1886
|
-
} catch (error) {
|
|
1887
|
-
this.runner.instrumentData.errorCount++;
|
|
1888
|
-
this.Error(`TestCaseFhir08:ExecuteQuery(): Error: [${error}]`);
|
|
1889
|
-
throw error;
|
|
1890
|
-
}
|
|
1832
|
+
PerformExecuteQuery = async () => {
|
|
1833
|
+
const __snapshot1 = performance.now();
|
|
1834
|
+
const client = await this.GetClient();
|
|
1835
|
+
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1836
|
+
const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "4");
|
|
1837
|
+
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1838
|
+
const retVal = await client.GetResource("Person", personRecord.id);
|
|
1839
|
+
const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
1840
|
+
const resource = retVal.body;
|
|
1841
|
+
resource.text.div = `Merge Patched record TestCaseFhir08 ${this.runner.iteration}`;
|
|
1842
|
+
const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"4"`);
|
|
1843
|
+
this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
|
|
1844
|
+
return retValPatched.body;
|
|
1891
1845
|
};
|
|
1892
1846
|
};
|
|
1893
1847
|
//#endregion
|
|
1894
1848
|
//#region src/libmodule/testCaseFhir09.ts
|
|
1895
1849
|
var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
} else {
|
|
1908
|
-
this.runner.instrumentData.errorCount++;
|
|
1909
|
-
return null;
|
|
1910
|
-
}
|
|
1911
|
-
} catch (error) {
|
|
1850
|
+
PerformExecuteQuery = async () => {
|
|
1851
|
+
const __snapshot1 = performance.now();
|
|
1852
|
+
const client = await this.GetClient();
|
|
1853
|
+
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1854
|
+
const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "5");
|
|
1855
|
+
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1856
|
+
if (personRecord.text) {
|
|
1857
|
+
const retVal = await client.DeleteResource("Person", personRecord.id, `W/"5"`);
|
|
1858
|
+
this._CheckOutputLongDurationError(__snapshot3, "await this.DeleteResource()");
|
|
1859
|
+
return retVal.body;
|
|
1860
|
+
} else {
|
|
1912
1861
|
this.runner.instrumentData.errorCount++;
|
|
1913
|
-
|
|
1914
|
-
throw error;
|
|
1862
|
+
return null;
|
|
1915
1863
|
}
|
|
1916
1864
|
};
|
|
1917
1865
|
};
|
|
1918
1866
|
//#endregion
|
|
1919
1867
|
//#region src/libmodule/testCaseFhir10.ts
|
|
1920
1868
|
var TestCaseFhir10 = class extends TestCaseFhirQueryBase {
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
return retVal.body;
|
|
1931
|
-
} catch (error) {
|
|
1932
|
-
this.runner.instrumentData.errorCount++;
|
|
1933
|
-
this.Error(`TestCaseFhir10:ExecuteQuery(): Error: [${error}]`);
|
|
1934
|
-
throw error;
|
|
1935
|
-
}
|
|
1869
|
+
PerformExecuteQuery = async () => {
|
|
1870
|
+
const __snapshot1 = performance.now();
|
|
1871
|
+
const client = await this.GetClient();
|
|
1872
|
+
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1873
|
+
const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "1");
|
|
1874
|
+
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1875
|
+
const retVal = await client.GetHistoryInstanceFhirResource("Person", personRecord.id, "2");
|
|
1876
|
+
this._CheckOutputLongDurationError(__snapshot3, "await this.GetHistoryInstanceFhirResource()");
|
|
1877
|
+
return retVal.body;
|
|
1936
1878
|
};
|
|
1937
1879
|
};
|
|
1938
1880
|
//#endregion
|