You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by roccatgaming <ra...@softvisioninc.eu> on 2010/06/17 17:40:11 UTC

Running different JMeter tests from a shell script

Hi,

I am trying to run different jmx files by calling jmeter.sh from a custom sh
script that I've wrote.
The script file was supposed to run a test in Non-GUI mode and then move on
to the next one.

The script file is like this:

#-----------------------------------------------------------
${JMETER_HOME}/bin/jmeter.sh -n -p ${TESTS_HOME}/test1.properties -t
${TESTS_HOME}/test1.jmx
${JMETER_HOME}/bin/jmeter.sh -n -p ${TESTS_HOME}/test2.properties -t
${TESTS_HOME}/test2.jmx
${JMETER_HOME}/bin/jmeter.sh -n -p ${TESTS_HOME}/test3.properties -t
${TESTS_HOME}/test3.jmx
#-----------------------------------------------------------

Note: If I run the tests without the -n parameter (so, in GUI mode) after I
close the first test the next one opens and so on. So it works as expected.
But, in Non-GUI mode, after running the first test, the JMeter prompts me
about "Tidying up ..." "... end of run" and nothing happens next. The next
test doesn't start. I think the script waits for something, or JMeter
doesn't shut down itself... I'm not sure.

Do I have to put a specific element in JMeter at test end? So that it close
itself?

Thanks for your help in advance!
-- 
View this message in context: http://old.nabble.com/Running-different-JMeter-tests-from-a-shell-script-tp28916054p28916054.html
Sent from the JMeter - User mailing list archive at Nabble.com.


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


Re: Running different JMeter tests from a shell script

Posted by roccatgaming <ra...@softvisioninc.eu>.

sebb-2-2 wrote:
> 
> 
> Again, that looks OK.
> 
> Try creating some dummy test plans that only download a single page
> and see how those work.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> 

Thanks for your help. It seems that the problem comes from a custom element
(developed for other purposes in my company) that it's not working as
expected in this case. So  it's not something related to standard JMeter
elements. Probably there is a method that needs to be implemented or
something like this... If you have a hint for the developers, please let me
know.

Thanks again!

-- 
View this message in context: http://old.nabble.com/Running-different-JMeter-tests-from-a-shell-script-tp28916054p28927564.html
Sent from the JMeter - User mailing list archive at Nabble.com.


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


Re: Running different JMeter tests from a shell script

Posted by sebb <se...@gmail.com>.
On 17/06/2010, roccatgaming <ra...@softvisioninc.eu> wrote:
>
>
>
>  sebb-2-2 wrote:
>  >
>  > On 17/06/2010, roccatgaming <ra...@softvisioninc.eu> wrote:
>  >>
>  >>  Hi,
>  >>
>  >>  I am trying to run different jmx files by calling jmeter.sh from a
>  >> custom sh
>  >>  script that I've wrote.
>  >>  The script file was supposed to run a test in Non-GUI mode and then move
>  >> on
>  >>  to the next one.
>  >>
>  >>  The script file is like this:
>  >>
>  >>  #-----------------------------------------------------------
>  >>  ${JMETER_HOME}/bin/jmeter.sh -n -p ${TESTS_HOME}/test1.properties -t
>  >>  ${TESTS_HOME}/test1.jmx
>  >>  ${JMETER_HOME}/bin/jmeter.sh -n -p ${TESTS_HOME}/test2.properties -t
>  >>  ${TESTS_HOME}/test2.jmx
>  >>  ${JMETER_HOME}/bin/jmeter.sh -n -p ${TESTS_HOME}/test3.properties -t
>  >>  ${TESTS_HOME}/test3.jmx
>  >>  #-----------------------------------------------------------
>  >
>  > That looks OK, though you might want to use separate jmeter log files
>  > (-j).
>  > Ditto for jtl files (-l).
>  >
>  >>
>  >>  Note: If I run the tests without the -n parameter (so, in GUI mode)
>  >> after I
>  >>  close the first test the next one opens and so on. So it works as
>  >> expected.
>  >>  But, in Non-GUI mode, after running the first test, the JMeter prompts
>  >> me
>  >>  about "Tidying up ..." "... end of run" and nothing happens next. The
>  >> next
>  >>  test doesn't start. I think the script waits for something, or JMeter
>  >>  doesn't shut down itself... I'm not sure.
>  >
>  > Check the log file to see.
>  >
>  >>  Do I have to put a specific element in JMeter at test end? So that it
>  >> close
>  >>  itself?
>  >
>  > No, JMeter should shutdown by itself when all the threads have completed.
>  >
>  > Does the GUI mode test show all the threads as having completed, or
>  > are some still running when you close it?
>  >
>
> > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>  >
>  >
>  >
>
>
> In the log file the last lines are as follows:
>
>  ...
>  2010/06/17 12:12:39 INFO  - jmeter.engine.StandardJMeterEngine: Stopping
>  test
>  2010/06/17 12:12:39 INFO  - jmeter.engine.StandardJMeterEngine: Notifying
>  test listeners of end of test
>  2010/06/17 12:12:39 INFO  - jmeter.engine.StandardJMeterEngine: Test has
>  ended
>
>  In the shell window where I run the script the last lines are:
>  ...
>  Starting the test @ Thu Jun 17 12:10:38 EDT 2010 (1276791038055)
>  Waiting for possible shutdown message on port 4445
>  Tidying up ...    @ Thu Jun 17 12:12:39 EDT 2010 (1276791159399)
>  ... end of run
>
>  So I suppose it should start the next test... because the other one looks
>  finished to me :).

