-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
53 lines (47 loc) · 1.83 KB
/
Rakefile
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
require 'rake'
require 'rubygems'
require 'cucumber'
require 'cucumber/rake/task'
require 'assertthat-bdd'
Cucumber::Rake::Task.new do |t|
t.cucumber_opts = %w[ --format json -o reports/cucumber.json]
end
task :download_features do
AssertThatBDD::Features.download(
#Optional can be supplied as environment variable ASSERTTHAT_ACCESS_KEY
accessKey:'ASSERTTHAT_ACCESS_KEY',
#Optional can be supplied as environment variable ASSERTTHAT_SECRET_KEY
secretKey:'ASSERTTHAT_SECRET_KEY',
#Required Jira project id e.g. 10001
projectId: 'PROJECT_ID',
#Optional - default ./features
outputFolder: './features/',
#Optional proxy url to connect to Jira
proxy: 'PROXY_URL',
#Optional - default automated (can be one of: manual/automated/both)
mode: 'automated',
#Optional - all features downloaded by default - should be a valid JQL
jql: 'project = XX AND key in (\'XXX-1\')'
)
end
task :upload_report do
AssertThatBDD::Report.upload(
#Optional can be supplied as environment variable ASSERTTHAT_ACCESS_KEY
accessKey:'ASSERTTHAT_ACCESS_KEY',
#Optional can be supplied as environment variable ASSERTTHAT_SECRET_KEY
secretKey:'ASSERTTHAT_SECRET_KEY',
#Jira project id e.g. 10001
projectId: 'PROJECT_ID',
#The name of the run - default 'Test run dd MMM yyyy HH:mm:ss'
runName: "Dry Tests Run",
#Json report folder - default ./reports
jsonReportFolder: "reports",
#Regex to search for cucumber reports - default .*.json
jsonReportIncludePattern: ".*/cucumber.json"
)
end
task :cucumber => :download_features
task :default => :cucumber
Rake::Task["cucumber"].enhance do
Rake::Task[:upload_report].invoke
end