[Webtest] Webtest parallel - where to use ?
Mike B
Mike B <mikebigg@yahoo.com>
Thu, 20 Dec 2007 03:08:53 -0800 (PST)
--0-291022137-1198148933=:83606
Content-Type: text/plain; charset=us-ascii
Willi / all,
I was able to execute a parallel test with the following ant target example. I hope it helps.
Description: starts four ant tasks with web tests. Each test repeats 10 times and keeps a counter. then prints the value and exits the task. I had not problems using this.
<target name="experiment2">
<parallel>
<webtest name="Parallel-1" description="experiment with parallel tests">
&configuration; <!-- <config> block, you probably don't need this line to try this test -->
<steps>
<repeat count="10">
<scriptStep description="js1" language="javascript">
var i = step.getWebtestProperty('JSPropertyCount1')
i++;
step.setWebtestProperty('JSPropertyCount1', i);
</scriptStep>
</repeat>
<echo message="Count(1): #{JSPropertyCount1}"/>
</steps>
</webtest>
</parallel>
<parallel>
<webtest name="Parallel-2" description="experiment with parallel tests">
&configuration;
<steps>
<repeat count="10">
<scriptStep description="js1" language="javascript">
var i = step.getWebtestProperty('JSPropertyCount2')
i++;
step.setWebtestProperty('JSPropertyCount2', i);
</scriptStep>
</repeat>
<echo message="Count(2): #{JSPropertyCount2}"/>
</steps>
</webtest>
</parallel>
<parallel>
<webtest name="Parallel-3" description="experiment with parallel tests">
&configuration;
<steps>
<repeat count="10">
<scriptStep description="js1" language="javascript">
var i = step.getWebtestProperty('JSPropertyCount3')
i++;
step.setWebtestProperty('JSPropertyCount3', i);
</scriptStep>
</repeat>
<echo message="Count(3): #{JSPropertyCount3}"/>
</steps>
</webtest>
</parallel>
<parallel>
<webtest name="Parallel-4" description="experiment with parallel tests">
&configuration;
<steps>
<repeat count="10">
<scriptStep description="js1" language="javascript">
var i = step.getWebtestProperty('JSPropertyCount4')
i++;
step.setWebtestProperty('JSPropertyCount4', i);
</scriptStep>
</repeat>
<echo message="Count(4): {JSPropertyCount4}"/>
</steps>
</webtest>
</parallel>
</target>
Mike
----- Original Message ----
From: Willi Kuhnis <wkuehnis@gmail.com>
To: webtest@lists.canoo.com
Sent: Thursday, December 20, 2007 11:55:18 AM
Subject: [Webtest] Webtest parallel - where to use ?
Hi,
I want to make a stress test.
I think, I could use parallel for this reason.
But now I didnt find out a constellation, which works.
When I use the <Parallel>-function inside the <Webtest>,
then I get a error-message.
Did somebody use it ?
I tried it now on many different ways - without success.
Also the following configuration dont work:
<project name="ABC" default="test">
<target name="test">
<parallel>
<webtest name="Test 1">
... do someting
</webtest>
<webtest name="Test 2">
... do someting
</webtest>
</parallel>
</target>
</project>
Thanks for any tips.
--
Willi Kuhnis
wkuehnis@gmail.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
--0-291022137-1198148933=:83606
Content-Type: text/html; charset=us-ascii
<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:12pt"><div style="font-family: arial,helvetica,sans-serif; font-size: 12pt;">Willi / all,<br><br>I was able to execute a parallel test with the following ant target example. I hope it helps.<br><br>Description: starts four ant tasks with web tests. Each test repeats 10 times and keeps a counter. then prints the value and exits the task. I had not problems using this.<br><br><font size="2"><span style="font-family: courier,monaco,monospace,sans-serif;"><target name="experiment2"></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <parallel></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family:
courier,monaco,monospace,sans-serif;"> <webtest name="Parallel-1" description="experiment with parallel tests"></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> &configuration; <!-- <config> block, you probably don't need this line to try this test --></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <steps></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <repeat count="10"></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family:
courier,monaco,monospace,sans-serif;"> <scriptStep description="js1" language="javascript"></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> var i = step.getWebtestProperty('JSPropertyCount1')</span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> i++;</span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;">
step.setWebtestProperty('JSPropertyCount1', i);</span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> </scriptStep></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> </repeat></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <echo message="Count(1): #{JSPropertyCount1}"/></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> </steps></span><br
style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> </webtest></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> </parallel></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <parallel></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <webtest name="Parallel-2" description="</span></font><font size="2"><span style="font-family: courier,monaco,monospace,sans-serif;">experiment </span></font><font size="2"><span style="font-family: courier,monaco,monospace,sans-serif;">with parallel tests"></span><br
style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> &configuration;</span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <steps></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <repeat count="10"></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <scriptStep description="js1" language="javascript"></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span
style="font-family: courier,monaco,monospace,sans-serif;"> var i = step.getWebtestProperty('JSPropertyCount2')</span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> i++;</span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> step.setWebtestProperty('JSPropertyCount2', i);</span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family:
courier,monaco,monospace,sans-serif;"> </scriptStep></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> </repeat></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <echo message="Count(2): #{JSPropertyCount2}"/></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> </steps></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family:
courier,monaco,monospace,sans-serif;"> </webtest></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> </parallel></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <parallel></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <webtest name="Parallel-3" description="</span></font><font size="2"><span style="font-family: courier,monaco,monospace,sans-serif;">experiment </span></font><font size="2"><span style="font-family: courier,monaco,monospace,sans-serif;">with parallel tests"></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family:
courier,monaco,monospace,sans-serif;"> &configuration;</span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <steps></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <repeat count="10"></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <scriptStep description="js1" language="javascript"></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family:
courier,monaco,monospace,sans-serif;"> var i = step.getWebtestProperty('JSPropertyCount3')</span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> i++;</span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> step.setWebtestProperty('JSPropertyCount3', i);</span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;">
</scriptStep></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> </repeat></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <echo message="Count(3): #{JSPropertyCount3}"/></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> </steps></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> </webtest></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family:
courier,monaco,monospace,sans-serif;"> </parallel></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <parallel></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <webtest name="Parallel-4" description="</span></font><font size="2"><span style="font-family: courier,monaco,monospace,sans-serif;">experiment </span></font><font size="2"><span style="font-family: courier,monaco,monospace,sans-serif;">with parallel tests"></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> &configuration;</span><br style="font-family: courier,monaco,monospace,sans-serif;"><span
style="font-family: courier,monaco,monospace,sans-serif;"> <steps></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <repeat count="10"></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <scriptStep description="js1" language="javascript"></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> var i = step.getWebtestProperty('JSPropertyCount4')</span><br style="font-family:
courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> i++;</span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> step.setWebtestProperty('JSPropertyCount4', i);</span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> </scriptStep></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;">
</repeat></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> <echo message="Count(4): {JSPropertyCount4}"/></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> </steps></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> </webtest></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;"> </parallel></span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;">
</target></span></font><br><br><br>Mike<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Willi Kuhnis <wkuehnis@gmail.com><br>To: webtest@lists.canoo.com<br>Sent: Thursday, December 20, 2007 11:55:18 AM<br>Subject: [Webtest] Webtest parallel - where to use ?<br><br>Hi, <br>I want to make a stress test.<br>I think, I could use parallel for this reason.<br>But now I didnt find out a constellation, which works.<br>When I use the <Parallel>-function inside the <Webtest>,<br>then I get a error-message.
<br>Did somebody use it ?<br>I tried it now on many different ways - without success.<br><br>Also the following configuration dont work:<br><br clear="all"><project name="ABC" default="test"><br>
<target name="test"><br> <parallel><br> <webtest name="Test 1"><br> ... do someting<br> </webtest><br> <webtest name="Test 2">
<br> ... do someting<br> </webtest><br> </parallel><br> </target><br></project><br><br>Thanks for any tips.<br><br>-- <br>Willi Kuhnis<br><a rel="nofollow" ymailto="mailto:wkuehnis@gmail.com" target="_blank" href="mailto:wkuehnis@gmail.com">
wkuehnis@gmail.com</a><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</div><br></div></div><br>
<hr size=1>Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. <a href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ "> Try it now.</a></body></html>
--0-291022137-1198148933=:83606--