This repository was archived by the owner on Nov 16, 2018. It is now read-only.
forked from cucumber/cucumber-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Wire Protocol
dwhelan edited this page Aug 13, 2010
·
35 revisions
This page documents the details of the low-level \wire protocol that Cucumber uses to list and invoke steps in a remote process.
This protocol is in flux. Please see wire protocol for discussions around this emerging protocol.
|-- list_step_defintions --->| |<--------------------- ok --|
{
"version" : "1.0",
"list_step_definitions" : ""
}
{
"version" : "1.0",
"step_definitions": [
{ "id": "id1", "regexp": "regex1" },
{ "id": "id2", "regexp": "regex2" }
]
}
|-- invoke --------->|
|<------------- ok --|
OR
|<----- diff_table --|
|-- diff_response -->|
|<------------- ok --|
OR
|<---- step_failed --|
{
"version" : "1.0",
"invoke" : "id1",
"params" : [ "foo", "bar" ]
}
If the step is invoked successfully then an ‘ok’ response is returned:
{
"version" : "1.0",
"ok" : ""
}
OR If the step throws an exception then a ‘step_failed’ response is returned:
{
"version" : "1.0",
"step_failed" : {
"exception" : "some exception type",
"message" : "foo",
"backtrace" : "bar"
}
}
If the remote process cannot handle a request then it shall return a ‘failed’ response:
{
"version" : "1.0",
"failed" : {
"exception" : "some exception type",
"message" : "foo",
"backtrace" : "bar"
}
}