Selenium+Junit+Jmeter

2,270 views
Skip to first unread message

Deepak Koul

unread,
Aug 19, 2010, 7:00:25 AM8/19/10
to seleniu...@googlegroups.com
Anyone familiar with Selenium+Junit+Jmeter combination to load test web applications

Aniket Deshpande

unread,
Aug 19, 2010, 8:20:02 AM8/19/10
to seleniu...@googlegroups.com
Hmmm... Interesting!...
You could configure JMeter proxy to the RC and then I guess JMeter would record all your requests/responses.
And then you can configure JMeter to run this network traffic for n no. of connections...

Another option would be to captureNetworkTraffic from selenium and create a .jmx file which will be an input to JMeter... 
This option seems to be tedious to implement... First option sounds better...

Would be interesting to know if someone has already designed a framework around it already...

- ANIKET


On 19 August 2010 16:30, Deepak Koul <koul...@gmail.com> wrote:
Anyone familiar with Selenium+Junit+Jmeter combination to load test web applications
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

Bob McConnell

unread,
Aug 19, 2010, 8:40:28 AM8/19/10
to seleniu...@googlegroups.com
From: Deepak Koul

> Anyone familiar with Selenium+Junit+Jmeter combination
> to load test web applications

Selenium is not the right tool to load test web servers. Look on Source
Forge for several tools designed for that very purpose. Search for
"stress test web server".

Bob McConnell

Deepak Koul

unread,
Aug 19, 2010, 8:38:39 AM8/19/10
to seleniu...@googlegroups.com
Someone in my organization uses this framework. What they do is write selenium+Junit scripts , bundle them as JARs and put them in Junit directory in Jmeter setup.

Problem I am facing is that If i extend Junit's Testcase class in my selenium script ( which is the only way Jmeter will identify the jar in Junit directory and automatically run it when a Junit sampler is added to thread group.) there is an classDef not found error by selenium.

and If I extend SeleneseTestcase , Jmeter doesnt recognize jar.

Any inputs.................

Aniket Deshpande

unread,
Aug 19, 2010, 8:45:14 AM8/19/10
to seleniu...@googlegroups.com
Sorry dude...
I am totally clueless about the java client driver... I use .NET...

However, looking at your description it looks like it is a JMeter framework... 
Silly question: If it is being used in your organization... why can't you use the same?

- ANIKET

Deepak Koul

unread,
Aug 19, 2010, 8:47:54 AM8/19/10
to seleniu...@googlegroups.com
@ Aniket I posted this same question to the person( different business unit, same org) a month before I posted it here. Still awaiting reply :(

Aniket Deshpande

unread,
Aug 19, 2010, 9:11:09 AM8/19/10
to seleniu...@googlegroups.com
LOL :D

Getafix

unread,
Aug 19, 2010, 11:23:23 PM8/19/10
to Selenium Users
I am also searching for a sample to get started on this ( although
just being comfortable in playing with the jmeter proxy!)
Aniket's first option seems to be viable and a good one to start with?
Deepak , if you find the clues , would be able to share the knowledge?
Would be keen to follow you guys
Cheers

On Aug 19, 11:11 pm, Aniket Deshpande <meetani...@gmail.com> wrote:
> LOL :D
>
> On 19 August 2010 18:17, Deepak Koul <kould...@gmail.com> wrote:
>
> > @ Aniket I posted this same question to the person( different business
> > unit, same org) a month before I posted it here. Still awaiting reply :(
>
> > On Thu, Aug 19, 2010 at 6:15 PM, Aniket Deshpande <meetani...@gmail.com>wrote:
>
> >> Sorry dude...
> >> I am totally clueless about the java client driver... I use .NET...
>
> >> However, looking at your description it looks like it is a JMeter
> >> framework...
> >> Silly question: If it is being used in your organization... why can't you
> >> use the same?
>
> >> - ANIKET
>
> >> On 19 August 2010 18:08, Deepak Koul <kould...@gmail.com> wrote:
>
> >>> Someone in my organization uses this framework. What they do is write
> >>> selenium+Junit scripts , bundle them as JARs and put them in Junit directory
> >>> in Jmeter setup.
>
> >>> Problem I am facing is that If i extend Junit's Testcase class in my
> >>> selenium script ( which is the only way Jmeter will identify the jar in
> >>> Junit directory and automatically run it when a Junit sampler is added to
> >>> thread group.) there is an classDef not found error by selenium.
>
> >>> and If I extend SeleneseTestcase , Jmeter doesnt recognize jar.
>
> >>> Any inputs.................
>
> >>> On Thu, Aug 19, 2010 at 5:50 PM, Aniket Deshpande <meetani...@gmail.com>wrote:
>
> >>>> Hmmm... Interesting!...
> >>>> You could configure JMeter proxy to the RC and then I guess JMeter would
> >>>> record all your requests/responses.
> >>>> And then you can configure JMeter to run this network traffic for n no.
> >>>> of connections...
>
> >>>> Another option would be to captureNetworkTraffic from selenium and
> >>>> create a .jmx file which will be an input to JMeter...
> >>>> This option seems to be tedious to implement... First option sounds
> >>>> better...
>
> >>>> Would be interesting to know if someone has already designed a framework
> >>>> around it already...
>
> >>>> - ANIKET
>
> >>>> On 19 August 2010 16:30, Deepak Koul <kould...@gmail.com> wrote:
>
> >>>>> Anyone familiar with Selenium+Junit+Jmeter combination to load test web
> >>>>> applications
> >>>>>  --
> >>>>> You received this message because you are subscribed to the Google
> >>>>> Groups "Selenium Users" group.
> >>>>> To post to this group, send email to seleniu...@googlegroups.com.
> >>>>> To unsubscribe from this group, send email to
> >>>>> selenium-user...@googlegroups.com<selenium-users%2Bunsu...@googlegroups.com>
> >>>>> .
> >>>>> For more options, visit this group at
> >>>>>http://groups.google.com/group/selenium-users?hl=en.
>
> >>>> --
> >>>> You received this message because you are subscribed to the Google
> >>>> Groups "Selenium Users" group.
> >>>> To post to this group, send email to seleniu...@googlegroups.com.
> >>>> To unsubscribe from this group, send email to
> >>>> selenium-user...@googlegroups.com<selenium-users%2Bunsu...@googlegroups.com>
> >>>> .
> >>>> For more options, visit this group at
> >>>>http://groups.google.com/group/selenium-users?hl=en.
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "Selenium Users" group.
> >>> To post to this group, send email to seleniu...@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> selenium-user...@googlegroups.com<selenium-users%2Bunsu...@googlegroups.com>
> >>> .
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/selenium-users?hl=en.
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Selenium Users" group.
> >> To post to this group, send email to seleniu...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> selenium-user...@googlegroups.com<selenium-users%2Bunsu...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/selenium-users?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Selenium Users" group.
> > To post to this group, send email to seleniu...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > selenium-user...@googlegroups.com<selenium-users%2Bunsu...@googlegroups.com>
> > .

neelu

unread,
Sep 2, 2010, 4:58:08 AM9/2/10
to Selenium Users
Hi,
Today i have successfully runs the selenium scripts in jmeter. so
i will list out the steps below.

Step1. Record and convert your script to selenium java-junit format
using selenium ide.

Step2. open the eclipse and save that file as a java file.

Step3. Using junit run that file but before that you need to add
selenium-server.jar file in eclipse.

Step4. After that test runs successfully you will get .class file
under bin folder.

Step5. Setup your Run configuration settings for converting java file
to jar.

Step6. Select .java file and .class together and convert to .jar file.

Step7. Paste that .jar file into lib/junit folder.

Step8. start your j-meter server and see the magic.

On Aug 19, 5:38 pm, Deepak Koul <kould...@gmail.com> wrote:
> Someone in my organization uses this framework. What they do is write
> selenium+Junit scripts , bundle them as JARs and put them in Junit directory
> in Jmeter setup.
>
> Problem I am facing is that If i extend Junit's Testcase class in my
> selenium script ( which is the only way Jmeter will identify the jar in
> Junit directory and automatically run it when a Junit sampler is added to
> thread group.) there is an classDef not found error by selenium.
>
> and If I extend SeleneseTestcase , Jmeter doesnt recognize jar.
>
> Any inputs.................
>
> On Thu, Aug 19, 2010 at 5:50 PM, Aniket Deshpande <meetani...@gmail.com>wrote:
>
> > Hmmm... Interesting!...
> > You could configure JMeter proxy to the RC and then I guess JMeter would
> > record all your requests/responses.
> > And then you can configure JMeter to run this network traffic for n no. of
> > connections...
>
> > Another option would be to captureNetworkTraffic from selenium and create a
> > .jmx file which will be an input to JMeter...
> > This option seems to be tedious to implement... First option sounds
> > better...
>
> > Would be interesting to know if someone has already designed a framework
> > around it already...
>
> > - ANIKET
>
> > On 19 August 2010 16:30, Deepak Koul <kould...@gmail.com> wrote:
>
> >> Anyone familiar with Selenium+Junit+Jmeter combination to load test web
> >> applications
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Selenium Users" group.
> >> To post to this group, send email to seleniu...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> selenium-user...@googlegroups.com<selenium-users%2Bunsu...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/selenium-users?hl=en.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "Selenium Users" group.
> > To post to this group, send email to seleniu...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > selenium-user...@googlegroups.com<selenium-users%2Bunsu...@googlegroups.com>
> > .

Aniket Deshpande

unread,
Sep 2, 2010, 5:23:48 AM9/2/10
to seleniu...@googlegroups.com
Oh cool!!
I would definitely give this a try... 

I specially liked your Step 8 though ;)

- ANIKET

To unsubscribe from this group, send email to selenium-user...@googlegroups.com.

NeelakandanRVJ

unread,
Sep 2, 2010, 5:43:52 AM9/2/10
to seleniu...@googlegroups.com
Hi,

I forget to add one more step in that before starting the jmeter you need to place selenium-server.jar file into the lib folder of jmeter-server.

now you can see real magic:)

