Cucumber-Ruby 4.0.0 has been released
This is the first stable Cucumber release of the 4.x series. It's the first stable release for 2 years. Upgrading from 3.x should not require any changes, but there are some deprecations (see below). We also have some exciting new features! Added new Gherkin syntax: Rules and Examples One of the most visible change in the new release is the support of the Gherkin 6+ syntax. This is still backward compatible with your existing features of course, but here are the changes introduced: the Rule keyword acts as a grouping of scenarios inside a feature the Scenario Outline keyword is not needed anymore when using Examples with a Scenario the Scenario keyword now has synonym: Example If you are familiar with example mapping, you will see how easy it is to translate your cards from an example mapping session into a feature file. support of the cucumber-messages protocol cucumber-messages is the new format that is used by Cucumber to represent the various information emitted during an execution. This library satisfies multiple interests: same output for all cucumber and related implementation (cucumber-ruby, cucumber-jvm, cucumber-jss, SpecFlow ...) it relies on protobuf, so it is fairly easy to generate a consumer in any language supported by protobuf. we have published libraries to consume this format for ruby, Java, JavaScript and C# it is easier to generate tools consuming this output To generate the new messages, you can use the message reporter. Example: bundle exec cucumber --format message sending results to a server You now have the option to send the results of the execution directly to a web server. You can achieve this by specifying an http or http URL to the --out parameter. Example: bundle exec cucumber --format messages --out "http://example.com/report-service" HTML reporter We've added a brand new HTML reporter in this release. Everything is embedded in a single file (no CSS or JS file), so you can easily share the generated page. Example: bundle exec cucumber --format html --out report.html Deprecated JSON formatter With the introduction of the message formatter, we have decided to deprecate the JSON formatter. It will be removed in the 5.0.0 release. After the removal, you will still have the possibility to export to JSON using the json-formatter which takes cucumber-messages as input. puts When using puts in your step definitions, the data you output is caught by cucumber and then processed by the formatter (for example, when using the json formatter, the data provided to puts will appear in the output field of the step). This solution is now deprecated in favor of the log method. In cucumber-ruby 5, calls to puts will not be caught by the formatter and the default Ruby behavior will be triggered. embed The embed method to add attachments is also deprecated in favor of the attach method. This is part of task to make the different implementations of cucumber more uniform.Solved6.1KViews2likes12CommentsWelcome to the Cucumber Open community
You have come to the right place for questions about Behaviour-Driven Development and Cucumber Open (the open source implementations of Cucumber). Please follow these guidelines: Keeping it as short as possible, only including the essential parts of source code, logs and error messages Say what Cucumber platform and version you are using (for example Cucumber-JVM 6.0.0.RC1) Ask the community instead of asking individuals directly as it puts unnecessary pressure on them and excludes others ASK YOUR CUCUMBERQUESTION Thanks for using Cucumber! 🥒🥒🥒2.7KViews0likes0Comments[academic study] how do OSS developers respond to such phenomena as partially or wrongly implemented
Hello, We're a team of Software Engineering researchers investigating technical debt. Technical debt refers to "not quite right code which we postpone making it right” (Cunningham) and this may often introduce a cost. More specifically, the aim of this study is to gather information on how open source developers respond to specific source code phenomena such as partially or wrongly implemented functionality. With the results of this study we aim to create a better understanding of how developers annotate issues in source code. These results will be used to support prioritisation of maintenance activities in software systems. The survey data will be collected, analyzed and stored so that research questions can be answered and the results can be published. Since the survey is anonymous, no personal information is collected. For the same reason we cannot modify or remove answers upon request. If you contribute code to this project you can help us out by filling out the following survey:https://forms.office.com/r/QmrtwiA321. The survey should take you at most 15 minutes. Thanks in advance, Alexander Serebrenik (Eindhoven U of Technology, NL) also on behalf of Nathan Cassee, Massimiliano Di Penta, Nicole Novielli and Fiorella Zampetti2.4KViews0likes0CommentsIs it possible to simulate failing omniauth request with cucumber?
I'm trying to get a cucumber test to follow the failure route in my sessions controller when making an omniauth request with invalid credentials: match 'auth/failure', :to => 'sessions#failure', :via => [:get, :post] But instead of doing that, it seems to return and start the register/login process (which then fails). I thought I could do this by setting up my features/support/env.rb as: Before('@omniauth_test5') do OmniAuth.config.test_mode = true Capybara.default_host = 'http://example.com' OmniAuth.config.mock_auth[:github] = :invalid_credentials Rails.application.env_config["omniauth.auth"] = OmniAuth.config.mock_auth[:github] end After('@omniauth_test5') do OmniAuth.config.test_mode = false OmniAuth.config.mock_auth[:github] = nil end But this is just failing later in my sessions create method I inserted this code as well, but I'm not entirely positive it's in the right place. OmniAuth.config.on_failure = Proc.new { |env| OmniAuth::FailureEndpoint.new(env).redirect_to_failure } I'm also finding it very difficult to find a reasonable place to put a stop for debugging. I realize that this isn't strictly a cucumber question, but I'm hoping that others in this community are familiar with how this can be done properly. THANKS!2.2KViews0likes5Commentsfeature is coming up nil in query.rb
I recently updated a bunch of gems including Chromedriver, cucumber, capybara, selenium-webdriver. Everything was working fine before. Now I get the following error. The token (feature is undefined).... undefined method `tags' for nil:NilClass (NoMethodError) ../.rvm/gems/ruby-2.3.0/gems/cucumber-gherkin-13.0.0/lib/gherkin/query.rb:19:in `update_feature' def update_feature(feature) store_nodes_location(feature.tags) feature.children.each do |child| update_rule(child.rule) if child.rule update_background(child.background) if child.background update_scenario(child.scenario) if child.scenario end end2KViews0likes5CommentsHaving logging statements go to cucumber logs "outside of step definitions"
Using Ruby 2.6.5 with cucumber 5.1.0 So in my `features/step_definitons` files, I have a number of "log('something')" lines. Some of the step_defintions called other required rb file, which can't use log(undefined) so they use puts Now, log works in the step definitions just fine. In my external code it calls, I have been using puts. This is all fine, but we have an automated testing system that does something like "cucumber --format message --out test_results" The trouble is, my external code that is using the puts doesn't go into that "--out test_results" file, it goes to the console of the tool that is running the automated tests. Is there some way I can get at that logging object that cucumber has inside the step definitions, the one I get when using "log" (NOTE: I used to use puts there too, but started getting that WARNing of deprecation to use puts instead)1.8KViews0likes0CommentsHow to read hashtag# in a scenrio when creating and test case
I am trying to compare/read from the database a value in a specific field for a test please se bellow. This is in eclipse and I am using cucumber method field value | RUBRIDTATKST | W0322#Rubrik59=59# | So when trying to write the value with hashtag everything that is after the hashtag gets marked out/excluded from the comparison. Is there any way around this so that I can see if the whole valueW0322#Rubrik59=59# is in the database?1.8KViews0likes1Comment