Repository navigation
Expand file tree
/
Copy pathcucumber.js
More file actions
110 lines (100 loc) · 2.62 KB
/
Copy pathcucumber.js
File metadata and controls
110 lines (100 loc) · 2.62 KB
1
2
3
4
5
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/**
* Cucumber配置文件
* 定义不同的测试配置文件(profiles)
*/
module.exports = {
// 默认配置
default: {
paths: ['features/**/*.feature'],
require: [
'features/support/**/*.js',
'features/step-definitions/**/*.js'
],
format: [
'progress',
'html:test-results/cucumber-report.html',
'json:test-results/cucumber-report.json'
],
publishQuiet: true,
language: 'zh-CN'
},
// 按执行层级的配置
smoke: {
paths: ['features/**/*.feature'],
require: ['features/support/**/*.js'],
format: ['progress'],
tags: '@smoke',
publishQuiet: true,
language: 'zh-CN'
},
critical: {
paths: ['features/**/*.feature'],
require: ['features/support/**/*.js'],
format: ['progress', 'json:test-results/cucumber-report.json'],
tags: '@critical',
publishQuiet: true,
language: 'zh-CN'
},
comprehensive: {
paths: ['features/**/*.feature'],
require: ['features/support/**/*.js'],
format: [
'progress',
'html:test-results/cucumber-report.html',
'json:test-results/cucumber-report.json'
],
tags: '@comprehensive',
publishQuiet: true,
language: 'zh-CN'
},
// 按速度的配置
fast: {
paths: ['features/**/*.feature'],
require: ['features/support/**/*.js'],
format: ['progress'],
tags: '@fast and not @slow',
publishQuiet: true,
language: 'zh-CN'
},
// 按领域的配置
mcp: {
paths: ['features/e2e/mcp/**/*.feature'],
require: ['features/support/**/*.js'],
format: ['progress', 'html:test-results/cucumber-report.html'],
publishQuiet: true,
language: 'zh-CN'
},
cognition: {
paths: ['features/e2e/cognition/**/*.feature'],
require: ['features/support/**/*.js'],
format: ['progress', 'html:test-results/cognition-report.html'],
publishQuiet: true,
language: 'zh-CN'
},
'cognition:smoke': {
paths: ['features/e2e/cognition/**/*.feature'],
require: ['features/support/**/*.js'],
format: ['progress'],
tags: '@smoke',
publishQuiet: true,
language: 'zh-CN'
},
'cognition:critical': {
paths: ['features/e2e/cognition/**/*.feature'],
require: ['features/support/**/*.js'],
format: ['progress', 'html:test-results/cognition-critical.html'],
tags: '@critical',
publishQuiet: true,
language: 'zh-CN'
},
// CI/CD配置
ci: {
paths: ['features/**/*.feature'],
require: ['features/support/**/*.js'],
format: ['progress', 'json:test-results/cucumber-report.json'],
tags: '@smoke or @critical',
publishQuiet: true,
language: 'zh-CN',
parallel: 2
}
};