Shaba K

unread,
Sep 2, 2010, 7:06:22 AM9/2/10
to seleniu...@googlegroups.com
Hi,
 
Though clean steps were mentioned & i followed it as a bible.
I don't see my class files being populated at all.
 
Is there any step that i am missing i followed the below in Jmeter

1. written junit tests in selenium made jar  of the classes

2. copy and paste the jar files into jmeter/lib/junit directory  copied the selenium-server to jmeter/lib

3. start jmeter

4. select “test plan”

5. right click add -> thread group

6. select “thread group”

7. right click add -> sampler -> junit request

8. enter “my unit test” in the name

9. enter the package of your junit test

Am i missing somthing important ???
 
-Shabana

Deepak Koul

unread,
Sep 2, 2010, 7:40:19 AM9/2/10
to seleniu...@googlegroups.com
start selenium server

Shaba K

unread,
Sep 2, 2010, 8:37:56 AM9/2/10
to seleniu...@googlegroups.com
I don't use maven to start or stop selenium server.
 
But its all within the junit testcase.
 
Please recommend whats the best practice when we are using selenium junit to jmeter.
 
I guess starting selenium server externally makes sense.

Shaba K

unread,
Sep 2, 2010, 8:42:53 AM9/2/10
to seleniu...@googlegroups.com
Hi Deepak/Neela,
 
I did start the selenium server , i still don't see my class files being populated in the JMeter claasname:
I have mentioned the package filter too.
 
It doesnt work with or without package filter.
 
Am i missing something.
 
 
My Selenium+Junit script works fine when executed in Eclipse.

-Shaba
On Thu, Sep 2, 2010 at 12:40 PM, Deepak Koul <koul...@gmail.com> wrote:

Deepak Koul

unread,
Sep 2, 2010, 8:51:28 AM9/2/10
to seleniu...@googlegroups.com
Does ur test extend the TestCase Class ???? or SeleneseTestCase

Shaba K

unread,
Sep 2, 2010, 9:17:58 AM9/2/10
to seleniu...@googlegroups.com
It extends TestCase Class  :(

Getafix

unread,
Sep 2, 2010, 7:18:41 PM9/2/10
to Selenium Users
I will be looking forwards to try the steps mentioned by Deepak and
Neelakandan .
This post sounds very interesting



On Sep 2, 11:17 pm, Shaba K <shabazi...@gmail.com> wrote:
> It extends TestCase Class  :(
>
> On Thu, Sep 2, 2010 at 1:51 PM, Deepak Koul <kould...@gmail.com> wrote:
> > Does ur test extend the TestCase Class ???? or SeleneseTestCase
>
> >   On Thu, Sep 2, 2010 at 6:12 PM, Shaba K <shabazi...@gmail.com> wrote:
>
> >>   Hi Deepak/Neela,
>
> >> I did start the selenium server , i still don't see my class files being
> >> populated in the JMeter claasname:
> >> I have mentioned the package filter too.
>
> >> It doesnt work with or without package filter.
>
> >> Am i missing something.
>
> >> My Selenium+Junit script works fine when executed in Eclipse.
>
> >> -Shaba
> >>   On Thu, Sep 2, 2010 at 12:40 PM, Deepak Koul <kould...@gmail.com>wrote:
>
> >>>  start selenium server
>
> >>>   On Thu, Sep 2, 2010 at 4:36 PM, Shaba K <shabazi...@gmail.com> wrote:
>
> >>>>   Hi,
>
> >>>> Though clean steps were mentioned & i followed it as a bible.
> >>>> I don't see my class files being populated at all.
>
> >>>> Is there any step that i am missing i followed the below in Jmeter
>
> >>>> 1. written junit tests in selenium made jar  of the classes
>
> >>>> 2. copy and paste the jar files into jmeter/lib/junit directory  copied
> >>>> the selenium-server to jmeter/lib
>
> >>>> 3. start jmeter
>
> >>>> 4. select “test plan”
>
> >>>> 5. right click add -> thread group
>
> >>>> 6. select “thread group”
>
> >>>> 7. right click add -> sampler -> junit request
>
> >>>> 8. enter “my unit test” in the name
>
> >>>> 9. enter the package of your junit test
> >>>> Am i missing somthing important ???
>
> >>>> -Shabana
>
> >>>>   On Thu, Sep 2, 2010 at 10:43 AM, NeelakandanRVJ <neelu...@gmail.com>wrote:
>
> >>>>> Hi,
>
> >>>>> I forget to add one more step in that before starting the jmeter you
> >>>>> need to place selenium-server.jar file into the lib folder of jmeter-server.
>
> >>>>> now you can see real magic:)
>
> >>>>> On Thu, Sep 2, 2010 at 2:53 PM, Aniket Deshpande <meetani...@gmail.com
> >>>>> > wrote:
>
> >>>>>> Oh cool!!
> >>>>>> I would definitely give this a try...
>
> >>>>>> I specially liked your Step 8 though ;)
>
> >>>>>> - ANIKET
>
> >>>>>>> <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>
>
> >>>>>>> > >> .
> >>>>>>> > >> For more options, visit this group at
> >>>>>>> > >>http://groups.google.com/group/selenium-users?hl=en.
>
> >>>>>>> > >  --
> >>>>>>> > > You received this message because you are subscribed to the
> >>>>>>> Google Groups
> >>>>>>> > > "Selenium Users" group.
> >>>>>>> > > To post to this group, send email to
> >>>>>>> seleniu...@googlegroups.com.
> >>>>>>> > > To unsubscribe from this group, send email to
> >>>>>>> > > selenium-user...@googlegroups.com<selenium-users%2Bunsu...@googlegroups.com>
> >>>>>>> <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>

Shaba K

unread,
Sep 3, 2010, 4:57:48 AM9/3/10
to seleniu...@googlegroups.com, koul...@gmail.com, neel...@gmail.com
On Thu, Sep 2, 2010 at 1:51 PM, Deepak Koul <koul...@gmail.com> wrote:
Does ur test extend the TestCase Class ???? or SeleneseTestCase

Hi deepak/neela,
 
I have exactly followed steps mentioned by you on both creating a test script in selenium & then creating jar & then putting them across to the jmeter/lib/junit ,placing the selenium server in junit/lib & then starting the jmeter server.
 
 
I wonder i don't see any of my classes being populated in jmeter.
 
Am i missing something.
 
Also should i create a executabel jar or just a jar file through eclipse.
 
Any help /insight is highly appreciated.

Getafix

unread,
Sep 6, 2010, 3:48:48 AM9/6/10
to Selenium Users
Hi Everyone,

I created a jar file with a java class extending the testcase and
placed in lib/junit location, compiled it and jarred it . Now in
JMeter when i create a thread group -> add Junit request i do not see
the class name in Jmeter ? Can anyone let me know what mistake ?

Thanks Very much

