Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #307 from rackspace/fran

B-16613: Update default response-messaging.cfg.xml to handle */*.  Update RMS JMe...
  • Loading branch information...
commit 5c4ccbde3cba02a1fbacdd4ee9e6559662f07665 2 parents c09da99 + 1bfe8aa
@forcewhisperer forcewhisperer authored
View
2  ...-set/core/core-lib/src/main/resources/META-INF/schema/examples/response-messaging.cfg.xml
@@ -3,7 +3,7 @@
<response-messaging xmlns="http://docs.rackspacecloud.com/power-api/response-messaging/v1.0">
<status-code id="413" code-regex="413">
- <message media-type="application/json">
+ <message media-type="*/*">
{
"overLimit" : {
"code" : 413,
View
223 test/jmeter-automation/src/test/jmeter/Power API - Response-Messaging Tests.jmx
@@ -80,7 +80,7 @@
</collectionProp>
</HeaderManager>
<hashTree/>
- <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="4xx" enabled="true"/>
+ <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="4xx ALWAYS - full body" enabled="true"/>
<hashTree>
<GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="XML" enabled="true"/>
<hashTree>
@@ -183,7 +183,19 @@
</ResponseAssertion>
<hashTree/>
</hashTree>
- <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get 413 Combined JSON Message" enabled="true">
+ </hashTree>
+ <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Catch-All" enabled="true"/>
+ <hashTree>
+ <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
+ <collectionProp name="HeaderManager.headers">
+ <elementProp name="" elementType="Header">
+ <stringProp name="Header.name">accept</stringProp>
+ <stringProp name="Header.value">text/plain</stringProp>
+ </elementProp>
+ </collectionProp>
+ </HeaderManager>
+ <hashTree/>
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Catch-All Message" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -193,7 +205,7 @@
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
- <stringProp name="HTTPSampler.path">${path}/413</stringProp>
+ <stringProp name="HTTPSampler.path">${path}/404</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
@@ -203,18 +215,18 @@
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
</HTTPSamplerProxy>
<hashTree>
- <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Should Return 413" enabled="true">
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Should Return 404" enabled="true">
<collectionProp name="Asserion.test_strings">
- <stringProp name="51542">413</stringProp>
+ <stringProp name="51512">404</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
<boolProp name="Assertion.assume_success">true</boolProp>
<intProp name="Assertion.test_type">1</intProp>
</ResponseAssertion>
<hashTree/>
- <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="JSON Not Authorized Message" enabled="true">
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Catch-All Not Authorized Message" enabled="true">
<collectionProp name="Asserion.test_strings">
- <stringProp name="1935206659">&lt;html&gt;&lt;head&gt;&lt;title&gt;Apache Tomcat/6.0.24 - Error report&lt;/title&gt;&lt;style&gt;&lt;!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--&gt;&lt;/style&gt; &lt;/head&gt;&lt;body&gt;&lt;h1&gt;HTTP Status 413 - &lt;/h1&gt;&lt;HR size=&quot;1&quot; noshade=&quot;noshade&quot;&gt;&lt;p&gt;&lt;b&gt;type&lt;/b&gt; Status report&lt;/p&gt;&lt;p&gt;&lt;b&gt;message&lt;/b&gt; &lt;u&gt;&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;description&lt;/b&gt; &lt;u&gt;The request entity is larger than the server is willing or able to process.&lt;/u&gt;&lt;/p&gt;&lt;HR size=&quot;1&quot; noshade=&quot;noshade&quot;&gt;&lt;h3&gt;Apache Tomcat/6.0.24&lt;/h3&gt;&lt;/body&gt;&lt;/html&gt;Request sent went over the limit!</stringProp>
+ <stringProp name="-1833734465">You are not authorized... Did you drop your ID?</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
<boolProp name="Assertion.assume_success">true</boolProp>
@@ -223,18 +235,21 @@
<hashTree/>
</hashTree>
</hashTree>
- <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Catch-All" enabled="true"/>
+ </hashTree>
+ <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="346 ALWAYS - empty body" enabled="true"/>
+ <hashTree>
+ <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="JSON" enabled="true"/>
<hashTree>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="" elementType="Header">
<stringProp name="Header.name">accept</stringProp>
- <stringProp name="Header.value">text/plain</stringProp>
+ <stringProp name="Header.value">application/json</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
- <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Catch-All Message" enabled="true">
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get 346 JSON Message" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -244,7 +259,42 @@
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
- <stringProp name="HTTPSampler.path">${path}/404</stringProp>
+ <stringProp name="HTTPSampler.path">${path}/346</stringProp>
+ <stringProp name="HTTPSampler.method">GET</stringProp>
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
+ <boolProp name="HTTPSampler.monitor">false</boolProp>
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
+ </HTTPSamplerProxy>
+ <hashTree/>
+ </hashTree>
+ </hashTree>
+ <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="345 IF_EMPTY - empty body" enabled="true"/>
+ <hashTree>
+ <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="XML" enabled="true"/>
+ <hashTree>
+ <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
+ <collectionProp name="HeaderManager.headers">
+ <elementProp name="" elementType="Header">
+ <stringProp name="Header.name">accept</stringProp>
+ <stringProp name="Header.value">application/xml</stringProp>
+ </elementProp>
+ </collectionProp>
+ </HeaderManager>
+ <hashTree/>
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get 345 XML Message" enabled="true">
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
+ <collectionProp name="Arguments.arguments"/>
+ </elementProp>
+ <stringProp name="HTTPSampler.domain"></stringProp>
+ <stringProp name="HTTPSampler.port"></stringProp>
+ <stringProp name="HTTPSampler.connect_timeout"></stringProp>
+ <stringProp name="HTTPSampler.response_timeout"></stringProp>
+ <stringProp name="HTTPSampler.protocol"></stringProp>
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
+ <stringProp name="HTTPSampler.path">${path}/345</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
@@ -254,18 +304,159 @@
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
</HTTPSamplerProxy>
<hashTree>
- <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Should Return 404" enabled="true">
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Should return RMS xml message" enabled="true">
<collectionProp name="Asserion.test_strings">
- <stringProp name="51512">404</stringProp>
+ <stringProp name="586646502">&lt;response
+ xmlns=&quot;http://docs.openstack.org/common/api/v1.1&quot;
+ code=&quot;345&quot;&gt;
+ &lt;message&gt;Woohooo! You got a 345!&lt;/message&gt;
+&lt;/response&gt;</stringProp>
+ </collectionProp>
+ <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+ <boolProp name="Assertion.assume_success">false</boolProp>
+ <intProp name="Assertion.test_type">1</intProp>
+ </ResponseAssertion>
+ <hashTree/>
+ </hashTree>
+ </hashTree>
+ <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="JSON" enabled="true"/>
+ <hashTree>
+ <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
+ <collectionProp name="HeaderManager.headers">
+ <elementProp name="" elementType="Header">
+ <stringProp name="Header.name">accept</stringProp>
+ <stringProp name="Header.value">application/json</stringProp>
+ </elementProp>
+ </collectionProp>
+ </HeaderManager>
+ <hashTree/>
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get 345 JSON Message" enabled="true">
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
+ <collectionProp name="Arguments.arguments"/>
+ </elementProp>
+ <stringProp name="HTTPSampler.domain"></stringProp>
+ <stringProp name="HTTPSampler.port"></stringProp>
+ <stringProp name="HTTPSampler.connect_timeout"></stringProp>
+ <stringProp name="HTTPSampler.response_timeout"></stringProp>
+ <stringProp name="HTTPSampler.protocol"></stringProp>
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
+ <stringProp name="HTTPSampler.path">${path}/345</stringProp>
+ <stringProp name="HTTPSampler.method">GET</stringProp>
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
+ <boolProp name="HTTPSampler.monitor">false</boolProp>
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
+ </HTTPSamplerProxy>
+ <hashTree>
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Should return RMS JSON message" enabled="true">
+ <collectionProp name="Asserion.test_strings">
+ <stringProp name="-662672274">{
+ &quot;response&quot; : {
+ &quot;code&quot; : 345
+ }
+}</stringProp>
+ </collectionProp>
+ <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+ <boolProp name="Assertion.assume_success">false</boolProp>
+ <intProp name="Assertion.test_type">1</intProp>
+ </ResponseAssertion>
+ <hashTree/>
+ </hashTree>
+ </hashTree>
+ <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Empty accept" enabled="true"/>
+ <hashTree>
+ <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
+ <collectionProp name="HeaderManager.headers">
+ <elementProp name="" elementType="Header">
+ <stringProp name="Header.name">accept</stringProp>
+ <stringProp name="Header.value"></stringProp>
+ </elementProp>
+ </collectionProp>
+ </HeaderManager>
+ <hashTree/>
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get 345 JSON Message" enabled="true">
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
+ <collectionProp name="Arguments.arguments"/>
+ </elementProp>
+ <stringProp name="HTTPSampler.domain"></stringProp>
+ <stringProp name="HTTPSampler.port"></stringProp>
+ <stringProp name="HTTPSampler.connect_timeout"></stringProp>
+ <stringProp name="HTTPSampler.response_timeout"></stringProp>
+ <stringProp name="HTTPSampler.protocol"></stringProp>
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
+ <stringProp name="HTTPSampler.path">${path}/345</stringProp>
+ <stringProp name="HTTPSampler.method">GET</stringProp>
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
+ <boolProp name="HTTPSampler.monitor">false</boolProp>
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
+ </HTTPSamplerProxy>
+ <hashTree>
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+ <collectionProp name="Asserion.test_strings">
+ <stringProp name="-662672274">{
+ &quot;response&quot; : {
+ &quot;code&quot; : 345
+ }
+}</stringProp>
+ </collectionProp>
+ <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+ <boolProp name="Assertion.assume_success">false</boolProp>
+ <intProp name="Assertion.test_type">1</intProp>
+ </ResponseAssertion>
+ <hashTree/>
+ </hashTree>
+ </hashTree>
+ </hashTree>
+ <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="413 IF_EMPTY - full body" enabled="true"/>
+ <hashTree>
+ <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="PASS THRU" enabled="true"/>
+ <hashTree>
+ <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
+ <collectionProp name="HeaderManager.headers">
+ <elementProp name="" elementType="Header">
+ <stringProp name="Header.name">accept</stringProp>
+ <stringProp name="Header.value">application/json</stringProp>
+ </elementProp>
+ </collectionProp>
+ </HeaderManager>
+ <hashTree/>
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get 413 Origin Service Message" enabled="true">
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
+ <collectionProp name="Arguments.arguments"/>
+ </elementProp>
+ <stringProp name="HTTPSampler.domain"></stringProp>
+ <stringProp name="HTTPSampler.port"></stringProp>
+ <stringProp name="HTTPSampler.connect_timeout"></stringProp>
+ <stringProp name="HTTPSampler.response_timeout"></stringProp>
+ <stringProp name="HTTPSampler.protocol"></stringProp>
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
+ <stringProp name="HTTPSampler.path">${path}/413</stringProp>
+ <stringProp name="HTTPSampler.method">GET</stringProp>
+ <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
+ <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
+ <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
+ <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
+ <boolProp name="HTTPSampler.monitor">false</boolProp>
+ <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
+ </HTTPSamplerProxy>
+ <hashTree>
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Should Return 413" enabled="true">
+ <collectionProp name="Asserion.test_strings">
+ <stringProp name="51542">413</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
<boolProp name="Assertion.assume_success">true</boolProp>
<intProp name="Assertion.test_type">1</intProp>
</ResponseAssertion>
<hashTree/>
- <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Catch-All Not Authorized Message" enabled="true">
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Should keep message returned from origin service" enabled="true">
<collectionProp name="Asserion.test_strings">
- <stringProp name="-1833734465">You are not authorized... Did you drop your ID?</stringProp>
+ <stringProp name="-1906006296">&lt;body&gt;&lt;h1&gt;HTTP Status 413 - &lt;/h1&gt;&lt;HR size=&quot;1&quot; noshade=&quot;noshade&quot;&gt;&lt;p&gt;&lt;b&gt;type&lt;/b&gt; Status report&lt;/p&gt;&lt;p&gt;&lt;b&gt;message&lt;/b&gt; &lt;u&gt;&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;description&lt;/b&gt; &lt;u&gt;The request entity is larger than the server is willing or able to process.&lt;/u&gt;&lt;/p&gt;&lt;HR size=&quot;1&quot; noshade=&quot;noshade&quot;&gt;&lt;h3&gt;Apache Tomcat/6.0.24&lt;/h3&gt;&lt;/body&gt;</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
<boolProp name="Assertion.assume_success">true</boolProp>
@@ -275,7 +466,7 @@
</hashTree>
</hashTree>
</hashTree>
- <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="5xx" enabled="true"/>
+ <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="5xx Message From File" enabled="true"/>
<hashTree>
<GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Message From File" enabled="true"/>
<hashTree>
Please sign in to comment.
Something went wrong with that request. Please try again.