I am currently running several tests via cucumber-jvm, and I am kicking them off via an ant script. I am passing values to the ant script via command line at run
, which are then overriding my Cucumber.Options values. This is working fantastic, and allows me to select different feature files, and different scenarios with specific tags on the fly. My question is, can my actual java code access these values from the ant script.
Anywhere in the javacode would be acceptable, but ideally my @Before method could access these values to properly setup my testing environment based on the tests being run. Thanks in advance for the support!
--
-- Rules --
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
On Fri, May 17, 2013 at 8:52 AM, theposob <max.sap...@coveros.com> wrote:
I am currently running several tests via cucumber-jvm, and I am kicking them off via an ant script. I am passing values to the ant script via command line at runYou mean you're defining JVM system properties on the command line using -D?
, which are then overriding my Cucumber.Options values. This is working fantastic, and allows me to select different feature files, and different scenarios with specific tags on the fly. My question is, can my actual java code access these values from the ant script.This is really a question about Ant, not Cucumber. Rephrased:When you say values, what exactly do you mean? JVM system properties? Ant <property> values?
Please see An't docs for the <java> task to learn how to pass JVM system properties to a java program launched from Ant.If you fork, you have to pass them explicitly, if you don't fork, Ant and Cucumber will run in the same JVM and have access to the same system properties.
AslakAnywhere in the javacode would be acceptable, but ideally my @Before method could access these values to properly setup my testing environment based on the tests being run. Thanks in advance for the support!--You received this message because you are subscribed to the Google Groups "Cukes" group.
-- Rules --
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
---
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
--
-- Rules --
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Cukes" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cukes/3zrgof6rFFk/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to cukes+un...@googlegroups.com.