On Sep 3, 6:57 pm, Shaba K <shabazi...@gmail.com> wrote:
> On Thu, Sep 2, 2010 at 1:51 PM, Deepak Koul <kould...@gmail.com> wrote:
> > Does ur test extend the TestCase Class ???? or SeleneseTestCase
>
> > Hi deepak/neela,
>
> I have exactly followed steps mentioned by you on both creating a test
> script in selenium & then creating jar & then putting them across to the
> jmeter/lib/junit ,placing the selenium server in junit/lib & then starting
> the jmeter server.
>
> I wonder i don't see any of my classes being populated in jmeter.
>
> Am i missing something.
>
> Also should i create a executabel jar or just a jar file through eclipse.
>
> Any help /insight is highly appreciated.
>
> -Shaba
>
>
>
> >   On Thu, Sep 2, 2010 at 6:12 PM, Shaba K <shabazi...@gmail.com> wrote:
>
> >>   Hi Deepak/Neela,
>
> >> I did start the selenium server , i still don't see my class files being
> >> populated in the JMeter claasname:
> >> I have mentioned the package filter too.
>
> >> It doesnt work with or without package filter.
>
> >> Am i missing something.
>
> >> My Selenium+Junit script works fine when executed in Eclipse.
>
> >> -Shaba
> >>   On Thu, Sep 2, 2010 at 12:40 PM, Deepak Koul <kould...@gmail.com>wrote:
>
> >>>  start selenium server
>
> >>>   On Thu, Sep 2, 2010 at 4:36 PM, Shaba K <shabazi...@gmail.com> wrote:
>
> >>>>   Hi,
>
> >>>> Though clean steps were mentioned & i followed it as a bible.
> >>>> I don't see my class files being populated at all.
>
> >>>> Is there any step that i am missing i followed the below in Jmeter
>
> >>>> 1. written junit tests in selenium made jar  of the classes
>
> >>>> 2. copy and paste the jar files into jmeter/lib/junit directory  copied
> >>>> the selenium-server to jmeter/lib
>
> >>>> 3. start jmeter
>
> >>>> 4. select “test plan”
>
> >>>> 5. right click add -> thread group
>
> >>>> 6. select “thread group”
>
> >>>> 7. right click add -> sampler -> junit request
>
> >>>> 8. enter “my unit test” in the name
>
> >>>> 9. enter the package of your junit test
> >>>> Am i missing somthing important ???
>
> >>>> -Shabana
>
> >>>>   On Thu, Sep 2, 2010 at 10:43 AM, NeelakandanRVJ <neelu...@gmail.com>wrote:
>
> >>>>> Hi,
>
> >>>>> I forget to add one more step in that before starting the jmeter you
> >>>>> need to place selenium-server.jar file into the lib folder of jmeter-server.
>
> >>>>> now you can see real magic:)
>
> >>>>> On Thu, Sep 2, 2010 at 2:53 PM, Aniket Deshpande <meetani...@gmail.com
> >>>>> > wrote:
>
> >>>>>> Oh cool!!
> >>>>>> I would definitely give this a try...
>
> >>>>>> I specially liked your Step 8 though ;)
>
> >>>>>> - ANIKET
>
> >>>>>>> <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>
>
> >>>>>>> > >> .
> >>>>>>> > >> For more options, visit this group at
> >>>>>>> > >>http://groups.google.com/group/selenium-users?hl=en.
>
> >>>>>>> > >  --
> >>>>>>> > > You received this message because you are subscribed to the
> >>>>>>> Google Groups
> >>>>>>> > > "Selenium Users" group.
> >>>>>>> > > To post to this group, send email to
> >>>>>>> seleniu...@googlegroups.com.
> >>>>>>> > > To unsubscribe from this group, send email to
> >>>>>>> > > selenium-user...@googlegroups.com<selenium-users%2Bunsu...@googlegroups.com>
> >>>>>>> <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>

NeelakandanRVJ

unread,
Sep 6, 2010, 3:59:00 AM9/6/10
to seleniu...@googlegroups.com
Your class name should exactly like this eg.(NewTest). it means keyword "Test" is mandatory.

Have Fun:)

To unsubscribe from this group, send email to selenium-user...@googlegroups.com.

Shaba K

unread,
Sep 6, 2010, 5:31:12 AM9/6/10
to seleniu...@googlegroups.com
Hey ensure that there is no other jar other than the one you placed in the lib/junit & only then start the JMeter server.
 
for ex: Jmeter has test.jar remove that & just have only the jar you've created.
 
Also ensure to start the selenium server.
 
