Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion src/main/resources/wfc/schemas/report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ properties:
type: [array, "null"]
items:
$ref: "#/$defs/Coverage"
warnings:
description: "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."
type: [array, "null"]
items:
$ref: "#/$defs/Warning"

required:
- "schemaVersion"
Expand Down Expand Up @@ -189,6 +197,13 @@ $defs:
description: "The line number in the generated test suite file where the code of this test case ends."
type: integer
minimum: 0
namedExamples:
description: "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."
type: [array, "null"]
items:
type: string
uniqueItems: true

Faults:
type: object
Expand Down Expand Up @@ -232,4 +247,20 @@ $defs:
description: "Optional number of all testing targets for this criterion. For some criteria, this number can be unknown."
type: [integer, "null"]
minimum: 0
required: ["name","covered"]
required: ["name","covered"]
Warning:
type: object
properties:
message:
description: "The textual content of the warning message."
type: string
category:
description: "Label to specify the type of warning, e.g., if related to the schema or
fuzzer misconfiguration."
type: string
displayPriority:
description: "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."
type: integer
minimum: 0
23 changes: 23 additions & 0 deletions web-report/src/types/GeneratedTypes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ export interface WebFuzzingCommonsReport {
* Extra, optional coverage information, collected by different tools.
*/
extra?: Coverage[] | null;
/**
* 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.
*/
warnings?: Warning[] | null;
[k: string]: unknown;
}
export interface Faults {
Expand Down Expand Up @@ -151,6 +155,10 @@ export interface TestCase {
* The line number in the generated test suite file where the code of this test case ends.
*/
endLine?: number;
/**
* 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.
*/
namedExamples?: string[] | null;
[k: string]: unknown;
}
export interface Coverage {
Expand All @@ -176,3 +184,18 @@ export interface CoverageCriterion {
total?: number | null;
[k: string]: unknown;
}
export interface Warning {
/**
* The textual content of the warning message.
*/
message?: string;
/**
* Label to specify the type of warning, e.g., if related to the schema or fuzzer misconfiguration.
*/
category?: string;
/**
* 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.
*/
displayPriority?: number;
[k: string]: unknown;
}
10 changes: 10 additions & 0 deletions web-report/src/types/GeneratedTypesZod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ export const testCaseSchema = z.record(z.unknown()).and(
name: z.string().optional(),
startLine: z.number().optional(),
endLine: z.number().optional(),
namedExamples: z.array(z.string()).optional().nullable(),
}),
);

export const warningSchema = z.record(z.unknown()).and(
z.object({
message: z.string().optional(),
category: z.string().optional(),
displayPriority: z.number().optional(),
}),
);

Expand Down Expand Up @@ -92,5 +101,6 @@ export const webFuzzingCommonsReportSchema = z.record(z.unknown()).and(
testCases: z.array(testCaseSchema),
executionTimeInSeconds: z.number(),
extra: z.array(coverageSchema).optional().nullable(),
warnings: z.array(warningSchema).optional().nullable(),
}),
);
Loading