Skip to content

Commit c14ffa0

Browse files
committed
Initial commit
0 parents  commit c14ffa0

File tree

6 files changed

+149
-0
lines changed

6 files changed

+149
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
reports/*
2+
features/*
3+
4+

Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'cucumber', '~> 4.0.0.rc.1'
4+
gem 'assertthat-bdd', '~> 1.0.2'
5+
gem 'test-unit'

Gemfile.lock

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
assertthat-bdd (1.0.2)
5+
rest-client (~> 2.0, >= 2.0.2)
6+
rubyzip (~> 1.0, >= 1.0.0)
7+
backports (3.11.4)
8+
builder (3.2.3)
9+
c21e (1.1.8)
10+
cucumber (4.0.0.rc.1)
11+
builder (>= 2.1.2)
12+
cucumber-core (~> 4.0)
13+
cucumber-expressions (~> 6.0, >= 6.0.1)
14+
cucumber-formatter-dots (~> 1.0)
15+
cucumber-wire (~> 1.0)
16+
diff-lcs (~> 1.3)
17+
gherkin (~> 6.0)
18+
multi_json (>= 1.7.5, < 2.0)
19+
multi_test (>= 0.1.2)
20+
cucumber-core (4.0.0)
21+
backports (>= 3.8.0)
22+
cucumber-tag_expressions (~> 1.1.0)
23+
gherkin (~> 6.0)
24+
cucumber-expressions (6.0.1)
25+
cucumber-formatter-dots (1.1.2)
26+
c21e (~> 1.1.8)
27+
cucumber-messages (~> 2.0.0)
28+
cucumber-messages (2.0.0)
29+
google-protobuf (= 3.6.1)
30+
cucumber-tag_expressions (1.1.1)
31+
cucumber-wire (1.0.0)
32+
cucumber-core (~> 4.0)
33+
cucumber-expressions (~> 6.0)
34+
diff-lcs (1.3)
35+
domain_name (0.5.20180417)
36+
unf (>= 0.0.5, < 1.0.0)
37+
ffi (1.9.25-x64-mingw32)
38+
gherkin (6.0.15)
39+
c21e (~> 1.1.8)
40+
cucumber-messages (~> 2.0.0)
41+
google-protobuf (3.6.1-x64-mingw32)
42+
http-cookie (1.0.3)
43+
domain_name (~> 0.5)
44+
mime-types (3.2.2)
45+
mime-types-data (~> 3.2015)
46+
mime-types-data (3.2018.0812)
47+
multi_json (1.13.1)
48+
multi_test (0.1.2)
49+
netrc (0.11.0)
50+
power_assert (1.1.3)
51+
rest-client (2.0.2-x64-mingw32)
52+
ffi (~> 1.9)
53+
http-cookie (>= 1.0.2, < 2.0)
54+
mime-types (>= 1.16, < 4.0)
55+
netrc (~> 0.8)
56+
rubyzip (1.2.2)
57+
test-unit (3.2.9)
58+
power_assert
59+
unf (0.1.4)
60+
unf_ext
61+
unf_ext (0.0.7.5-x64-mingw32)
62+
63+
PLATFORMS
64+
x64-mingw32
65+
66+
DEPENDENCIES
67+
assertthat-bdd (~> 1.0.2)
68+
cucumber (~> 4.0.0.rc.1)
69+
test-unit
70+
71+
BUNDLED WITH
72+
1.17.1

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Coming soon ...

Rakefile

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
require 'rake'
2+
require 'rubygems'
3+
require 'cucumber'
4+
require 'cucumber/rake/task'
5+
require 'assertthat-bdd'
6+
7+
Cucumber::Rake::Task.new do |t|
8+
t.cucumber_opts = %w[ --format json -o reports/cucumber.json]
9+
end
10+
11+
task :download_features do
12+
AssertThatBDD::Features.download(
13+
#Optional can be supplied as environment variable ASSERTTHAT_ACCESS_KEY
14+
accessKey:'ASSERTTHAT_ACCESS_KEY',
15+
#Optional can be supplied as environment variable ASSERTTHAT_SECRET_KEY
16+
secretKey:'ASSERTTHAT_SECRET_KEY',
17+
#Required Jira project id e.g. 10001
18+
projectId: 'PROJECT_ID',
19+
#Optional - default ./features
20+
outputFolder: './features/',
21+
#Optional proxy url to connect to Jira
22+
proxy: 'PROXY_URL',
23+
#Optional - default automated (can be one of: manual/automated/both)
24+
mode: 'automated',
25+
#Optional - all features downloaded by default - should be a valid JQL
26+
jql: 'project = XX AND key in (\'XXX-1\')'
27+
)
28+
end
29+
30+
task :upload_report do
31+
AssertThatBDD::Report.upload(
32+
#Optional can be supplied as environment variable ASSERTTHAT_ACCESS_KEY
33+
accessKey:'ASSERTTHAT_ACCESS_KEY',
34+
#Optional can be supplied as environment variable ASSERTTHAT_SECRET_KEY
35+
secretKey:'ASSERTTHAT_SECRET_KEY',
36+
#Jira project id e.g. 10001
37+
projectId: 'PROJECT_ID',
38+
#The name of the run - default 'Test run dd MMM yyyy HH:mm:ss'
39+
runName: "Dry Tests Run",
40+
#Json report folder - default ./reports
41+
jsonReportFolder: "reports",
42+
#Regex to search for cucumber reports - default .*.json
43+
jsonReportIncludePattern: ".*/cucumber.json"
44+
)
45+
end
46+
47+
task :cucumber => :download_features
48+
49+
task :default => :cucumber
50+
51+
Rake::Task["cucumber"].enhance do
52+
Rake::Task[:upload_report].invoke
53+
end
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Given(/^I add some meaningful step definishions instead of this dummy one$/) do
2+
stepDefsCreated = true
3+
assert_true(stepDefsCreated)
4+
end
5+
6+
When(/^I run the framework with mvn integration-test goal$/) do
7+
testsRun = true
8+
assert_true(testsRun)
9+
end
10+
11+
Then(/^I see cucumber test report on AssertThat reporting dashboard$/) do
12+
reportSubmitted = true
13+
assert_true(reportSubmitted)
14+
end

0 commit comments

Comments
 (0)