You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

4.0.0.md 3.6 kB

2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Cucumber-ruby 4.0.0 release notes
  2. This is the first stable Cucumber release of the 4.x series. It's the first stable release for 2 years.
  3. Upgrading from 3.x should not require any changes, but there are some deprecations (see below). We also have some exciting new features!
  4. ## Added
  5. ### new Gherkin syntax: Rules and Examples
  6. 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:
  7. - the `Rule` keyword acts as a grouping of scenarios inside a feature
  8. - the `Scenario Outline` keyword is not needed anymore when using `Examples` with a `Scenario``
  9. - the `Scenario` keyword now has synonym: `Example`
  10. If you are familiar with [example mapping](https://cucumber.io/docs/bdd/example-mapping/), you will see how easy it is to translate your cards from an example mapping session into a `feature` file.
  11. ### support of the cucumber-messages protocol
  12. [`cucumber-messages`](https://github.com/cucumber/cucumber/tree/master/messages#cucumber-messages) is the new format that is used by Cucumber to represent the various information emitted during an execution.
  13. This library satisfies multiple interests:
  14. - same output for all `cucumber` and related implementation (cucumber-ruby, cucumber-jvm, cucumber-jss, SpecFlow ...)
  15. - it relies on [`protobuf`](https://developers.google.com/protocol-buffers/), so it is fairly easy to generate a consumer in any language supported by `protobuf`.
  16. - we have published libraries to consume this format for [ruby](https://rubygems.org/gems/cucumber-messages), [Java](https://mvnrepository.com/artifact/io.cucumber/messages), [JavaScript](https://www.npmjs.com/package/@cucumber/messages) and [C#](https://www.nuget.org/packages/Cucumber.Messages/)
  17. - it is easier to generate tools consuming this output
  18. To generate the new messages, you can use the `message` reporter.
  19. Example: `bundle exec cucumber --format message`
  20. ### sending results to a server
  21. 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.
  22. Example: `bundle exec cucumber --format messages --out "http://example.com/report-service"`
  23. ### HTML reporter
  24. 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.
  25. Example: `bundle exec cucumber --format html --out report.html`
  26. ## Deprecated
  27. ### JSON formatter
  28. With the introduction of the `message` formatter, we have decided to deprecate the JSON formatter. It will be removed in the 6.0.0 release.
  29. After the removal, you will still have the possibility to export to JSON using the [`json-formatter`](https://github.com/cucumber/cucumber/tree/master/json-formatter#cucumber-json-formatter) which takes cucumber-messages as input.
  30. ### `puts`
  31. 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).
  32. 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.
  33. ### `embed`
  34. 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](https://github.com/cucumber/cucumber/issues/897).

No Description

Contributors (1)