I had similar issue but unfortunatley i see all my testcases fail :(
 
-Shaba

To unsubscribe from this group, send email to selenium-user...@googlegroups.com.

Shaba K

unread,
Sep 6, 2010, 1:03:44 PM9/6/10
to seleniu...@googlegroups.com
It works fine now .....

Getafix

unread,
Sep 6, 2010, 7:13:44 PM9/6/10
to Selenium Users
I still can't get to see my classname in my JMeter - Junit sampler
I did all that was mentioned ...
In addition to my earlier reply , i did the following
1.Added the jmeter\lib\junit folder to my classpath
2.Mine is just a junit test that extends TestCase (public class
SampleTest extends TestCase) as pointed by Neelakantan
3.Deleted my existing jar aspointed by Shoba. I just have 'mytest.jar'
in the jmeter\lib\junit dir
(mytest.jar was made out of both the .java and .class files)
4.I don't have to start sel server , but even tried that :(
5.I then start my jmeter, add thread group , add junit sampler and
could not see anything in the classname dropdown !!

What else could i be doing wrong??

Much appreciated




On Sep 7, 3:03 am, Shaba K <shabazi...@gmail.com> wrote:
> It works fine now .....
>
> On Mon, Sep 6, 2010 at 10:31 AM, Shaba K <shabazi...@gmail.com> wrote:
> > Hey ensure that there is no other jar other than the one you placed in the
> > lib/junit & only then start the JMeter server.
>
> > for ex: Jmeter has test.jar remove that & just have only the jar you've
> > created.
>
> > Also ensure to start the selenium server.
>
> > I had similar issue but unfortunatley i see all my testcases fail :(
>
> > -Shaba
>
> >> > >>>>>>> <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>
> >> <selenium-users%252Buns...@googlegroups.com<selenium-users%25252Bun...@googlegroups.com>
>
> >> > >>>>>>> > >> .
> >> > >>>>>>> > >> For more options, visit this group at
> >> > >>>>>>> > >>http://groups.google.com/group/selenium-users?hl=en.
>
> >> > >>>>>>> > >  --
> >> > >>>>>>> > > You received this message because you are subscribed to the
> >> > >>>>>>> Google Groups
> >> > >>>>>>> > > "Selenium Users" group.
> >> > >>>>>>> > > To post to this group, send email to
> >> > >>>>>>> seleniu...@googlegroups.com.
> >> > >>>>>>> > > To unsubscribe from this group, send email to
> >> > >>>>>>> > > selenium-user...@googlegroups.com<selenium-users%2Bunsu...@googlegroups.com>
> >> <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>
>
> >> > >>>>>>> <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>
> >> <selenium-users%252Buns...@googlegroups.com<selenium-users%25252Bun...@googlegroups.com>
> ...
>
> read more »

NeelakandanRVJ

unread,
Sep 7, 2010, 2:47:33 AM9/7/10
to seleniu...@googlegroups.com
here i have placed my test scripts you can refer this.

package selenium;

import com.thoughtworks.selenium.*;
import java.util.regex.Pattern;
import org.junit.*;

public class LiferayTest extends SeleneseTestCase {
    public void setUp() throws Exception {
        setUp("http://localhost:8080/", "*chrome");
    }
    public void testSelenium() throws Exception {
        
        selenium.open("/web/guest/home");
        selenium.type("_58_login", "te...@liferay.com");
        selenium.type("_58_password", "test");
        selenium.click("//div/span/span/input");
        selenium.waitForPageToLoad("30000");
        selenium.click("//span/span/a");
        selenium.waitForPageToLoad("30000");
    }
    public static void main(String args[]){
        org.junit.runner.JUnitCore.main("selenium.LiferayTest");
    }
}


To unsubscribe from this group, send email to selenium-user...@googlegroups.com.

Shaba K

unread,
Sep 7, 2010, 5:39:54 AM9/7/10
to seleniu...@googlegroups.com
Shouldn't it be public class SampleTestCase extends TestCase.
You don't have to start selenium server if its handled by your code.
 
Add a listener view resultrs tree & see whats going on ??
 
Else everything looks fine.

-Shaba
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.

Vasuki

unread,
Sep 23, 2010, 3:24:58 AM9/23/10
to Selenium Users
Hi Friends,

I can able to see the classname in JMeter. Then I am adding 'View
Results Tree' and 'Aggregate Report'. Then I have saved the test plan
as JUnitTest.jmx. After that I started the test plan using Ctrl+R. But
it does not show any results in View results tree. Its show like
below:

Sample Result:

Thread Name: Thread Group 1-1
Sample Start: 1970-01-01 05:30:00 GMT+05:30
Load time: 0
Latency: 0
Size in bytes: 0
Sample Count: 1
Error Count: 1
Response code: 1000
Response message:

Response headers:


SampleResult fields:
ContentType:
DataEncoding: windows-1252



Request:
com.zoho.contacts.category.DeleteCategory.suite
Request Headers:

Response Data:: It shows nothing

I can see in 'View Results Tree --> Request' only single class name is
coming. How to run all the classname?

Please share me if you have any step by step process to get the
result. Or let me know what I need to do?

Also, is it possible to view the URLs?

Thanks in advance.



On Sep 7, 2:39 pm, Shaba K <shabazi...@gmail.com> wrote:
> Shouldn't it be public class SampleTestCase extends TestCase.
> You don't have to start selenium server if its handled by your code.
>
> Add a listener view resultrs tree & see whats going on ??
>
> Else everything looks fine.
>
> -Shaba
>
> > > >> > >>>>>>> <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>
> > <selenium-users%252Buns...@googlegroups.com<selenium-users%25252Bun...@googlegroups.com>
>
> > > >> <selenium-users%252Buns...@googlegroups.com<selenium-users%25252Bun...@googlegroups.com>
> > <selenium-users%25252Bun...@googlegroups.com<selenium-users%2525252Bu...@googlegroups.com>
>
> > > >> > >>>>>>> > >> .
> > > >> > >>>>>>> > >> For more options, visit this group at
> > > >> > >>>>>>> > >>http://groups.google.com/group/selenium-users?hl=en.
>
> > > >> > >>>>>>> > >  --
> > > >> > >>>>>>> > > You received this message because you are subscribed to
> > the
> > > >> > >>>>>>> Google Groups
> > > >> > >>>>>>> > > "Selenium Users" group.
> > > >> > >>>>>>> > > To post to this group, send email to
> > > >> > >>>>>>> seleniu...@googlegroups.com.
> > > >> > >>>>>>> > > To unsubscribe from this group, send email to
> > > >> > >>>>>>> > > selenium-user...@googlegroups.com<selenium-users%2Bunsu...@googlegroups.com>
> > <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>
>
> > > >> <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>
> > <selenium-users%252Buns...@googlegroups.com<selenium-users%25252Bun...@googlegroups.com>
>
> > > >> > >>>>>>> <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>
> > <selenium-users%252Buns...@googlegroups.com<selenium-users%25252Bun...@googlegroups.com>
>
> > > >> <selenium-users%252Buns...@googlegroups.com<selenium-users%25252Bun...@googlegroups.com>
> > <selenium-users%25252Bun...@googlegroups.com<selenium-users%2525252Bu...@googlegroups.com>
> > > ...
>
> > > read more »
>
> > --
> >  You received this message because you are subscribed to the Google Groups
> > "Selenium Users" group.
> > To post to this group, send email to seleniu...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > selenium-user...@googlegroups.com<selenium-users%2Bunsu...@googlegroups.com>

subha ram

unread,
Sep 27, 2010, 2:27:59 AM9/27/10
to Selenium Users
Friends,

Please give me the suggestions.. I can not able to proceed further.

Thanks in advance.

To unsubscribe from this group, send email to selenium-user...@googlegroups.com.

Sasi kumar

unread,
Sep 29, 2010, 6:09:03 AM9/29/10
to Selenium Users
hi all .i placed my classes and junit jar.now iam able to get my
classnames in jmeter .but iam not able to run.

can anyone suggest

On Sep 7, 4:13 am, Getafix <ashg...@gmail.com> wrote:
> I still can't get to see my classname in myJMeter- Junit sampler
> I did all that was mentioned ...
> In addition to my earlier reply , i did the following
> 1.Added thejmeter\lib\junit folder to my classpath
> 2.Mine is just a junit test that extends TestCase (public class
> SampleTest extends TestCase) as pointed by Neelakantan
> 3.Deleted my existing jar aspointed by Shoba. I just have 'mytest.jar'
> in thejmeter\lib\junit dir
>   (mytest.jar was made out of both the .java and .class files)
> 4.I don't have to start sel server , but even tried that :(
> 5.I then start myjmeter, add thread group , add junit sampler and
> could  not see anything in the classname dropdown !!
>
> What else could i be doing wrong??
>
> Much appreciated
>
> On Sep 7, 3:03 am, Shaba K <shabazi...@gmail.com> wrote:
>
> > It works fine now .....
>
> > On Mon, Sep 6, 2010 at 10:31 AM, Shaba K <shabazi...@gmail.com> wrote:
> > > Hey ensure that there is no other jar other than the one you placed in the
> > > lib/junit & only then start theJMeterserver.
>
> > > for ex:Jmeterhas test.jar remove that & just have only the jar you've
> > > created.
>
> > > Also ensure to start theseleniumserver.
>
> > > I had similar issue but unfortunatley i see all my testcases fail :(
>
> > > -Shaba
>
> > >   On Mon, Sep 6, 2010 at 8:48 AM, Getafix <ashg...@gmail.com> wrote:
>
> > >> Hi Everyone,
>
> > >> I created a jar file with a java class extending the testcase and
> > >> placed in lib/junit location, compiled it and jarred it . Now in
> > >>JMeterwhen i create a thread group -> add Junit request  i do not see
> > >> the class name inJmeter? Can anyone let me know what mistake ?
>
> > >> Thanks Very much
>
> > >> On Sep 3, 6:57 pm, Shaba K <shabazi...@gmail.com> wrote:
> > >> > On Thu, Sep 2, 2010 at 1:51 PM, Deepak Koul <kould...@gmail.com> wrote:
> > >> > > Does ur test extend the TestCase Class ???? or SeleneseTestCase
>
> > >> > > Hi deepak/neela,
>
> > >> > I have exactly followed steps mentioned by you on both creating a test
> > >> > script inselenium& then creating jar & then putting them across to the
> > >> >jmeter/lib/junit ,placing theseleniumserver in junit/lib & then
> > >> starting
> > >> > thejmeterserver.
>
> > >> > I wonder i don't see any of my classes being populated injmeter.
>
> > >> > Am i missing something.
>
> > >> > Also should i create a executabel jar or just a jar file through
> > >> eclipse.
>
> > >> > Any help /insight is highly appreciated.
>
> > >> > -Shaba
>
> > >> > >   On Thu, Sep 2, 2010 at 6:12 PM, Shaba K <shabazi...@gmail.com>
> > >> wrote:
>
> > >> > >>   Hi Deepak/Neela,
>
> > >> > >> I did start theseleniumserver , i still don't see my class files
> > >> being
> > >> > >> populated in theJMeterclaasname:
> > >> > >> I have mentioned the package filter too.
>
> > >> > >> It doesnt work with or without package filter.
>
> > >> > >> Am i missing something.
>
> > >> > >> MySelenium+Junit script works fine when executed in Eclipse.
>
> > >> > >> -Shaba
> > >> > >>   On Thu, Sep 2, 2010 at 12:40 PM, Deepak Koul <kould...@gmail.com
> > >> >wrote:
>
> > >> > >>>  startseleniumserver
>
> > >> > >>>   On Thu, Sep 2, 2010 at 4:36 PM, Shaba K <shabazi...@gmail.com>
> > >> wrote:
>
> > >> > >>>>   Hi,
>
> > >> > >>>> Though clean steps were mentioned & i followed it as a bible.
> > >> > >>>> I don't see my class files being populated at all.
>
> > >> > >>>> Is there any step that i am missing i followed the below inJmeter
>
> > >> > >>>> 1. written junit tests inseleniummade jar  of the classes
>
> > >> > >>>> 2. copy and paste the jar files intojmeter/lib/junit directory
> > >>  copied
> > >> > >>>> theselenium-server tojmeter/lib
>
> > >> > >>>> 3. startjmeter
>
> > >> > >>>> 4. select “test plan”
>
> > >> > >>>> 5. right click add -> thread group
>
> > >> > >>>> 6. select “thread group”
>
> > >> > >>>> 7. right click add -> sampler -> junit request
>
> > >> > >>>> 8. enter “my unit test” in the name
>
> > >> > >>>> 9. enter the package of your junit test
> > >> > >>>> Am i missing somthing important ???
>
> > >> > >>>> -Shabana
>
> > >> > >>>>   On Thu, Sep 2, 2010 at 10:43 AM, NeelakandanRVJ <
> > >> neelu...@gmail.com>wrote:
>
> > >> > >>>>> Hi,
>
> > >> > >>>>> I forget to add one more step in that before starting thejmeter
> > >> you
> > >> > >>>>> need to placeselenium-server.jar file into the lib folder of
> > >>jmeter-server.
>
> > >> > >>>>> now you can see real magic:)
>
> > >> > >>>>> On Thu, Sep 2, 2010 at 2:53 PM, Aniket Deshpande <
> > >> meetani...@gmail.com
> > >> > >>>>> > wrote:
>
> > >> > >>>>>> Oh cool!!
> > >> > >>>>>> I would definitely give this a try...
>
> > >> > >>>>>> I specially liked your Step 8 though ;)
>
> > >> > >>>>>> - ANIKET
>
> > >>  > >>>>>> On 2 September 2010 14:28, neelu <neelu...@gmail.com> wrote:
>
> > >> > >>>>>>> Hi,
> > >> > >>>>>>>    Today i have successfully runs theseleniumscripts in
> > >> > >>>>>>> >seleniumscript ( which is the only wayJmeterwill identify
> > >> the
> > >> > >>>>>>> jar in
> > >> > >>>>>>> > Junit directory and automatically run it when a Junit sampler
> > >> is
> > >> > >>>>>>> added to
> > >> > >>>>>>> > thread group.) there is an classDef not found error by
> > >>selenium.
>
> > >> > >>>>>>> > and If I extend SeleneseTestcase ,Jmeterdoesnt recognize
> > >> jar.
>
> > >> > >>>>>>> > Any inputs.................
>
> > >> > >>>>>>> > On Thu, Aug 19, 2010 at 5:50 PM, Aniket Deshpande <
> > >> > >>>>>>> meetani...@gmail.com>wrote:
>
> > >> > >>>>>>> > > Hmmm... Interesting!...
> > >> > >>>>>>> > > You could configureJMeterproxy to the RC and then I guess
> > >> > >>>>>>>JMeterwould
> > >> > >>>>>>> > > record all your requests/responses.
> > >> > >>>>>>> > > And then you can configureJMeterto run this network
> > >> traffic for
> > >> > >>>>>>> n no. of
> > >> > >>>>>>> > > connections...
>
> > >> > >>>>>>> > > Another option would be to captureNetworkTraffic from
> > >>selenium
> > >> > >>>>>>> and create a
> > >> > >>>>>>> > > .jmx file which will be an input toJMeter...
> > >> > >>>>>>> > > This option seems to be tedious to implement... First option
> > >> > >>>>>>> sounds
> > >> > >>>>>>> > > better...
>
> > >> > >>>>>>> > > Would be interesting to know if someone has already designed
> > >> a
> > >> > >>>>>>> framework
> > >> > >>>>>>> > > around it already...
>
> > >> > >>>>>>> > > - ANIKET
>
> > >> > >>>>>>> > > On 19 August 2010 16:30, Deepak Koul <kould...@gmail.com>
> > >> wrote:
>
> > >> > >>>>>>> > >> Anyone familiar withSelenium+Junit+Jmetercombination to
> > >> load
> > >> > >>>>>>> test web
> > >> > >>>>>>> > >> applications
> > >> > >>>>>>> > >> --
> > >> > >>>>>>> > >> You received this message because you are subscribed to the
> > >> > >>>>>>> Google Groups
> > >> > >>>>>>> > >> "SeleniumUsers" group.
> > >> > >>>>>>> > >> To post to this group, send email to
> > >> > >>>>>>>seleniu...@googlegroups.com.
> > >> > >>>>>>> > >> To unsubscribe from this group, send email to
> > >> > >>>>>>> > >>selenium-user...@googlegroups.com<selenium-users%2Bunsu...@googlegroups.com>
> > >> <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>
>
> > >> > >>>>>>> <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>
> > >> <selenium-users%252Buns...@googlegroups.com<selenium-users%25252Bun...@googlegroups.com>
>
> > >> > >>>>>>> > >> .
> > >> > >>>>>>> > >> For more options, visit this group at
> > >> > >>>>>>> > >>http://groups.google.com/group/selenium-users?hl=en.
>
> > >> > >>>>>>> > >  --
> > >> > >>>>>>> > > You received this message because you are subscribed to the
> > >> > >>>>>>> Google Groups
> > >> > >>>>>>> > > "SeleniumUsers" group.
> > >> > >>>>>>> > > To post to this group, send email to
> > >> > >>>>>>>seleniu...@googlegroups.com.
> > >> > >>>>>>> > > To unsubscribe from this group, send email to
> > >> > >>>>>>> > >selenium-user...@googlegroups.com<selenium-users%2Bunsu...@googlegroups.com>
> > >> <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>
>
> > >> > >>>>>>> <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>
> > >> <selenium-users%252Buns...@googlegroups.com<selenium-users%25252Bun...@googlegroups.com>
>
> > >> > >>>>>>>  > > .
> > >> > >>>>>>> > > For more options, visit this group at
> > >> > >>>>>>> > >http://groups.google.com/group/selenium-users?hl=en.
>
> > >> > >>>>>>> --
> > >> > >>>>>>> You received this message because you are subscribed to the
> > >> Google
>
> ...
>
> read more »

sriharsha a

unread,
Sep 29, 2010, 5:05:28 AM9/29/10
to Selenium Users
Hi Guys!

i am new to Selenium and i want know how do we handle security
certificates pop ups in IE and Firefox??

On Aug 19, 4:00 pm, Deepak Koul <kould...@gmail.com> wrote:
> Anyone familiar with Selenium+Junit+Jmeter combination to load test web
> applications

Shaba K

unread,
Sep 29, 2010, 10:29:58 AM9/29/10
to seleniu...@googlegroups.com
Selenium-server.jar i guess thats required too
 
put that in jmeter/lib

> ...
>
> read more »

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.

To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.

Vasuki

unread,
Sep 30, 2010, 2:00:41 AM9/30/10
to Selenium Users
Hi,

Thanks for your reply.

I already placed the selenium-server.jar under jmeter/lib directory.

I really don't know what I missed.

On Sep 29, 7:29 pm, Shaba K <shabazi...@gmail.com> wrote:
> Selenium-server.jar i guess thats required too
>
> put that in jmeter/lib
>
> > > > >> > >>>>>>> <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>
> > <selenium-users%252Buns...@googlegroups.com<selenium-users%25252Bun...@googlegroups.com>
>
> ...
>
> read more »

Vasuki

unread,
Sep 30, 2010, 2:18:22 AM9/30/10
to Selenium Users
Hi,

I follow the steps that mentioned by Neelakandan.

I selected the .java file and .class file together and convert that as
a .jar file. Then, I placed that .jar file under lib/junit directory.
Also, I placed the selenium-server.jar file in jmeter/lib directory.

I find the class in JMeter. But I can't able to run the load test.

Please suggest me how to resolve the issue.
> ...
>
> read more »

Sasi kumar

unread,
Oct 4, 2010, 9:13:43 AM10/4/10
to Selenium Users
i can see the classname in jmeter ,but not able to run it.

i have followed all steps above and iam stuck at last step,please
help.


On Sep 2, 1:58 pm, neelu <neelu...@gmail.com> wrote:
> Hi,
>     Today i have successfully runs theseleniumscripts injmeter. so
> i will list out the steps below.
>
> Step1. Record and convert your script toseleniumjava-junitformat
> usingseleniumide.
>
> Step2. open the eclipse and save that file as a java file.
>
> Step3. Usingjunitrun that file but before that you need to addselenium-server.jar file in eclipse.
>
> Step4. After that test runs successfully you will get .class file
> under bin folder.
>
> Step5. Setup your Run configuration settings for converting java file
> to jar.
>
> Step6. Select .java file and .class together and convert to .jar file.
>
> Step7. Paste that .jar file into lib/junitfolder.
>
> Step8. start your j-meter server and see the magic.
>
> On Aug 19, 5:38 pm, Deepak Koul <kould...@gmail.com> wrote:
>
> > Someone in my organization uses this framework. What they do is write
> >selenium+Junitscripts , bundle them as JARs and put them inJunitdirectory
> > inJmetersetup.
>
> > Problem I am facing is that If i extendJunit'sTestcase class in my
> >seleniumscript ( which is the only wayJmeterwill identify the jar in
> >Junitdirectory and automatically run it when aJunitsampler is added to
> > thread group.) there is an classDef not found error byselenium.
>
> > and If I extend SeleneseTestcase ,Jmeterdoesnt recognize jar.
>
> > Any inputs.................
>
> > On Thu, Aug 19, 2010 at 5:50 PM, Aniket Deshpande <meetani...@gmail.com>wrote:
>
> > > Hmmm... Interesting!...
> > > You could configureJMeterproxy to the RC and then I guessJMeterwould
> > > record all your requests/responses.
> > > And then you can configureJMeterto run this network traffic for n no. of
> > > connections...
>
> > > Another option would be to captureNetworkTraffic fromseleniumand create a
> > > .jmx file which will be an input toJMeter...
> > > This option seems to be tedious to implement... First option sounds
> > > better...
>
> > > Would be interesting to know if someone has already designed a framework
> > > around it already...
>
> > > - ANIKET
>
> > > On 19 August 2010 16:30, Deepak Koul <kould...@gmail.com> wrote:
>
> > >> Anyone familiar withSelenium+Junit+Jmetercombination to load test web
> > >> applications
> > >> --
> > >> You received this message because you are subscribed to the Google Groups
> > >> "SeleniumUsers" group.
> > >> To post to this group, send email toseleni...@googlegroups.com.
> > >> To unsubscribe from this group, send email to
> > >>selenium-user...@googlegroups.com<selenium-users%2Bunsu...@googlegroups.com>
> > >> .
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/selenium-users?hl=en.
>
> > >  --
> > > You received this message because you are subscribed to the Google Groups
> > > "SeleniumUsers" group.
> > > To post to this group, send email toseleni...@googlegroups.com.

Sasi kumar

unread,
Oct 4, 2010, 9:14:43 AM10/4/10
to Selenium Users
i have done that too but it is not running ?

On Sep 29, 7:29 pm, Shaba K <shabazi...@gmail.com> wrote:
> Selenium-server.jar i guess thats required too
>
> put that in jmeter/lib
>

NeelakandanRVJ

unread,
Oct 4, 2010, 11:11:37 PM10/4/10
to seleniu...@googlegroups.com
Make sure you should place junit jar also inside jmeter

> ...
>
> read more »

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.

To post to this group, send email to seleniu...@googlegroups.com.

Sasi kumar

unread,
Oct 5, 2010, 6:26:21 AM10/5/10
to Selenium Users
i have that too!!

On Oct 5, 8:11 am, NeelakandanRVJ <neelu...@gmail.com> wrote:
> Make sure you should place junit jar also inside jmeter
>
> ...
>
> read more »

NeelakandanRVJ

unread,
Oct 5, 2010, 6:45:03 AM10/5/10
to seleniu...@googlegroups.com
Then problem may occur because of converting java and class file to jar. you should follow the proper steps to making jar file. Before making jar file you should do some configurations in eclipse.

> ...
>
> read more »

Sasi kumar

unread,
Oct 6, 2010, 2:01:47 AM10/6/10
to Selenium Users
thanks for your reply,let me tell what i have done so youu can point
me,

iam already automating using selenium in java using netbeans, i have
created jar with class,java and placed it under jmeter lib.

added selenium,junit jars there .now if i start my jmeter i can see
the package ie class name there.

i also tried starting slenium server there!!

am i missing some thing??

few doubts,

i) should i start the selenium server in code
ii) i have junit related code in my java file (Testsuite)
iii) do i have to do anything specific in jmeter


