Skip to content

Commit 37a3b4c

Browse files
kamilkisielaardatan
authored andcommitted
logs
1 parent f81877d commit 37a3b4c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

federation/scenarios/constant-vus-over-time/generate-report.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,27 @@ async function generateReport(artifactsRootPath: string) {
217217
(c) => c.name === "valid response structure"
218218
);
219219

220+
function logRawReport() {
221+
console.log("Raw report for:", v.name);
222+
console.log("--");
223+
console.log(JSON.stringify(checks, null, 2));
224+
console.log("--");
225+
}
226+
227+
if (!http200Check) {
228+
logRawReport();
229+
throw new Error("Could not find 'response code was 200' check!");
230+
}
231+
232+
if (!graphqlErrors) {
233+
logRawReport();
234+
throw new Error("Could not find 'no graphql errors' check!");
235+
}
236+
237+
if (!responseStructure) {
238+
logRawReport();
239+
throw new Error("Could not find 'valid response structure' check!");
240+
}
220241

221242
if (http200Check.fails > 0) {
222243
notes.push(`${http200Check.fails} non-200 responses`);

0 commit comments

Comments
 (0)