badoo / badoo/parallel_cucumber

It's not possible to override ENV var from config/cucumber.yml

Open
#28 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
23
Forks
20
PR merge metrics
No merged PRs in 30d

Description

If in `config/cucumber.yml` for any project env var is specified it is impossible to override it from CLI.

For example
```
# in config/cucumber.yml:
some_profile: SOME_VAR=1
```

```
$ parallel_cucumber --debug --cucumber-options ' SOME_VAR=2 -p some_profile' features/functional/some.feature
...
== Running command `cucumber ... SOME_VAR=2 ... SOME_VAR=1 features/functional/some.feature ...`
...
```

It seems there is a problem in [`batch_mapped_files`](https://github.com/badoo/parallel_cucumber/blob/9c992eb/lib/parallel_cucumber/helper/cucumber.rb#L20) function — it should handle duplicated ENV vars (and replace old ones cucumber config with new ones from CLI/--cucumber-options).

Contributor guide

No contributing guide indexed for this repository

Research direction

Open lib/parallel_cucumber/helper/cucumber.rb and inspect batch_mapped_files, then reproduce the issue with the parallel_cucumber command shown in the report. Done means an ENV value supplied through --cucumber-options takes precedence over the same variable from config/cucumber.yml without leaving conflicting assignments in the generated command.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.