cucumber / cucumber-ruby-wire Goto Github PK
View Code? Open in Web Editor NEWWire protocol plugin for Cucumber
License: MIT License
Wire protocol plugin for Cucumber
License: MIT License
Here's exception stack
โ cucumber -f html -o out.html
WARNING: # built-in usage of the wire protocol is deprecated and will be removed after version 8.0.0. See https://github.com/cucumber/cucumber-ruby/blob/main/UPGRADING.md#upgrading-to-710 for more info.
(Called from /Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-7.1.0/lib/cucumber/runtime.rb:77:in `run!')
undefined method `id' for #<Cucumber::Wire::StepDefinition:0x00007fa31abba548> (NoMethodError)
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-7.1.0/lib/cucumber/formatter/query/step_definitions_by_test_step.rb:34:in `on_step_activated'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-core-10.1.0/lib/cucumber/core/event_bus.rb:34:in `block in broadcast'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-core-10.1.0/lib/cucumber/core/event_bus.rb:34:in `each'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-core-10.1.0/lib/cucumber/core/event_bus.rb:34:in `broadcast'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-core-10.1.0/lib/cucumber/core/event_bus.rb:40:in `method_missing'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-7.1.0/lib/cucumber/configuration.rb:34:in `notify'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-7.1.0/lib/cucumber/filters/activate_steps.rb:53:in `result'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-7.1.0/lib/cucumber/filters/activate_steps.rb:37:in `find_match'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-7.1.0/lib/cucumber/filters/activate_steps.rb:33:in `attempt_to_activate'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-7.1.0/lib/cucumber/filters/activate_steps.rb:29:in `map'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-7.1.0/lib/cucumber/filters/activate_steps.rb:29:in `new_test_steps'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-7.1.0/lib/cucumber/filters/activate_steps.rb:23:in `test_case'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-7.1.0/lib/cucumber/filters/activate_steps.rb:12:in `test_case'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-core-10.1.0/lib/cucumber/core/test/case.rb:28:in `describe_to'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-7.1.0/lib/cucumber/filters/activate_steps.rb:12:in `test_case'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-core-10.1.0/lib/cucumber/core/test/case.rb:28:in `describe_to'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-core-10.1.0/lib/cucumber/core/test/filters/locations_filter.rb:18:in `block in done'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-core-10.1.0/lib/cucumber/core/test/filters/locations_filter.rb:17:in `each'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-core-10.1.0/lib/cucumber/core/test/filters/locations_filter.rb:17:in `done'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-core-10.1.0/lib/cucumber/core/filter.rb:62:in `done'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-core-10.1.0/lib/cucumber/core/test/filters/tag_filter.rb:18:in `done'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-core-10.1.0/lib/cucumber/core/compiler.rb:31:in `done'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-core-10.1.0/lib/cucumber/core/gherkin/parser.rb:46:in `done'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-core-10.1.0/lib/cucumber/core.rb:35:in `parse'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-core-10.1.0/lib/cucumber/core.rb:24:in `compile'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-7.1.0/lib/cucumber/runtime.rb:83:in `run!'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-7.1.0/lib/cucumber/cli/main.rb:29:in `execute!'
/Users/canmor/.rvm/gems/ruby-2.6.3/gems/cucumber-7.1.0/bin/cucumber:9:in `<top (required)>'
/Users/canmor/.rvm/gems/ruby-2.6.3/bin/cucumber:23:in `load'
/Users/canmor/.rvm/gems/ruby-2.6.3/bin/cucumber:23:in `<main>'
/Users/canmor/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval'
/Users/canmor/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>'
After some investigation, I found that the code throw exception here is requiring method id
of StepDefinition
:
But StepDefinition
in wire library did not define reader for id
:
After define a id
attr_reader in code above, it works.
Please investigate which library should be fix?
I know this is WIP, but would you mind to include the LICENSE file into gem? I am packaging this for Fedora and the Fedora packaging guidelines mandates the separate license file.
On master branch, Fedora 24, ruby 2.4.0, bundler 1.13.7
bundle exec rake unit_tests
is done successfully.
However
bundle exec rake acceptance_tests
...
+/home/jaruga/git/cucumber-ruby-wire/vendor/bundle/ruby/2.4.0/gems/diff-lcs-1.2.5/lib/diff/lcs/change.rb:117: warning: constant ::Fixnum is deprecated
...
Failing Scenarios:
cucumber features/table_diffing.feature:23 # Scenario: Invoke a step definition tries to diff the table and fails
cucumber features/table_diffing.feature:52 # Scenario: Invoke a step definition tries to diff the table and passes
cucumber features/table_diffing.feature:71 # Scenario: Invoke a step definition which successfully diffs a table but then fails
cucumber features/table_diffing.feature:98 # Scenario: Invoke a step definition which asks for an immediate diff that fails
21 scenarios (4 failed, 17 passed)
Maybe the reason is because of below issue. diff-lcs-1.2.5 outputs warnings on Ruby 2.4.
https://github.com/halostatue/diff-lcs/pull/36/files
cucumber --format json is working incorrectly skipping steps, when Background section is present ( but works correctly when Rule sections is present)
cucumber invoke side
cucumber --format json --tag "@demo01" [{"id":"demofeature","uri":"features/Demo.feature","keyword":"Feature","name":"DemoFeature","description":" As a development team\n we want to demonstrate the cpp step implementations","line":2,"tags":[{"name":"@Demo","line":1}],"elements":[{"id":"demofeature;wait-and-trace","keyword":"Scenario Outline","name":"Wait and trace","description":" This is a good weather scenario.","line":11,"type":"scenario","steps":[],"tags":[{"name":"@Demo","line":1},{"name":"@demo01","line":10}]}]}]
cucumber request handler side
` ./build/cucumber_wire_proxy/cucumber_test.cucumber_wire_proxy
2023-05-17T07:54:20.980834 CucumberWireProtocolServer connection accepted from: 127.0.0.1
2023-05-17T07:54:20.981011 ["step_matches",{"name_to_match":"I wait 1 seconds test"}]
[ "success", [ { "id":"0", "args":[ { "val":"1", "pos":7 } ], "source":"DemoSteps.cpp:26" } ] ]
2023-05-17T07:54:20.983639 ["step_matches",{"name_to_match":"I wait 5 seconds test"}]
[ "success", [ { "id":"0", "args":[ { "val":"5", "pos":7 } ], "source":"DemoSteps.cpp:26" } ] ] `
Same steps being processed as when a defualt format is being used or when the Rule section is present in the Feature
Using default format
`cucumber --tag "@demo01"
@demo
Feature: DemoFeature
As a development team
we want to demonstrate the cpp step implementations
Background: Test Background # features/Demo.feature:6
Background setup for demonstration
Given I wait 1 seconds test # DemoSteps.cpp:26
@demo01
Scenario Outline: Wait and trace # features/Demo.feature:11
This is a good weather scenario.
When I wait 5 seconds test # DemoSteps.cpp:26
1 scenario (1 passed)
2 steps (2 passed)
0m10.517s`
`
2023-05-17T08:07:58.085245 CucumberWireProtocolServer connection accepted from: 127.0.0.1
2023-05-17T08:07:58.085365 ["step_matches",{"name_to_match":"I wait 1 seconds test"}]
[ "success", [ { "id":"0", "args":[ { "val":"1", "pos":7 } ], "source":"DemoSteps.cpp:26" } ] ]
2023-05-17T08:07:58.087540 ["step_matches",{"name_to_match":"I wait 5 seconds test"}]
[ "success", [ { "id":"0", "args":[ { "val":"5", "pos":7 } ], "source":"DemoSteps.cpp:26" } ] ]
2023-05-17T08:07:58.166488 ["begin_scenario",{"tags":["Demo","demo01"]}]
[ "success", [ ] ]
2023-05-17T08:07:58.168553 ["invoke",{"id":"0","args":["1"]}]
2023-05-17T08:07:58.168649 Waiting for 1 seconds[ "success", [ ] ]
2023-05-17T08:07:59.173326 ["invoke",{"id":"0","args":["5"]}]
2023-05-17T08:07:59.173523 Waiting for 5 seconds[ "success", [ ] ]
2023-05-17T08:08:08.605159 ["end_scenario",{"tags":["Demo","demo01"]}]
[ "success", [ ] ]`
With feature file containing rule section
cucumber --format json --tag "@demo_b01" [{"id":"demofeature","uri":"features/DemoRule.feature","keyword":"Feature","name":"DemoFeature","description":" As a development team\n we want to demonstrate the cpp step implementations","line":2,"tags":[{"name":"@DemoRule","line":1}],"elements":[{"id":"demofeature;wait-and-trace","keyword":"Scenario Outline","name":"Wait and trace","description":" This is a good weather scenario.","line":14,"type":"scenario","steps":[{"keyword":"Given ","name":"I wait 1 seconds test","line":11,"match":{"location":"DemoSteps.cpp:26"},"result":{"status":"passed","duration":1005075700}},{"keyword":"When ","name":"I wait 3 seconds test","line":16,"match":{"location":"DemoSteps.cpp:26"},"result":{"status":"passed","duration":3003355200}}],"tags":[{"name":"@DemoRule","line":1},{"name":"@demo_b01","line":13}],"before":[{"match":{"location":"wire"},"result":{"status":"passed","duration":3498600}}],"after":[{"match":{"location":"wire"},"result":{"status":"passed","duration":2025100}}]}]}]
`root@9a49fcc40bc3:/workspaces/cucumber_test# ./build/cucumber_wire_proxy/cucumber_test.cucumber_wire_proxy
2023-05-17T07:57:15.068438 CucumberWireProtocolServer connection accepted from: 127.0.0.1
2023-05-17T07:57:15.068848 ["step_matches",{"name_to_match":"I wait 1 seconds test"}]
[ "success", [ { "id":"0", "args":[ { "val":"1", "pos":7 } ], "source":"DemoSteps.cpp:26" } ] ]
2023-05-17T07:57:15.071259 ["step_matches",{"name_to_match":"I wait 3 seconds test"}]
[ "success", [ { "id":"0", "args":[ { "val":"3", "pos":7 } ], "source":"DemoSteps.cpp:26" } ] ]
2023-05-17T07:57:15.150092 ["begin_scenario",{"tags":["DemoRule","demo_b01"]}]
[ "success", [ ] ]
2023-05-17T07:57:15.154718 ["invoke",{"id":"0","args":["1"]}]
2023-05-17T07:57:15.156274 Waiting for 1 seconds[ "success", [ ] ]
2023-05-17T07:57:16.160083 ["invoke",{"id":"0","args":["3"]}]
2023-05-17T07:57:16.160243 Waiting for 3 seconds[ "success", [ ] ]
2023-05-17T07:57:19.163339 ["end_scenario",{"tags":["DemoRule","demo_b01"]}]
[ "success", [ ] ]`
cucumber-ruby 7.1
cucumber-ruby-wire 6.2.1
cucumber-wire-proxy (in-house c++ implementation of the steps and cucumber request handler to be connected to)
You can use a repository with the setup
https://github.com/AleksKovalenko/cucumber-wire-test
This text was originally generated from a template, then edited by hand. You can modify the template here.
Feature features/snippets_message.feature
had to be modified in commit e7feefc due to a bug in Gherkin (gherkin#290).
Once it's fixed, we should be able to revert the file to use two spaces instead of \t
.
We should still be able to release the gem with this fix and get cucumber-ruby 4.0.0rc2
without being blocked by this issue.
Hi everyone,
I'm trying to figure out if the wire protocol supports the transfer of embeddings (screen captures...).
It seems it does not, but maybe I'm missing something.
Does it?
This is to conform with the naming standard used for other libraries such as cucumber-expressions-[ruby,java,javascript,etc]
.
The gem name should stay the same, just cucumber-wire
There ain't none...
Given the following scenario:
Scenario: Backslashes in step definitions
Given "\u20ac"
And "\\u20ac"
in the first case, u20ac
arrives from the wire, and in the second case \\u20ac
.
Tested with both cucumber-cpp and cucumber-tcl-wire (as they have different wire client implementations)
tested with Cucumber 2.1.0 on win32, will retest with newer cucumber
change "send_data_to_socket(packet.to_json)" to "send_data_to_socket(JSON.iconv("GBK", "UTF-8", packet.to_json))"
and
change "DataPacket.parse(raw_response)" to DataPacket.parse(JSON.iconv("UTF-8", "GBK", raw_response))"
e.g.
Given /a ruby step/ do
step "a step on the wire server"
end
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Location: renovate.json
Error type: Invalid JSON (parsing failed)
Message: Syntax error: expecting String near ], ignor
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.