You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Rajesh Balamohan <ra...@gmail.com> on 2009/04/08 15:57:38 UTC

Creating JMeter test cases programatically and running through program

Hello Folks,

I have some experience in using this wonderful JMeter tool. It is really
useful.

I was wondering if we could the following with latest release of JMeter.

1. Create test plan programatically (using java client code, is it possible
to create test-plan and pass it on to JMeter?)
2. Is it possible to kick off JMeter from some other java program?. (I know
only java-ant task is available. However, I would like to know if it is
possible to kick off from some other java code). This will help in doing
some performance automation.

Any pointers on this would be of great help.

-- 
~Rajesh.B

Re: Creating JMeter test cases programatically and running through program

Posted by sebb <se...@gmail.com>.
On 08/04/2009, Rajesh Balamohan <ra...@gmail.com> wrote:
> Also, currently the only way to create simple testcases with http is to
>  launch jmeter and configure the testcases.

Or use the Proxy Server to record a browser session.

>  Would it be possible to create the simple testcases programtically without
>  having to launch jmeter GUI

Yes, of course, this is open source so you get to see how it's all done...

The JMX files are just text files, so you can create them with a
scripting program.
That's probably the easiest approach.

Or you can have a look at how the Proxy creates the test plan.

>  ~Rajesh.B
>
>
>
>  On Wed, Apr 8, 2009 at 10:17 AM, Rajesh Balamohan <
>  rajesh.balamohan@gmail.com> wrote:
>
>  >
>  >
>  > Thankx for reply Noel.
>  >>
>  >> Yes.  It is possible to do that way. But it spawns off a new process.
>  >>
>  >> I was wondering if we can
>  >>
>  >> 1. create a testcase programatically and populate the hashtree in jmeter
>  >> 2. Invoke StandAloneJMeter and pass on this hashtree(configuration)
>  >> 3. Gather the results and populate them into database from custom program.
>  >>
>  >> ~Rajesh.B
>  >>
>  >>
>  >> On Wed, Apr 8, 2009 at 10:04 AM, Noel O'Brien <no...@newbay.com> wrote:
>  >>
>  >>>  On Wednesday 08 April 2009 14:57:38 Rajesh Balamohan wrote:
>  >>>
>  >>> > Hello Folks,
>  >>>
>  >>> >
>  >>>
>  >>> > I have some experience in using this wonderful JMeter tool. It is
>  >>> really
>  >>>
>  >>> > useful.
>  >>>
>  >>> >
>  >>>
>  >>> > I was wondering if we could the following with latest release of
>  >>> JMeter.
>  >>>
>  >>> >
>  >>>
>  >>> > 1. Create test plan programatically (using java client code, is it
>  >>> possible
>  >>>
>  >>> > to create test-plan and pass it on to JMeter?)
>  >>>
>  >>> > 2. Is it possible to kick off JMeter from some other java program?. (I
>  >>> know
>  >>>
>  >>> > only java-ant task is available. However, I would like to know if it is
>  >>>
>  >>> > possible to kick off from some other java code). This will help in
>  >>> doing
>  >>>
>  >>> > some performance automation.
>  >>>
>  >>> You could use Runtime.exec() to run JMeter from Java code
>  >>>
>  >>> Regards,
>  >>>
>  >>> Noel
>  >>>
>  >>> >
>  >>>
>  >>> > Any pointers on this would be of great help.
>  >>>
>  >>>
>  >>
>  >>
>  >> --
>  >> ~Rajesh.B
>  >>
>  >
>  >
>  >
>  > --
>  > ~Rajesh.B
>  >
>
>
>
>
> --
>  ~Rajesh.B
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Creating JMeter test cases programatically and running through program

Posted by Rajesh Balamohan <ra...@gmail.com>.
Also, currently the only way to create simple testcases with http is to
launch jmeter and configure the testcases.

Would it be possible to create the simple testcases programtically without
having to launch jmeter GUI

~Rajesh.B


On Wed, Apr 8, 2009 at 10:17 AM, Rajesh Balamohan <
rajesh.balamohan@gmail.com> wrote:

