allure 3.0.0-beta.16 → 3.0.0-beta.18
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 +70 -36
- package/dist/commands/history.d.ts +9 -7
- package/dist/commands/history.js +31 -28
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.js +1 -0
- 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 +14 -7
- package/dist/commands/qualityGate.js +131 -45
- package/dist/commands/results/index.d.ts +2 -0
- package/dist/commands/results/index.js +2 -0
- package/dist/commands/results/pack.d.ts +10 -0
- package/dist/commands/results/pack.js +111 -0
- package/dist/commands/results/unpack.d.ts +9 -0
- package/dist/commands/results/unpack.js +79 -0
- package/dist/commands/run.d.ts +22 -10
- package/dist/commands/run.js +244 -101
- 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 +33 -35
- package/dist/utils/process.d.ts +7 -1
- package/dist/utils/process.js +17 -6
- package/package.json +27 -20
- package/dist/utils/commands.d.ts +0 -16
- package/dist/utils/commands.js +0 -16
|
@@ -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 Allure2Command 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
|
+
reportLanguage: string | undefined;
|
|
11
|
+
singleFile: boolean | undefined;
|
|
12
|
+
historyPath: string | undefined;
|
|
13
|
+
knownIssues: string | undefined;
|
|
14
|
+
execute(): Promise<void>;
|
|
15
|
+
}
|
package/dist/commands/allure2.js
CHANGED
|
@@ -1,89 +1,77 @@
|
|
|
1
|
-
import { AllureReport,
|
|
1
|
+
import { AllureReport, readConfig } from "@allurereport/core";
|
|
2
2
|
import Allure2Plugin from "@allurereport/plugin-allure2";
|
|
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
|
-
|
|
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
|
-
"--output, -o <file>",
|
|
50
|
-
{
|
|
51
|
-
description: "The output directory name. Absolute paths are accepted as well",
|
|
52
|
-
default: "allure-report",
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
[
|
|
56
|
-
"--report-name, --name <string>",
|
|
57
|
-
{
|
|
58
|
-
description: "The report name",
|
|
59
|
-
default: "Allure Report",
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
|
-
[
|
|
63
|
-
"--report-language, --lang <string>",
|
|
64
|
-
{
|
|
65
|
-
description: "Default language of the report (default: OS language)",
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
[
|
|
69
|
-
"--single-file",
|
|
7
|
+
export class Allure2Command 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.reportLanguage = Option.String("--report-language,--lang", {
|
|
24
|
+
description: "Default language of the report (default: OS language)",
|
|
25
|
+
});
|
|
26
|
+
this.singleFile = Option.Boolean("--single-file", {
|
|
27
|
+
description: "Generate single file report",
|
|
28
|
+
});
|
|
29
|
+
this.historyPath = Option.String("--history-path,-h", {
|
|
30
|
+
description: "The path to history file",
|
|
31
|
+
});
|
|
32
|
+
this.knownIssues = Option.String("--known-issues", {
|
|
33
|
+
description: "Path to the known issues file. Updates the file and quarantines failed tests when specified",
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
async execute() {
|
|
37
|
+
const cwd = await realpath(this.cwd ?? process.cwd());
|
|
38
|
+
const before = new Date().getTime();
|
|
39
|
+
const defaultAllure2Options = {
|
|
40
|
+
singleFile: this.singleFile ?? false,
|
|
41
|
+
reportLanguage: this.reportLanguage,
|
|
42
|
+
};
|
|
43
|
+
const config = await readConfig(cwd, this.config, {
|
|
44
|
+
output: this.output ?? "allure-report",
|
|
45
|
+
name: this.reportName ?? "Allure Report",
|
|
46
|
+
knownIssuesPath: this.knownIssues,
|
|
47
|
+
historyPath: this.historyPath,
|
|
48
|
+
});
|
|
49
|
+
config.plugins = [
|
|
70
50
|
{
|
|
71
|
-
|
|
72
|
-
|
|
51
|
+
id: "allure2",
|
|
52
|
+
enabled: true,
|
|
53
|
+
options: defaultAllure2Options,
|
|
54
|
+
plugin: new Allure2Plugin(defaultAllure2Options),
|
|
73
55
|
},
|
|
74
|
-
]
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
+
Allure2Command.paths = [["allure2"]];
|
|
66
|
+
Allure2Command.usage = Command.Usage({
|
|
67
|
+
category: "Reports",
|
|
68
|
+
description: "Generates Allure Classic report based on provided Allure Results",
|
|
69
|
+
details: "This command generates an Allure Classic report from the provided Allure Results directory.",
|
|
70
|
+
examples: [
|
|
71
|
+
["allure2 ./allure-results", "Generate a report from the ./allure-results directory"],
|
|
81
72
|
[
|
|
82
|
-
"--
|
|
83
|
-
|
|
84
|
-
description: "Path to the known issues file. Updates the file and quarantines failed tests when specified",
|
|
85
|
-
},
|
|
73
|
+
"allure2 ./allure-results --output custom-report",
|
|
74
|
+
"Generate a report from the ./allure-results directory to the custom-report directory",
|
|
86
75
|
],
|
|
87
76
|
],
|
|
88
|
-
action: ClassicLegacyCommandAction,
|
|
89
77
|
});
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { Command } from "clipanion";
|
|
2
|
+
export declare class AwesomeCommand 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
|
+
historyPath: string | undefined;
|
|
15
|
+
knownIssues: string | undefined;
|
|
16
|
+
groupBy: string | undefined;
|
|
17
|
+
execute(): Promise<void>;
|
|
18
|
+
}
|
package/dist/commands/awesome.js
CHANGED
|
@@ -1,109 +1,89 @@
|
|
|
1
|
-
import { AllureReport,
|
|
1
|
+
import { AllureReport, readConfig } from "@allurereport/core";
|
|
2
2
|
import { default as AwesomePlugin } from "@allurereport/plugin-awesome";
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
[
|
|
64
|
-
"--single-file",
|
|
65
|
-
{
|
|
66
|
-
description: "Generate single file report",
|
|
67
|
-
default: false,
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
[
|
|
71
|
-
"--logo <string>",
|
|
72
|
-
{
|
|
73
|
-
description: "Path to the report logo which will be displayed in the header",
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
[
|
|
77
|
-
"--theme <string>",
|
|
7
|
+
export class AwesomeCommand 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
|
+
this.historyPath = Option.String("--history-path,-h", {
|
|
36
|
+
description: "The path to history file",
|
|
37
|
+
});
|
|
38
|
+
this.knownIssues = Option.String("--known-issues", {
|
|
39
|
+
description: "Path to the known issues file. Updates the file and quarantines failed tests when specified",
|
|
40
|
+
});
|
|
41
|
+
this.groupBy = Option.String("--group-by,-g", {
|
|
42
|
+
description: "Group test results by labels. The labels should be separated by commas",
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
async execute() {
|
|
46
|
+
const cwd = await realpath(this.cwd ?? process.cwd());
|
|
47
|
+
const before = new Date().getTime();
|
|
48
|
+
const defaultAwesomeOptions = {
|
|
49
|
+
singleFile: this.singleFile ?? false,
|
|
50
|
+
logo: this.logo,
|
|
51
|
+
theme: this.theme,
|
|
52
|
+
reportLanguage: this.reportLanguage,
|
|
53
|
+
groupBy: this.groupBy?.split?.(",") ?? ["parentSuite", "suite", "subSuite"],
|
|
54
|
+
};
|
|
55
|
+
const config = await readConfig(cwd, this.config, {
|
|
56
|
+
output: this.output ?? "allure-report",
|
|
57
|
+
name: this.reportName ?? "Allure Report",
|
|
58
|
+
knownIssuesPath: this.knownIssues,
|
|
59
|
+
historyPath: this.historyPath,
|
|
60
|
+
});
|
|
61
|
+
config.plugins = [
|
|
78
62
|
{
|
|
79
|
-
|
|
63
|
+
id: "awesome",
|
|
64
|
+
enabled: true,
|
|
65
|
+
options: defaultAwesomeOptions,
|
|
66
|
+
plugin: new AwesomePlugin(defaultAwesomeOptions),
|
|
80
67
|
},
|
|
81
|
-
]
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
description: "Path to the known issues file. Updates the file and quarantines failed tests when specified",
|
|
98
|
-
},
|
|
99
|
-
],
|
|
68
|
+
];
|
|
69
|
+
const allureReport = new AllureReport(config);
|
|
70
|
+
await allureReport.start();
|
|
71
|
+
await allureReport.readDirectory(this.resultsDir);
|
|
72
|
+
await allureReport.done();
|
|
73
|
+
const after = new Date().getTime();
|
|
74
|
+
console.log(`the report successfully generated (${after - before}ms)`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
AwesomeCommand.paths = [["awesome"]];
|
|
78
|
+
AwesomeCommand.usage = Command.Usage({
|
|
79
|
+
category: "Reports",
|
|
80
|
+
description: "Generates Allure Awesome report based on provided Allure Results",
|
|
81
|
+
details: "This command generates an Allure Awesome report from the provided Allure Results directory.",
|
|
82
|
+
examples: [
|
|
83
|
+
["awesome ./allure-results", "Generate a report from the ./allure-results directory"],
|
|
100
84
|
[
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
description: "Group test results by labels. The labels should be separated by commas",
|
|
104
|
-
default: "parentSuite,suite,subSuite",
|
|
105
|
-
},
|
|
85
|
+
"awesome ./allure-results --output custom-report",
|
|
86
|
+
"Generate a report from the ./allure-results directory to the custom-report directory",
|
|
106
87
|
],
|
|
107
88
|
],
|
|
108
|
-
action: AwesomeCommandAction,
|
|
109
89
|
});
|
|
@@ -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 ClassicCommand 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
|
+
reportLanguage: string | undefined;
|
|
11
|
+
singleFile: boolean | undefined;
|
|
12
|
+
historyPath: string | undefined;
|
|
13
|
+
knownIssues: string | undefined;
|
|
14
|
+
execute(): Promise<void>;
|
|
15
|
+
}
|
package/dist/commands/classic.js
CHANGED
|
@@ -1,89 +1,77 @@
|
|
|
1
|
-
import { AllureReport,
|
|
1
|
+
import { AllureReport, readConfig } from "@allurereport/core";
|
|
2
2
|
import ClassicPlugin from "@allurereport/plugin-classic";
|
|
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
|
-
|
|
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
|
-
"--output, -o <file>",
|
|
50
|
-
{
|
|
51
|
-
description: "The output directory name. Absolute paths are accepted as well",
|
|
52
|
-
default: "allure-report",
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
[
|
|
56
|
-
"--report-name, --name <string>",
|
|
57
|
-
{
|
|
58
|
-
description: "The report name",
|
|
59
|
-
default: "Allure Report",
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
|
-
[
|
|
63
|
-
"--report-language, --lang <string>",
|
|
64
|
-
{
|
|
65
|
-
description: "Default language of the report (default: OS language)",
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
[
|
|
69
|
-
"--single-file",
|
|
7
|
+
export class ClassicCommand 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.reportLanguage = Option.String("--report-language,--lang", {
|
|
24
|
+
description: "Default language of the report (default: OS language)",
|
|
25
|
+
});
|
|
26
|
+
this.singleFile = Option.Boolean("--single-file", {
|
|
27
|
+
description: "Generate single file report",
|
|
28
|
+
});
|
|
29
|
+
this.historyPath = Option.String("--history-path,-h", {
|
|
30
|
+
description: "The path to history file",
|
|
31
|
+
});
|
|
32
|
+
this.knownIssues = Option.String("--known-issues", {
|
|
33
|
+
description: "Path to the known issues file. Updates the file and quarantines failed tests when specified",
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
async execute() {
|
|
37
|
+
const cwd = await realpath(this.cwd ?? process.cwd());
|
|
38
|
+
const before = new Date().getTime();
|
|
39
|
+
const defaultClassicOptions = {
|
|
40
|
+
singleFile: this.singleFile ?? false,
|
|
41
|
+
reportLanguage: this.reportLanguage,
|
|
42
|
+
};
|
|
43
|
+
const config = await readConfig(cwd, this.config, {
|
|
44
|
+
output: this.output ?? "allure-report",
|
|
45
|
+
name: this.reportName ?? "Allure Report",
|
|
46
|
+
knownIssuesPath: this.knownIssues,
|
|
47
|
+
historyPath: this.historyPath,
|
|
48
|
+
});
|
|
49
|
+
config.plugins = [
|
|
70
50
|
{
|
|
71
|
-
|
|
72
|
-
|
|
51
|
+
id: "classic",
|
|
52
|
+
enabled: true,
|
|
53
|
+
options: defaultClassicOptions,
|
|
54
|
+
plugin: new ClassicPlugin(defaultClassicOptions),
|
|
73
55
|
},
|
|
74
|
-
]
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
+
ClassicCommand.paths = [["classic"]];
|
|
66
|
+
ClassicCommand.usage = Command.Usage({
|
|
67
|
+
category: "Reports",
|
|
68
|
+
description: "Generates Allure Classic report based on provided Allure Results",
|
|
69
|
+
details: "This command generates an Allure Classic report from the provided Allure Results directory.",
|
|
70
|
+
examples: [
|
|
71
|
+
["classic ./allure-results", "Generate a report from the ./allure-results directory"],
|
|
81
72
|
[
|
|
82
|
-
"--
|
|
83
|
-
|
|
84
|
-
description: "Path to the known issues file. Updates the file and quarantines failed tests when specified",
|
|
85
|
-
},
|
|
73
|
+
"classic ./allure-results --output custom-report",
|
|
74
|
+
"Generate a report from the ./allure-results directory to the custom-report directory",
|
|
86
75
|
],
|
|
87
76
|
],
|
|
88
|
-
action: ClassicCommandAction,
|
|
89
77
|
});
|
package/dist/commands/csv.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { Command } from "clipanion";
|
|
2
|
+
export declare class CsvCommand 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
|
+
disableHeaders: boolean | undefined;
|
|
10
|
+
separator: string | undefined;
|
|
11
|
+
knownIssues: string | undefined;
|
|
12
|
+
execute(): Promise<void>;
|
|
13
|
+
}
|