concurrent testing

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

concurrent testing

GW-5
Dear all,

I wonder if I can run stress test through Selenium. that is to say, I want to visit the same website concurrently through many different threads. also I want to collect the response time for each visiting. as I know, it seems we need wait for sometime in order to retrieve the result. I don't know if it will affect the timing measure accuracy.

any help will be great appreciated!
Sam
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1938&messageID=5496#5496

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: concurrent testing

GW-5
Sam,
It's better to use other performance testing tool/framework rather than Selenium, I think.
Apache JMeter will satisfy your needs.
http://jakarta.apache.org/jmeter/


As for using Selenium to measure response time, I did like following:
*note: it's just reference time, not way to measure exact responce time.

1. add a new Selenium command to user-extension.js
----
// output timestamp for debugging
Selenium.prototype.doOutputTime = function(text) {
  LOG.info(text + " : " + new Date().getTime() );
};
-----

2. In TestCase.html, put new commands before and after target commad to measure time.
----
<tr>
        <td>outputTime</td>
        <td>before click</td>
        <td></td>
</tr>

<tr>
        <td>clickAndWait</td>
        <td>//input[@value='add']</td>
        <td></td>
</tr>
<tr>
        <td>outputTime</td>
        <td>after click</td>
        <td></td>
</tr>
----

3. execute TestRunner with "Show Log" button, then run testcase.
you'll get logs at Selenium Log Console window:
----
Executing: |outputTime | before clickTwice |  |
before clickTwice : 1147247270703
Executing: |click | //input[@value='add'] |  |
Executing: |outputTime | after clickTwice |  |
after clickTwice : 1147247271093
----
This shows click command here takes (1147247271093 - 1147247270703 =) 390 msec.


Hope it helps,
Isaac.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1938&messageID=5499#5499

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: concurrent testing

GW-5
thank you very much, isaac!
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1938&messageID=5541#5541

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]