Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
FitNesseRoot.files.testResults.RestFixtureTests.LetTestsV2.20160329012238_2_1_0_0.xml Maven / Gradle / Ivy
<?xml version="1.0"?>
<testResults>
<FitNesseVersion>v20151230</FitNesseVersion>
<rootPath>RestFixtureTests.LetTestsV2</rootPath>
<result>
<counts>
<right>14</right>
<wrong>0</wrong>
<ignores>0</ignores>
<exceptions>0</exceptions>
</counts>
<date>2016-03-29T01:22:39+01:00</date>
<runTimeInMillis>420</runTimeInMillis>
<content></content>
<relativePageName>SuiteSetUp</relativePageName>
<instructions>
<instructionResult>
<instruction>{id='import_0_0', instruction='import', path='smartrics.rest.fitnesse.fixture'}</instruction>
<slimResult>pass(smartrics.rest.fitnesse.fixture)</slimResult>
<expectation>
<status>pass</status>
<instructionId>import_0_0</instructionId>
<col>0</col>
<row>1</row>
<type>ImportExpectation</type>
<evaluationMessage>smartrics.rest.fitnesse.fixture</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='import_0_1', instruction='import', path='smartrics.rest.test.fitnesse.fixture'}</instruction>
<slimResult>pass(smartrics.rest.test.fitnesse.fixture)</slimResult>
<expectation>
<status>pass</status>
<instructionId>import_0_1</instructionId>
<col>0</col>
<row>2</row>
<type>ImportExpectation</type>
<evaluationMessage>smartrics.rest.test.fitnesse.fixture</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='scriptTable_1_0', instruction='make', instanceName='scriptTableActor', className='HttpServerFixture', args=[]}</instruction>
<slimResult>pass(Http Server Fixture)</slimResult>
<expectation>
<status>pass</status>
<instructionId>scriptTable_1_0</instructionId>
<col>1</col>
<row>0</row>
<type>ConstructionExpectation</type>
<evaluationMessage>Http Server Fixture</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='scriptTable_1_1', instruction='call', instanceName='scriptTableActor', methodName='isStarted', args=[]}</instruction>
<slimResult>pass(false)</slimResult>
<expectation>
<status>pass</status>
<instructionId>scriptTable_1_1</instructionId>
<col>2</col>
<row>1</row>
<type>ReturnedValueExpectation</type>
<evaluationMessage>false</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='scriptTable_1_2', instruction='call', instanceName='scriptTableActor', methodName='startServer', args=[9876]}</instruction>
<slimResult></slimResult>
<expectation>
<instructionId>scriptTable_1_2</instructionId>
<col>0</col>
<row>2</row>
<type>ScriptActionExpectation</type>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='scriptTable_1_3', instruction='call', instanceName='scriptTableActor', methodName='isStarted', args=[]}</instruction>
<slimResult>pass(true)</slimResult>
<expectation>
<status>pass</status>
<instructionId>scriptTable_1_3</instructionId>
<col>2</col>
<row>3</row>
<type>ReturnedValueExpectation</type>
<evaluationMessage>true</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='tableTable_2_0', instruction='make', instanceName='tableTable_2', className='RestFixtureConfig', args=[]}</instruction>
<slimResult>pass(Table: Rest Fixture Config)</slimResult>
<expectation>
<status>pass</status>
<instructionId>tableTable_2_0</instructionId>
<col>0</col>
<row>0</row>
<type>ConstructionExpectation</type>
<evaluationMessage>Table: Rest Fixture Config</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='tableTable_2_1', instruction='call', instanceName='tableTable_2', methodName='doTable', args=[[[http.basicauth.username, foo], [http.basicauth.password, bar], [http.client.connection.timeout, 5000], [http.client.use.new.http.uri.factory, false], [restfixture.display.absolute.url.in.full, true], [restfixture.display.actual.on.right, true], [restfixture.display.toggle.for.cells.larger.than, 200], [restfixture.default.headers, defHeader : 1
anotherDefHeader : 2
], [restfixture.xml.namespace.context, ns1alias=http://smartrics/ns1
defalias=http://smartrics/defns], [restfixture.content.default.charset, UTF-8], [restfixture.content.handlers.map, application/xml=XML
application/json=JSON
text/plain=TEXT
default=XML
application/x-javascript=JS
]]]}</instruction>
<slimResult>pass()</slimResult>
<expectation>
<status>pass</status>
<instructionId>tableTable_2_1</instructionId>
<type>TableTableExpectation</type>
</expectation>
</instructionResult>
</instructions>
</result>
<result>
<counts>
<right>19</right>
<wrong>2</wrong>
<ignores>0</ignores>
<exceptions>0</exceptions>
</counts>
<date>2016-03-29T01:22:39+01:00</date>
<runTimeInMillis>433</runTimeInMillis>
<content></content>
<relativePageName>LetTestsV2</relativePageName>
<instructions>
<instructionResult>
<instruction>{id='scriptTable_0_0', instruction='make', instanceName='scriptTableActor', className='smartrics.rest.test.fitnesse.fixture.HttpServerFixture', args=[]}</instruction>
<slimResult>pass(smartrics.rest.test.fitnesse.fixture.HttpServerFixture)</slimResult>
<expectation>
<status>pass</status>
<instructionId>scriptTable_0_0</instructionId>
<col>1</col>
<row>0</row>
<type>ConstructionExpectation</type>
<evaluationMessage>smartrics.rest.test.fitnesse.fixture.HttpServerFixture</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='scriptTable_0_1', instruction='call', instanceName='scriptTableActor', methodName='isStarted', args=[]}</instruction>
<slimResult>pass(true)</slimResult>
<expectation>
<status>pass</status>
<instructionId>scriptTable_0_1</instructionId>
<col>2</col>
<row>1</row>
<type>ReturnedValueExpectation</type>
<evaluationMessage>true</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='scriptTable_0_2', instruction='call', instanceName='scriptTableActor', methodName='resetResourcesDatabase', args=[]}</instruction>
<slimResult>pass()</slimResult>
<expectation>
<status>pass</status>
<instructionId>scriptTable_0_2</instructionId>
<col>0</col>
<row>2</row>
<type>ScriptActionExpectation</type>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='tableTable_1_0', instruction='make', instanceName='tableTable_1', className='RestFixture', args=[<a href="http://localhost:9876">http://localhost:9876</a>]}</instruction>
<slimResult>pass(Table: Rest Fixture)</slimResult>
<expectation>
<status>pass</status>
<instructionId>tableTable_1_0</instructionId>
<col>0</col>
<row>0</row>
<type>ConstructionExpectation</type>
<evaluationMessage>Table: Rest Fixture</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='tableTable_1_1', instruction='call', instanceName='tableTable_1', methodName='doTable', args=[[[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,
json = {
"widget": {
"debug": "on",
"window": {
"title": "Sample Konfabulator Widget",
"name": "main_window",
"width": 500,
"height": 500
},
"image": {
"src": "Images/Sun.png",
"name": "sun1",
"hOffset": 250,
"vOffset": 250,
"alignment": "center"
},
"text": {
"data": "Click Here",
"size": 36,
"style": "bold",
"name": "text1",
"hOffset": 250,
"vOffset": 100,
"alignment": "center",
"onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;"
}
}
};
json.widget.image.src
, Images/Sun.png]]]}</instruction>
<slimResult>pass()</slimResult>
<expectation>
<status>pass</status>
<instructionId>tableTable_1_1</instructionId>
<type>TableTableExpectation</type>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='tableTable_2_0', instruction='make', instanceName='tableTable_2', className='RestFixture', args=[<a href="http://localhost:9876">http://localhost:9876</a>]}</instruction>
<slimResult>pass(Table: Rest Fixture)</slimResult>
<expectation>
<status>pass</status>
<instructionId>tableTable_2_0</instructionId>
<col>0</col>
<row>0</row>
<type>ConstructionExpectation</type>
<evaluationMessage>Table: Rest Fixture</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='tableTable_2_1', instruction='call', instanceName='tableTable_2', methodName='doTable', args=[[[setBody, <resource><name>Bill</name><data>Some data on Bill</data></resource>], [POST, /resources/, 201, , no-body], [let, id, header, Location:/resources/(.+), ], [let, id_string, js, 'The id is: ' + symbols.get('id'), The id is: %id%]]]}</instruction>
<slimResult>pass()</slimResult>
<expectation>
<status>pass</status>
<instructionId>tableTable_2_1</instructionId>
<type>TableTableExpectation</type>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='tableTable_3_0', instruction='make', instanceName='tableTable_3', className='RestFixture', args=[<a href="http://localhost:9876">http://localhost:9876</a>]}</instruction>
<slimResult>pass(Table: Rest Fixture)</slimResult>
<expectation>
<status>pass</status>
<instructionId>tableTable_3_0</instructionId>
<col>0</col>
<row>0</row>
<type>ConstructionExpectation</type>
<evaluationMessage>Table: Rest Fixture</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='tableTable_3_1', instruction='call', instanceName='tableTable_3', methodName='doTable', args=[[[GET, /resources/1, 200, , ], [let, body_value, js, response.body, ], [setBody, <resource><name>Bill</name><data>Some data on Bill</data></resource>], [POST, /resources/, 201, , no-body], [let, status_code_value, js, response.statusCode, ], [let, status_text_value, js, response.statusText, ], [let, c_len, js, response.header0('Content-Length'), 0], [let, loc_again, js, response.header('Location', 0), ], [let, h_size, js, response.headerListSize('Location'), 1], [let, all_h_size, js, response.headersSize(), ]]]}</instruction>
<slimResult>pass()</slimResult>
<expectation>
<status>pass</status>
<instructionId>tableTable_3_1</instructionId>
<type>TableTableExpectation</type>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='tableTable_4_0', instruction='make', instanceName='tableTable_4', className='RestFixture', args=[<a href="http://localhost:9876">http://localhost:9876</a>]}</instruction>
<slimResult>pass(Table: Rest Fixture)</slimResult>
<expectation>
<status>pass</status>
<instructionId>tableTable_4_0</instructionId>
<col>0</col>
<row>0</row>
<type>ConstructionExpectation</type>
<evaluationMessage>Table: Rest Fixture</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='tableTable_4_1', instruction='call', instanceName='tableTable_4', methodName='doTable', args=[[[GET, /resources/1.json, 200, ,
jsonbody.name=="Bill" && jsobody.data=="foogazy"
], [let, body_value, js, response.jsonbody, ], [let, body_value, js, response.jsonbody.resource.name, a funky name]]]}</instruction>
<slimResult>fail()</slimResult>
<expectation>
<status>fail</status>
<instructionId>tableTable_4_1</instructionId>
<type>TableTableExpectation</type>
</expectation>
</instructionResult>
</instructions>
</result>
<result>
<counts>
<right>2</right>
<wrong>0</wrong>
<ignores>0</ignores>
<exceptions>0</exceptions>
</counts>
<date>2016-03-29T01:22:40+01:00</date>
<runTimeInMillis>10</runTimeInMillis>
<content><br/><span class="meta">variable defined: ns1=!-http://smartrics/ns1-!</span>
<br/><span class="meta">variable defined: defns=!-http://smartrics/defns-!</span>
<br/><br/><table>
<tr class="slimRowTitle">
<td>Import</td>
</tr>
<tr class="slimRowColor0">
<td><span class="pass">smartrics.rest.fitnesse.fixture</span></td>
</tr>
<tr class="slimRowColor1">
<td><span class="pass">smartrics.rest.test.fitnesse.fixture</span></td>
</tr>
</table>
<br/><table>
<tr class="slimRowTitle">
<td>script</td>
<td colspan="2"><span class="pass">Http Server Fixture</span></td>
</tr>
<tr class="slimRowColor0">
<td>check</td>
<td>is started</td>
<td><span class="pass">false</span></td>
</tr>
<tr class="slimRowColor3">
<td>start server</td>
<td colspan="2">9876</td>
</tr>
<tr class="slimRowColor0">
<td>check</td>
<td>is started</td>
<td><span class="pass">true</span></td>
</tr>
</table>
<br/><div class="collapsible"><ul><li><a href='#' class='expandall'>Expand</a></li><li><a href='#' class='collapseall'>Collapse</a></li></ul>
<p class="title">Configure the <a href="RestFixture">.RestFixture</a> with named configuration table of key value pairs</p>
<div>Read more about .RestFixtureConfig<a title="create page" href="RestFixtureConfig?edit&amp;nonExistent=true">[?]</a><br/></div>
</div>
<table>
<tr class="slimRowTitle">
<td colspan="2"><span class="pass">Table: Rest Fixture Config</span></td>
</tr>
<tr class="slimRowColor0">
<td>http.basicauth.username</td>
<td><span class="pass">foo</span></td>
</tr>
<tr class="slimRowColor1">
<td>http.basicauth.password</td>
<td><span class="pass">bar</span></td>
</tr>
<tr class="slimRowColor0">
<td>http.client.connection.timeout</td>
<td><span class="pass">5000</span></td>
</tr>
<tr class="slimRowColor1">
<td>http.client.use.new.http.uri.factory</td>
<td><span class="pass">false</span></td>
</tr>
<tr class="slimRowColor0">
<td>restfixture.display.absolute.url.in.full</td>
<td><span class="pass">true</span></td>
</tr>
<tr class="slimRowColor1">
<td>restfixture.display.actual.on.right</td>
<td><span class="pass">true</span></td>
</tr>
<tr class="slimRowColor0">
<td>restfixture.display.toggle.for.cells.larger.than</td>
<td><span class="pass">200</span></td>
</tr>
<tr class="slimRowColor1">
<td>restfixture.default.headers</td>
<td><span class="pass">defHeader&amp;nbsp;:&amp;nbsp;1&lt;br/&gt;anotherDefHeader&amp;nbsp;:&amp;nbsp;2&lt;br/&gt;</span></td>
</tr>
<tr class="slimRowColor0">
<td>restfixture.xml.namespace.context</td>
<td><span class="pass">ns1alias=http://smartrics/ns1&amp;nbsp;&lt;br/&gt;&amp;nbsp;defalias=http://smartrics/defns</span></td>
</tr>
<tr class="slimRowColor1">
<td>restfixture.content.default.charset</td>
<td><span class="pass">UTF-8</span></td>
</tr>
<tr class="slimRowColor0">
<td>restfixture.content.handlers.map</td>
<td><span class="pass">application/xml=XML&lt;br/&gt;application/json=JSON&lt;br/&gt;text/plain=TEXT&lt;br/&gt;default=XML&lt;br/&gt;application/x-javascript=JS&lt;br/&gt;</span></td>
</tr>
</table>
<div class="collapsible closed"><ul><li><a href='#' class='expandall'>Expand</a></li><li><a href='#' class='collapseall'>Collapse</a></li></ul>
<p class="title">Included page: <a href="RestFixtureTests.SetUp">.RestFixtureTests.SetUp</a> <a href="RestFixtureTests.SetUp?edit&amp;redirectToReferer=true&amp;redirectAction=" class="edit">(edit)</a></p>
<div><table>
<tr class="slimRowTitle">
<td>script</td>
<td colspan="2"><span class="pass">smartrics.rest.test.fitnesse.fixture.HttpServerFixture</span></td>
</tr>
<tr class="slimRowColor0">
<td>check</td>
<td>is started</td>
<td><span class="pass">true</span></td>
</tr>
<tr class="slimRowColor9">
<td colspan="3"><span class="pass">reset resources database</span></td>
</tr>
</table>
</div>
</div>
<br/>LET can use now the full power of JavaScript to extract data from the last response parts. The additions<br/>to support the new JavaScript extensions will not break the existing <a href="RestFixture">.RestFixture</a>. API.<br/><br/>The JavaScript extensions can be used to process more effectively JSON <i>Content-Type</i>s.<br/><br/><i>LET can access the Fitnesse Symbols map to extract data previously stored</i><br/><br/>If the context of the let context is <i>js</i> the expression is evaluated as a javascript string. The value assigned<br/>to the let label is the result of the evaluation of the content in the expression cell.<br/><br/>For example:<br/><br/><table>
<tr class="slimRowTitle">
<td><span class="pass">Table: Rest Fixture</span></td>
<td colspan="4"><a href="http://localhost:9876">http://localhost:9876</a></td>
</tr>
<tr class="slimRowColor0">
<td>let</td>
<td>message</td>
<td>js</td>
<td><div>'Hello,&nbsp;World!'</div></td>
<td><span class="pass"><div>Hello,&nbsp;World!</div></span></td>
</tr>
<tr class="slimRowColor1">
<td>let</td>
<td>sum</td>
<td>js</td>
<td><div>'2&nbsp;+&nbsp;5&nbsp;=&nbsp;'&nbsp;+&nbsp;(2&nbsp;+&nbsp;5)</div></td>
<td><span class="pass"><div>2&nbsp;+&nbsp;5&nbsp;=&nbsp;7</div></span></td>
</tr>
<tr class="slimRowColor0">
<td>let</td>
<td>two_expressions</td>
<td>js</td>
<td><div>a=1;<br/>'a&nbsp;is&nbsp;'&nbsp;+&nbsp;a</div></td>
<td><span class="pass"><div>a&nbsp;is&nbsp;1</div></span></td>
</tr>
<tr class="slimRowColor1">
<td>let</td>
<td>json_expr</td>
<td>js</td>
<td><div><br/>json&nbsp;=&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;"widget":&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"debug":&nbsp;"on",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"window":&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"title":&nbsp;"Sample&nbsp;Konfabulator&nbsp;Widget",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"name":&nbsp;"main_window",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"width":&nbsp;500,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"height":&nbsp;500<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"image":&nbsp;{&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"src":&nbsp;"Images/Sun.png",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"name":&nbsp;"sun1",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"hOffset":&nbsp;250,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"vOffset":&nbsp;250,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"alignment":&nbsp;"center"<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"text":&nbsp;{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"data":&nbsp;"Click&nbsp;Here",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"size":&nbsp;36,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"style":&nbsp;"bold",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"name":&nbsp;"text1",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"hOffset":&nbsp;250,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"vOffset":&nbsp;100,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"alignment":&nbsp;"center",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"onMouseUp":&nbsp;"sun1.opacity&nbsp;=&nbsp;(sun1.opacity&nbsp;/&nbsp;100)&nbsp;*&nbsp;90;"<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;&nbsp;}<br/>};<br/>json.widget.image.src<br/></div></td>
<td><span class="pass"><div>Images/Sun.png</div></span></td>
</tr>
</table>
<br/>(Example courtesy of <a href="http://json.org/example.html)">http://json.org/example.html)</a><br/><br/>It's also possible to access the FitNesse symbols map. The scope where expression is evaluated contains the <br/>'symbols' object <br/><br/><table>
<tr class="slimRowTitle">
<td><span class="pass">Table: Rest Fixture</span></td>
<td colspan="4"><a href="http://localhost:9876">http://localhost:9876</a></td>
</tr>
<tr class="slimRowColor0">
<td>setBody</td>
<td colspan="4">&lt;resource&gt;&lt;name&gt;Bill&lt;/name&gt;&lt;data&gt;Some data on Bill&lt;/data&gt;&lt;/resource&gt;</td>
</tr>
<tr class="slimRowColor1">
<td>POST</td>
<td><div><a href='http://localhost:9876/resources/'>/resources/</a></div></td>
<td><span class="pass"><div>201</div></span></td>
<td><div>Location&nbsp;:&nbsp;/resources/2<br/>Content-Length&nbsp;:&nbsp;0<br/>Server&nbsp;:&nbsp;Jetty(6.0.2)</div></td>
<td><span class="pass"><div>no-body</div></span></td>
</tr>
<tr class="slimRowColor0">
<td>let</td>
<td>id</td>
<td>header</td>
<td><div>Location:/resources/(.+)</div></td>
<td><div>2</div></td>
</tr>
<tr class="slimRowColor1">
<td>let</td>
<td>id_string</td>
<td>js</td>
<td><div>'The&nbsp;id&nbsp;is:&nbsp;'&nbsp;+&nbsp;symbols.get('id')</div></td>
<td><span class="pass"><div>The&nbsp;id&nbsp;is:&nbsp;2</div></span></td>
</tr>
</table>
<br/><br/>The scope also contains the 'response' object, populated with the data from the last Rest response executed<br/><br/>For example<br/><br/><table>
<tr class="slimRowTitle">
<td><span class="pass">Table: Rest Fixture</span></td>
<td colspan="4"><a href="http://localhost:9876">http://localhost:9876</a></td>
</tr>
<tr class="slimRowColor0">
<td>GET</td>
<td><div><a href='http://localhost:9876/resources/1'>/resources/1</a></div></td>
<td><span class="pass"><div>200</div></span></td>
<td><div>Set-Cookie&nbsp;:&nbsp;JID="ABC.${a.y}";<br/>Content-Type&nbsp;:&nbsp;application/xml;charset=ISO-8859-1<br/>Content-Length&nbsp;:&nbsp;77<br/>Server&nbsp;:&nbsp;Jetty(6.0.2)</div></td>
<td><div>{&nbsp;"resource"&nbsp;:&nbsp;{&nbsp;"name"&nbsp;:&nbsp;"a&nbsp;funky&nbsp;name",&nbsp;"data"&nbsp;:&nbsp;"an&nbsp;important&nbsp;message"&nbsp;}&nbsp;}</div></td>
</tr>
<tr class="slimRowColor1">
<td>let</td>
<td>body_value</td>
<td>js</td>
<td><div>response.body</div></td>
<td><div>{&nbsp;"resource"&nbsp;:&nbsp;{&nbsp;"name"&nbsp;:&nbsp;"a&nbsp;funky&nbsp;name",&nbsp;"data"&nbsp;:&nbsp;"an&nbsp;important&nbsp;message"&nbsp;}&nbsp;}</div></td>
</tr>
<tr class="slimRowColor0">
<td>setBody</td>
<td colspan="4">&lt;resource&gt;&lt;name&gt;Bill&lt;/name&gt;&lt;data&gt;Some data on Bill&lt;/data&gt;&lt;/resource&gt;</td>
</tr>
<tr class="slimRowColor1">
<td>POST</td>
<td><div><a href='http://localhost:9876/resources/'>/resources/</a></div></td>
<td><span class="pass"><div>201</div></span></td>
<td><div>Location&nbsp;:&nbsp;/resources/3<br/>Content-Length&nbsp;:&nbsp;0<br/>Server&nbsp;:&nbsp;Jetty(6.0.2)</div></td>
<td><span class="pass"><div>no-body</div></span></td>
</tr>
<tr class="slimRowColor0">
<td>let</td>
<td>status_code_value</td>
<td>js</td>
<td><div>response.statusCode</div></td>
<td><div>201</div></td>
</tr>
<tr class="slimRowColor1">
<td>let</td>
<td>status_text_value</td>
<td>js</td>
<td><div>response.statusText</div></td>
<td><div>Created</div></td>
</tr>
<tr class="slimRowColor0">
<td>let</td>
<td>c_len</td>
<td>js</td>
<td><div>response.header0('Content-Length')</div></td>
<td><span class="pass"><div>0</div></span></td>
</tr>
<tr class="slimRowColor1">
<td>let</td>
<td>loc_again</td>
<td>js</td>
<td><div>response.header('Location',&nbsp;0)</div></td>
<td><div>/resources/3</div></td>
</tr>
<tr class="slimRowColor0">
<td>let</td>
<td>h_size</td>
<td>js</td>
<td><div>response.headerListSize('Location')</div></td>
<td><span class="pass"><div>1</div></span></td>
</tr>
<tr class="slimRowColor1">
<td>let</td>
<td>all_h_size</td>
<td>js</td>
<td><div>response.headersSize()</div></td>
<td><div>3</div></td>
</tr>
</table>
<br/>A particoular case is when the response is JSON (Content-Type : application/json). In such case, the property <b>jsonbody</b><br/>contains the JSON object that can be accessed using the dot notation. For example<br/><br/><table>
<tr class="slimRowTitle">
<td><span class="pass">Table: Rest Fixture</span></td>
<td colspan="4"><a href="http://localhost:9876">http://localhost:9876</a></td>
</tr>
<tr class="slimRowColor0">
<td>GET</td>
<td><div><a href='http://localhost:9876/resources/1.json'>/resources/1.json</a></div></td>
<td><span class="pass"><div>200</div></span></td>
<td><div>Set-Cookie&nbsp;:&nbsp;JID="ABC.${a.y}";<br/>Content-Type&nbsp;:&nbsp;application/json;charset=ISO-8859-1<br/>Content-Length&nbsp;:&nbsp;77<br/>Server&nbsp;:&nbsp;Jetty(6.0.2)</div></td>
<td><span class="fail"><div><br/>jsonbody.name=="Bill"&nbsp;&&&nbsp;jsobody.data=="foogazy"<br/><br/><i><span class='fit_label'>expected</span></i><hr/><br/>{&nbsp;"resource"&nbsp;:&nbsp;{&nbsp;"name"&nbsp;:&nbsp;"a&nbsp;funky&nbsp;name",&nbsp;"data"&nbsp;:&nbsp;"an&nbsp;important&nbsp;message"&nbsp;}&nbsp;}<br/><i><span class='fit_label'>actual</span></i><hr/><br/>not&nbsp;found:&nbsp;'jsonbody.name=="Bill"&nbsp;&&&nbsp;jsobody.data=="foogazy"'<br/><br/><i><span class='fit_label'>errors</span></i></div></span></td>
</tr>
<tr class="slimRowColor1">
<td>let</td>
<td>body_value</td>
<td>js</td>
<td><div>response.jsonbody</div></td>
<td><div>[object&nbsp;Object]</div></td>
</tr>
<tr class="slimRowColor0">
<td>let</td>
<td>body_value</td>
<td>js</td>
<td><div>response.jsonbody.resource.name</div></td>
<td><span class="pass"><div>a&nbsp;funky&nbsp;name</div></span></td>
</tr>
</table>
<br/><br/><table>
<tr class="slimRowTitle">
<td>script</td>
<td colspan="2"><span class="pass">smartrics.rest.test.fitnesse.fixture.HttpServerFixture</span></td>
</tr>
<tr class="slimRowColor0">
<td>check</td>
<td>is started</td>
<td><span class="pass">true</span></td>
</tr>
<tr class="slimRowColor9">
<td colspan="3">stop server</td>
</tr>
<tr class="slimRowColor0">
<td>check</td>
<td>is stopped</td>
<td><span class="pass">true</span></td>
</tr>
</table>
</content>
<relativePageName>SuiteTearDown</relativePageName>
<instructions>
<instructionResult>
<instruction>{id='scriptTable_0_0', instruction='make', instanceName='scriptTableActor', className='smartrics.rest.test.fitnesse.fixture.HttpServerFixture', args=[]}</instruction>
<slimResult>pass(smartrics.rest.test.fitnesse.fixture.HttpServerFixture)</slimResult>
<expectation>
<status>pass</status>
<instructionId>scriptTable_0_0</instructionId>
<col>1</col>
<row>0</row>
<type>ConstructionExpectation</type>
<evaluationMessage>smartrics.rest.test.fitnesse.fixture.HttpServerFixture</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='scriptTable_0_1', instruction='call', instanceName='scriptTableActor', methodName='isStarted', args=[]}</instruction>
<slimResult>pass(true)</slimResult>
<expectation>
<status>pass</status>
<instructionId>scriptTable_0_1</instructionId>
<col>2</col>
<row>1</row>
<type>ReturnedValueExpectation</type>
<evaluationMessage>true</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='scriptTable_0_2', instruction='call', instanceName='scriptTableActor', methodName='stopServer', args=[]}</instruction>
<slimResult></slimResult>
<expectation>
<instructionId>scriptTable_0_2</instructionId>
<col>0</col>
<row>2</row>
<type>ScriptActionExpectation</type>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='scriptTable_0_3', instruction='call', instanceName='scriptTableActor', methodName='isStopped', args=[]}</instruction>
<slimResult>pass(true)</slimResult>
<expectation>
<status>pass</status>
<instructionId>scriptTable_0_3</instructionId>
<col>2</col>
<row>3</row>
<type>ReturnedValueExpectation</type>
<evaluationMessage>true</evaluationMessage>
</expectation>
</instructionResult>
</instructions>
</result>
<executionLog>
<testSystem>slim:fitnesse.slim.SlimService</testSystem>
<command>"C:\Program Files\Java\jdk8\bin\java" -cp C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\fitnesse-20151230.jar;target/classes/;target/test-classes/;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\ant-1.7.0.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\ant-launcher-1.7.0.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\commons-codec-1.2.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\commons-collections-3.2.1.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\commons-httpclient-3.1.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\commons-lang-2.6.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\commons-logging-1.0.4.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\cos-05Nov2002.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\diffutils-1.3.0.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\fitnesse-20151230.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\hamcrest-all-1.3.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\hamcrest-core-1.1.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\htmlcleaner-2.2.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\htmllexer-2.1.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\htmlparser-2.1.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\jdom-1.1.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\jettison-1.3.2.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\jetty-6.0.2.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\jetty-util-6.0.2.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\json-20140107.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\junit-4.10.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\log4j-1.2.17.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\mockito-all-1.9.0.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\rhino-1.7R3.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\servlet-api-2.5-6.0.2.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\slf4j-api-1.7.13.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\slf4j-log4j12-1.6.6.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\smartrics-RestClient-2.1.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\smartrics-RestFixture-4.2-SNAPSHOT.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\stax-api-1.0.1.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\velocity-1.7.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\xmlpull-1.1.3.1.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\xpp3_min-1.1.4c.jar;C:\Users\702161900\Dev\smartrics\RestFixtureLiveDoc\target\dependencies\xstream-1.4.2.jar fitnesse.slim.SlimService 8086</command>
<exitCode>0</exitCode>
<stdOut>01:22:39,699 INFO [RestFixture] - ############ Detected FitNesse version: v20151230 ###########
</stdOut>
<stdErr></stdErr>
</executionLog>
<finalCounts>
<right>2</right>
<wrong>1</wrong>
<ignores>0</ignores>
<exceptions>0</exceptions>
</finalCounts>
<totalRunTimeInMillis>2455</totalRunTimeInMillis>
</testResults>