开发者

Importing Jmeter testResults XML data into mysql

开发者 https://www.devze.com 2023-03-01 10:40 出处:网络
I have done some tests in jmeter which produces an xml report in the following format <testResults version=\"1.2\">

I have done some tests in jmeter which produces an xml report in the following format

 <testResults version="1.2">

 <httpSample t="28786" lt="27285" ts="1304028697536" s="true" lb="/" rc="200" rm="OK" tn="Ultimate Thread Group 1-2" dt="text" by="344754" hn="MacBook-Pro.local"/>
 开发者_开发技巧</testResults>`

I created a table in mysql called testResult with columns t, lt, ts, s, lb...and so on.

I was wondering how can i import the content of each attributes into mysql?

Thanks.


Most programming languages will provide you ways to do this. Python has suds, JAXB Marshalling for java.

There is also this method

Using XML in mysql


You can either dump your xml data in the db like grantk show you in is link or you have to map yourself the xml value to the db field you need in java, python or perl.

Note that you can output your result in xml or csv

more here : http://jmeter.apache.org/usermanual/listeners.html

and here : http://jmeter-tips.blogspot.com/2010/02/tip-8-how-to-save-test-results.html

0

精彩评论

暂无评论...
验证码 换一张
取 消