>
>
> Thankx for reply Noel.
>>
>> Yes.  It is possible to do that way. But it spawns off a new process.
>>
>> I was wondering if we can
>>
>> 1. create a testcase programatically and populate the hashtree in jmeter
>> 2. Invoke StandAloneJMeter and pass on this hashtree(configuration)
>> 3. Gather the results and populate them into database from custom program.
>>
>> ~Rajesh.B
>>
>>
>> On Wed, Apr 8, 2009 at 10:04 AM, Noel O'Brien <no...@newbay.com> wrote:
>>
>>>  On Wednesday 08 April 2009 14:57:38 Rajesh Balamohan wrote:
>>>
>>> > Hello Folks,
>>>
>>> >
>>>
>>> > I have some experience in using this wonderful JMeter tool. It is
>>> really
>>>
>>> > useful.
>>>
>>> >
>>>
>>> > I was wondering if we could the following with latest release of
>>> JMeter.
>>>
>>> >
>>>
>>> > 1. Create test plan programatically (using java client code, is it
>>> possible
>>>
>>> > to create test-plan and pass it on to JMeter?)
>>>
>>> > 2. Is it possible to kick off JMeter from some other java program?. (I
>>> know
>>>
>>> > only java-ant task is available. However, I would like to know if it is
>>>
>>> > possible to kick off from some other java code). This will help in
>>> doing
>>>
>>> > some performance automation.
>>>
>>> You could use Runtime.exec() to run JMeter from Java code
>>>
>>> Regards,
>>>
>>> Noel
>>>
>>> >
>>>
>>> > Any pointers on this would be of great help.
>>>
>>>
>>
>>
>> --
>> ~Rajesh.B
>>
>
>
>
> --
> ~Rajesh.B
>



-- 
~Rajesh.B

Re: Creating JMeter test cases programatically and running through program

Posted by Rajesh Balamohan <ra...@gmail.com>.
Thankx for reply Noel.
>
> Yes.  It is possible to do that way. But it spawns off a new process.
>
> I was wondering if we can
>
> 1. create a testcase programatically and populate the hashtree in jmeter
> 2. Invoke StandAloneJMeter and pass on this hashtree(configuration)
> 3. Gather the results and populate them into database from custom program.
>
> ~Rajesh.B
>
>
> On Wed, Apr 8, 2009 at 10:04 AM, Noel O'Brien <no...@newbay.com> wrote:
>
>>  On Wednesday 08 April 2009 14:57:38 Rajesh Balamohan wrote:
>>
>> > Hello Folks,
>>
>> >
>>
>> > I have some experience in using this wonderful JMeter tool. It is really
>>
>> > useful.
>>
>> >
>>
>> > I was wondering if we could the following with latest release of JMeter.
>>
>> >
>>
>> > 1. Create test plan programatically (using java client code, is it
>> possible
>>
>> > to create test-plan and pass it on to JMeter?)
>>
>> > 2. Is it possible to kick off JMeter from some other java program?. (I
>> know
>>
>> > only java-ant task is available. However, I would like to know if it is
>>
>> > possible to kick off from some other java code). This will help in doing
>>
>> > some performance automation.
>>
>> You could use Runtime.exec() to run JMeter from Java code
>>
>> Regards,
>>
>> Noel
>>
>> >
>>
>> > Any pointers on this would be of great help.
>>
>>
>
>
> --
> ~Rajesh.B
>



-- 
~Rajesh.B

Re: Creating JMeter test cases programatically and running through program

Posted by Noel O'Brien <no...@newbay.com>.
On Wednesday 08 April 2009 14:57:38 Rajesh Balamohan wrote:
> Hello Folks,
>
> I have some experience in using this wonderful JMeter tool. It is really
> useful.
>
> I was wondering if we could the following with latest release of JMeter.
>
> 1. Create test plan programatically (using java client code, is it possible
> to create test-plan and pass it on to JMeter?)
> 2. Is it possible to kick off JMeter from some other java program?. (I know
> only java-ant task is available. However, I would like to know if it is
> possible to kick off from some other java code). This will help in doing
> some performance automation.

You could use Runtime.exec() to run JMeter from Java code

Regards,
Noel

>
> Any pointers on this would be of great help.