From 508ae54e633b6090b399396d34c0582fdf32dffd Mon Sep 17 00:00:00 2001 From: Tommy Kelly Date: Sun, 27 Nov 2016 13:12:19 -0500 Subject: [PATCH] renamed tests to describe what they were testing. got rid of empty scenarios as it was causing an issue in cucumber (https://github.com/cucumber/cucumber-ruby/issues/967). updated tests to use new line numbers because of empty scenario issue. --- .../parallel_calabash/feature_grouper_spec.rb | 10 ++--- spec/test_data/features/aaa.feature | 42 ++++++++++++------- spec/test_data/features/bbb.feature | 18 +++++--- spec/test_data/features/ccc.feature | 12 ++++-- spec/test_data/features/ddd.feature | 9 ++-- spec/test_data/features/eee.feature | 6 ++- 6 files changed, 63 insertions(+), 34 deletions(-) diff --git a/spec/lib/parallel_calabash/feature_grouper_spec.rb b/spec/lib/parallel_calabash/feature_grouper_spec.rb index 97ba2ae..b0a1df5 100644 --- a/spec/lib/parallel_calabash/feature_grouper_spec.rb +++ b/spec/lib/parallel_calabash/feature_grouper_spec.rb @@ -109,17 +109,17 @@ describe :scenario_groups do it 'should groups all @runnable scenario equally into 2 groups' do expect(ParallelCalabash::FeatureGrouper.scenario_groups(2,{:feature_folder => ["spec/test_data/features"],:cucumber_options => "--tags @runnable"})).to eq \ - [["spec/test_data/features/aaa.feature:10", "spec/test_data/features/aaa.feature:16", "spec/test_data/features/aaa.feature:19", "spec/test_data/features/bbb.feature:13"], ["spec/test_data/features/bbb.feature:16", "spec/test_data/features/ccc.feature:11", "spec/test_data/features/ddd.feature:7", "spec/test_data/features/ddd.feature:10"]] + [["spec/test_data/features/aaa.feature:12", "spec/test_data/features/aaa.feature:20", "spec/test_data/features/aaa.feature:24", "spec/test_data/features/bbb.feature:16"], ["spec/test_data/features/bbb.feature:20", "spec/test_data/features/ccc.feature:13", "spec/test_data/features/ddd.feature:8", "spec/test_data/features/ddd.feature:12"]] end - it 'should groups all @runnable scenario equally into 2 groups' do + it 'should groups all @runnable scenario equally into 3 groups' do expect(ParallelCalabash::FeatureGrouper.scenario_groups(3,{:feature_folder => ["spec/test_data/features"],:cucumber_options => "--tags @runnable"})).to eq \ - [["spec/test_data/features/aaa.feature:10", "spec/test_data/features/aaa.feature:16", "spec/test_data/features/ddd.feature:7"], ["spec/test_data/features/aaa.feature:19", "spec/test_data/features/bbb.feature:13", "spec/test_data/features/ddd.feature:10"], ["spec/test_data/features/bbb.feature:16", "spec/test_data/features/ccc.feature:11"]] + [["spec/test_data/features/aaa.feature:12", "spec/test_data/features/aaa.feature:20", "spec/test_data/features/ddd.feature:8"],["spec/test_data/features/aaa.feature:24", "spec/test_data/features/bbb.feature:16", "spec/test_data/features/ddd.feature:12"], ["spec/test_data/features/bbb.feature:20", "spec/test_data/features/ccc.feature:13"]] end - it 'should groups all @runnable scenario equally into 2 groups' do + it 'should groups all @runnable scenario equally into 4 groups' do expect(ParallelCalabash::FeatureGrouper.scenario_groups(4,{:feature_folder => ["spec/test_data/features"],:cucumber_options => "--tags @runnable"})).to eq \ - [["spec/test_data/features/aaa.feature:10", "spec/test_data/features/aaa.feature:16"], ["spec/test_data/features/aaa.feature:19", "spec/test_data/features/bbb.feature:13"], ["spec/test_data/features/bbb.feature:16", "spec/test_data/features/ccc.feature:11"], ["spec/test_data/features/ddd.feature:7", "spec/test_data/features/ddd.feature:10"]] + [["spec/test_data/features/aaa.feature:12", "spec/test_data/features/aaa.feature:20"], ["spec/test_data/features/aaa.feature:24", "spec/test_data/features/bbb.feature:16"], ["spec/test_data/features/bbb.feature:20", "spec/test_data/features/ccc.feature:13"], ["spec/test_data/features/ddd.feature:8", "spec/test_data/features/ddd.feature:12"]] end end diff --git a/spec/test_data/features/aaa.feature b/spec/test_data/features/aaa.feature index 198dc0f..bb8df8a 100644 --- a/spec/test_data/features/aaa.feature +++ b/spec/test_data/features/aaa.feature @@ -1,43 +1,57 @@ Feature: aaa feature @tag1 - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 @runnable - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 @runnable - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 @runnable - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 - Scenario: \ No newline at end of file + Scenario: Scenario with name + Given I am just a simple step \ No newline at end of file diff --git a/spec/test_data/features/bbb.feature b/spec/test_data/features/bbb.feature index 98e2527..773f1c6 100644 --- a/spec/test_data/features/bbb.feature +++ b/spec/test_data/features/bbb.feature @@ -1,19 +1,25 @@ Feature: bbb.feature @tag1 - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag12 - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 @runnable - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 @runnable - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 - Scenario: \ No newline at end of file + Scenario: Scenario with name + Given I am just a simple step \ No newline at end of file diff --git a/spec/test_data/features/ccc.feature b/spec/test_data/features/ccc.feature index 25c3a2e..4bf37e5 100644 --- a/spec/test_data/features/ccc.feature +++ b/spec/test_data/features/ccc.feature @@ -2,13 +2,17 @@ Feature: ccc.feature @tag1 - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 @runnable - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 - Scenario: \ No newline at end of file + Scenario: Scenario with name + Given I am just a simple step \ No newline at end of file diff --git a/spec/test_data/features/ddd.feature b/spec/test_data/features/ddd.feature index 7c90f41..c7ed41f 100644 --- a/spec/test_data/features/ddd.feature +++ b/spec/test_data/features/ddd.feature @@ -1,10 +1,13 @@ Feature: ddd.feature @tag1 - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 @runnable - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 @runnable - Scenario: \ No newline at end of file + Scenario: Scenario with name + Given I am just a simple step \ No newline at end of file diff --git a/spec/test_data/features/eee.feature b/spec/test_data/features/eee.feature index 31e9051..72fc8b6 100644 --- a/spec/test_data/features/eee.feature +++ b/spec/test_data/features/eee.feature @@ -1,7 +1,9 @@ Feature: eee feature @tag1 - Scenario: + Scenario: Scenario with name + Given I am just a simple step @tag1 - Scenario: \ No newline at end of file + Scenario: Scenario with name + Given I am just a simple step \ No newline at end of file