On Thursday, April 4, 2013 8:53:06 AM UTC-5, Aslak Hellesøy wrote:Hi all,I'm at CukeUp! (duh, obviously) and getting lots of great ideas talking to people.Kirill from JetBrains told me they would like to run each Scenario with different configurations.
JetBrains uses Cucumber-JVM to test RubyMine - their excellent Ruby IDE. RubyMine needs to work with various versions of Ruby, and they would like to run each scenario once for each Ruby version they want to support.This is similar to the situation where a team developing a web app uses a browser testing library and wants to run each Scenario once for each browser, say Firefox, Chrome and IE.Currently, the only way to do this is to launch Cucumber once for each environment, setting the environment settings in environment variables or system properties.This is fine for a CI environment, but for a developer it becomes rather tedious to launch Cucumber N times.I'm therefore considering adding a new feature to Cucumber that would make it able to run each Scenario N times within the same Cucumber execution. All the results would end up in the same report.What I'm thinking is that the configuration of the various environments would be done in a configuration file. Configuration would be written in JSON or TOML [1]. See the example [2].If we're introducing a configuration file, we might as well take the opportunity to add some more to it, like command line options.You'd specify it with --config path/to/config.{json|toml}. For Cucumber-Ruby this would replace cucumber.yml. We also have a related ticket for this [3].WDYT?
Aslak,
A config file could certainly be useful, but specifying multiple environment configurations seems like a potential black hole as there are many different possible configurations a developer/tester might want to use when running tests. It would need to be totally configuration agnostic and the heavy lifting of using the environment configuration settings at run-time should be done in the step definitions (@Before, @After, or in the stepdefs themselves) and implemented by the developer writing the test code.
Regarding the configuration file format, have you considered YAML? I admittedly only glanced at TOML from the link in your post but it looks like it is fairly young and not nearly as mature as the YAML or JSON formats. I would be concerned with the long term stability and support of the TOML API. YAML has more flexibility and extensibility than JSON in my experience. I used JSON initially for configuration files for a project I am currently working on but ultimately moved to YAML for its flexibility and readability, especially in Java using snakeyaml. I have only used it in Java, however, so I'm not sure how capable it is in other languages that Cucumber supports.
Cheers,
Tim
--
-- 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.
Fixing Rule (2)
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/CdO7fG1R0KQ/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi all,I'm at CukeUp! (duh, obviously) and getting lots of great ideas talking to people.Kirill from JetBrains told me they would like to run each Scenario with different configurations.
JetBrains uses Cucumber-JVM to test RubyMine - their excellent Ruby IDE. RubyMine needs to work with various versions of Ruby, and they would like to run each scenario once for each Ruby version they want to support.This is similar to the situation where a team developing a web app uses a browser testing library and wants to run each Scenario once for each browser, say Firefox, Chrome and IE.Currently, the only way to do this is to launch Cucumber once for each environment, setting the environment settings in environment variables or system properties.
This is fine for a CI environment, but for a developer it becomes rather tedious to launch Cucumber N times.I'm therefore considering adding a new feature to Cucumber that would make it able to run each Scenario N times within the same Cucumber execution. All the results would end up in the same report.What I'm thinking is that the configuration of the various environments would be done in a configuration file. Configuration would be written in JSON or TOML [1]. See the example [2].If we're introducing a configuration file, we might as well take the opportunity to add some more to it, like command line options.You'd specify it with --config path/to/config.{json|toml}. For Cucumber-Ruby this would replace cucumber.yml. We also have a related ticket for this [3].WDYT?
--
Fixing Rule (2)On 4 Apr 2013, at 15:46, Tim Mertens <t...@filmchicago.org> wrote:On Thursday, April 4, 2013 8:53:06 AM UTC-5, Aslak Hellesøy wrote:Hi all,I'm at CukeUp! (duh, obviously) and getting lots of great ideas talking to people.Kirill from JetBrains told me they would like to run each Scenario with different configurations.
JetBrains uses Cucumber-JVM to test RubyMine - their excellent Ruby IDE. RubyMine needs to work with various versions of Ruby, and they would like to run each scenario once for each Ruby version they want to support.This is similar to the situation where a team developing a web app uses a browser testing library and wants to run each Scenario once for each browser, say Firefox, Chrome and IE.Currently, the only way to do this is to launch Cucumber once for each environment, setting the environment settings in environment variables or system properties.This is fine for a CI environment, but for a developer it becomes rather tedious to launch Cucumber N times.I'm therefore considering adding a new feature to Cucumber that would make it able to run each Scenario N times within the same Cucumber execution. All the results would end up in the same report.What I'm thinking is that the configuration of the various environments would be done in a configuration file. Configuration would be written in JSON or TOML [1]. See the example [2].If we're introducing a configuration file, we might as well take the opportunity to add some more to it, like command line options.You'd specify it with --config path/to/config.{json|toml}. For Cucumber-Ruby this would replace cucumber.yml. We also have a related ticket for this [3].WDYT?Aslak,
A config file could certainly be useful, but specifying multiple environment configurations seems like a potential black hole as there are many different possible configurations a developer/tester might want to use when running tests. It would need to be totally configuration agnostic and the heavy lifting of using the environment configuration settings at run-time should be done in the step definitions (@Before, @After, or in the stepdefs themselves) and implemented by the developer writing the test code.
Regarding the configuration file format, have you considered YAML? I admittedly only glanced at TOML from the link in your post but it looks like it is fairly young and not nearly as mature as the YAML or JSON formats. I would be concerned with the long term stability and support of the TOML API. YAML has more flexibility and extensibility than JSON in my experience. I used JSON initially for configuration files for a project I am currently working on but ultimately moved to YAML for its flexibility and readability, especially in Java using snakeyaml. I have only used it in Java, however, so I'm not sure how capable it is in other languages that Cucumber supports.
Cheers,
Tim--
-- 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.
--
-- 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.
and provide a way to run features with different profiles by one command?
and provide a way to run features with different profiles by one command?Yes, the idea is to be able to run scenarios more than once within a single cucumber execution.
On Saturday, 6 April 2013 at 20:37, Matt Wynne wrote:
On 4 Apr 2013, at 14:53, aslak hellesoy <aslak.h...@gmail.com> wrote:Hi all,I'm at CukeUp! (duh, obviously) and getting lots of great ideas talking to people.Kirill from JetBrains told me they would like to run each Scenario with different configurations.
JetBrains uses Cucumber-JVM to test RubyMine - their excellent Ruby IDE. RubyMine needs to work with various versions of Ruby, and they would like to run each scenario once for each Ruby version they want to support.This is similar to the situation where a team developing a web app uses a browser testing library and wants to run each Scenario once for each browser, say Firefox, Chrome and IE.Currently, the only way to do this is to launch Cucumber once for each environment, setting the environment settings in environment variables or system properties.This is fine for a CI environment, but for a developer it becomes rather tedious to launch Cucumber N times.I'm therefore considering adding a new feature to Cucumber that would make it able to run each Scenario N times within the same Cucumber execution. All the results would end up in the same report.What I'm thinking is that the configuration of the various environments would be done in a configuration file. Configuration would be written in JSON or TOML [1]. See the example [2].If we're introducing a configuration file, we might as well take the opportunity to add some more to it, like command line options.You'd specify it with --config path/to/config.{json|toml}. For Cucumber-Ruby this would replace cucumber.yml. We also have a related ticket for this [3].WDYT?I think I'd like to see a concrete PR to get an idea of how this would work and whether there are any alternatives.
FWIW, we're planning to clean up the configuration in Cucumber Ruby for 2.0, and that might involve replacing or at least deprecating Cucumber.yml, to replace it with something that directly configures Cucumber rather than just configuring CLI argument strings. So that might help / be relevant.
From my experience this would be very helpful,
We have been dealing with this too, in our framework we had to create yml files per environment so we could change data used in assertions depending on the environment.So it would be nice that this configuration file whether its json, toml or yml, could grow as desired so we could link data to those configurations. For example:{ "options": { "glue": "classpath:com/company/app/stepdefs", "format": [ "pretty", "json:target/cucumber.json" ] }, "environments": { "firefox": { "driver": "org.openqa.selenium.firefox.FirefoxDriver" }, "chrome": { "driver": "org.openqa.selenium.chrome.ChromeDriver" } }, "contexts": { "prod": { "hostname": "prod.site.com", "propertyX": "expected_value_Y" }, "integration": { "hostname": "mock.site.com", "propertyX": "expected_value_Z" } } }
--
-- 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.
Aslak, Is there a timeline for this being built
and is there documentation to achieve the same result (multiple browsers) in the meantime? Either with maven or something else?
I kind-off lost from this big thread so what should be doing to run the same scenario multiple times with in one one Cucumber execution
Thanks,
-Sasha