Forum Discussion

ransam's avatar
ransam
New Contributor
10 years ago

can we use xml instead of binary xml on simulated request?

simulated request cant send xml properly after parameterizing variables on loadcomplete..

 -- got this error on simuted respond body

 

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Action Controller: Exception caught</title>
<style>
body { background-color: #fff; color: #333; }

body, p, ol, ul, td {
font-family: helvetica, verdana, arial, sans-serif;
font-size: 13px;
line-height: 18px;
}

pre {
background-color: #eee;
padding: 10px;
font-size: 11px;
white-space: pre-wrap;
}

a { color: #000; }
a:visited { color: #666; }
a:hover { color: #fff; background-color:#000; }
</style>
</head>
<body>

<h1>
NoMethodError
in Schedule::ReservesController#create
</h1>
<pre>undefined method `[]&#x27; for nil:NilClass</pre>


<p><code>Rails.root: /home/mdcloud/mdcloudapp/releases/20150714213016</code></p>

<div id="traces">
<a href="#" onclick="document.getElementById(&#x27;Framework-Trace&#x27;).style.display=&#x27;none&#x27;;document.getElementById(&#x27;Full-Trace&#x27;).style.display=&#x27;none&#x27;;document.getElementById(&#x27;Application-Trace&#x27;).style.display=&#x27;block&#x27;;; return false;">Application Trace</a> |
<a href="#" onclick="document.getElementById(&#x27;Application-Trace&#x27;).style.display=&#x27;none&#x27;;document.getElementById(&#x27;Full-Trace&#x27;).style.display=&#x27;none&#x27;;document.getElementById(&#x27;Framework-Trace&#x27;).style.display=&#x27;block&#x27;;; return false;">Framework Trace</a> |
<a href="#" onclick="document.getElementById(&#x27;Application-

activerecord (3.2.22) lib/active_record/query_cache.rb:64:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
activerecord (3.2.22) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
actionpack (3.2.22) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call&#x27;
activesupport (3.2.22) lib/active_support/callbacks.rb:405:in `_run__78128496099008972__call__810842498440846013__callbacks&#x27;
activesupport (3.2.22) lib/active_support/callbacks.rb:405:in `__run_callback&#x27;
activesupport (3.2.22) lib/active_support/callbacks.rb:385:in `_run_call_callbacks&#x27;
activesupport (3.2.22) lib/active_support/callbacks.rb:81:in `run_callbacks&#x27;
actionpack (3.2.22) lib/action_dispatch/middleware/callbacks.rb:27:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
actionpack (3.2.22) lib/action_dispatch/middleware/remote_ip.rb:31:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
actionpack (3.2.22) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
actionpack (3.2.22) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
railties (3.2.22) lib/rails/rack/logger.rb:32:in `call_app&#x27;
railties (3.2.22) lib/rails/rack/logger.rb:18:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
request_store (1.1.0) lib/request_store/middleware.rb:8:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
actionpack (3.2.22) lib/action_dispatch/middleware/request_id.rb:22:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
rack (1.4.5) lib/rack/methodoverride.rb:21:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
rack (1.4.5) lib/rack/runtime.rb:17:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
activesupport (3.2.22) lib/active_support/cache/strategy/local_cache.rb:72:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
rack (1.4.5) lib/rack/lock.rb:15:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
actionpack (3.2.22) lib/action_dispatch/middleware/static.rb:83:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:143:in `pass&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:155:in `invalidate&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:71:in `call!&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:51:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
hoptoad_notifier (2.4.11) lib/hoptoad_notifier/user_informer.rb:12:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
railties (3.2.22) lib/rails/engine.rb:484:in `call&#x27;
railties (3.2.22) lib/rails/application.rb:231:in `call&#x27;
railties (3.2.22) lib/rails/railtie/configurable.rb:30:in `method_missing&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
unicorn (4.6.3) lib/unicorn/http_server.rb:552:in `process_client&#x27;
unicorn (4.6.3) lib/unicorn/http_server.rb:632:in `worker_loop&#x27;
unicorn (4.6.3) lib/unicorn/http_server.rb:500:in `spawn_missing_workers&#x27;
unicorn (4.6.3) lib/unicorn/http_server.rb:511:in `maintain_worker_count&#x27;
unicorn (4.6.3) lib/unicorn/http_server.rb:277:in `join&#x27;
unicorn (4.6.3) bin/unicorn:126:in `&lt;top (required)&gt;&#x27;
/home/mdcloud/.rvm/gems/ruby-1.9.3-p385/bin/unicorn:23:in `load&#x27;
/home/mdcloud/.rvm/gems/ruby-1.9.3-p385/bin/unicorn:23:in `&lt;main&gt;&#x27;
/home/mdcloud/.rvm/gems/ruby-1.9.3-p385/bin/ruby_executable_hooks:15:in `eval&#x27;
/home/mdcloud/.rvm/gems/ruby-1.9.3-p385/bin/ruby_executable_hooks:15:in `&lt;main&gt;&#x27;</code></pre>
</div>
<div id="Full-Trace" style="display: none;">

activesupport (3.2.22) lib/active_support/notifications.rb:123:in `block in instrument&#x27;
activesupport (3.2.22) lib/active_support/notifications/instrumenter.rb:20:in `instrument&#x27;
activesupport (3.2.22) lib/active_support/notifications.rb:123:in `instrument&#x27;
actionpack (3.2.22) lib/action_controller/metal/instrumentation.rb:29:in `process_action&#x27;
actionpack (3.2.22) lib/action_controller/metal/params_wrapper.rb:207:in `process_action&#x27;
activerecord (3.2.22) lib/active_record/railties/controller_runtime.rb:18:in `process_action&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/rails3/action_controller.rb:28:in `block in process_action&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/controller_instrumentation.rb:361:in `perform_action_with_newrelic_trace&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/rails3/action_controller.rb:27:in `process_action&#x27;
actionpack (3.2.22) lib/abstract_controller/base.rb:121:in `process&#x27;
actionpack (3.2.22) lib/abstract_controller/rendering.rb:45:in `process&#x27;
actionpack (3.2.22) lib/action_controller/metal.rb:203:in `dispatch&#x27;
actionpack (3.2.22) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch&#x27;
actionpack (3.2.22) lib/action_controller/metal.rb:246:in `block in action&#x27;
actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:73:in `call&#x27;
actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:73:in `dispatch&#x27;
actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:36:in `call&#x27;
journey (1.0.4) lib/journey/router.rb:68:in `block in call&#x27;
journey (1.0.4) lib/journey/router.rb:56:in `each&#x27;
journey (1.0.4) lib/journey/router.rb:56:in `call&#x27;
actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:608:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
apipie-rails (0.0.23) lib/apipie/static_dispatcher.rb:56:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
hoptoad_notifier (2.4.11) lib/hoptoad_notifier/rack.rb:27:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/rack/agent_hooks.rb:30:in `traced_call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/rack/browser_monitoring.rb:32:in `traced_call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
warden (1.2.3) lib/warden/manager.rb:35:in `block in call&#x27;
warden (1.2.3) lib/warden/manager.rb:34:in `catch&#x27;
warden (1.2.3) lib/warden/manager.rb:34:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
actionpack (3.2.22) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
rack (1.4.5) lib/rack/etag.rb:23:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
rack (1.4.5) lib/rack/conditionalget.rb:35:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
actionpack (3.2.22) lib/action_dispatch/middleware/head.rb:14:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
actionpack (3.2.22) lib/action_dispatch/middleware/params_parser.rb:21:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
actionpack (3.2.22) lib/action_dispatch/middleware/flash.rb:242:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context&#x27;
rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
actionpack (3.2.22) lib/action_dispatch/middleware/cookies.rb:341:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
activerecord (3.2.22) lib/active_record/query_cache.rb:64:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
activerecord (3.2.22) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
actionpack (3.2.22) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call&#x27;
activesupport (3.2.22) lib/active_support/callbacks.rb:405:in `_run__78128496099008972__call__810842498440846013__callbacks&#x27;
activesupport (3.2.22) lib/active_support/callbacks.rb:405:in `__run_callback&#x27;
activesupport (3.2.22) lib/active_support/callbacks.rb:385:in `_run_call_callbacks&#x27;
activesupport (3.2.22) lib/active_support/callbacks.rb:81:in `run_callbacks&#x27;
actionpack (3.2.22) lib/action_dispatch/middleware/callbacks.rb:27:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
actionpack (3.2.22) lib/action_dispatch/middleware/remote_ip.rb:31:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
actionpack (3.2.22) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call&#x27;

activesupport (3.2.22) lib/active_support/cache/strategy/local_cache.rb:72:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
rack (1.4.5) lib/rack/lock.rb:15:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
actionpack (3.2.22) lib/action_dispatch/middleware/static.rb:83:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:143:in `pass&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:155:in `invalidate&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:71:in `call!&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:51:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
hoptoad_notifier (2.4.11) lib/hoptoad_notifier/user_informer.rb:12:in `call&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
railties (3.2.22) lib/rails/engine.rb:484:in `call&#x27;
railties (3.2.22) lib/rails/application.rb:231:in `call&#x27;
railties (3.2.22) lib/rails/railtie/configurable.rb:30:in `method_missing&#x27;
newrelic_rpm (3.12.1.298) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call&#x27;
unicorn (4.6.3) lib/unicorn/http_server.rb:552:in `process_client&#x27;
unicorn (4.6.3) lib/unicorn/http_server.rb:632:in `worker_loop&#x27;
unicorn (4.6.3) lib/unicorn/http_server.rb:500:in `spawn_missing_workers&#x27;
unicorn (4.6.3) lib/unicorn/http_server.rb:511:in `maintain_worker_count&#x27;
unicorn (4.6.3) lib/unicorn/http_server.rb:277:in `join&#x27;
unicorn (4.6.3) bin/unicorn:126:in `&lt;top (required)&gt;&#x27;
/home/mdcloud/.rvm/gems/ruby-1.9.3-p385/bin/unicorn:23:in `load&#x27;
/home/mdcloud/.rvm/gems/ruby-1.9.3-p385/bin/unicorn:23:in `&lt;main&gt;&#x27;
/home/mdcloud/.rvm/gems/ruby-1.9.3-p385/bin/ruby_executable_hooks:15:in `eval&#x27;
/home/mdcloud/.rvm/gems/ruby-1.9.3-p385/bin/ruby_executable_hooks:15:in `&lt;main&gt;&#x27;</code></pre>
</div>
</div>

 

<h2 style="margin-top: 30px">Request</h2>
<p><b>Parameters</b>: <pre>{&quot;_method&quot;=&gt;&quot;post&quot;,
&quot;access_token&quot;=&gt;&quot;[FILTERED]&quot;,
&quot;book_group_id&quot;=&gt;&quot;6&quot;,
&quot;book_id&quot;=&gt;&quot;42&quot;,
&quot;format&quot;=&gt;&quot;xml&quot;}</pre></p>

<p><a href="#" onclick="document.getElementById('session_dump').style.display='block'; return false;">Show session dump</a></p>
<div id="session_dump" style="display:none"><pre></pre></div>

<p><a href="#" onclick="document.getElementById('env_dump').style.display='block'; return false;">Show env dump</a></p>
<div id="env_dump" style="display:none"><pre>HTTP_ACCEPT: &quot;text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8&quot;
HTTP_ACCEPT_ENCODING: &quot;gzip, deflate&quot;
HTTP_ACCEPT_LANGUAGE: &quot;en-US,en;q=0.5&quot;
REMOTE_ADDR: &quot;127.0.0.1&quot;
SERVER_NAME: &quot;192.168.55.20&quot;
SERVER_PROTOCOL: &quot;HTTP/1.0&quot;</pre></div>


<h2 style="margin-top: 30px">Response</h2>
<p><b>Headers</b>: <pre>None</pre></p>

 

</body>
</html>

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    What I can see from the attached screenshot is that the format of the end_time in the simulated request differs from the format in the recorded request.

    Could this difference cause the exception on the backend that was received in the response?

    • ransam's avatar
      ransam
      New Contributor

      Hi,

       

      Thanks for the reply. The issue raised when I use parameterizing the value and replace it with the variable.

      I seen on the doc's that the loadcomplete send binary xml when doing the parameterizing - anyway we can

      still use and send the xml document as per we are doing in the record?

       

      Thanks.

       

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        Not sure I completely understood what you are asking about...

        When you do parameterization, you, basically, create some variable, populate it with some value and command LoadComplete where to use this variable.

        Note, that LoadComplete has no idea about what values can be used for this or that variable and what values cannot. The only thing it (LoadComplete) does is that it modifies request by inserting the data from the variable where specified, sends the request and compares returned result code with the recorded (expected) one.

         

        Without knowing more details about your case, my understanding is like this:

        -- You created some variable and somehow populated it with the date/time value;

        -- You commanded LoadComplete to use the value of this variable for the end_time parameter.

        It appeared, that the format of the variable's value is different from the value used in the initially recorded request. It looks like that this difference caused a failure on the backend.

        What I would try is to assign the variable exactly the same value as was recorded initially and check if the request pass or still fail.