Skip to content

Commit fc18415

Browse files
committed
updated generated files
1 parent b708b93 commit fc18415

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

web-report/src/types/GeneratedTypes.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ export interface WebFuzzingCommonsReport {
6464
* Extra, optional coverage information, collected by different tools.
6565
*/
6666
extra?: Coverage[] | null;
67+
/**
68+
* Optional list of general 'warnings' regarding the fuzzing process. These are general, and not specific to any generated test case. For example, problems in the schema would be reported here, as well as possible misconfigurations of the fuzzer.
69+
*/
70+
warnings?: Warning[] | null;
6771
[k: string]: unknown;
6872
}
6973
export interface Faults {
@@ -151,6 +155,10 @@ export interface TestCase {
151155
* The line number in the generated test suite file where the code of this test case ends.
152156
*/
153157
endLine?: number;
158+
/**
159+
* Optional list of 'named examples' used in the test cases. These typically represent user test data that need to be tracked in the generated test suite.
160+
*/
161+
namedExamples?: string[] | null;
154162
[k: string]: unknown;
155163
}
156164
export interface Coverage {
@@ -176,3 +184,18 @@ export interface CoverageCriterion {
176184
total?: number | null;
177185
[k: string]: unknown;
178186
}
187+
export interface Warning {
188+
/**
189+
* The textual content of the warning message.
190+
*/
191+
message?: string;
192+
/**
193+
* Label to specify the type of warning, e.g., if related to the schema or fuzzer misconfiguration.
194+
*/
195+
category?: string;
196+
/**
197+
* Hint on the priority of this warning message, where lowest (eg, 1) values mean more important. This is ONLY meant to be used for display purposes, e.g., when sorting the list of warnings to show to user.
198+
*/
199+
displayPriority?: number;
200+
[k: string]: unknown;
201+
}

web-report/src/types/GeneratedTypesZod.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ export const testCaseSchema = z.record(z.unknown()).and(
1616
name: z.string().optional(),
1717
startLine: z.number().optional(),
1818
endLine: z.number().optional(),
19+
namedExamples: z.array(z.string()).optional().nullable(),
20+
}),
21+
);
22+
23+
export const warningSchema = z.record(z.unknown()).and(
24+
z.object({
25+
message: z.string().optional(),
26+
category: z.string().optional(),
27+
displayPriority: z.number().optional(),
1928
}),
2029
);
2130

@@ -92,5 +101,6 @@ export const webFuzzingCommonsReportSchema = z.record(z.unknown()).and(
92101
testCases: z.array(testCaseSchema),
93102
executionTimeInSeconds: z.number(),
94103
extra: z.array(coverageSchema).optional().nullable(),
104+
warnings: z.array(warningSchema).optional().nullable(),
95105
}),
96106
);

0 commit comments

Comments
 (0)