Again, that looks OK.

Try creating some dummy test plans that only download a single page
and see how those work.

>  Thanks.
>
>
>
>  --
>  View this message in context: http://old.nabble.com/Running-different-JMeter-tests-from-a-shell-script-tp28916054p28916626.html
>
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

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


Re: Running different JMeter tests from a shell script

Posted by roccatgaming <ra...@softvisioninc.eu>.


sebb-2-2 wrote:
> 
> On 17/06/2010, roccatgaming <ra...@softvisioninc.eu> wrote:
>>
>>  Hi,
>>
>>  I am trying to run different jmx files by calling jmeter.sh from a
>> custom sh
>>  script that I've wrote.
>>  The script file was supposed to run a test in Non-GUI mode and then move
>> on
>>  to the next one.
>>
>>  The script file is like this:
>>
>>  #-----------------------------------------------------------
>>  ${JMETER_HOME}/bin/jmeter.sh -n -p ${TESTS_HOME}/test1.properties -t
>>  ${TESTS_HOME}/test1.jmx
>>  ${JMETER_HOME}/bin/jmeter.sh -n -p ${TESTS_HOME}/test2.properties -t
>>  ${TESTS_HOME}/test2.jmx
>>  ${JMETER_HOME}/bin/jmeter.sh -n -p ${TESTS_HOME}/test3.properties -t
>>  ${TESTS_HOME}/test3.jmx
>>  #-----------------------------------------------------------
> 
> That looks OK, though you might want to use separate jmeter log files
> (-j).
> Ditto for jtl files (-l).
> 
>>
>>  Note: If I run the tests without the -n parameter (so, in GUI mode)
>> after I
>>  close the first test the next one opens and so on. So it works as
>> expected.
>>  But, in Non-GUI mode, after running the first test, the JMeter prompts
>> me
>>  about "Tidying up ..." "... end of run" and nothing happens next. The
>> next
>>  test doesn't start. I think the script waits for something, or JMeter
>>  doesn't shut down itself... I'm not sure.
> 
> Check the log file to see.
> 
>>  Do I have to put a specific element in JMeter at test end? So that it
>> close
>>  itself?
> 
> No, JMeter should shutdown by itself when all the threads have completed.
> 
> Does the GUI mode test show all the threads as having completed, or
> are some still running when you close it?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> 
> 

In the log file the last lines are as follows:

...
2010/06/17 12:12:39 INFO  - jmeter.engine.StandardJMeterEngine: Stopping
test 
2010/06/17 12:12:39 INFO  - jmeter.engine.StandardJMeterEngine: Notifying
test listeners of end of test 
2010/06/17 12:12:39 INFO  - jmeter.engine.StandardJMeterEngine: Test has
ended 

In the shell window where I run the script the last lines are:
...
Starting the test @ Thu Jun 17 12:10:38 EDT 2010 (1276791038055)
Waiting for possible shutdown message on port 4445
Tidying up ...    @ Thu Jun 17 12:12:39 EDT 2010 (1276791159399)
... end of run

So I suppose it should start the next test... because the other one looks
finished to me :).

Thanks.


-- 
View this message in context: http://old.nabble.com/Running-different-JMeter-tests-from-a-shell-script-tp28916054p28916626.html
Sent from the JMeter - User mailing list archive at Nabble.com.


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


Re: Running different JMeter tests from a shell script

Posted by sebb <se...@gmail.com>.
On 17/06/2010, roccatgaming <ra...@softvisioninc.eu> wrote:
>
>  Hi,
>
>  I am trying to run different jmx files by calling jmeter.sh from a custom sh
>  script that I've wrote.
>  The script file was supposed to run a test in Non-GUI mode and then move on
>  to the next one.
>
>  The script file is like this:
>
>  #-----------------------------------------------------------
>  ${JMETER_HOME}/bin/jmeter.sh -n -p ${TESTS_HOME}/test1.properties -t
>  ${TESTS_HOME}/test1.jmx
>  ${JMETER_HOME}/bin/jmeter.sh -n -p ${TESTS_HOME}/test2.properties -t
>  ${TESTS_HOME}/test2.jmx
>  ${JMETER_HOME}/bin/jmeter.sh -n -p ${TESTS_HOME}/test3.properties -t
>  ${TESTS_HOME}/test3.jmx
>  #-----------------------------------------------------------

That looks OK, though you might want to use separate jmeter log files (-j).
Ditto for jtl files (-l).

>
>  Note: If I run the tests without the -n parameter (so, in GUI mode) after I
>  close the first test the next one opens and so on. So it works as expected.
>  But, in Non-GUI mode, after running the first test, the JMeter prompts me
>  about "Tidying up ..." "... end of run" and nothing happens next. The next
>  test doesn't start. I think the script waits for something, or JMeter
>  doesn't shut down itself... I'm not sure.

Check the log file to see.

>  Do I have to put a specific element in JMeter at test end? So that it close
>  itself?

No, JMeter should shutdown by itself when all the threads have completed.

Does the GUI mode test show all the threads as having completed, or
are some still running when you close it?

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