Comments (14)
from cucumber.
Delay? I literally asked this 4 mins ago, I wouldn't call that a delay :)
from cucumber.
I think this should be an easy fix:
val runtimeMXBean = ManagementFactory.getRuntimeMXBean
import scala.collection.JavaConversions._
val args = runtimeMXBean.getInputArguments.toList
Gets me the arguments passed in. I'll do that fix in the next couple of hours.
from cucumber.
The cucumber-plugin should now pass through the JVM arguments. Will look at the runner too, basically two ways Cucumber can be invoked, one through its own command 'sbt cucumber' the other is hooking into the "JUnit" test frameworks. I need to check the later. But, if you are using 'sbt cucumber' that should now pass through arguments fine and return error on failing test. Checked into master, may take a bit of time to hit Maven.
from cucumber.
Your a star :)
from cucumber.
No worries, like the other one, I'll leave the open issue for a day or two in case of problems, then I'll close it down.
from cucumber.
for 0.1.4 I still have this issue
could you please help?
from cucumber.
Will take a look this evening, can generate a new release if required.
from cucumber.
Just wondering, I guess "sbt -DsomeArg=someVal test" on the runner doesn't work? The plugin creates its own JVM for the new command. The runner hooks into the test framework..., will investigate.
from cucumber.
I tried many ways
sbt "-DsomeArg=someVal cucumber --tags @debug"
sbt -DsomeArg=someVal "cucumber --tags @debug"
sbt -DsomeArg=someVal cucumber
none of them works
however in CI, where we lunch it with with java & teamcity cucumber plugin, flags are passed
from cucumber.
@lewismj hey, I have plugin v0.1.6 and facing the exact same issue. Im passing in -Dbrowser and getProperty is returning null. Im using scala 2.11
from cucumber.
Finally, getting a chance to look at this today. Busy at work Mifid2 :(
from cucumber.
Looking first at the Runner, if I do:
tangaroa:example lewismj$ export K="2049"
and the run sbt test
with println(System.getenv("K"))
in one of the steps, I can see that the env is picked up:
Feature: Multiplication
In order to avoid making mistakes
As a dummy
I want to multiply numbers
@my-test
Scenario: Multiply two variables # Multiplication.feature:7
2049
Given a variable x with value 2 # MultiplicationSteps.scala:44
And a variable y with value 3 # MultiplicationSteps.scala:49
When I multiply x * y # MultiplicationSteps.scala:53
Then I get 6 # MultiplicationSteps.scala:57
1 Scenarios (1 passed)
4 Steps (4 passed)
0m0.117s
Which I think is fine for the runner (running tests as a JUnit framework), I will look at the standalone plugin...
from cucumber.
For the next (sbt 1.0) version of the plugin (not the runner) you can override the environment variables by setting an 'envProperties' flag, e.g.
CucumberPlugin.envProperties := Map("K"->"2049")
The runner documentation and plugin doc should show how to filter by tags.
e.g.
sbt "cucumber --tags ~@my-tag"
Will be a few hours before its checked in and published.
n.b. Unfortunately the SBT interface has changed so the next version of the plugin will be SBT 1.0.2 only.
from cucumber.
Related Issues (20)
- Exit code 0 HOT 8
- Piping standard out to forked process HOT 2
- CucumberPlugin.features option is not used by the Cucumber Runner plugin HOT 4
- Cucumber 1.2.6 / Scala 2.12 HOT 8
- CucumberPlugin.cucumber is an InputKey. HOT 6
- Not possible to use monochrome output for cucumber-runner HOT 12
- [Question] How to run a single feature/example HOT 2
- Executing tests in parallel HOT 8
- Allow specification for multiple paths for Cucumber.glue setting HOT 3
- [Question] How to pass own plugin via CucumberPlugin.plugin HOT 3
- Scala versions compatibility HOT 11
- [Question] Tag_Expression for '--tags' HOT 2
- IOException HOT 22
- IllegalArgumentException on runner params HOT 1
- Documentation: subprojects HOT 4
- sbt test gives error: java.lang.NoSuchMethodError: scala.Product.$init$(Lscala/Product;)V HOT 5
- New version of the plugin for Scala 2.10 HOT 1
- Big club
- CucumberTestFramework returns successful despite test failures.
- Use of BeforeAndAfterAll
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cucumber.