You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Sonam Chauhan <so...@ce.com.au> on 2006/12/20 04:26:54 UTC
JMeter under cron
Just a cautionary tale of running JMeter through a cron job on a Linux system.
We have a JMeter-based regression-test suite at work. This has run nightly for several years as a cron job. Recently, we added tests that post in extended ASCII data (which has 'ý' and 'ü' record separators) which sometimes passed, and sometimes failed. After much debugging I found the new tests failed when automatically run by cron, but passed when run by an interactive terminal session.
When executed in an interactive terminal session, LANG is set to:
LANG=en_AU
However, cron sets the Unix LANG environment variable to POSIX. Ie:
LANG=POSIX
This seems to be causing the proble,.
I got the tests running by prefixing the test suite crontab entry with "export LANG=en_AU ;"
ie: The entry is now:
30 20 * * * export LANG=en_AU ; $HOME/runsuite.sh >> $HOME/tmp.out 2>&1
This got these tests running.
Regards,
Sonam Chauhan
PS: 'locale -a' on the system shows that UTF-8 encoded English is also a support LANG attribute:
en_AU.utf8
I guess this may be more pertinent for those whose testcases post in binary data.