TSung HTTP not working with header

1k Views Asked by At

We are performing load testing using tsung.

We were able to load test a HTTP end point without any headers. But when add HTTP header, tsung is failing and not able to make the request.

I am unable to decipher from the tsung logs the issue. The format of the configuration tsung.xml is exactly as per the tsung help docs.

please find the below tsung.xml configuration we used and also error from logs,

tsung.xml

    <sessions>
      <session name="http-example" probability="100" type="ts_http">
        <request>
          <http url="http://172.17.0.1/api/test" version="1.1" method="GET">
            <http_header name="Authorization" value="Bearer a3b84dd8-d8a3-4e37-9468-5244333df0e0"/>
          </http>
       </request>
      </session>
    </sessions>

tsungcontroller.log

** Reason for termination =
** {{case_clause,false},
    [{ts_http_common,'-headers/1-fun-0-',2,
[{file,"src/tsung/ts_http_common.erl"},{line,224}]},
     {lists,foldl,3,[{file,"lists.erl"},{line,1248}]},
     {ts_http_common,http_no_body,2,
[{file,"src/tsung/ts_http_common.erl"},{line,75}]},
{ts_http,get_message,2,[{file,"src/tsung/ts_http.erl"},{line,130}]},
     {ts_client,handle_next_request,2,
                [{file,"src/tsung/ts_client.erl"},{line,798}]},
     {gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,505}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]} 

Please let me know what I am missing

1

There are 1 best solutions below

0
On BEST ANSWER

I was using tsung 1.5.1 earlier. But the issue is resolved in 1.6 :) :)

I am able to add http headers.