@nsshunt/ststestrunner 1.1.85 → 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 +2 -2
- 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.cjs
CHANGED
|
@@ -415,6 +415,8 @@ var TestCaseFhirBase = class {
|
|
|
415
415
|
#resetSocketClientTrigger = 50;
|
|
416
416
|
#clientSocketFetchCount = 0;
|
|
417
417
|
#authAgentManager;
|
|
418
|
+
retryCount = 0;
|
|
419
|
+
maxAuthRetryCount = 5;
|
|
418
420
|
runnerDurationList = [];
|
|
419
421
|
_authMaxTimeout = 5e3;
|
|
420
422
|
accessTokenTime = performance.now();
|
|
@@ -924,32 +926,12 @@ var TestCaseFhirBase = class {
|
|
|
924
926
|
await this.#ForcePublishTelemetryData();
|
|
925
927
|
return true;
|
|
926
928
|
};
|
|
927
|
-
};
|
|
928
|
-
//#endregion
|
|
929
|
-
//#region src/libmodule/testCaseFhirQueryBase.ts
|
|
930
|
-
var TestCaseFhirQueryBase = class extends TestCaseFhirBase {
|
|
931
|
-
_longExecTimeoutVal = 5e3;
|
|
932
|
-
_durationList = [];
|
|
933
|
-
constructor(workerInstance, runner) {
|
|
934
|
-
super(workerInstance, runner);
|
|
935
|
-
}
|
|
936
929
|
GetClient = async () => {
|
|
937
930
|
let client;
|
|
938
931
|
if (this.runner.options.fhirOptions.stsfhirsocketclientmode === "no-socket-client") client = await this.GetRESTClient();
|
|
939
932
|
else client = await this.GetFhirSocketClient();
|
|
940
933
|
return client;
|
|
941
934
|
};
|
|
942
|
-
ExecuteQuery = async () => {
|
|
943
|
-
return null;
|
|
944
|
-
};
|
|
945
|
-
#ResetClient = (reason) => {
|
|
946
|
-
this.ResetClient();
|
|
947
|
-
};
|
|
948
|
-
#CheckResetClient = () => {
|
|
949
|
-
if (this.runner.instrumentData.requestCount > 0) {
|
|
950
|
-
if (this.runner.instrumentData.requestCount % this.runner.options.clientResetMod === 0) this.#ResetClient("#ResetClient triggered");
|
|
951
|
-
}
|
|
952
|
-
};
|
|
953
935
|
_GetDetail = () => {
|
|
954
936
|
return `testType: [${this.runner.options.testType}], description: [${this.runner.options.description}], workerManagerId: [${this.runner.workerManagerId}], Iteration: [${this.runner.iteration}]`;
|
|
955
937
|
};
|
|
@@ -962,6 +944,48 @@ var TestCaseFhirQueryBase = class extends TestCaseFhirBase {
|
|
|
962
944
|
}
|
|
963
945
|
return snapShotEnd;
|
|
964
946
|
};
|
|
947
|
+
ExecuteQuery = async () => {
|
|
948
|
+
this.retryCount = 0;
|
|
949
|
+
return this._ExecuteQuery();
|
|
950
|
+
};
|
|
951
|
+
_ExecuteQuery = async () => {
|
|
952
|
+
try {
|
|
953
|
+
return await this.PerformExecuteQuery();
|
|
954
|
+
} catch (error) {
|
|
955
|
+
this.runner.instrumentData.errorCount++;
|
|
956
|
+
if (this.HandleError(error) === true) if (this.retryCount < this.maxAuthRetryCount) {
|
|
957
|
+
this.retryCount++;
|
|
958
|
+
this.runner.instrumentData.authenticationRetryCount++;
|
|
959
|
+
const message = `TestCaseFhir02:ExecuteQuery(): Retry auth attempt: retryCount: [${this.retryCount}], maxAuthRetryCount: [${this.maxAuthRetryCount}]`;
|
|
960
|
+
this.Error(message);
|
|
961
|
+
await (0, _nsshunt_stsutils.Sleep)(this.retryCount * 1e3);
|
|
962
|
+
return this._ExecuteQuery();
|
|
963
|
+
} else {
|
|
964
|
+
const message = `TestCaseFhir02:ExecuteQuery(): Max auth retries exceeded: retryCount: [${this.retryCount}], maxAuthRetryCount: [${this.maxAuthRetryCount}], Error: [${error}]`;
|
|
965
|
+
this.Error(message);
|
|
966
|
+
error.message = message;
|
|
967
|
+
throw error;
|
|
968
|
+
}
|
|
969
|
+
else throw error;
|
|
970
|
+
}
|
|
971
|
+
};
|
|
972
|
+
};
|
|
973
|
+
//#endregion
|
|
974
|
+
//#region src/libmodule/testCaseFhirQueryBase.ts
|
|
975
|
+
var TestCaseFhirQueryBase = class extends TestCaseFhirBase {
|
|
976
|
+
_longExecTimeoutVal = 5e3;
|
|
977
|
+
_durationList = [];
|
|
978
|
+
constructor(workerInstance, runner) {
|
|
979
|
+
super(workerInstance, runner);
|
|
980
|
+
}
|
|
981
|
+
#ResetClient = (reason) => {
|
|
982
|
+
this.ResetClient();
|
|
983
|
+
};
|
|
984
|
+
#CheckResetClient = () => {
|
|
985
|
+
if (this.runner.instrumentData.requestCount > 0) {
|
|
986
|
+
if (this.runner.instrumentData.requestCount % this.runner.options.clientResetMod === 0) this.#ResetClient("#ResetClient triggered");
|
|
987
|
+
}
|
|
988
|
+
};
|
|
965
989
|
ExecuteRunner = async () => {
|
|
966
990
|
if (this.runner.iteration % 100 === 0) this.Debug(`TestCaseFhirQueryBase:ExecuteRunner(): ${this._GetDetail()}`);
|
|
967
991
|
const start = performance.now();
|
|
@@ -1024,197 +1048,139 @@ var TestCaseFhirQueryBase = class extends TestCaseFhirBase {
|
|
|
1024
1048
|
//#endregion
|
|
1025
1049
|
//#region src/libmodule/testCaseFhir01.ts
|
|
1026
1050
|
var TestCaseFhir01 = class extends TestCaseFhirQueryBase {
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
return null;
|
|
1034
|
-
} catch (error) {
|
|
1035
|
-
this.runner.instrumentData.errorCount++;
|
|
1036
|
-
this.Error(`TestCaseFhir01:ExecuteQuery(): Error: [${error}]`);
|
|
1037
|
-
throw error;
|
|
1038
|
-
}
|
|
1051
|
+
PerformExecuteQuery = async () => {
|
|
1052
|
+
const __snapshot1 = performance.now();
|
|
1053
|
+
await this.GetAccessToken();
|
|
1054
|
+
this._CheckOutputLongDurationError(__snapshot1, "await this.GetAccessToken()");
|
|
1055
|
+
this.accesssToken = null;
|
|
1056
|
+
return null;
|
|
1039
1057
|
};
|
|
1040
1058
|
};
|
|
1041
1059
|
//#endregion
|
|
1042
1060
|
//#region src/libmodule/testCaseFhir02.ts
|
|
1043
1061
|
var TestCaseFhir02 = class extends TestCaseFhirQueryBase {
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
this.
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
_ExecuteQuery = async () => {
|
|
1055
|
-
try {
|
|
1056
|
-
const __snapshot1 = performance.now();
|
|
1057
|
-
const client = await this.GetClient();
|
|
1058
|
-
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1059
|
-
const prefix = this.runner.options.personPrefix;
|
|
1060
|
-
const personRecord = await this.GetPersonRecord(prefix, this.runner.iteration, "1");
|
|
1061
|
-
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1062
|
-
const retVal = await client.PostResource("Person", personRecord);
|
|
1063
|
-
this._CheckOutputLongDurationError(__snapshot3, "await this.PostResource()");
|
|
1064
|
-
return retVal.body;
|
|
1065
|
-
} catch (error) {
|
|
1066
|
-
this.runner.instrumentData.errorCount++;
|
|
1067
|
-
if (this.HandleError(error) === true) if (this.retryCount < this.maxAuthRetryCount) {
|
|
1068
|
-
this.retryCount++;
|
|
1069
|
-
this.runner.instrumentData.authenticationRetryCount++;
|
|
1070
|
-
const message = `TestCaseFhir02:ExecuteQuery(): Retry auth attempt: retryCount: [${this.retryCount}], maxAuthRetryCount: [${this.maxAuthRetryCount}]`;
|
|
1071
|
-
this.Error(message);
|
|
1072
|
-
await (0, _nsshunt_stsutils.Sleep)(this.retryCount * 1e3);
|
|
1073
|
-
return this._ExecuteQuery();
|
|
1074
|
-
} else {
|
|
1075
|
-
const message = `TestCaseFhir02:ExecuteQuery(): Max auth retries exceeded: retryCount: [${this.retryCount}], maxAuthRetryCount: [${this.maxAuthRetryCount}], Error: [${error}]`;
|
|
1076
|
-
this.Error(message);
|
|
1077
|
-
error.message = message;
|
|
1078
|
-
throw error;
|
|
1079
|
-
}
|
|
1080
|
-
else throw error;
|
|
1081
|
-
}
|
|
1062
|
+
PerformExecuteQuery = async () => {
|
|
1063
|
+
const __snapshot1 = performance.now();
|
|
1064
|
+
const client = await this.GetClient();
|
|
1065
|
+
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1066
|
+
const prefix = this.runner.options.personPrefix;
|
|
1067
|
+
const personRecord = await this.GetPersonRecord(prefix, this.runner.iteration, "1");
|
|
1068
|
+
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1069
|
+
const retVal = await client.PostResource("Person", personRecord);
|
|
1070
|
+
this._CheckOutputLongDurationError(__snapshot3, "await this.PostResource()");
|
|
1071
|
+
return retVal.body;
|
|
1082
1072
|
};
|
|
1083
1073
|
};
|
|
1084
1074
|
//#endregion
|
|
1085
1075
|
//#region src/libmodule/testCaseFhir03.ts
|
|
1086
1076
|
var TestCaseFhir03 = class extends TestCaseFhirQueryBase {
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
return retVal.body;
|
|
1102
|
-
} catch (error) {
|
|
1103
|
-
this.runner.instrumentData.errorCount++;
|
|
1104
|
-
this.Error(`TestCaseFhir03:ExecuteQuery(): Error: [${error}]`);
|
|
1105
|
-
throw error;
|
|
1106
|
-
}
|
|
1077
|
+
PerformExecuteQuery = async () => {
|
|
1078
|
+
const __snapshot1 = performance.now();
|
|
1079
|
+
const client = await this.GetClient();
|
|
1080
|
+
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1081
|
+
const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "1");
|
|
1082
|
+
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1083
|
+
const retVal = await client.GetResource("Person", personRecord.id);
|
|
1084
|
+
this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
1085
|
+
delete personRecord.meta;
|
|
1086
|
+
delete retVal.body.meta;
|
|
1087
|
+
const p1 = JSON.stringify(personRecord);
|
|
1088
|
+
const p2 = JSON.stringify(retVal.body);
|
|
1089
|
+
if (p1.localeCompare(p2) !== 0) this.runner.instrumentData.errorCount++;
|
|
1090
|
+
return retVal.body;
|
|
1107
1091
|
};
|
|
1108
1092
|
};
|
|
1109
1093
|
//#endregion
|
|
1110
1094
|
//#region src/libmodule/testCaseFhir04.ts
|
|
1111
1095
|
var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1129
|
-
this.runner.instrumentData.errorCount++;
|
|
1130
|
-
return retVal.body;
|
|
1131
|
-
}
|
|
1132
|
-
const originalPersonRecord = retVal.body;
|
|
1133
|
-
if (originalPersonRecord && originalPersonRecord.text) {
|
|
1134
|
-
originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration}`;
|
|
1135
|
-
const retVal = await client.PutResource("Person", originalPersonRecord, `W/"1"`);
|
|
1136
|
-
this._CheckOutputLongDurationError(__snapshot4, "await this.PutResource()");
|
|
1137
|
-
const updatedRecord = { ...retVal.body };
|
|
1138
|
-
delete updatedRecord.meta;
|
|
1139
|
-
delete originalPersonRecord.meta;
|
|
1140
|
-
const p1 = JSON.stringify(updatedRecord);
|
|
1141
|
-
const p2 = JSON.stringify(originalPersonRecord);
|
|
1142
|
-
if (p1.localeCompare(p2) !== 0) this.runner.instrumentData.errorCount++;
|
|
1143
|
-
return retVal.body;
|
|
1144
|
-
} else {
|
|
1145
|
-
this.runner.instrumentData.errorCount++;
|
|
1146
|
-
return null;
|
|
1147
|
-
}
|
|
1148
|
-
} catch (error) {
|
|
1096
|
+
PerformExecuteQuery = async () => {
|
|
1097
|
+
const __snapshot1 = performance.now();
|
|
1098
|
+
const client = await this.GetClient();
|
|
1099
|
+
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1100
|
+
const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "1");
|
|
1101
|
+
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1102
|
+
const retVal = await client.GetResource("Person", personRecord.id);
|
|
1103
|
+
const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
1104
|
+
this.runner.instrumentData.requestCount++;
|
|
1105
|
+
const compPersonRecord = { ...personRecord };
|
|
1106
|
+
const loadedPersonRecorded = { ...retVal.body };
|
|
1107
|
+
delete compPersonRecord.meta;
|
|
1108
|
+
delete loadedPersonRecorded.meta;
|
|
1109
|
+
const p1 = JSON.stringify(compPersonRecord);
|
|
1110
|
+
const p2 = JSON.stringify(loadedPersonRecorded);
|
|
1111
|
+
if (p1.localeCompare(p2) !== 0) {
|
|
1149
1112
|
this.runner.instrumentData.errorCount++;
|
|
1150
|
-
|
|
1151
|
-
|
|
1113
|
+
return retVal.body;
|
|
1114
|
+
}
|
|
1115
|
+
const originalPersonRecord = retVal.body;
|
|
1116
|
+
if (originalPersonRecord && originalPersonRecord.text) {
|
|
1117
|
+
originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration}`;
|
|
1118
|
+
const retVal = await client.PutResource("Person", originalPersonRecord, `W/"1"`);
|
|
1119
|
+
this._CheckOutputLongDurationError(__snapshot4, "await this.PutResource()");
|
|
1120
|
+
const updatedRecord = { ...retVal.body };
|
|
1121
|
+
delete updatedRecord.meta;
|
|
1122
|
+
delete originalPersonRecord.meta;
|
|
1123
|
+
const p1 = JSON.stringify(updatedRecord);
|
|
1124
|
+
const p2 = JSON.stringify(originalPersonRecord);
|
|
1125
|
+
if (p1.localeCompare(p2) !== 0) this.runner.instrumentData.errorCount++;
|
|
1126
|
+
return retVal.body;
|
|
1127
|
+
} else {
|
|
1128
|
+
this.runner.instrumentData.errorCount++;
|
|
1129
|
+
return null;
|
|
1152
1130
|
}
|
|
1153
1131
|
};
|
|
1154
1132
|
};
|
|
1155
1133
|
//#endregion
|
|
1156
1134
|
//#region src/libmodule/testCaseFhir05.ts
|
|
1157
1135
|
var TestCaseFhir05 = class extends TestCaseFhirQueryBase {
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
} else {
|
|
1177
|
-
this.runner.instrumentData.errorCount++;
|
|
1178
|
-
return null;
|
|
1179
|
-
}
|
|
1180
|
-
} catch (error) {
|
|
1136
|
+
PerformExecuteQuery = async () => {
|
|
1137
|
+
const __snapshot1 = performance.now();
|
|
1138
|
+
const client = await this.GetClient();
|
|
1139
|
+
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1140
|
+
const originalPersonRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "2");
|
|
1141
|
+
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1142
|
+
if (originalPersonRecord && originalPersonRecord.text) {
|
|
1143
|
+
originalPersonRecord.text.div = `Put record TestCaseFhir05 ${this.runner.iteration}`;
|
|
1144
|
+
const retVal = await client.PutResource("Person", originalPersonRecord, `W/"2"`);
|
|
1145
|
+
this._CheckOutputLongDurationError(__snapshot3, "await this.PutResource()");
|
|
1146
|
+
const updatedRecord = { ...retVal.body };
|
|
1147
|
+
delete updatedRecord.meta;
|
|
1148
|
+
delete originalPersonRecord.meta;
|
|
1149
|
+
const p1 = JSON.stringify(updatedRecord);
|
|
1150
|
+
const p2 = JSON.stringify(originalPersonRecord);
|
|
1151
|
+
if (p1.localeCompare(p2) !== 0) this.runner.instrumentData.errorCount++;
|
|
1152
|
+
return retVal.body;
|
|
1153
|
+
} else {
|
|
1181
1154
|
this.runner.instrumentData.errorCount++;
|
|
1182
|
-
|
|
1183
|
-
throw error;
|
|
1155
|
+
return null;
|
|
1184
1156
|
}
|
|
1185
1157
|
};
|
|
1186
1158
|
};
|
|
1187
1159
|
//#endregion
|
|
1188
1160
|
//#region src/libmodule/testCaseFhir06.ts
|
|
1189
1161
|
var TestCaseFhir06 = class extends TestCaseFhirQueryBase {
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
this._CheckOutputLongDurationError(__snapshot3, "await this.GetResources()");
|
|
1211
|
-
}
|
|
1212
|
-
return retVal.body;
|
|
1213
|
-
} catch (error) {
|
|
1214
|
-
this.runner.instrumentData.errorCount++;
|
|
1215
|
-
this.Error(`TestCaseFhir06:ExecuteQuery(): Error: [${error}]`);
|
|
1216
|
-
throw error;
|
|
1162
|
+
PerformExecuteQuery = async () => {
|
|
1163
|
+
const __snapshot1 = performance.now();
|
|
1164
|
+
const client = await this.GetClient();
|
|
1165
|
+
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1166
|
+
const baseUrl = this.runner.options.fhirOptions.stsfhirbaseurl;
|
|
1167
|
+
const prefix = this.runner.options.personPrefix;
|
|
1168
|
+
const personRecord = await this.GetPersonRecord(prefix, this.runner.iteration, "3");
|
|
1169
|
+
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1170
|
+
const url = new URL(`${baseUrl}/Person?family=${personRecord.name[0].family}`);
|
|
1171
|
+
let retVal;
|
|
1172
|
+
if (this.runner.options.useDirectQuery === true) {
|
|
1173
|
+
const data = {
|
|
1174
|
+
queryTestingMode: this.runner.options.queryTestingMode,
|
|
1175
|
+
family: personRecord.name[0].family
|
|
1176
|
+
};
|
|
1177
|
+
retVal = await client.GenericSearchTesting("Person", data);
|
|
1178
|
+
this._CheckOutputLongDurationError(__snapshot3, "await this.GenericSearchTesting()");
|
|
1179
|
+
} else {
|
|
1180
|
+
retVal = await client.GetResources(url);
|
|
1181
|
+
this._CheckOutputLongDurationError(__snapshot3, "await this.GetResources()");
|
|
1217
1182
|
}
|
|
1183
|
+
return retVal.body;
|
|
1218
1184
|
};
|
|
1219
1185
|
};
|
|
1220
1186
|
//#endregion
|
|
@@ -1867,96 +1833,72 @@ var fast_json_patch_default = Object.assign({}, core_exports, duplex_exports, {
|
|
|
1867
1833
|
//#endregion
|
|
1868
1834
|
//#region src/libmodule/testCaseFhir07.ts
|
|
1869
1835
|
var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
|
|
1870
|
-
|
|
1871
|
-
|
|
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(`TestCaseFhir07:ExecuteQuery(): Error: [${error}]`);
|
|
1889
|
-
throw error;
|
|
1890
|
-
}
|
|
1836
|
+
PerformExecuteQuery = async () => {
|
|
1837
|
+
const __snapshot1 = performance.now();
|
|
1838
|
+
const client = await this.GetClient();
|
|
1839
|
+
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1840
|
+
const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "3");
|
|
1841
|
+
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1842
|
+
const retVal = await client.GetResource("Person", personRecord.id);
|
|
1843
|
+
const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
1844
|
+
const resource = retVal.body;
|
|
1845
|
+
const observer = fast_json_patch_default.observe(resource);
|
|
1846
|
+
resource.text.div = `Json Patched record TestCaseFhir07 ${this.runner.iteration}`;
|
|
1847
|
+
const patchRecord = fast_json_patch_default.generate(observer);
|
|
1848
|
+
const retValPatched = await client.PatchResource("Person", personRecord.id, patchRecord, `application/json-patch+json`, `W/"3"`);
|
|
1849
|
+
this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
|
|
1850
|
+
return retValPatched.body;
|
|
1891
1851
|
};
|
|
1892
1852
|
};
|
|
1893
1853
|
//#endregion
|
|
1894
1854
|
//#region src/libmodule/testCaseFhir08.ts
|
|
1895
1855
|
var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
return retValPatched.body;
|
|
1910
|
-
} catch (error) {
|
|
1911
|
-
this.runner.instrumentData.errorCount++;
|
|
1912
|
-
this.Error(`TestCaseFhir08:ExecuteQuery(): Error: [${error}]`);
|
|
1913
|
-
throw error;
|
|
1914
|
-
}
|
|
1856
|
+
PerformExecuteQuery = async () => {
|
|
1857
|
+
const __snapshot1 = performance.now();
|
|
1858
|
+
const client = await this.GetClient();
|
|
1859
|
+
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1860
|
+
const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "4");
|
|
1861
|
+
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1862
|
+
const retVal = await client.GetResource("Person", personRecord.id);
|
|
1863
|
+
const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
1864
|
+
const resource = retVal.body;
|
|
1865
|
+
resource.text.div = `Merge Patched record TestCaseFhir08 ${this.runner.iteration}`;
|
|
1866
|
+
const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"4"`);
|
|
1867
|
+
this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
|
|
1868
|
+
return retValPatched.body;
|
|
1915
1869
|
};
|
|
1916
1870
|
};
|
|
1917
1871
|
//#endregion
|
|
1918
1872
|
//#region src/libmodule/testCaseFhir09.ts
|
|
1919
1873
|
var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
} else {
|
|
1932
|
-
this.runner.instrumentData.errorCount++;
|
|
1933
|
-
return null;
|
|
1934
|
-
}
|
|
1935
|
-
} catch (error) {
|
|
1874
|
+
PerformExecuteQuery = async () => {
|
|
1875
|
+
const __snapshot1 = performance.now();
|
|
1876
|
+
const client = await this.GetClient();
|
|
1877
|
+
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1878
|
+
const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "5");
|
|
1879
|
+
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1880
|
+
if (personRecord.text) {
|
|
1881
|
+
const retVal = await client.DeleteResource("Person", personRecord.id, `W/"5"`);
|
|
1882
|
+
this._CheckOutputLongDurationError(__snapshot3, "await this.DeleteResource()");
|
|
1883
|
+
return retVal.body;
|
|
1884
|
+
} else {
|
|
1936
1885
|
this.runner.instrumentData.errorCount++;
|
|
1937
|
-
|
|
1938
|
-
throw error;
|
|
1886
|
+
return null;
|
|
1939
1887
|
}
|
|
1940
1888
|
};
|
|
1941
1889
|
};
|
|
1942
1890
|
//#endregion
|
|
1943
1891
|
//#region src/libmodule/testCaseFhir10.ts
|
|
1944
1892
|
var TestCaseFhir10 = class extends TestCaseFhirQueryBase {
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
return retVal.body;
|
|
1955
|
-
} catch (error) {
|
|
1956
|
-
this.runner.instrumentData.errorCount++;
|
|
1957
|
-
this.Error(`TestCaseFhir10:ExecuteQuery(): Error: [${error}]`);
|
|
1958
|
-
throw error;
|
|
1959
|
-
}
|
|
1893
|
+
PerformExecuteQuery = async () => {
|
|
1894
|
+
const __snapshot1 = performance.now();
|
|
1895
|
+
const client = await this.GetClient();
|
|
1896
|
+
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1897
|
+
const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "1");
|
|
1898
|
+
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1899
|
+
const retVal = await client.GetHistoryInstanceFhirResource("Person", personRecord.id, "2");
|
|
1900
|
+
this._CheckOutputLongDurationError(__snapshot3, "await this.GetHistoryInstanceFhirResource()");
|
|
1901
|
+
return retVal.body;
|
|
1960
1902
|
};
|
|
1961
1903
|
};
|
|
1962
1904
|
//#endregion
|