tsung
tsung copied to clipboard
tsung multipart/form-data
Hi. i cant use this metod...
config:
<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd">
<tsung loglevel="debug" version="1.0">
<clients>
<client host="localhost" use_controller_vm="true" maxusers="10" />
</clients>
<servers>
<server host="test" port="8000" type="tcp" />
</servers>
<load>
<arrivalphase phase="1" duration="1" unit="second">
<users maxnumber="10" arrivalrate="1" unit="second" />
</arrivalphase>
</load>
<sessions>
<session name='rec20140402-1908' probability='100' type='ts_http'>
<request>
<http url='/api/regis'
version='1.1'
content_type='multipart/form-data;
boundary=------WebKitFormBoundary7MA4YWxkTrZu0gW'
contents_from_file='/home/qdos/22.bin'
method='POST'>
</http>
</request>
</session>
</sessions>
</tsung>
File:
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="token"
c7be5a2438f243f6b369fcaa6f266e38
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="lang"
rus
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="name"
2222
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="/home/qdos/ba59ab04-a88c-41ba-aae6-79392ce7b2f8_15168691868394264765827460068741.xls"
Content-Type: application/vnd.ms-excel
------WebKitFormBoundary7MA4YWxkTrZu0gW--
What's wrong with what I'm doing? dont work...
Hi. Can you tell us what exactly does not work?
Tsung's multipart/form-data support is not very good, but in general this should work.