All Downloads are FREE. Search and download functionalities are using the official Maven repository.

FitNesseRoot.files.testResults.RestFixtureTests.OverrideContentHandlers.20160224235240_0_0_0_1.xml Maven / Gradle / Ivy

<?xml version="1.0"?>
<testResults>
  <FitNesseVersion>v20150424</FitNesseVersion>
  <rootPath>RestFixtureTests.OverrideContentHandlers</rootPath>
    <result>
    <counts>
      <right>0</right>
      <wrong>0</wrong>
      <ignores>0</ignores>
      <exceptions>9</exceptions>
    </counts>
   <runTimeInMillis>41</runTimeInMillis>
    <content>&lt;div class="collapsible closed"&gt;&lt;ul&gt;&lt;li&gt;&lt;a href='#' class='expandall'&gt;Expand&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='#' class='collapseall'&gt;Collapse&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
	&lt;p class="title"&gt;Included page: &lt;a href="RestFixtureTests.SetUp"&gt;.RestFixtureTests.SetUp&lt;/a&gt; &lt;a href="RestFixtureTests.SetUp?edit&amp;amp;redirectToReferer=true&amp;amp;redirectAction=" class="edit"&gt;(edit)&lt;/a&gt;&lt;/p&gt;
	&lt;div&gt;&lt;table&gt;
	&lt;tr class="slimRowTitle"&gt;
		&lt;td&gt;script&lt;/td&gt;
		&lt;td colspan="2"&gt;http server fixture &lt;span class="error"&gt;Could not invoke constructor for HttpServerFixture[0]&lt;/span&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class="slimRowColor0"&gt;
		&lt;td&gt;check&lt;/td&gt;
		&lt;td&gt;is started&lt;/td&gt;
		&lt;td&gt;true &lt;span class="error"&gt;The instance scriptTableActor.isStarted. does not exist&lt;/span&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class="slimRowColor9"&gt;
		&lt;td colspan="3"&gt;reset resources database &lt;span class="error"&gt;The instance scriptTableActor.resetResourcesDatabase. does not exist&lt;/span&gt;&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br/&gt;RestFixture uses three content handlers to parse and set expectations used to verify the behaviour of HTTP calls. &lt;br/&gt;These are the handlers currently available:&lt;br/&gt;&lt;ul&gt;
	&lt;li&gt;&lt;b&gt;XML&lt;/b&gt; interprets the body as an xml string and allows XPath expressions as expectations on that content&lt;/li&gt;
	&lt;li&gt;&lt;b&gt;JSON&lt;/b&gt; interprets the body as a JSON string and allows expectations to be written in JavaScript&lt;a title="create page" href="RestFixtureTests.JavaScript?edit&amp;amp;nonExistent=true"&gt;[?]&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;b&gt;TEXT&lt;/b&gt; interprets the body as a string and allows regular expression expectations.&lt;/li&gt;
&lt;/ul&gt;
&lt;br/&gt;These are the defaults&lt;br/&gt;&lt;br/&gt;&lt;ul&gt;
	&lt;li&gt;default=XML&lt;/li&gt;
	&lt;li&gt;application/xml=XML&lt;/li&gt;
	&lt;li&gt;application/json=JSON&lt;/li&gt;
	&lt;li&gt;text/plain=TEXT&lt;/li&gt;
&lt;/ul&gt;
&lt;br/&gt;&lt;div class="collapsible"&gt;&lt;ul&gt;&lt;li&gt;&lt;a href='#' class='expandall'&gt;Expand&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='#' class='collapseall'&gt;Collapse&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
	&lt;p class="title"&gt;Note: unrecognised content types.&lt;/p&gt;
	&lt;div&gt;Content types not recogised will be mapped to the default content handler (XML).&lt;br/&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br/&gt;For example, XML handler is used for for content types of application/xml; hence XPaths can be used to set expectations:&lt;br/&gt;&lt;br/&gt;&lt;table&gt;
	&lt;tr class="slimRowTitle"&gt;
		&lt;td&gt;Table: Rest Fixture &lt;span class="error"&gt;Could not invoke constructor for RestFixture[1]&lt;/span&gt;&lt;/td&gt;
		&lt;td colspan="4"&gt;&lt;a href="http://localhost:9876"&gt;http://localhost:9876&lt;/a&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class="slimRowColor0"&gt;
		&lt;td&gt;GET&lt;/td&gt;
		&lt;td&gt;/resources/0&lt;/td&gt;
		&lt;td&gt;200&lt;/td&gt;
		&lt;td&gt;Content-Type : application/xml;.+&lt;/td&gt;
		&lt;td&gt;
 /resource/name[text()='a funky name'] &lt;br/&gt;
 /resource/data[text()='an important message']