On Oct 5, 3:45 pm, NeelakandanRVJ <neelu...@gmail.com> wrote:
> Then problem may occur because of converting java and class file to jar. you
> should follow the proper steps to making jar file. Before making jar file
> you should do some configurations in eclipse.
>
> ...
>
> read more »

Vasuki

unread,
Oct 21, 2010, 7:59:52 AM10/21/10
to Selenium Users
Friends,

Finally, I can able to run the selenium+junit+jmeter successfully.
After that, I am running the stored .jmx file through ant. I received
a html report that contains only JUnit Request and its total time
taken to run all the test cases of that class (because of adding
Thread Group --> Sampler --> JUnit Request as per the steps mentioned
in the above thread).

The report shown like below:

Summary::::

Tests Failures Success Rate Average Time Min Time Max
Time
1 0 100.00% 1827903 ms 1827903
ms 1827903 ms

Pages:::

URL Tests Failures Success Rate Average Time Min
Time Max Time
JUnit Request 1 0 100.00% 1827903 ms
1827903 ms 1827903 ms expand/collapse

My requirement is to see all the test cases (as well as URLs of the
test case) and corresponding time taken to run the test cases of a
JUnit Request classname.

Please let me know how to get that.


On Oct 6, 11:01 am, Sasi kumar <sasiku...@gmail.com> wrote:
> thanks for your reply,let me tell what i have done so youu can point
> me,
>
> iam already automating usingseleniumin java using netbeans, i have
> created jar with class,java and placed it underjmeterlib.
>
> addedselenium,junitjars there .now if i start myjmeteri can see
> the package ie class name there.
>
> i also tried starting slenium server there!!
>
> am i missing some thing??
>
> few doubts,
>
> i) should i start theseleniumserver in code
> ii) i havejunitrelated code in my java file (Testsuite)
> iii) do i have to do anything specific injmeter
>
> On Oct 5, 3:45 pm, NeelakandanRVJ <neelu...@gmail.com> wrote:
>
> > Then problem may occur because of converting java and class file to jar. you
> > should follow the proper steps to making jar file. Before making jar file
> > you should do some configurations in eclipse.
>
> > On Tue, Oct 5, 2010 at 3:56 PM, Sasi kumar <sasiku...@gmail.com> wrote:
> > > i have that too!!
>
> > > On Oct 5, 8:11 am, NeelakandanRVJ <neelu...@gmail.com> wrote:
> > > > Make sure you should placejunitjar also insidejmeter
>
> > > > On Thu, Sep 30, 2010 at 11:48 AM, Vasuki <subharamamur...@gmail.com>
> > > wrote:
> > > > > Hi,
>
> > > > > I follow the steps that mentioned by Neelakandan.
>
> > > > > I selected the .java file and .class file together and convert that as
> > > > > a .jar file. Then, I placed that .jar file under lib/junitdirectory.
> > > > > Also, I placed theselenium-server.jar file injmeter/lib directory.
>
> > > > > I find the class inJMeter. But I can't able to run the load test.
>
> > > > > Please suggest me how to resolve the issue.
>
> > > > > On Sep 30, 11:00 am, Vasuki <subharamamur...@gmail.com> wrote:
> > > > > > Hi,
>
> > > > > > Thanks for your reply.
>
> > > > > > I already placed theselenium-server.jar underjmeter/lib directory.
>
> > > > > > I really don't know what I missed.
>
> > > > > > On Sep 29, 7:29 pm, Shaba K <shabazi...@gmail.com> wrote:
>
> > > > > > >Selenium-server.jar i guess thats required too
>
> > > > > > > put that injmeter/lib
>
> > > > > > > On Wed, Sep 29, 2010 at 11:09 AM, Sasi kumar <sasiku...@gmail.com>
> > > > > wrote:
> > > > > > > > hi all .i placed my classes andjunitjar.now iam able to get my
> > > > > > > > classnames injmeter.but iam not able to run.
>
> > > > > > > > can anyone suggest
>
> > > > > > > > On Sep 7, 4:13 am, Getafix <ashg...@gmail.com> wrote:
> > > > > > > > > I still can't get to see my classname in myJMeter-Junit
> > > sampler
> > > > > > > > > I did all that was mentioned ...
> > > > > > > > > In addition to my earlier reply , i did the following
> > > > > > > > > 1.Added thejmeter\lib\junitfolder to my classpath
> > > > > > > > > 2.Mine is just ajunittest that extends TestCase (public class
> > > > > > > > > SampleTest extends TestCase) as pointed by Neelakantan
> > > > > > > > > 3.Deleted my existing jar aspointed by Shoba. I just have
> > > > > 'mytest.jar'
> > > > > > > > > in thejmeter\lib\junitdir
> > > > > > > > > (mytest.jar was made out of both the .java and .class files)
> > > > > > > > > 4.I don't have to start sel server , but even tried that :(
> > > > > > > > > 5.I then start myjmeter, add thread group , addjunitsampler
> > > and
> > > > > > > > > could not see anything in the classname dropdown !!
>
> > > > > > > > > What else could i be doing wrong??
>
> > > > > > > > > Much appreciated
>
> > > > > > > > > On Sep 7, 3:03 am, Shaba K <shabazi...@gmail.com> wrote:
>
> > > > > > > > > > It works fine now .....
>
> > > > > > > > > > On Mon, Sep 6, 2010 at 10:31 AM, Shaba K <
> > > shabazi...@gmail.com>
> > > > > wrote:
> > > > > > > > > > > Hey ensure that there is no other jar other than the one
> > > you
> > > > > placed
> > > > > > > > in the
> > > > > > > > > > > lib/junit& only then start theJMeterserver.
>
> > > > > > > > > > > for ex:Jmeterhas test.jar remove that & just have only the
> > > jar
> > > > > you've
> > > > > > > > > > > created.
>
> > > > > > > > > > > Also ensure to start theseleniumserver.
>
> > > > > > > > > > > I had similar issue but unfortunatley i see all my
> > > testcases
> > > > > fail :(
>
> > > > > > > > > > > -Shaba
>
> > > > > > > > > > > On Mon, Sep 6, 2010 at 8:48 AM, Getafix <
> > > ashg...@gmail.com>
> > > > > wrote:
>
> > > > > > > > > > >> Hi Everyone,
>
> > > > > > > > > > >> I created a jar file with a java class extending the
> > > testcase
> > > > > and
> > > > > > > > > > >> placed in lib/junitlocation, compiled it and jarred it .
> > > Now
> > > > > in
> > > > > > > > > > >>JMeterwhen i create a thread group -> addJunitrequest i
> > > > > > > > > > >> > >> MySelenium+Junitscript works fine when executed in
> > > > > Eclipse.
>
> > > > > > > > > > >> > >> -Shaba
> > > > > > > > > > >> > >> On Thu, Sep 2, 2010 at 12:40 PM, Deepak Koul <
> > > > > > > > kould...@gmail.com
> > > > > > > > > > >> >wrote:
>
> > > > > > > > > > >> > >>> startseleniumserver
>
> > > > > > > > > > >> > >>> On Thu, Sep 2, 2010 at 4:36 PM, Shaba K <
> > > > > > > > shabazi...@gmail.com>
> > > > > > > > > > >> wrote:
>
> > > > > > > > > > >> > >>>> Hi,
>
> > > > > > > > > > >> > >>>> Though clean steps were mentioned & i followed it
> > > as a
> > > > > bible.
> > > > > > > > > > >> > >>>> I don't see my class files being populated at all.
>
> > > > > > > > > > >> > >>>> Is there any step that i am missing i followed the
> > > > > below
> > > > > > > > inJmeter
>
> > > > > > > > > > >> > >>>> 1. writtenjunittests inseleniummade jar of the
> > > > > > > > > > >> > >>>>>>> Step3. Usingjunitrun that file but before that
> > > you
> > > > > need
> > > > > > > > to add
> > > > > > > > > > >> > >>>>>>>selenium-server.jar file in eclipse.
>
> > > > > > > > > > >> > >>>>>>> Step4. After that test runs successfully you
>
> ...
>
> read more »

Shaba K

unread,
Oct 21, 2010, 9:41:31 AM10/21/10
to seleniu...@googlegroups.com

You gotto add listeners
 
That suits your requirements & then you are all set.
 
-Shabana
> ...
>
> read more »

Vasuki

unread,
Oct 27, 2010, 2:24:58 AM10/27/10
to Selenium Users
Hi Shabana,

Thanks for your reply.

I have added all the listeners which is present in JMeter Thread Group
--> Add --> Listeners. After running the test plan, I can able to see
only the JUnit Request label.

Is it possible to add any custom listeners for getting the URLs of the
test cases? If it is, then please let me know how to do it.

Awaiting for your reply.

Thanks.


On Oct 21, 6:41 pm, Shaba K <shabazi...@gmail.com> wrote:
> You gotto add listeners
>
> That suits your requirements & then you are all set.
>
> -Shabana
>
> ...
>
> read more »

Shaba K

unread,
Oct 27, 2010, 7:57:57 AM10/27/10
to seleniu...@googlegroups.com
I don't really understand what does custom listeners mean.
 
If you meant generating the test result report for the number of pass or fail test report.
 
You can generate a HTML report.Its been some thing i worked on it .for which i don't recall right away if i do will let you know.
 
-Shabana

> ...
>
> read more »

subha ram

unread,
Oct 28, 2010, 2:17:08 AM10/28/10
to seleniu...@googlegroups.com
Shabana,

Based on the below steps,

Step1. Record and convert your script to selenium java-junit format
using selenium ide.

Step2. open the eclipse and save that file as a java file.

Step3. Using junit run that file but before that you need to add
selenium-server.jar file in eclipse.

Step4. After that test runs successfully you will get .class file
under bin folder.

Step5. Setup your Run configuration settings for converting java file
to jar.

Step6. Select .java file and .class together and convert to .jar file.

Step7. Paste that .jar file into lib/junit folder.

Step8. start your j-meter server and see the magic.


I got the class names in JMeter by adding 'Sampler --> JUnit Request'. Then am adding listeners (Please refer the jmx.png from the attachment). After that, I am running the test plan through ant. Finally I received only JUnit Request in html report (Please refer JMeterResults1.html from the attachment).

My requirement is to get all the URLs of the test case. For example, if we record and play back a single test case, we can get the URL of each action in html report (Please refer JMeterResults.html from the attachment). Similarly, JUnit Request contains many classes. Each class contain many URLs. If we are running the test plan, I need to get the URLs of the class instead of JUnit Request.

Please let me know how to get that.

Awaiting for you reply.

Thanks
JMeterResults1.html
JMeterResults.html
jmx.png

Shaba K

unread,
Oct 28, 2010, 5:43:17 AM10/28/10
to seleniu...@googlegroups.com
Did you mean a link to each testcase.
 
I guess thats part of your ant task.
 
Would you mind sharing your ant - build.xml
 
-Shabana

subha ram

unread,
Oct 28, 2010, 6:56:28 AM10/28/10
to seleniu...@googlegroups.com
Shabana,

Thanks for your reply.

Currently, JMeter shows JUnit Request alone. But, the JUnit Request contains more test cases. So, I need to get all the test cases link as well as corresponding URL action of each test case (Similar with previous JMeterResults.html attachment ).

Herewith I have attached build.xml file. Please let me know what I need to change.

Thanks
build.xml

Shaba K

unread,
Oct 28, 2010, 7:12:05 AM10/28/10
to seleniu...@googlegroups.com
Thanks will revrt back ..

NeelakandanRVJ

unread,
Oct 29, 2010, 1:58:11 AM10/29/10
to seleniu...@googlegroups.com
Hi all.
    In jmeter, how to handle dynamic values?

Hang nguyen

unread,
Oct 29, 2010, 2:58:23 AM10/29/10
to seleniu...@googlegroups.com

Hi,

use variable to save data from Regular expression extractor
Nguyễn Thuý Hằng
-----------------------
Position: Tester
eXo Platform SEA
8 Flr, Thaiha building, 18/11 alley, Thaiha Str, Hanoi
Skype: tigon61
Y! messenger: tigon61
Google Talk: tigon6182
-----------------
Email:hang....@exoplatform.com
          tigo...@gmail.com
Website: www.exoplatform.com
Mobile: +84. 983286802

----  ----  ----  ----  ----  ----  ----  ----

Vasuki

unread,
Nov 11, 2010, 6:43:19 AM11/11/10
to Selenium Users
Friends,

I have added all the classes in one file and run that class through
ant. I received only JUnit Request.

Now, I am trying to add each and every single class in a separate
files (Instead of adding all the classes in a single file). Then I am
getting those classes by adding 'Sampler --> Junit Request' in JMeter.
Then I run that files one by one. Now also I am getting only JUnit
Request.

For examples, I have added create, edit, delete actions in a separate
classes. And run those classes through ant. But, I received only
'JUnit Request' in html report for those classes.

Is it possible to get all the URLs of create, edit, delete actions in
the html report?

Please let me know.

Awaiting for your reply.

On Oct 28, 11:17 am, subha ram <subharamamur...@gmail.com> wrote:
> Shabana,
>
> Based on the below steps,
>
> Step1. Record and convert your script to selenium java-junit format
> using selenium ide.
>
> Step2. open the eclipse and save that file as a java file.
>
> Step3. Using junit run that file but before that you need to add
> selenium-server.jar file in eclipse.
>
> Step4. After that test runs successfully you will get .class file
> under bin folder.
>
> Step5. Setup your Run configuration settings for converting java file
> to jar.
>
> Step6. Select .java file and .class together and convert to .jar file.
>
> Step7. Paste that .jar file into lib/junit folder.
> Step8. start your j-meter server and see the magic.
>
> I got the class names in JMeter by adding '*Sampler --> JUnit Request*'.
> Then am adding listeners (Please refer the *jmx.png* from the attachment).
> After that, I am running the test plan through ant. Finally I received only
> JUnit Request in html report (Please refer *JMeterResults1.html* from the
> attachment).
>
> My requirement is to get all the URLs of the test case. For example, if we
> record and play back a single test case, we can get the URL of each action
> in html report (Please refer *JMeterResults.html* from the attachment).
> Similarly, JUnit Request contains many classes. Each class contain many
> URLs. If we are running the test plan, I need to get the URLs of the class
> instead of JUnit Request.
>
> Please let me know how to get that.
>
> Awaiting for you reply.
>
> Thanks
>
> On Wed, Oct 27, 2010 at 5:27 PM, Shaba K <shabazi...@gmail.com> wrote:
> > I don't really understand what does custom listeners mean.
>
> > If you meant generating the test result report for the number of pass or
> > fail test report.
>
> > You can generate a HTML report.Its been some thing i worked on it .for
> > which i don't recall right away if i do will let you know.
>
> > -Shabana
>
> ...
>
> read more »
>
>  JMeterResults1.html
> 5KViewDownload
>
>  JMeterResults.html
> 25KViewDownload
>
>  jmx.png
> 77KViewDownload

Vasuki

unread,
Nov 18, 2010, 9:04:39 AM11/18/10
to Selenium Users
Is any one familiar with generating .jmx file automatically?

I have used selenium+junit+jmeter. From that, I get the classname in
JMeter. Based on the requirement, I can able to create the .jmx file
by using that classname. All of these are done manually.

Suppose, if I add any new class in selenium, I can get that class from
the jar file. After that, I need to put that jar in jmeter/lib/junit
directory. Again, I need to create the .jmx file from jmeter gui.

Instead of creating .jmx file manually, how to create the .jmx file
automatically while adding any new classes in selenium?

For example, if I add a "create" class in selenium junit, then the
jmeter will automatically generate the "create.jmx" file for that
class.

Is there any API for that? Please let me know the possibility of doing
the above.

Awaiting for your reply.

Thanks.

> ...
>
> read more »

jarocena

unread,
Jan 4, 2011, 6:02:16 PM1/4/11
to Selenium Users
Hi people,

I was reading this thread and I have a question,I haven't tried
anything yet, btw What happend if the number of thread in parallel is
"big"... may be 100, i'll see 100 instances of firefox???

Thanks!!

On 18 nov 2010, 11:04, Vasuki <subharamamur...@gmail.com> wrote:
> Is any one familiar with generating .jmx file automatically?
>
> I have used selenium+junit+jmeter. From that, I get the classname inJMeter. Based on the requirement, I can able to create the .jmx file
> by using that classname. All of these are done manually.
>
> Suppose, if I add any new class in selenium, I can get that class from
> the jar file. After that, I need to put that jar injmeter/lib/junit
> directory. Again, I need to create the .jmx file fromjmetergui.
>
> Instead of creating .jmx file manually, how to create the .jmx file
> automatically while adding any new classes in selenium?
>
> For example, if I add a "create" class in selenium junit,  then thejmeterwill automatically generate the "create.jmx" file for that
> > > I got the class names inJMeterby adding '*Sampler --> JUnit Request*'.
> > > Then am adding listeners (Please refer the *jmx.png* from the attachment).
> > > After that, I am running the test plan through ant. Finally I received only
> > > JUnit Request in html report (Please refer *JMeterResults1.html* from the
> > > attachment).
>
> > > My requirement is to get all the URLs of the test case. For example, if we
> > > record and play back a single test case, we can get the URL of each action
> > > in html report (Please refer *JMeterResults.html* from the attachment).
> > > Similarly, JUnit Request contains many classes. Each class contain many
> > > URLs. If we are running the test plan, I need to get the URLs of the class
> > > instead of JUnit Request.
>
> > > Please let me know how to get that.
>
> > > Awaiting for you reply.
>
> > > Thanks
>
> > > On Wed, Oct 27, 2010 at 5:27 PM, Shaba K <shabazi...@gmail.com> wrote:
> > > > I don't really understand what does custom listeners mean.
>
> > > > If you meant generating the test result report for the number of pass or
> > > > fail test report.
>
> > > > You can generate a HTML report.Its been some thing i worked on it .for
> > > > which i don't recall right away if i do will let you know.
>
> > > > -Shabana
>
> > > > On Wed, Oct 27, 2010 at 7:24 AM, Vasuki <subharamamur...@gmail.com> wrote:
>
> > > >> Hi Shabana,
>
> > > >> Thanks for your reply.
>
> > > >> I have added all the listeners which is present inJMeterThread Group

NeelakandanRVJ

unread,
Jan 4, 2011, 10:42:43 PM1/4/11
to seleniu...@googlegroups.com
NO you can't, because jmeter will not launch browsers.

ravinder reddy

unread,
Jul 4, 2011, 9:40:48 AM7/4/11
to seleniu...@googlegroups.com
hi neelu,
Here i am sending my script.in this some errors are there.can u pls tell me why these errors are occur.am i did some thing wrong.pls let me know.its showing the error at package selenium,if we comment that the above line is showing error.

Here i am sending the screen shot for u r reference.
if i try to run it it showing the error ,u can observe the error in the screen shot.pls help me out

package com.example.tests;
package selenium;

import com.thoughtworks.selenium.*;
import java.util.regex.Pattern;
import org.junit.*;


public class Login extends SeleneseTestCase
{
    public void setUp(String string, String string2) throws Exception
    {
        setUp("http://192.168.1.36/inndocsddc", "*firefox");
    }
    public void testDDCLogin() throws Exception
    {
        selenium.open("http://192.168.1.36/InndocsDDC/");
        //assertEquals("", selenium.getTitle());
        selenium.type("tbUserName", "admin");
        selenium.type("tbPassword", "admin");
        selenium.click("btnLogin");
        selenium.waitForPageToLoad("500000");
        //assertEquals("Inndocs – Dashboard", selenium.getTitle());
    }
    public static void main(String[] args)
    {
        org.junit.runner.JUnitCore.main("selenium.testDDCLogin");
    }
}

thanks,
ravi.m

eclipse error.docx

Mark Collin

unread,
Jul 4, 2011, 9:47:20 AM7/4/11
to seleniu...@googlegroups.com

Your package cannot be defined twice, remove the second line it shouldn’t be there.

 

You really need to learn basic Java if you are going to carry on down this path.

--

You received this message because you are subscribed to the Google Groups "Selenium Users" group.

To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/-BpE75MdMXYJ.


To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.


-- This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify postm...@ardescosolutions.com

ravinder reddy

unread,
Jul 4, 2011, 9:52:42 AM7/4/11
to seleniu...@googlegroups.com
thanks for giving reply mark......
if i remove "package selenium",its showing the error at " package com.example.tests",if i comment this statement the next three lines showing warning.

ravinder reddy

unread,
Jul 4, 2011, 10:00:57 AM7/4/11
to seleniu...@googlegroups.com
hi mark,

  If i comment the package and run the testcase,it showing like this in the console.can u expalin wht is the reason.plssssssssssssssss dont hesitate to give the answer plsssssssssss

JUnit version 4.8.1
Could not find class: selenium.Login

Time: 0

OK (0 tests)

thanks,
ravi.

Mark Collin

unread,
Jul 4, 2011, 10:06:54 AM7/4/11
to seleniu...@googlegroups.com

Does the name of your package in the file match the name of the package you have created?  I reiterate my previous suggestion J

Mark Collin

unread,
Jul 4, 2011, 10:11:10 AM7/4/11
to seleniu...@googlegroups.com

You need a basic Java course or some help from somebody (one of the devs) who knows Java.

 

Teaching you Java is beyond the scope of this mailing list.

 

From: seleniu...@googlegroups.com [mailto:seleniu...@googlegroups.com] On Behalf Of ravinder reddy
Sent: 04 July 2011 15:01
To: seleniu...@googlegroups.com
Subject: Re: [selenium-users] Re: Selenium+Junit+Jmeter

 

hi mark,

--

You received this message because you are subscribed to the Google Groups "Selenium Users" group.

To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/kDqO2ABremAJ.


To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

NeelakandanRVJ

unread,
Jul 4, 2011, 11:55:19 AM7/4/11
to seleniu...@googlegroups.com
Hi ravi,
    To avoid these kind of error better use selenium ide to convert your scripts in java/junit.
 Thanks,
Neelu

ravinder reddy

unread,
Jul 12, 2011, 2:18:11 AM7/12/11
to seleniu...@googlegroups.com
hi vasuki,

  here i got the same problem after run the junit test case in jmeter.its showing the results same as it is whichever you got previously.can u tell me wht r the steps u followed to resolve this .

pls help........

ravinder reddy

unread,
Jul 13, 2011, 3:15:26 AM7/13/11
to seleniu...@googlegroups.com
hi mark,
pls help me out ...
 
here i can create the jar file and i can see the class name  in the junit sampler .if i run the jmeter i am geeting the resullts like vasuki  got.

In aggregate report:

sampler_label aggregate_report_count average aggregate_report_median aggregate_report_90%_line aggregate_report_min aggregate_report_max aggregate_report_error% aggregate_report_rate aggregate_report_bandwidth
JUnit Request 5 0 0 0 0 0 1 6.195787 0
TOTAL 5 0 0 0 0 0 1 6.195787 0

In View Results tree:

Thread Name: Thread Group 1-5
Sample Start: 2011-07-13 12:06:16 GMT+05:30
Load time: 0
Latency: 0
Size in bytes: 0
Sample Count: 1
Error Count: 1
Response code: 1000
Response message:

Response headers:


SampleResult fields:
ContentType:
DataEncoding: windows-1252

am i missing any thing.....
pls help me out.....
pls let me know what i missed .......i can't go forward......

thanks,
ravi.m


Reply all
Reply to author
Forward
0 new messages