Included page: .RestFixtureTests.SetUp (edit)
| script | smartrics.rest.test.fitnesse.fixture.HttpServerFixture | |
| check | is started | true |
| reset resources database | ||
Issue #120 Render full URL for REST requests
When you execute a .RestFixture table only the path from the URL is currently rendered from column 2
Ideally we would like to see a full URL here
The behaviour of the formatter controlling how the cells in position 1 is determined by the
config property
restfixture.display.absolute.url.in.fullwhich by default is set to true.
In the following table (see source) the path to /resources/0 is
%proto%://localhost:9876/resources/0
and by default is should be rendered in full (the label 'proto' is assigned via let.)
| Table: Rest Fixture | http://localhost:9876 | |||
| let | proto | const | http |
http |
| HEAD | 200 |
Set-Cookie : JID="ABC.${a.y}"; Content-Type : application/xml;charset=ISO-8859-1 Content-Length : 183 Server : Jetty(6.0.2) |
no-body |
|
The config property is now set explicitly set to 'false'.
| Table: Rest Fixture Config | withRestFixtureAbsoluteUrlInFullSetToFalse |
| restfixture.display.absolute.url.in.full | false |
With the property set, each absolute URL is rendered correctly only showing the file part of the URL.
| Table: Rest Fixture | http://localhost:9876 | withRestFixtureAbsoluteUrlInFullSetToFalse | ||
| comment | the following URI should be NOT shown in full |
|||
| HEAD | 200 |
Set-Cookie : JID="ABC.${a.y}"; Content-Type : application/xml;charset=ISO-8859-1 Content-Length : 183 Server : Jetty(6.0.2) |
no-body |
|
| comment | the following URI should be NOT in full and it is correctly shown in relative |
|||
| HEAD | 200 |
Set-Cookie : JID="ABC.${a.y}"; Content-Type : application/xml;charset=ISO-8859-1 Content-Length : 183 Server : Jetty(6.0.2) |
no-body |
|
The property can also be set in the default config (see SuiteSetUp[?]), as such, taking effect in each fixture.