l_u_c_f_e_r_13 wrote:
>
> Hi.
>
> I test site where some GET request is send every 10 seconds. This request
> means that User still logged in.
> Question: How to emulate this request parallel with original Test? I mean
> how can I do to this request send every 10 seconds at the time test would
> have been executed.
>
> TIA.
>
For example I can use BeanShell sampler with following code:
try {
// Construct data
String data = URLEncoder.encode("do", "UTF-8") + "=" +
URLEncoder.encode("", "UTF-8");
// Send data
URL url = new
URL("http://www.selfgrowthtest.com//engine/sites/all/modules/selfgrowth/sg_presence/handler.php");
while(1==1){
URLConnection conn = url.openConnection();
conn.setDoOutput(true);
OutputStreamWriter wr = new
OutputStreamWriter(conn.getOutputStream());
wr.write(data);
wr.flush();
//Get the response
BufferedReader rd = new BufferedReader(new
InputStreamReader(conn.getInputStream()));
String line;
while ((line = rd.readLine()) != null) {
// Process line...
}
wr.close();
rd.close();
Thread.sleep(60000);
}
} catch (Exception e) {
}
but this sampler will run forever and not switch to next sampler. What I
need is to test executes parallel with this request.
Any ideas???
--
View this message in context:
http://www.nabble.com/Permanent-status-update-tp20321665p20322758.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]