[erlang-questions] right tool for the job?
Fri Oct 14 00:11:07 CEST 2011
Andy Kriger ecrivait le 12/10/2011 15:40:
> (I originally posted this to the Tsung mailing list but received no
> response so I'm broadening my request there to see if anyone with
> Tsung or Common Test experience might have an opinion on the matter)
I can't find your mail in the archive.
> I have a complex JMeter script that reads in a CSV where each row
> defines parameters to a test that makes an HTTP request as well as the
> expectations on the response. The JMeter script has logic to perform
> the correct assertions based on the incoming parameters. In short, it
> is not so much a load test as a way of doing many many permutations of
> HTTP requests (though as a side-effect it does put load on the server
> because there are so many permutations being run).
> I'm curious if Tsung allows for this kind of reading in data sets and
> performing logic based on the data to execute assertions or if it is
> intended for load testing only. Can you extend Tsung with custom
> Erlang to accomplish more than just load testing?
I think you can do this in tsung. For example, if you have a csv with 2
columns, url + expected response, you can:
<option name="file_server" id="urls" value="urls.csv" ></option>
<session name="http_csv" probability="100" type="ts_http">
<repeat name="myloop" >
<setdynvars sourcetype="file" fileid="urls" delimiter=";" order="iter">
<var name="url" />
<var name="response" />
<if var="myurl" neq="end">
<match do="log" when="nomatch" subst='true'>%%_response%%</match>
<http url="%%_url%%" version='1.1' method='GET' />
<!-- the last line of the file should be "end"-->
<until var="url" eq="end"/> </repeat>
you can also include erlang code inside the tsung configuration file, see
More information about the erlang-questions