&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
&lt;br/&gt;Bespoke mapping can be defined in the config using the config key &lt;b&gt;restfixture.content.handlers.map&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;&lt;table&gt;
	&lt;tr class="slimRowTitle"&gt;
		&lt;td&gt;Table: Rest Fixture Config &lt;span class="error"&gt;Could not invoke constructor for RestFixtureConfig[1]&lt;/span&gt;&lt;/td&gt;
		&lt;td&gt;overridesContentHandlerConfig&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class="slimRowColor0"&gt;
		&lt;td&gt;restfixture.content.handlers.map&lt;/td&gt;
		&lt;td&gt;
application/xml=TEXT
&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
&lt;br/&gt;&lt;table&gt;
	&lt;tr class="slimRowTitle"&gt;
		&lt;td&gt;Table: Rest Fixture &lt;span class="error"&gt;Could not invoke constructor for RestFixture[2]&lt;/span&gt;&lt;/td&gt;
		&lt;td&gt;&lt;a href="http://localhost:9876"&gt;http://localhost:9876&lt;/a&gt;&lt;/td&gt;
		&lt;td colspan="3"&gt;overridesContentHandlerConfig&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class="slimRowColor0"&gt;
		&lt;td&gt;GET&lt;/td&gt;
		&lt;td&gt;/resources/0&lt;/td&gt;
		&lt;td&gt;200&lt;/td&gt;
		&lt;td&gt;Content-Type : application/xml;.+&lt;/td&gt;
		&lt;td&gt;&amp;lt;resource&amp;gt;[\s.]*&amp;lt;name&amp;gt;a funky name&amp;lt;/name&amp;gt;[\s\w\d&amp;lt;&amp;gt;/=\:'.]*&amp;lt;/resource&amp;gt;[\s]*&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
&lt;br/&gt;</content>
    <relativePageName>OverrideContentHandlers</relativePageName>
            <instructions>
            <instructionResult>
        <instruction>{id='scriptTable_0_0', instruction='make', instanceName='scriptTableActor', className='HttpServerFixture', args=[]}</instruction>
        <slimResult></slimResult>
                <expectation>
                    <status>error</status>
                    <instructionId>scriptTable_0_0</instructionId>
                              <type>ConstructionExpectation</type>
                                        <evaluationMessage>Could not invoke constructor for HttpServerFixture[0]</evaluationMessage>
                  </expectation>
              </instructionResult>
            <instructionResult>
        <instruction>{id='scriptTable_0_1', instruction='call', instanceName='scriptTableActor', methodName='isStarted', args=[]}</instruction>
        <slimResult></slimResult>
                <expectation>
                    <status>error</status>
                    <instructionId>scriptTable_0_1</instructionId>
                              <type>ReturnedValueExpectation</type>
                                        <evaluationMessage>The instance scriptTableActor.isStarted. does not exist</evaluationMessage>
                  </expectation>
              </instructionResult>
            <instructionResult>
        <instruction>{id='scriptTable_0_2', instruction='call', instanceName='scriptTableActor', methodName='resetResourcesDatabase', args=[]}</instruction>
        <slimResult></slimResult>
                <expectation>
                    <status>error</status>
                    <instructionId>scriptTable_0_2</instructionId>
                              <type>ScriptActionExpectation</type>
                                        <evaluationMessage>The instance scriptTableActor.resetResourcesDatabase. does not exist</evaluationMessage>
                  </expectation>
              </instructionResult>
            <instructionResult>
        <instruction>{id='tableTable_1_0', instruction='make', instanceName='tableTable_1', className='RestFixture', args=[&lt;a href="http://localhost:9876"&gt;http://localhost:9876&lt;/a&gt;]}</instruction>
        <slimResult></slimResult>
                <expectation>
                    <status>error</status>
                    <instructionId>tableTable_1_0</instructionId>
                              <type>ConstructionExpectation</type>
                                        <evaluationMessage>Could not invoke constructor for RestFixture[1]</evaluationMessage>
                  </expectation>
              </instructionResult>
            <instructionResult>
        <instruction>{id='tableTable_1_1', instruction='call', instanceName='tableTable_1', methodName='doTable', args=[[[GET, /resources/0, 200, Content-Type : application/xml;.+, 
 /resource/name[text()='a funky name'] &lt;br/&gt;
 /resource/data[text()='an important message']
]]]}</instruction>
        <slimResult></slimResult>
                <expectation>
                    <status>error</status>
                    <instructionId>tableTable_1_1</instructionId>
                              <type>TableTableExpectation</type>
                                        <evaluationMessage>The instance tableTable_1.doTable. does not exist</evaluationMessage>
                  </expectation>
              </instructionResult>
            <instructionResult>
        <instruction>{id='tableTable_2_0', instruction='make', instanceName='tableTable_2', className='RestFixtureConfig', args=[overridesContentHandlerConfig]}</instruction>
        <slimResult></slimResult>
                <expectation>
                    <status>error</status>
                    <instructionId>tableTable_2_0</instructionId>
                              <type>ConstructionExpectation</type>
                                        <evaluationMessage>Could not invoke constructor for RestFixtureConfig[1]</evaluationMessage>
                  </expectation>
              </instructionResult>
            <instructionResult>
        <instruction>{id='tableTable_2_1', instruction='call', instanceName='tableTable_2', methodName='doTable', args=[[[restfixture.content.handlers.map, 
application/xml=TEXT
]]]}</instruction>
        <slimResult></slimResult>
                <expectation>
                    <status>error</status>
                    <instructionId>tableTable_2_1</instructionId>
                              <type>TableTableExpectation</type>
                                        <evaluationMessage>The instance tableTable_2.doTable. does not exist</evaluationMessage>
                  </expectation>
              </instructionResult>
            <instructionResult>
        <instruction>{id='tableTable_3_0', instruction='make', instanceName='tableTable_3', className='RestFixture', args=[&lt;a href="http://localhost:9876"&gt;http://localhost:9876&lt;/a&gt;, overridesContentHandlerConfig]}</instruction>
        <slimResult></slimResult>
                <expectation>
                    <status>error</status>
                    <instructionId>tableTable_3_0</instructionId>
                              <type>ConstructionExpectation</type>
                                        <evaluationMessage>Could not invoke constructor for RestFixture[2]</evaluationMessage>
                  </expectation>
              </instructionResult>
            <instructionResult>
        <instruction>{id='tableTable_3_1', instruction='call', instanceName='tableTable_3', methodName='doTable', args=[[[GET, /resources/0, 200, Content-Type : application/xml;.+, &lt;resource&gt;[\s.]*&lt;name&gt;a funky name&lt;/name&gt;[\s\w\d&lt;&gt;/=\:'.]*&lt;/resource&gt;[\s]*]]]}</instruction>
        <slimResult></slimResult>
                <expectation>
                    <status>error</status>
                    <instructionId>tableTable_3_1</instructionId>
                              <type>TableTableExpectation</type>
                                        <evaluationMessage>The instance tableTable_3.doTable. does not exist</evaluationMessage>
                  </expectation>
              </instructionResult>
          </instructions>
      </result>
    <finalCounts>
    <right>0</right>
    <wrong>0</wrong>
    <ignores>0</ignores>
    <exceptions>1</exceptions>
  </finalCounts>
  <totalRunTimeInMillis>41</totalRunTimeInMillis>
</testResults>





© 2015 - 2024 Weber Informatics LLC | Privacy Policy