0

我已经设置了 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 天:(

4

1 回答 1

1

尝试使用 ip 或仅使用主机名而不是 .com。

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

参考这个

于 2017-03-20T04:46:39.880 回答