allure 3.0.0-beta.16 → 3.0.0-beta.17
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/commands/allure2.d.ts +15 -13
- package/dist/commands/allure2.js +67 -79
- package/dist/commands/awesome.d.ts +18 -15
- package/dist/commands/awesome.js +79 -99
- package/dist/commands/classic.d.ts +15 -13
- package/dist/commands/classic.js +67 -79
- package/dist/commands/csv.d.ts +13 -11
- package/dist/commands/csv.js +59 -65
- package/dist/commands/dashboard.d.ts +15 -13
- package/dist/commands/dashboard.js +67 -78
- package/dist/commands/generate.d.ts +11 -9
- package/dist/commands/generate.js +44 -36
- package/dist/commands/history.d.ts +9 -7
- package/dist/commands/history.js +31 -28
- package/dist/commands/knownIssue.d.ts +8 -6
- package/dist/commands/knownIssue.js +30 -23
- package/dist/commands/log.d.ts +12 -9
- package/dist/commands/log.js +54 -58
- package/dist/commands/login.d.ts +8 -7
- package/dist/commands/login.js +39 -36
- package/dist/commands/logout.d.ts +8 -7
- package/dist/commands/logout.js +39 -36
- package/dist/commands/open.d.ts +11 -9
- package/dist/commands/open.js +34 -40
- package/dist/commands/projects/create.d.ts +9 -7
- package/dist/commands/projects/create.js +70 -66
- package/dist/commands/projects/delete.d.ts +10 -7
- package/dist/commands/projects/delete.js +55 -61
- package/dist/commands/projects/list.d.ts +8 -7
- package/dist/commands/projects/list.js +62 -62
- package/dist/commands/qualityGate.d.ts +9 -7
- package/dist/commands/qualityGate.js +46 -42
- package/dist/commands/run.d.ts +13 -10
- package/dist/commands/run.js +102 -111
- package/dist/commands/slack.d.ts +9 -7
- package/dist/commands/slack.js +51 -48
- package/dist/commands/testplan.d.ts +8 -6
- package/dist/commands/testplan.js +36 -29
- package/dist/commands/watch.d.ts +12 -10
- package/dist/commands/watch.js +103 -99
- package/dist/commands/whoami.d.ts +8 -7
- package/dist/commands/whoami.js +44 -38
- package/dist/index.js +31 -35
- package/package.json +19 -19
- package/dist/utils/commands.d.ts +0 -16
- package/dist/utils/commands.js +0 -16
package/dist/commands/csv.js
CHANGED
|
@@ -1,75 +1,69 @@
|
|
|
1
|
-
import { AllureReport,
|
|
1
|
+
import { AllureReport, readConfig } from "@allurereport/core";
|
|
2
2
|
import CsvPlugin from "@allurereport/plugin-csv";
|
|
3
|
+
import { Command, Option } from "clipanion";
|
|
3
4
|
import * as console from "node:console";
|
|
4
5
|
import { realpath } from "node:fs/promises";
|
|
5
6
|
import process from "node:process";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
output,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
[
|
|
42
|
-
"--cwd <cwd>",
|
|
43
|
-
{
|
|
44
|
-
description: "The working directory for the command to run (Default: current working directory)",
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
[
|
|
48
|
-
"--output, -o <file>",
|
|
49
|
-
{
|
|
50
|
-
description: "The output file name. Absolute paths are accepted as well",
|
|
51
|
-
default: "allure.csv",
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
[
|
|
55
|
-
"--disable-headers",
|
|
7
|
+
export class CsvCommand extends Command {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.resultsDir = Option.String({ required: true, name: "The directory with Allure results" });
|
|
11
|
+
this.config = Option.String("--config,-c", {
|
|
12
|
+
description: "The path Allure config file",
|
|
13
|
+
});
|
|
14
|
+
this.cwd = Option.String("--cwd", {
|
|
15
|
+
description: "The working directory for the command to run (default: current working directory)",
|
|
16
|
+
});
|
|
17
|
+
this.output = Option.String("--output,-o", {
|
|
18
|
+
description: "The output file name. Absolute paths are accepted as well",
|
|
19
|
+
});
|
|
20
|
+
this.disableHeaders = Option.Boolean("--disable-headers", {
|
|
21
|
+
description: "Specify, to disable CSV headers",
|
|
22
|
+
});
|
|
23
|
+
this.separator = Option.String("--separator", {
|
|
24
|
+
description: "The csv separator",
|
|
25
|
+
});
|
|
26
|
+
this.knownIssues = Option.String("--known-issues", {
|
|
27
|
+
description: "Path to the known issues file. Updates the file and quarantines failed tests when specified",
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
async execute() {
|
|
31
|
+
const cwd = await realpath(this.cwd ?? process.cwd());
|
|
32
|
+
const before = new Date().getTime();
|
|
33
|
+
const defaultCsvOptions = {
|
|
34
|
+
separator: this.separator ?? ",",
|
|
35
|
+
disableHeaders: this.disableHeaders ?? false,
|
|
36
|
+
};
|
|
37
|
+
const config = await readConfig(cwd, this.config, {
|
|
38
|
+
output: this.output ?? "allure.csv",
|
|
39
|
+
knownIssuesPath: this.knownIssues,
|
|
40
|
+
});
|
|
41
|
+
config.plugins = [
|
|
56
42
|
{
|
|
57
|
-
|
|
43
|
+
id: "csv",
|
|
44
|
+
enabled: true,
|
|
45
|
+
options: defaultCsvOptions,
|
|
46
|
+
plugin: new CsvPlugin(defaultCsvOptions),
|
|
58
47
|
},
|
|
59
|
-
]
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
48
|
+
];
|
|
49
|
+
const allureReport = new AllureReport(config);
|
|
50
|
+
await allureReport.start();
|
|
51
|
+
await allureReport.readDirectory(this.resultsDir);
|
|
52
|
+
await allureReport.done();
|
|
53
|
+
const after = new Date().getTime();
|
|
54
|
+
console.log(`the report successfully generated (${after - before}ms)`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
CsvCommand.paths = [["csv"]];
|
|
58
|
+
CsvCommand.usage = Command.Usage({
|
|
59
|
+
category: "Reports",
|
|
60
|
+
description: "Generates CSV report based on provided Allure Results",
|
|
61
|
+
details: "This command generates a CSV report from the provided Allure Results directory.",
|
|
62
|
+
examples: [
|
|
63
|
+
["csv ./allure-results", "Generate a report from the ./allure-results directory"],
|
|
67
64
|
[
|
|
68
|
-
"--
|
|
69
|
-
|
|
70
|
-
description: "Path to the known issues file. Updates the file and quarantines failed tests when specified",
|
|
71
|
-
},
|
|
65
|
+
"csv ./allure-results --output custom-report.csv",
|
|
66
|
+
"Generate a report from the ./allure-results directory to the custom-report.csv file",
|
|
72
67
|
],
|
|
73
68
|
],
|
|
74
|
-
action: CsvCommandAction,
|
|
75
69
|
});
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { Command } from "clipanion";
|
|
2
|
+
export declare class DashboardCommand extends Command {
|
|
3
|
+
static paths: string[][];
|
|
4
|
+
static usage: import("clipanion").Usage;
|
|
5
|
+
resultsDir: string;
|
|
6
|
+
config: string | undefined;
|
|
7
|
+
cwd: string | undefined;
|
|
8
|
+
output: string | undefined;
|
|
9
|
+
reportName: string | undefined;
|
|
10
|
+
singleFile: boolean | undefined;
|
|
11
|
+
logo: string | undefined;
|
|
12
|
+
theme: string | undefined;
|
|
13
|
+
reportLanguage: string | undefined;
|
|
14
|
+
execute(): Promise<void>;
|
|
15
|
+
}
|
|
@@ -1,88 +1,77 @@
|
|
|
1
|
-
import { AllureReport,
|
|
1
|
+
import { AllureReport, readConfig } from "@allurereport/core";
|
|
2
2
|
import DashboardPlugin from "@allurereport/plugin-dashboard";
|
|
3
|
+
import { Command, Option } from "clipanion";
|
|
3
4
|
import * as console from "node:console";
|
|
4
5
|
import { realpath } from "node:fs/promises";
|
|
5
6
|
import process from "node:process";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
output,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
{
|
|
50
|
-
description: "The output directory name. Absolute paths are accepted as well",
|
|
51
|
-
default: "allure-report",
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
[
|
|
55
|
-
"--report-name, --name <string>",
|
|
56
|
-
{
|
|
57
|
-
description: "The report name",
|
|
58
|
-
default: "Allure Report",
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
[
|
|
62
|
-
"--single-file",
|
|
63
|
-
{
|
|
64
|
-
description: "Generate single file report",
|
|
65
|
-
default: false,
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
[
|
|
69
|
-
"--logo <string>",
|
|
7
|
+
export class DashboardCommand extends Command {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.resultsDir = Option.String({ required: true, name: "The directory with Allure results" });
|
|
11
|
+
this.config = Option.String("--config,-c", {
|
|
12
|
+
description: "The path Allure config file",
|
|
13
|
+
});
|
|
14
|
+
this.cwd = Option.String("--cwd", {
|
|
15
|
+
description: "The working directory for the command to run (default: current working directory)",
|
|
16
|
+
});
|
|
17
|
+
this.output = Option.String("--output,-o", {
|
|
18
|
+
description: "The output directory name. Absolute paths are accepted as well",
|
|
19
|
+
});
|
|
20
|
+
this.reportName = Option.String("--report-name,--name", {
|
|
21
|
+
description: "The report name",
|
|
22
|
+
});
|
|
23
|
+
this.singleFile = Option.Boolean("--single-file", {
|
|
24
|
+
description: "Generate single file report",
|
|
25
|
+
});
|
|
26
|
+
this.logo = Option.String("--logo", {
|
|
27
|
+
description: "Path to the report logo which will be displayed in the header",
|
|
28
|
+
});
|
|
29
|
+
this.theme = Option.String("--theme", {
|
|
30
|
+
description: "Default theme of the report (default: OS theme)",
|
|
31
|
+
});
|
|
32
|
+
this.reportLanguage = Option.String("--report-language,--lang", {
|
|
33
|
+
description: "Default language of the report (default: OS language)",
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
async execute() {
|
|
37
|
+
const cwd = await realpath(this.cwd ?? process.cwd());
|
|
38
|
+
const before = new Date().getTime();
|
|
39
|
+
const defaultDashboardOptions = {
|
|
40
|
+
singleFile: this.singleFile ?? false,
|
|
41
|
+
logo: this.logo,
|
|
42
|
+
theme: this.theme,
|
|
43
|
+
reportLanguage: this.reportLanguage ?? "en",
|
|
44
|
+
};
|
|
45
|
+
const config = await readConfig(cwd, this.config, {
|
|
46
|
+
output: this.output ?? "allure-report",
|
|
47
|
+
name: this.reportName ?? "Allure Report",
|
|
48
|
+
});
|
|
49
|
+
config.plugins = [
|
|
70
50
|
{
|
|
71
|
-
|
|
51
|
+
id: "dashboard",
|
|
52
|
+
enabled: true,
|
|
53
|
+
options: defaultDashboardOptions,
|
|
54
|
+
plugin: new DashboardPlugin(defaultDashboardOptions),
|
|
72
55
|
},
|
|
73
|
-
]
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
56
|
+
];
|
|
57
|
+
const allureReport = new AllureReport(config);
|
|
58
|
+
await allureReport.start();
|
|
59
|
+
await allureReport.readDirectory(this.resultsDir);
|
|
60
|
+
await allureReport.done();
|
|
61
|
+
const after = new Date().getTime();
|
|
62
|
+
console.log(`the report successfully generated (${after - before}ms)`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
DashboardCommand.paths = [["dashboard"]];
|
|
66
|
+
DashboardCommand.usage = Command.Usage({
|
|
67
|
+
category: "Reports",
|
|
68
|
+
description: "Generates Allure Dashboard report based on provided Allure Results",
|
|
69
|
+
details: "This command generates an Allure Dashboard report from the provided Allure Results directory.",
|
|
70
|
+
examples: [
|
|
71
|
+
["dashboard ./allure-results", "Generate a report from the ./allure-results directory"],
|
|
80
72
|
[
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
description: "Default language of the report (default: OS language)",
|
|
84
|
-
},
|
|
73
|
+
"dashboard ./allure-results --output custom-report",
|
|
74
|
+
"Generate a report from the ./allure-results directory to the custom-report directory",
|
|
85
75
|
],
|
|
86
76
|
],
|
|
87
|
-
action: DashboardCommandAction,
|
|
88
77
|
});
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { Command } from "clipanion";
|
|
2
|
+
export declare class GenerateCommand extends Command {
|
|
3
|
+
static paths: string[][];
|
|
4
|
+
static usage: import("clipanion").Usage;
|
|
5
|
+
resultsDir: string;
|
|
6
|
+
config: string | undefined;
|
|
7
|
+
output: string | undefined;
|
|
8
|
+
cwd: string | undefined;
|
|
9
|
+
reportName: string | undefined;
|
|
10
|
+
execute(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -1,49 +1,57 @@
|
|
|
1
1
|
import { AllureReport, readConfig } from "@allurereport/core";
|
|
2
2
|
import { KnownError } from "@allurereport/service";
|
|
3
|
+
import { Command, Option } from "clipanion";
|
|
4
|
+
import process from "node:process";
|
|
3
5
|
import { red } from "yoctocolors";
|
|
4
|
-
import { createCommand } from "../utils/commands.js";
|
|
5
6
|
import { logError } from "../utils/logs.js";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
export class GenerateCommand extends Command {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.resultsDir = Option.String({ required: true, name: "The directory with Allure results" });
|
|
11
|
+
this.config = Option.String("--config,-c", {
|
|
12
|
+
description: "The path Allure config file",
|
|
13
|
+
});
|
|
14
|
+
this.output = Option.String("--output,-o", {
|
|
15
|
+
description: "The output directory name. Absolute paths are accepted as well (default: allure-report)",
|
|
16
|
+
});
|
|
17
|
+
this.cwd = Option.String("--cwd", {
|
|
18
|
+
description: "The working directory for the command to run (default: current working directory)",
|
|
19
|
+
});
|
|
20
|
+
this.reportName = Option.String("--report-name,--name", {
|
|
21
|
+
description: "The report name",
|
|
22
|
+
});
|
|
14
23
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
24
|
+
async execute() {
|
|
25
|
+
const config = await readConfig(this.cwd, this.config, {
|
|
26
|
+
name: this.reportName,
|
|
27
|
+
output: this.output ?? "allure-report",
|
|
28
|
+
});
|
|
29
|
+
try {
|
|
30
|
+
const allureReport = new AllureReport(config);
|
|
31
|
+
await allureReport.start();
|
|
32
|
+
await allureReport.readDirectory(this.resultsDir);
|
|
33
|
+
await allureReport.done();
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
if (error instanceof KnownError) {
|
|
37
|
+
console.error(red(error.message));
|
|
38
|
+
process.exit(1);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
await logError("Failed to generate report due to unexpected error", error);
|
|
18
42
|
process.exit(1);
|
|
19
|
-
return;
|
|
20
43
|
}
|
|
21
|
-
await logError("Failed to generate report due to unexpected error", error);
|
|
22
|
-
process.exit(1);
|
|
23
44
|
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
45
|
+
}
|
|
46
|
+
GenerateCommand.paths = [["generate"]];
|
|
47
|
+
GenerateCommand.usage = Command.Usage({
|
|
27
48
|
description: "Generates the report to specified directory",
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
{
|
|
32
|
-
description: "The path Allure config file",
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
[
|
|
36
|
-
"--output, -o <file>",
|
|
37
|
-
{
|
|
38
|
-
description: "The output directory name. Absolute paths are accepted as well (default: allure-report)",
|
|
39
|
-
},
|
|
40
|
-
],
|
|
49
|
+
details: "This command generates a report from the provided Allure Results directory.",
|
|
50
|
+
examples: [
|
|
51
|
+
["generate ./allure-results", "Generate a report from the ./allure-results directory"],
|
|
41
52
|
[
|
|
42
|
-
"--
|
|
43
|
-
|
|
44
|
-
description: "The working directory for the command to run (default: current working directory)",
|
|
45
|
-
},
|
|
53
|
+
"generate ./allure-results --output custom-report",
|
|
54
|
+
"Generate a report from the ./allure-results directory to the custom-report directory",
|
|
46
55
|
],
|
|
47
56
|
],
|
|
48
|
-
action: GenerateCommandAction,
|
|
49
57
|
});
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { Command } from "clipanion";
|
|
2
|
+
export declare class HistoryCommand extends Command {
|
|
3
|
+
static paths: string[][];
|
|
4
|
+
static usage: import("clipanion").Usage;
|
|
5
|
+
resultsDir: string;
|
|
6
|
+
historyPath: string | undefined;
|
|
7
|
+
reportName: string | undefined;
|
|
8
|
+
execute(): Promise<void>;
|
|
9
|
+
}
|
package/dist/commands/history.js
CHANGED
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
import { AllureReport, resolveConfig } from "@allurereport/core";
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
name:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
import { Command, Option } from "clipanion";
|
|
3
|
+
export class HistoryCommand extends Command {
|
|
4
|
+
constructor() {
|
|
5
|
+
super(...arguments);
|
|
6
|
+
this.resultsDir = Option.String({ required: true, name: "The directory with Allure results" });
|
|
7
|
+
this.historyPath = Option.String("--history-path,-h", {
|
|
8
|
+
description: "The path to history file",
|
|
9
|
+
});
|
|
10
|
+
this.reportName = Option.String("--report-name,--name", {
|
|
11
|
+
description: "The report name",
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
async execute() {
|
|
15
|
+
const config = await resolveConfig({
|
|
16
|
+
historyPath: this.historyPath ?? "history.jsonl",
|
|
17
|
+
name: this.reportName ?? "Allure Report",
|
|
18
|
+
plugins: {},
|
|
19
|
+
});
|
|
20
|
+
const allureReport = new AllureReport(config);
|
|
21
|
+
await allureReport.start();
|
|
22
|
+
await allureReport.readDirectory(this.resultsDir);
|
|
23
|
+
await allureReport.done();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
HistoryCommand.paths = [["history"]];
|
|
27
|
+
HistoryCommand.usage = Command.Usage({
|
|
16
28
|
description: "Generates the history to specified folder",
|
|
17
|
-
|
|
29
|
+
details: "This command generates history from the provided Allure Results directory.",
|
|
30
|
+
examples: [
|
|
31
|
+
["history ./allure-results", "Generate history from the ./allure-results directory"],
|
|
18
32
|
[
|
|
19
|
-
"--history-path
|
|
20
|
-
|
|
21
|
-
description: "The path to history file",
|
|
22
|
-
default: "history.jsonl",
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
[
|
|
26
|
-
"--report-name, --name <string>",
|
|
27
|
-
{
|
|
28
|
-
description: "The report name",
|
|
29
|
-
default: "Allure Report",
|
|
30
|
-
},
|
|
33
|
+
"history ./allure-results --history-path custom-history.jsonl",
|
|
34
|
+
"Generate history from the ./allure-results directory to the custom-history.jsonl file",
|
|
31
35
|
],
|
|
32
36
|
],
|
|
33
|
-
action: HistoryCommandAction,
|
|
34
37
|
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { Command } from "clipanion";
|
|
2
|
+
export declare class KnownIssueCommand extends Command {
|
|
3
|
+
static paths: string[][];
|
|
4
|
+
static usage: import("clipanion").Usage;
|
|
5
|
+
resultsDir: string;
|
|
6
|
+
output: string | undefined;
|
|
7
|
+
execute(): Promise<void>;
|
|
8
|
+
}
|
|
@@ -1,31 +1,38 @@
|
|
|
1
1
|
import { AllureReport, resolveConfig, writeKnownIssues } from "@allurereport/core";
|
|
2
|
+
import { Command, Option } from "clipanion";
|
|
2
3
|
import console from "node:console";
|
|
3
4
|
import { resolve } from "node:path";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
export class KnownIssueCommand extends Command {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.resultsDir = Option.String({ required: true, name: "The directory with Allure results" });
|
|
9
|
+
this.output = Option.String("--output,-o", {
|
|
10
|
+
description: "The output file name. Absolute paths are accepted as well",
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
async execute() {
|
|
14
|
+
const outputPath = this.output ?? "known-issues.json";
|
|
15
|
+
const config = await resolveConfig({
|
|
16
|
+
plugins: {},
|
|
17
|
+
});
|
|
18
|
+
const allureReport = new AllureReport(config);
|
|
19
|
+
await allureReport.start();
|
|
20
|
+
await allureReport.readDirectory(this.resultsDir);
|
|
21
|
+
await allureReport.done();
|
|
22
|
+
const targetPath = resolve(outputPath);
|
|
23
|
+
await writeKnownIssues(allureReport.store, outputPath);
|
|
24
|
+
console.log(`writing known-issues.json to ${targetPath}`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
KnownIssueCommand.paths = [["known-issue"]];
|
|
28
|
+
KnownIssueCommand.usage = Command.Usage({
|
|
20
29
|
description: "Generates a known issue list",
|
|
21
|
-
|
|
30
|
+
details: "This command generates a known issue list from the provided Allure Results directory.",
|
|
31
|
+
examples: [
|
|
32
|
+
["known-issue ./allure-results", "Generate a known issue list from the ./allure-results directory"],
|
|
22
33
|
[
|
|
23
|
-
"--output
|
|
24
|
-
|
|
25
|
-
description: "The output file name. Absolute paths are accepted as well",
|
|
26
|
-
default: "known-issues.json",
|
|
27
|
-
},
|
|
34
|
+
"known-issue ./allure-results --output custom-issues.json",
|
|
35
|
+
"Generate a known issue list from the ./allure-results directory to the custom-issues.json file",
|
|
28
36
|
],
|
|
29
37
|
],
|
|
30
|
-
action: KnownIssueCommandAction,
|
|
31
38
|
});
|
package/dist/commands/log.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { Command } from "clipanion";
|
|
2
|
+
export declare class LogCommand extends Command {
|
|
3
|
+
static paths: string[][];
|
|
4
|
+
static usage: import("clipanion").Usage;
|
|
5
|
+
resultsDir: string;
|
|
6
|
+
config: string | undefined;
|
|
7
|
+
cwd: string | undefined;
|
|
8
|
+
groupBy: string | undefined;
|
|
9
|
+
allSteps: boolean | undefined;
|
|
10
|
+
withTrace: boolean | undefined;
|
|
11
|
+
execute(): Promise<void>;
|
|
12
|
+
}
|