LiveDoc - smartrics/RestFixture GitHub Wiki
Precompiled Libraries
variable defined: ns1=
variable defined: defns=
Import |
smartrics.rest.fitnesse.fixture |
smartrics.rest.test.fitnesse.fixture |
script |
Http Server Fixture |
|
check | is started |
false |
start server | 9876 | |
check | is started |
true |
Configure the RestFixture with named configuration table of key value pairs
Table: Rest Fixture Config |
|
http.client.connection.timeout |
5000 |
http.client.use.new.http.uri.factory |
false |
restfixture.display.actual.on.right |
true |
restfixture.display.toggle.for.cells.larger.than |
200 |
restfixture.default.headers |
defHeader : 1 |
restfixture.xml.namespace.context |
ns1alias=http://smartrics/ns1 |
restfixture.content.default.charset |
UTF-8 |
restfixture.content.handlers.map |
application/xml=XML |
Precompiled Libraries
Included page: .RestFixtureTests.SetUp (edit)
script |
smartrics.rest.test.fitnesse.fixture.HttpServerFixture |
|
check | is started |
true |
reset resources database |
In the interest of readability, cells with large content can be rendered with a toggle on/off button.
The minimum length in characters of the cell, in order to enable the toggle button, is specified with the property
restfixture.display.toggle.for.cells.larger.than
If the value of the property is negative the toggle button will not be rendered.
Currently only large HTTP response content cells (if the actual value is displayed) are enabled for toggling.
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/100 |
200 |
Content-Type : application/xml;charset=ISO-8859-1 Content-Length : 910 Server : Jetty(6.0.2) |
/resource/type[text()=‘large content’]
<resource>
<name>giant bob</name> <type>large content</type> <address> <street> Regent Street </street> <number> 12345 </number> </address> <data> <part id=‘0’> <source href=‘http://en.wikipedia.org/wiki/Inferno_(Dante)’ /> <content> Inferno (Italian for ‘Hell’) is the first part of Dante Alighieri’s 14th-century epic poem Divine Comedy. It is followed by Purgatorio and Paradiso. It is an allegory telling of the journey of Dante through what is largely the medieval concept of Hell, guided by the Roman poet Virgil. In the poem, Hell is depicted as nine circles of suffering located within the Earth. Allegorically, the Divine Comedy represents the journey of the soultowards God, with the Inferno describing the recognition and rejection of sin. </content> </part> </data> </resource>
|
Precompiled Libraries
Included page: .RestFixtureTests.SetUp (edit)
script |
smartrics.rest.test.fitnesse.fixture.HttpServerFixture |
|
check | is started |
true |
reset resources database |
Note
Table: Rest Fixture |
http://localhost:9876 | |||
DELETE | /resources/0 |
204 |
Server : Jetty(6.0.2) |
no-body |
GET | /resources/0 |
404 |
Content-Length : 0 Server : Jetty(6.0.2) |
no-body |
Precompiled Libraries
Included page: .RestFixtureTests.SetUp (edit)
script |
smartrics.rest.test.fitnesse.fixture.HttpServerFixture |
|
check | is started |
true |
reset resources database |
Rest requests with query string containing array parameters
To allow correct handling of array parameters a new configuration option must be set: http.client.use.new.http.uri.factory
Table: Rest Fixture Config |
withArrayParametersSupport |
http.client.use.new.http.uri.factory |
true |
Table: Rest Fixture |
http://localhost:9876 | withArrayParametersSupport | ||
GET | /resources/0?a0=2&a1=4 |
200 |
Query-String : a0=2&a1=4 Content-Type : application/xml;charset=ISO-8859-1 Content-Length : 183 Server : Jetty(6.0.2) |
<resource> <name>a funky name</name> <data>an important message</data> <nstag xmlns:ns1=‘http://smartrics/ns1’> <ns1:number>3</ns1:number> </nstag> </resource> |
Precompiled Libraries
Included page: .RestFixtureTests.SetUp (edit)
script |
smartrics.rest.test.fitnesse.fixture.HttpServerFixture |
|
check | is started |
true |
reset resources database |
Notes
The following cell indicate:
1) the expected return HTTP code,
2) a subset of headers – regular expressions are allowed
3) a list of XPaths to be executed in the body. Each XPath is run and it suceedes only if the result of the execution
returns at least one node
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/0 |
200 |
Content-Length : [\d]+
|
|
Absolute resource paths
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/0 |
200 |
Content-Length : [\d]+
|
|
A GET request properly handles query strings. In this example the stub resource echoes the query string in a Query-String header
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/0?param=echome&something=else&another=parameter |
200 |
Content-Length : [\d]+
|
|
Get a non existing resource should not find it
Note
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/20 |
404 |
Content-Length : 0
|
no-body |
GET | /resources/20.json |
404 |
Content-Length : 0
|
no-body |
XPaths and namespaces
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/0 |
200 |
Content-Length : [\d]+
|
|
Json
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/1.json |
200 |
Content-Type : application/json;charset=ISO-8859-1
|
|
Rest requests with query string containing array parameters
To allow correct handling of array parameters a new configuration option must be set: http.client.use.new.http.uri.factory
Table: Rest Fixture Config |
withArrayParametersSupport |
http.client.use.new.http.uri.factory |
true |
Table: Rest Fixture |
http://localhost:9876 | withArrayParametersSupport | ||
GET | /resources/0?a0=2&a1=4 |
200 |
Query-String : a0=2&a1=4 Content-Type : application/xml;charset=ISO-8859-1 Content-Length : 183 Server : Jetty(6.0.2) |
<resource> <name>a funky name</name> <data>an important message</data> <nstag xmlns:ns1=‘http://smartrics/ns1’> <ns1:number>3</ns1:number> </nstag> </resource> |
Follow redirects setting
restfixture.requests.follow.redirects
needs to be set (defaults to true)
Table: Rest Fixture Config |
withFollowRedirect |
restfixture.requests.follow.redirects |
false |
Table: Rest Fixture |
http://localhost:9876 | withFollowRedirect | ||
GET | /resources/redirect/0 |
301 |
Location: /resources/0
|
no-body |
Table: Rest Fixture Config |
withFollowRedirect |
restfixture.requests.follow.redirects |
true |
Table: Rest Fixture |
http://localhost:9876 | withFollowRedirect | ||
GET | /resources/redirect/0 |
200 |
Content-Type : application/xml;charset=ISO-8859-1 Content-Length : 183 Server : Jetty(6.0.2) |
<resource> <name>a funky name</name> <data>an important message</data> <nstag xmlns:ns1=‘http://smartrics/ns1’> <ns1:number>3</ns1:number> </nstag> </resource> |
Precompiled Libraries
Included page: .RestFixtureTests.SetUp (edit)
script |
smartrics.rest.test.fitnesse.fixture.HttpServerFixture |
|
check | is started |
true |
reset resources database |
Head requests should return no-body but the headers list should match that of the equivalent GET operation.
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/0 |
200 |
Content-Length : [\d+]
|
<resource> <name>a funky name</name> <data>an important message</data> <nstag xmlns:ns1=‘http://smartrics/ns1’> <ns1:number>3</ns1:number> </nstag> </resource> |
let | length | header | Content-Length:(.+) | 183 |
let | type | header | Content-Type:(.+) | application/xml;charset=ISO-8859-1 |
HEAD | /resources/0 |
200 |
Content-Length : %length%
|
no-body |
HEAD | /resources/0 |
200 |
Content-Type: %type%
|
no-body |
Precompiled Libraries
Included page: .RestFixtureTests.SetUp (edit)
script |
smartrics.rest.test.fitnesse.fixture.HttpServerFixture |
|
check | is started |
true |
reset resources database |
As of RestFixture Version 2, a javascript engine is embedded to allow expectations in Javascript on response body contents in JSON format.
XPaths and JSON
After a successful response is received with content type “application/json” the expectation cell in a RestFixture[?]
row is
interpreted as a string with Javascript and executed within the context of the response body.
Table: Rest Fixture |
http://localhost:9876 | |||
setBody | { “resource” : { “name” : “test post”, “data” : “some data” } } | |||
POST | /resources/ |
201 |
Location : /resources/2 Content-Length : 0 Server : Jetty(6.0.2) |
no-body |
let | id | header | Location:/resources/(.+) | 2 |
A variable <code>jsonbody</code> is defined holding the JSON in the response.
The test passes if the result of the evaluation of the cell is a boolean.
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/2.json |
200 |
Content-Type : application/json
|
|
It is possible to specify multiple assertions, one for each line.
The test passes if each line evaluates to true.
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/2.json |
200 |
Content-Type : application/json
|
|
let | content | js | response.body | { “resource” : { “name” : “test post”, “data” : “some data” } } |
Table: Rest Fixture |
http://localhost:9876 | |||
setBody |
%content%
|
|||
POST | /resources/ |
201 |
Location : /resources/3 Content-Length : 0 Server : Jetty(6.0.2) |
no-body |
let | id | header | Location:/resources/(.+) | 3 |
In some cases may be useful to force evaluation of the expectation cell as a javascript block.
By embedding the <code>/* javascript */</code> comment, the whole expectation cell will be parsed and evaluated entirely using the javascript interpreter.
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/3.json |
200 |
Content-Type : application/json
|
|
let | content | js | response.body | { “resource” : { “name” : “test post”, “data” : “some data” } } |
Precompiled Libraries
Included page: .RestFixtureTests.SetUp (edit)
script |
smartrics.rest.test.fitnesse.fixture.HttpServerFixture |
|
check | is started |
true |
reset resources database |
Usages of LET (See alsoPostTests
for more examples)
LET used to extract values from header, using regular expressions
Table: Rest Fixture |
http://localhost:9876 | |||
setBody |
<resource><name>Bill</name><data>Some data on Bill</data></resource>
|
|||
POST | /resources/ |
201 |
Location : /resources/2 Content-Length : 0 Server : Jetty(6.0.2) |
no-body |
let | id | header | Location:/resources/(.+) | 2 |
The regex is applied to each header. On the first match the first group is extracted and
assigned as value to the label
id.
Labels are global and can be shared across rest fixture instances.
LET used to extract values from XML body via XPath
Values are re-usable across instances of RestFixture
Here follows an usage of the previously extracted
id.
This example also shows how to use let to extract data from the XML body of a response using XPath.
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/2 |
200 |
Content-Type : application/xml;charset=ISO-8859-1 Content-Length : 68 Server : Jetty(6.0.2) |
|
let | name | body | /resource/name/text() | Bill |
…or from a JSON body
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/1.json |
200 |
Content-Type : application/json
|
|
let | name | body | /resource/name/text() | a funky name |
Note
new Variables().get(“labelname”);
LET resolves names from Fixture Symbol map if not found in the local map
LetTestActionFixture allows to get/set values in the Fixture Symbol map
script |
smartrics.rest.test.fitnesse.fixture.LetTestActionFixture |
symbolName | resType |
symbolValue | /resources |
Note
for the GET method below is defined as
%resType%/%id%
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/2 |
200 |
Content-Type : application/xml;charset=ISO-8859-1 Content-Length : 68 Server : Jetty(6.0.2) |
<resource><name>Bill</name><data>Some data on Bill</data></resource> |
let | theName | body | /resource/name/text() | Bill |
script |
smartrics.rest.test.fitnesse.fixture.LetTestActionFixture |
|
symbolName | theName | |
check | symbolValue |
Bill |
Other fixtures can set a value in the symbol map with
Fixture.setSymbol.
The RestFixture[?]
can then pick them up
This fixture sets
symbolName=/resources…
script |
smartrics.rest.test.fitnesse.fixture.LetTestActionFixture |
symbolName | aNameOfASymbol |
symbolValue | /resources |
… then the value is used by the RestFixture
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/2 |
200 |
Content-Type : application/xml;charset=ISO-8859-1 Content-Length : 68 Server : Jetty(6.0.2) |
<resource><name>Bill</name><data>Some data on Bill</data></resource> |
Precompiled Libraries
Included page: .RestFixtureTests.SetUp (edit)
script |
smartrics.rest.test.fitnesse.fixture.HttpServerFixture |
|
check | is started |
true |
reset resources database |
LET can use now the full power of JavaScript to extract data from the last response parts. The additions
to support the new JavaScript extensions will not break the existing RestFixture API.
The JavaScript extensions can be used to process more effectively JSON
Content-Types.
LET can access the Fitnesse Symbols map to extract data previously stored
If the context of the let context is
js
the expression is evaluated as a javascript string. The value assigned
to the let label is the result of the evaluation of the content in the expression cell.
For example:
Table: Rest Fixture |
http://localhost:9876 | |||
let | message | js | ‘Hello, World!’ |
Hello, World! |
let | sum | js | ‘2 + 5 = ’ (2 5) |
2 + 5 = 7 |
let | two_expressions | js | a=1; ‘a is ’ + a |
a is 1 |
let | json_expr | js |
|
Images/Sun.png |
(Example courtesy ofhttp://json.org/example.html)
It’s also possible to access the FitNesse symbols map. The scope where expression is evaluated contains the
‘symbols’ object
Table: Rest Fixture |
http://localhost:9876 | |||
setBody |
<resource><name>Bill</name><data>Some data on Bill</data></resource>
|
|||
POST | /resources/ |
201 |
Location : /resources/2 Content-Length : 0 Server : Jetty(6.0.2) |
no-body |
let | id | header | Location:/resources/(.+) | 2 |
let | id_string | js | ‘The id is: ’ + symbols.get(‘id’) |
The id is: 2 |
The scope also contains the ‘response’ object, populated with the data from the last Rest response executed
For example
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/1 |
200 |
Content-Type : application/xml;charset=ISO-8859-1 Content-Length : 77 Server : Jetty(6.0.2) |
{ “resource” : { “name” : “a funky name”, “data” : “an important message” } } |
let | body_value | js | response.body | { “resource” : { “name” : “a funky name”, “data” : “an important message” } } |
setBody |
<resource><name>Bill</name><data>Some data on Bill</data></resource>
|
|||
POST | /resources/ |
201 |
Location : /resources/3 Content-Length : 0 Server : Jetty(6.0.2) |
no-body |
let | status_code_value | js | response.statusCode | 201 |
let | status_text_value | js | response.statusText | Created |
let | c_len | js | response.header0(‘Content-Length’) |
0 |
let | loc_again | js | response.header(‘Location’, 0) | /resources/3 |
let | h_size | js | response.headerListSize(‘Location’) |
1 |
let | all_h_size | js | response.headersSize() | 3 |
A particoular case is when the response is JSON (Content-Type : application/json). In such case, the property
jsonbody
contains the JSON object that can be accessed using the dot notation. For example
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/1.json |
200 |
Content-Type : application/json;charset=ISO-8859-1 Content-Length : 77 Server : Jetty(6.0.2) |
{ “resource” : { “name” : “a funky name”, “data” : “an important message” } } |
let | body_value | js | response.jsonbody | [object Object] |
let | body_value | js | response.jsonbody.resource.name |
a funky name |
Precompiled Libraries
Included page: .RestFixtureTests.SetUp (edit)
script |
smartrics.rest.test.fitnesse.fixture.HttpServerFixture |
|
check | is started |
true |
reset resources database |
Options requests are supported too:
Table: Rest Fixture |
http://localhost:9876 | |||
OPTIONS | /resources/0 |
200 |
Allow:.+
|
no-body |
Precompiled Libraries
Included page: .RestFixtureTests.SetUp (edit)
script |
smartrics.rest.test.fitnesse.fixture.HttpServerFixture |
|
check | is started |
true |
reset resources database |
RestFixture uses three content handlers to parse and set expectations used to verify the behaviour of HTTP calls.
These are the handlers currently available:
-
XML
interprets the body as an xml string and allows XPath expressions as expectations on that content -
JSON
interprets the body as a JSON string and allows expectations to be written in JavaScript
[?]. -
TEXT
interprets the body as a string and allows regular expression expectations.
These are the defaults
- default=XML
- application/xml=XML
- application/json=JSON
- text/plain=TEXT
Note: unrecognised content types.
For example, XML handler is used for for content types of application/xml; hence XPaths can be used to set expectations:
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/0 |
200 |
Content-Type : application/xml;.+
|
|
Bespoke mapping can be defined in the config using the config key
restfixture.content.handlers.map
Table: Rest Fixture Config |
overridesContentHandlerConfig |
restfixture.content.handlers.map |
|
Table: Rest Fixture |
http://localhost:9876 | overridesContentHandlerConfig | ||
GET | /resources/0 |
200 |
Content-Type : application/xml;.+
|
<resource>[\s.]<name>a funky name</name>[\s\w\d<>/=\:’.]</resource>[\s]*
|
Precompiled Libraries
Included page: .RestFixtureTests.SetUp (edit)
script |
smartrics.rest.test.fitnesse.fixture.HttpServerFixture |
|
check | is started |
true |
reset resources database |
Posting an XML should create a resource
Note
Here you can see how
let
is used. The first cell is the
label
of the variable.
The follwoing cell indicates where to get the data from. That is either the
header
or the body of the last successful HTTP response
Then the expression to extract the value to be assigned to he variable. For
header
it has to be a regular expression, for body it
has to be an XPath whose execution must return a String node.
Table: Rest Fixture |
http://localhost:9876 | |||
setBody |
<resource><name>test post</name><data>some data</data></resource>
|
|||
POST | /resources |
201 |
Location : /resources/2 Content-Length : 0 Server : Jetty(6.0.2) |
no-body |
let | id | header | Location:/resources/(.+) | 2 |
Note
%id%
where the label ‘id’ is defined in the test above.
The test succeedes only if the resulting XPath match the XML used for the creation of the resource.
You can also put variables in the expected result
The subsequent
let
operation shows how to use XPaths in the body.
Label values can be accessed from code using
new Variables().get(“labelname”);
Note on fit.Fixture symbol map
fit.Fixture.getSymbol().
If a label starts with $, the $ is ignored.
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/2 |
200 |
Content-Type : application/xml;charset=ISO-8859-1 Content-Length : 65 Server : Jetty(6.0.2) |
|
let | name | body | /resource/name/text() | test post |
let | $symName | body | /resource/name/text() | test post |
Labels that are set to null are rendered using the default value for null, e.g. the string “null”
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/2 |
200 |
Content-Type : application/xml;charset=ISO-8859-1 Content-Length : 65 Server : Jetty(6.0.2) |
<resource><name>test post</name><data>some data</data></resource> |
let | thisIsNull | body | /resource/somewhereelse/text() | |
comment | this is null: ‘null’ |
Albeit, the value can be overridden
Table: Rest Fixture Config |
withBespokeNullRepresentation |
restfixture.null.value.representation |
|
Table: Rest Fixture |
http://localhost:9876 | withBespokeNullRepresentation | ||
GET | /resources/2 |
200 |
Content-Type : application/xml;charset=ISO-8859-1 Content-Length : 65 Server : Jetty(6.0.2) |
<resource><name>test post</name><data>some data</data></resource> |
let | thisIsNull | body | /resource/somewhereelse/text() | |
comment | this is null: ’’ |
Table: Rest Fixture Config |
withBespokeNullRepresentation |
restfixture.null.value.representation |
NIL |
Table: Rest Fixture |
http://localhost:9876 | withBespokeNullRepresentation | ||
GET | /resources/2 |
200 |
Content-Type : application/xml;charset=ISO-8859-1 Content-Length : 65 Server : Jetty(6.0.2) |
<resource><name>test post</name><data>some data</data></resource> |
let | thisIsNull | body | /resource/somewhereelse/text() | |
comment | this is null: ‘NIL’ |
Json
Variables may be substitued in the expected result
Table: Rest Fixture |
http://localhost:9876 | |||
setBody | { “resource” : { “name” : “test post”, “data” : “some data” } } | |||
POST | /resources/ |
201 |
Location : /resources/3 Content-Length : 0 Server : Jetty(6.0.2) |
no-body |
let | id | header | Location:/resources/(.+) | 3 |
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/3.json |
200 |
Content-Type : application/json
|
|
File uploads
script |
smartrics.rest.test.fitnesse.fixture.FileUtilFixture |
|
content | { “resource” : { “name” : “test post”, “data” : “some data” } } | |
name | target/live-docs-temp/tempfile | |
check | create |
true |
check | exists |
true |
Table: Rest Fixture |
http://localhost:9876 | |||
setMultipartFileName | target/live-docs-temp/tempfile | |||
POST | /resources/ |
200 |
Content-Type : text/plain; charset=ISO-8859-1 Transfer-Encoding : chunked Server : Jetty(6.0.2) |
file: { “resource” : { “name” : “test post”, “data” : “some data” } } |
Table: Rest Fixture |
http://localhost:9876 | |||
setMultipartFileName | target/live-docs-temp/tempfile | |||
setMultipartFileParameterName | abc123 | |||
POST | /resources/ |
200 |
Content-Type : text/plain; charset=ISO-8859-1 Transfer-Encoding : chunked Server : Jetty(6.0.2) |
abc123: { “resource” : { “name” : “test post”, “data” : “some data” } } |
Use simple file upload
Table: Rest Fixture |
http://localhost:9876 | |||
setFileName | target/live-docs-temp/tempfile | |||
POST | /resources/ |
200 |
Content-Type : text/plain; charset=ISO-8859-1 Transfer-Encoding : chunked Server : Jetty(6.0.2) |
{ “resource” : { “name” : “test post”, “data” : “some data” } } |
script |
smartrics.rest.test.fitnesse.fixture.FileUtilFixture |
|
name | target/live-docs-temp/tempfile | |
check | delete |
true |
check | exists |
false |
Other than the aforementioned content types you can emulate form POSTs.
Remember to escape the setBody content cell with
Table: Rest Fixture |
http://localhost:9876 | |||
setHeader | Content-Type : application/x-www-form-urlencoded;charset=UTF-8 | |||
setBody | name=test%20post&data=some%20data | |||
POST | /resources |
201 |
Location : /resources/4 Content-Length : 0 Server : Jetty(6.0.2) |
no-body |
let | id | header | Location:/resources/(.+) | 4 |
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/4 |
200 |
Content-Type : application/xml;charset=ISO-8859-1 Content-Length : 68 Server : Jetty(6.0.2) |
|
Header values can also be substituted with symbols previously defined:
Table: Rest Fixture |
http://localhost:9876 | |||
let | contenttype | const | application/x-www-form-urlencoded;charset=UTF-8 | application/x-www-form-urlencoded;charset=UTF-8 |
setHeader | Content-Type : application/x-www-form-urlencoded;charset=UTF-8 | |||
setBody | name=test%20post&data=some%20data | |||
POST | /resources |
201 |
Location : /resources/5 Content-Length : 0 Server : Jetty(6.0.2) |
no-body |
let | id | header | Location:/resources/(.+) | 5 |
Table: Rest Fixture |
http://localhost:9876 | |||
GET | /resources/5 |
200 |
Content-Type : application/xml;charset=ISO-8859-1 Content-Length : 68 Server : Jetty(6.0.2) |
|
Precompiled Libraries
Included page: .RestFixtureTests.SetUp (edit)
script |
smartrics.rest.test.fitnesse.fixture.HttpServerFixture |
|
check | is started |
true |
reset resources database |
Note
following PUT and GET can match it the response.
Table: Rest Fixture |
http://localhost:9876 | |||
setBody |
<resource><name>name being updated</name><data>data being updated</data></resource>
|
|||
setHeader | Echo-Header : echoed | |||
PUT | /resources/0 |
200 |
Echo-Header : echoed
|
no-body |
GET | /resources/0 |
200 |
Echo-Header : echoed
|
|
Precompiled Libraries
Included page: .RestFixtureTests.SetUp (edit)
script |
smartrics.rest.test.fitnesse.fixture.HttpServerFixture |
|
check | is started |
true |
reset resources database |
TRACE requests are supported too:
Table: Rest Fixture |
http://localhost:9876 | |||
TRACE | /resources/0 |
200 |
Content-Type : message/http
|
TRACE /resources/0 HTTP/1.1 anotherDefHeader: 2 defHeader: 1 User-Agent: Jakarta Commons-HttpClient/3.1 Host: localhost:9876 |
Precompiled Libraries
script |
smartrics.rest.test.fitnesse.fixture.HttpServerFixture |
|
check | is started |
true |
stop server | ||
check | is stopped |
true |