【问题标题】:HTTP request gives 302HTTP 请求给出 302
【发布时间】:2017-03-20 12:46:39
【问题描述】:

我已经设置了 xml 文件,我认为在 tsung 中点击 http 请求时存在 ssl 证书问题。

<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd">
<tsung loglevel="debug" dumptraffic="true" version="1.0">

  <clients>
    <client host="localhost" maxusers="1" use_controller_vm="true"/>
  </clients>

  <servers>
    <server host="hostname.com" port="443" type="ssl"></server>
  </servers>


  <load>
    <arrivalphase phase="1" duration="1" unit="minute">
      <users arrivalrate="1" unit="second"/>
    </arrivalphase>
  </load>

 <sessions>
  <session name="http_test_1" probability="100" type="ts_http">

      <request subst="true">
        <dyn_variable name="redirect" re="Location: (http://.*)\r"/>
        <http url="/users/sign_in" contents='{&quot;user&quot;: {&quot;email&quot;: &quot;vishal.jagtap+51@zibtek.com&quot;,&quot;password&quot;: &quot;tudip123&quot;}}' content_type='application/json' method="POST" version="1.1">
        </http>
      </request>

    <thinktime random='true' value='27'/>

    <repeat name="redirect_loop" max_repeat="5">
      <request subst="true">
        <dyn_variable name="redirect" re="Location: (http://.*)\r"/>
        <http url="%%_redirect%%" method="GET"></http>
      </request>
      <until var="redirect" eq=""/>
    </repeat>

    <request>
      <http url="/users/edit" method="GET" version="1.1">
        </http>
    </request>

  </session>
 </sessions>

</tsung>

在 tsung.dump 中我得到 302,我怎样才能点击 https 请求 xml 中有什么方法或任何配置?

请帮帮我!我被困住了 3 天 :(

【问题讨论】:

  • 有人可以帮我吗?

标签: ruby xml tsung tsung-recorder


【解决方案1】:

在这里尝试使用 ip 或主机名而不是 .com。

<servers>
    <server host="HOSTNAME_HERE" port="443" type="ssl"></server>
</servers> 

请参考this

【讨论】:

  • 是的,我试过不使用 .com,但它会在 tsug.dump 文件中转储以下内容 NewClient:1490008761.822118:1 load:1 NewClient:1490008762.759179:1 load:2
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2021-05-22
  • 1970-01-01
  • 2016-12-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-09-16
相关资源
最近更新 更多