Discussion:
How to run the JMeter client locally on ZOS?
Lucas Partridge
2007-07-06 11:27:32 UTC
Permalink
I know JMeter works when I run it from a Windows box and point it at a ZOS
box, but I want to run JMeter 2.2 in batch mode (-n) from within Unix
System Services on ZOS. This is so that I can automate some tests.

However when I run JMeter it appears to send garbage data (EBCDIC?) in the
POST request:

POST /SpringSimpleAddressBookWeb/add_contact.do HTTP/1.1
Connection: keep-alive
Cookie:
JSESSIONID=00003IPlaBORkaMwOuHwpOAmjUu:C081E072F214D42E000000D40000000109390F0B
Content-Length: 48
Content-Type: application/x-www-form-urlencoded
User-Agent: Java/1.4.2
Host: 9.145.68.119:9081
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2

~??‰P

... as opposed to something like this when JMeter is run from Windows:

POST /SpringSimpleAddressBookWeb/add_contact.do HTTP/1.1
Connection: keep-alive
Cookie:
JSESSIONID=0000RMNYrz2DRWwXGi1zEQMNBIq:C081E072F214D42E000000D40000000109390F0B
Content-Length: 48
Content-Type: application/x-www-form-urlencoded
User-Agent: Java/1.4.2
Host: localhost:9081
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2

name=Lucas&phoneNumber=123&dateOfBirth=&address=

I've tried invoking JMeter by using the -Dfile.encoding=ISO-8859-1 on the
java command line but java then seems to expect the parameters for JMeter
to be in EBCDIC as well! For example:

/WebSphere/V6R0M0/AppServer/java/bin/java -jar -Dfile.encoding=ISO-8859-1
JMeter/jakarta-jmeter-2.2/bin/ApacheJMeter.jar -n -l jm.log -t
YP_STRUTS_ADD.jmx

yields:

/test/workarea/automation/tmp:>jmenc.sh
The jar file is not found: ÑÔ
£
a£`
£
`òKòaaÁ
ÑÔ
£
K
/test/workarea/automation/tmp:>

Any ideas please on how to get this working? I am not a ZOS expert so
hopefully the fix is simple:).
Many thanks.





Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Alf Høgemark
2007-07-06 19:08:11 UTC
Permalink
Hi

I think you should try the nightly build of jmeter.
There you can specify the content encoding used for sending the POST
request.
There is a parameter in the HTTP Request where you set the content
encoding, typically UTF-8 or ISO-8859-1, or whatever your web app is
expecting.

In Jmeter 2.2, the "JRE default encoding" was used in a number of
places, and it sounds like
the "JRE default encoding" on ZOS is ebcdic.
So I am pretty sure you should get it working if you use the nightly
build of jmeter.

Regards
Alf Hogemark

Lucas Partridge wrote:
> I know JMeter works when I run it from a Windows box and point it at a ZOS
> box, but I want to run JMeter 2.2 in batch mode (-n) from within Unix
> System Services on ZOS. This is so that I can automate some tests.
>
> However when I run JMeter it appears to send garbage data (EBCDIC?) in the
> POST request:
>
> POST /SpringSimpleAddressBookWeb/add_contact.do HTTP/1.1
> Connection: keep-alive
> Cookie:
> JSESSIONID=00003IPlaBORkaMwOuHwpOAmjUu:C081E072F214D42E000000D40000000109390F0B
> Content-Length: 48
> Content-Type: application/x-www-form-urlencoded
> User-Agent: Java/1.4.2
> Host: 9.145.68.119:9081
> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
>
> ~??‰P
>
> ... as opposed to something like this when JMeter is run from Windows:
>
> POST /SpringSimpleAddressBookWeb/add_contact.do HTTP/1.1
> Connection: keep-alive
> Cookie:
> JSESSIONID=0000RMNYrz2DRWwXGi1zEQMNBIq:C081E072F214D42E000000D40000000109390F0B
> Content-Length: 48
> Content-Type: application/x-www-form-urlencoded
> User-Agent: Java/1.4.2
> Host: localhost:9081
> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
>
> name=Lucas&phoneNumber=123&dateOfBirth=&address=
>
> I've tried invoking JMeter by using the -Dfile.encoding=ISO-8859-1 on the
> java command line but java then seems to expect the parameters for JMeter
> to be in EBCDIC as well! For example:
>
> /WebSphere/V6R0M0/AppServer/java/bin/java -jar -Dfile.encoding=ISO-8859-1
> JMeter/jakarta-jmeter-2.2/bin/ApacheJMeter.jar -n -l jm.log -t
> YP_STRUTS_ADD.jmx
>
> yields:
>
> /test/workarea/automation/tmp:>jmenc.sh
> The jar file is not found: ÑÔ
> £
> a£`
> £
> `òKòaaÁ
> ÑÔ
> £
> K
> /test/workarea/automation/tmp:>
>
> Any ideas please on how to get this working? I am not a ZOS expert so
> hopefully the fix is simple:).
> Many thanks.
>
>
>
>
>
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>
>
>
>
>
>
>
Lucas Partridge
2007-07-09 14:20:48 UTC
Permalink
Thanks very much, Alf - you saved my day because that worked!:)

I downloaded the jakarta-jmeter-r554518 nightly build, set the content
encoding for the POST requests (and the GET requests for good measure -
probably not necessary though!) to ISO-8859-1, and JMeter then ran fine on
z/OS. That is, my application understood the POST requests.

BTW I also discovered that my automation had to copy the jmx files over as
binary format but the corresponding csv data input files as EBCDIC for
JMeter to run properly. If instead the jmx files were in EBCDIC then I
got a parse exception when JMeter tried to read them:

2007/07/09 09:03:58 ERROR - jmeter.JMeter:
com.thoughtworks.xstream.io.StreamException: : only whitespace content
allowed before start tag and not L (position: START_DOCUMENT seen L...
@1:1)
at
com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:67)
at
com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:126)
at
com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:119)
at
com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:98)
at
com.thoughtworks.xstream.io.xml.AbstractPullReader.moveDown(AbstractPullReader.java:83)
at
com.thoughtworks.xstream.io.xml.XppReader.<init>(XppReader.java:37)
at
com.thoughtworks.xstream.io.xml.XppDriver.createReader(XppDriver.java:30)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:767)
at
org.apache.jmeter.save.SaveService.loadTree(SaveService.java:416)
at org.apache.jmeter.JMeter.run(JMeter.java:657)
at org.apache.jmeter.JMeter.startNonGui(JMeter.java:639)
at org.apache.jmeter.JMeter.start(JMeter.java:324)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at org.apache.jmeter.NewDriver.main(NewDriver.java:183)
Caused by: org.xmlpull.v1.XmlPullParserException: only whitespace content
allowed before start tag and not L (position: START_DOCUMENT seen L...
@1:1)
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at
com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:52)
... 17 more

...and if the csv data files were in binary then garbage was fed into the
POST request.

Many thanks for your help. That's a huge relief.
Regards,
Lucas.

PS It might be worth adding the content encoding value as an extra field
for the HTTP Request Defaults config element.




Alf Høgemark <***@i100.no>
06/07/2007 20:08
Please respond to
"JMeter Users List" <jmeter-***@jakarta.apache.org>


To
JMeter Users List <jmeter-***@jakarta.apache.org>
cc

Subject
Re: How to run the JMeter client locally on ZOS?






Hi

I think you should try the nightly build of jmeter.
There you can specify the content encoding used for sending the POST
request.
There is a parameter in the HTTP Request where you set the content
encoding, typically UTF-8 or ISO-8859-1, or whatever your web app is
expecting.

In Jmeter 2.2, the "JRE default encoding" was used in a number of
places, and it sounds like
the "JRE default encoding" on ZOS is ebcdic.
So I am pretty sure you should get it working if you use the nightly
build of jmeter.

Regards
Alf Hogemark

Lucas Partridge wrote:
> I know JMeter works when I run it from a Windows box and point it at a
ZOS
> box, but I want to run JMeter 2.2 in batch mode (-n) from within Unix
> System Services on ZOS. This is so that I can automate some tests.
>
> However when I run JMeter it appears to send garbage data (EBCDIC?) in
the
> POST request:
>
> POST /SpringSimpleAddressBookWeb/add_contact.do HTTP/1.1
> Connection: keep-alive
> Cookie:
>
JSESSIONID=00003IPlaBORkaMwOuHwpOAmjUu:C081E072F214D42E000000D40000000109390F0B
> Content-Length: 48
> Content-Type: application/x-www-form-urlencoded
> User-Agent: Java/1.4.2
> Host: 9.145.68.119:9081
> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
>
> ~???P
>
> ... as opposed to something like this when JMeter is run from Windows:
>
> POST /SpringSimpleAddressBookWeb/add_contact.do HTTP/1.1
> Connection: keep-alive
> Cookie:
>
JSESSIONID=0000RMNYrz2DRWwXGi1zEQMNBIq:C081E072F214D42E000000D40000000109390F0B
> Content-Length: 48
> Content-Type: application/x-www-form-urlencoded
> User-Agent: Java/1.4.2
> Host: localhost:9081
> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
>
> name=Lucas&phoneNumber=123&dateOfBirth=&address=
>
> I've tried invoking JMeter by using the -Dfile.encoding=ISO-8859-1 on
the
> java command line but java then seems to expect the parameters for
JMeter
> to be in EBCDIC as well! For example:
>
> /WebSphere/V6R0M0/AppServer/java/bin/java -jar
-Dfile.encoding=ISO-8859-1
> JMeter/jakarta-jmeter-2.2/bin/ApacheJMeter.jar -n -l jm.log -t
> YP_STRUTS_ADD.jmx
>
> yields:
>
> /test/workarea/automation/tmp:>jmenc.sh
> The jar file is not found: ÑÔ
> £
> a£`
> £
> `òKòaaÁ
> ÑÔ
> £
> K
> /test/workarea/automation/tmp:>
>
> Any ideas please on how to get this working? I am not a ZOS expert so
> hopefully the fix is simple:).
> Many thanks.
>
>
>
>
>
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number

> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU
>
>
>
>
>
>
>

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








Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
sebb
2007-07-10 11:45:35 UTC
Permalink
On 09/07/07, Lucas Partridge <***@uk.ibm.com> wrote:
> Thanks very much, Alf - you saved my day because that worked!:)
>
> I downloaded the jakarta-jmeter-r554518 nightly build, set the content
> encoding for the POST requests (and the GET requests for good measure -
> probably not necessary though!) to ISO-8859-1, and JMeter then ran fine on
> z/OS. That is, my application understood the POST requests.
>
> BTW I also discovered that my automation had to copy the jmx files over as
> binary format but the corresponding csv data input files as EBCDIC for
> JMeter to run properly. If instead the jmx files were in EBCDIC then I
> got a parse exception when JMeter tried to read them:

JMX files are in XML, which it seems can use EBCDIC.

However, I think the encoding needs to be set appropriately - instead of

<?xml version="1.0" encoding="UTF-8"?>

you would need something like:

<?xml version="1.0" encoding="CP037"?>

Might be interesting to try that?

Also, if you create a JMX on z/OS, what does the XML header line look like?

<snip/>
> ...and if the csv data files were in binary then garbage was fed into the
> POST request.
>
> Many thanks for your help. That's a huge relief.
> Regards,
> Lucas.
>
> PS It might be worth adding the content encoding value as an extra field
> for the HTTP Request Defaults config element.

Good idea.

>
>
> Alf Høgemark <***@i100.no>
> 06/07/2007 20:08
> Please respond to
> "JMeter Users List" <jmeter-***@jakarta.apache.org>
>
>
> To
> JMeter Users List <jmeter-***@jakarta.apache.org>
> cc
>
> Subject
> Re: How to run the JMeter client locally on ZOS?
>
>
>
>
>
>
> Hi
>
> I think you should try the nightly build of jmeter.
> There you can specify the content encoding used for sending the POST
> request.
> There is a parameter in the HTTP Request where you set the content
> encoding, typically UTF-8 or ISO-8859-1, or whatever your web app is
> expecting.
>
> In Jmeter 2.2, the "JRE default encoding" was used in a number of
> places, and it sounds like
> the "JRE default encoding" on ZOS is ebcdic.
> So I am pretty sure you should get it working if you use the nightly
> build of jmeter.
>
> Regards
> Alf Hogemark
>
> Lucas Partridge wrote:
> > I know JMeter works when I run it from a Windows box and point it at a
> ZOS
> > box, but I want to run JMeter 2.2 in batch mode (-n) from within Unix
> > System Services on ZOS. This is so that I can automate some tests.
> >
> > However when I run JMeter it appears to send garbage data (EBCDIC?) in
> the
> > POST request:
> >
> > POST /SpringSimpleAddressBookWeb/add_contact.do HTTP/1.1
> > Connection: keep-alive
> > Cookie:
> >
> JSESSIONID=00003IPlaBORkaMwOuHwpOAmjUu:C081E072F214D42E000000D40000000109390F0B
> > Content-Length: 48
> > Content-Type: application/x-www-form-urlencoded
> > User-Agent: Java/1.4.2
> > Host: 9.145.68.119:9081
> > Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
> >
> > ~???P
> >
> > ... as opposed to something like this when JMeter is run from Windows:
> >
> > POST /SpringSimpleAddressBookWeb/add_contact.do HTTP/1.1
> > Connection: keep-alive
> > Cookie:
> >
> JSESSIONID=0000RMNYrz2DRWwXGi1zEQMNBIq:C081E072F214D42E000000D40000000109390F0B
> > Content-Length: 48
> > Content-Type: application/x-www-form-urlencoded
> > User-Agent: Java/1.4.2
> > Host: localhost:9081
> > Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
> >
> > name=Lucas&phoneNumber=123&dateOfBirth=&address=
> >
> > I've tried invoking JMeter by using the -Dfile.encoding=ISO-8859-1 on
> the
> > java command line but java then seems to expect the parameters for
> JMeter
> > to be in EBCDIC as well! For example:
> >
> > /WebSphere/V6R0M0/AppServer/java/bin/java -jar
> -Dfile.encoding=ISO-8859-1
> > JMeter/jakarta-jmeter-2.2/bin/ApacheJMeter.jar -n -l jm.log -t
> > YP_STRUTS_ADD.jmx
> >
> > yields:
> >
> > /test/workarea/automation/tmp:>jmenc.sh
> > The jar file is not found: ÑÔ
> > £
> > a£`
> > £
> > `òKòaaÁ
> > ÑÔ
> > £
> > K
> > /test/workarea/automation/tmp:>
> >
> > Any ideas please on how to get this working? I am not a ZOS expert so
> > hopefully the fix is simple:).
> > Many thanks.
> >
> >
> >
> >
> >
> > Unless stated otherwise above:
> > IBM United Kingdom Limited - Registered in England and Wales with number
>
> > 741598.
> > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
> 3AU
> >
> >
> >
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-***@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-***@jakarta.apache.org
>
>
>
>
>
>
>
>
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>
>
>
>
>
>
Lucas Partridge
2007-07-13 17:51:06 UTC
Permalink
Unfortunately I no longer have access to the ZOS box and therefore can't
answer your questions:(.

I would guess that if I had created a JMX file using JMeter on ZOS then
the XML header line would have had an encoding value of Cp1047. That is
what the file.encoding Java system property was reported to be on the box.
I think that is the EBCDIC code page.

I should have clarified what I meant by 'binary format' before. The JMX
files were originally in ASCII so they remained as ASCII when ftp'd in
binary transfer mode over to the ZOS box. If you transfer an ASCII file
using ftp's text transfer mode however, then the ftp daemon on ZOS
automatically converts the format to EBCDIC. This can be a bit confusing
if you don't realise this, as I didn't at first!

Thanks for your help.
Lucas.




sebb <***@gmail.com>
10/07/2007 12:45
Please respond to
"JMeter Users List" <jmeter-***@jakarta.apache.org>


To
"JMeter Users List" <jmeter-***@jakarta.apache.org>
cc

Subject
Re: How to run the JMeter client locally on ZOS?






On 09/07/07, Lucas Partridge <***@uk.ibm.com> wrote:
> Thanks very much, Alf - you saved my day because that worked!:)
>
> I downloaded the jakarta-jmeter-r554518 nightly build, set the content
> encoding for the POST requests (and the GET requests for good measure -
> probably not necessary though!) to ISO-8859-1, and JMeter then ran fine
on
> z/OS. That is, my application understood the POST requests.
>
> BTW I also discovered that my automation had to copy the jmx files over
as
> binary format but the corresponding csv data input files as EBCDIC for
> JMeter to run properly. If instead the jmx files were in EBCDIC then I
> got a parse exception when JMeter tried to read them:

JMX files are in XML, which it seems can use EBCDIC.

However, I think the encoding needs to be set appropriately - instead of

<?xml version="1.0" encoding="UTF-8"?>

you would need something like:

<?xml version="1.0" encoding="CP037"?>

Might be interesting to try that?

Also, if you create a JMX on z/OS, what does the XML header line look
like?

<snip/>
> ...and if the csv data files were in binary then garbage was fed into
the
> POST request.
>
> Many thanks for your help. That's a huge relief.
> Regards,
> Lucas.
>
> PS It might be worth adding the content encoding value as an extra field
> for the HTTP Request Defaults config element.

Good idea.

>
>
> Alf Høgemark <***@i100.no>
> 06/07/2007 20:08
> Please respond to
> "JMeter Users List" <jmeter-***@jakarta.apache.org>
>
>
> To
> JMeter Users List <jmeter-***@jakarta.apache.org>
> cc
>
> Subject
> Re: How to run the JMeter client locally on ZOS?
>
>
>
>
>
>
> Hi
>
> I think you should try the nightly build of jmeter.
> There you can specify the content encoding used for sending the POST
> request.
> There is a parameter in the HTTP Request where you set the content
> encoding, typically UTF-8 or ISO-8859-1, or whatever your web app is
> expecting.
>
> In Jmeter 2.2, the "JRE default encoding" was used in a number of
> places, and it sounds like
> the "JRE default encoding" on ZOS is ebcdic.
> So I am pretty sure you should get it working if you use the nightly
> build of jmeter.
>
> Regards
> Alf Hogemark
>
> Lucas Partridge wrote:
> > I know JMeter works when I run it from a Windows box and point it at a
> ZOS
> > box, but I want to run JMeter 2.2 in batch mode (-n) from within Unix
> > System Services on ZOS. This is so that I can automate some tests.
> >
> > However when I run JMeter it appears to send garbage data (EBCDIC?) in
> the
> > POST request:
> >
> > POST /SpringSimpleAddressBookWeb/add_contact.do HTTP/1.1
> > Connection: keep-alive
> > Cookie:
> >
>
JSESSIONID=00003IPlaBORkaMwOuHwpOAmjUu:C081E072F214D42E000000D40000000109390F0B
> > Content-Length: 48
> > Content-Type: application/x-www-form-urlencoded
> > User-Agent: Java/1.4.2
> > Host: 9.145.68.119:9081
> > Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
> >
> > ~???P
> >
> > ... as opposed to something like this when JMeter is run from Windows:
> >
> > POST /SpringSimpleAddressBookWeb/add_contact.do HTTP/1.1
> > Connection: keep-alive
> > Cookie:
> >
>
JSESSIONID=0000RMNYrz2DRWwXGi1zEQMNBIq:C081E072F214D42E000000D40000000109390F0B
> > Content-Length: 48
> > Content-Type: application/x-www-form-urlencoded
> > User-Agent: Java/1.4.2
> > Host: localhost:9081
> > Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
> >
> > name=Lucas&phoneNumber=123&dateOfBirth=&address=
> >
> > I've tried invoking JMeter by using the -Dfile.encoding=ISO-8859-1 on
> the
> > java command line but java then seems to expect the parameters for
> JMeter
> > to be in EBCDIC as well! For example:
> >
> > /WebSphere/V6R0M0/AppServer/java/bin/java -jar
> -Dfile.encoding=ISO-8859-1
> > JMeter/jakarta-jmeter-2.2/bin/ApacheJMeter.jar -n -l jm.log -t
> > YP_STRUTS_ADD.jmx
> >
> > yields:
> >
> > /test/workarea/automation/tmp:>jmenc.sh
> > The jar file is not found: ÑÔ
> > £
> > a£`
> > £
> > `òKòaaÁ
> > ÑÔ
> > £
> > K
> > /test/workarea/automation/tmp:>
> >
> > Any ideas please on how to get this working? I am not a ZOS expert so
> > hopefully the fix is simple:).
> > Many thanks.
> >
> >
> >
> >
> >
> > Unless stated otherwise above:
> > IBM United Kingdom Limited - Registered in England and Wales with
number
>
> > 741598.
> > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
> 3AU
> >
> >
> >
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-***@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-***@jakarta.apache.org
>
>
>
>
>
>
>
>
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU
>
>
>
>
>
>

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








Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
sebb
2007-07-14 00:28:00 UTC
Permalink
On 13/07/07, Lucas Partridge <***@uk.ibm.com> wrote:
> Unfortunately I no longer have access to the ZOS box and therefore can't
> answer your questions:(.

OK. By the same token, I guess you don't need to use JMeter on ZOS either..

> I would guess that if I had created a JMX file using JMeter on ZOS then
> the XML header line would have had an encoding value of Cp1047. That is
> what the file.encoding Java system property was reported to be on the box.
> I think that is the EBCDIC code page.
>
> I should have clarified what I meant by 'binary format' before. The JMX
> files were originally in ASCII so they remained as ASCII when ftp'd in
> binary transfer mode over to the ZOS box. If you transfer an ASCII file
> using ftp's text transfer mode however, then the ftp daemon on ZOS
> automatically converts the format to EBCDIC. This can be a bit confusing
> if you don't realise this, as I didn't at first!

Though presumably the ftp daemon is not clever enough to convert the
encoding attribute in XML files ;-)

> Thanks for your help.
> Lucas.
>
>
>
>
> sebb <***@gmail.com>
> 10/07/2007 12:45
> Please respond to
> "JMeter Users List" <jmeter-***@jakarta.apache.org>
>
>
> To
> "JMeter Users List" <jmeter-***@jakarta.apache.org>
> cc
>
> Subject
> Re: How to run the JMeter client locally on ZOS?
>
>
>
>
>
>
> On 09/07/07, Lucas Partridge <***@uk.ibm.com> wrote:
> > Thanks very much, Alf - you saved my day because that worked!:)
> >
> > I downloaded the jakarta-jmeter-r554518 nightly build, set the content
> > encoding for the POST requests (and the GET requests for good measure -
> > probably not necessary though!) to ISO-8859-1, and JMeter then ran fine
> on
> > z/OS. That is, my application understood the POST requests.
> >
> > BTW I also discovered that my automation had to copy the jmx files over
> as
> > binary format but the corresponding csv data input files as EBCDIC for
> > JMeter to run properly. If instead the jmx files were in EBCDIC then I
> > got a parse exception when JMeter tried to read them:
>
> JMX files are in XML, which it seems can use EBCDIC.
>
> However, I think the encoding needs to be set appropriately - instead of
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> you would need something like:
>
> <?xml version="1.0" encoding="CP037"?>
>
> Might be interesting to try that?
>
> Also, if you create a JMX on z/OS, what does the XML header line look
> like?
>
> <snip/>
> > ...and if the csv data files were in binary then garbage was fed into
> the
> > POST request.
> >
> > Many thanks for your help. That's a huge relief.
> > Regards,
> > Lucas.
> >
> > PS It might be worth adding the content encoding value as an extra field
> > for the HTTP Request Defaults config element.
>
> Good idea.
>
> >
> >
> > Alf Høgemark <***@i100.no>
> > 06/07/2007 20:08
> > Please respond to
> > "JMeter Users List" <jmeter-***@jakarta.apache.org>
> >
> >
> > To
> > JMeter Users List <jmeter-***@jakarta.apache.org>
> > cc
> >
> > Subject
> > Re: How to run the JMeter client locally on ZOS?
> >
> >
> >
> >
> >
> >
> > Hi
> >
> > I think you should try the nightly build of jmeter.
> > There you can specify the content encoding used for sending the POST
> > request.
> > There is a parameter in the HTTP Request where you set the content
> > encoding, typically UTF-8 or ISO-8859-1, or whatever your web app is
> > expecting.
> >
> > In Jmeter 2.2, the "JRE default encoding" was used in a number of
> > places, and it sounds like
> > the "JRE default encoding" on ZOS is ebcdic.
> > So I am pretty sure you should get it working if you use the nightly
> > build of jmeter.
> >
> > Regards
> > Alf Hogemark
> >
> > Lucas Partridge wrote:
> > > I know JMeter works when I run it from a Windows box and point it at a
> > ZOS
> > > box, but I want to run JMeter 2.2 in batch mode (-n) from within Unix
> > > System Services on ZOS. This is so that I can automate some tests.
> > >
> > > However when I run JMeter it appears to send garbage data (EBCDIC?) in
> > the
> > > POST request:
> > >
> > > POST /SpringSimpleAddressBookWeb/add_contact.do HTTP/1.1
> > > Connection: keep-alive
> > > Cookie:
> > >
> >
> JSESSIONID=00003IPlaBORkaMwOuHwpOAmjUu:C081E072F214D42E000000D40000000109390F0B
> > > Content-Length: 48
> > > Content-Type: application/x-www-form-urlencoded
> > > User-Agent: Java/1.4.2
> > > Host: 9.145.68.119:9081
> > > Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
> > >
> > > ~???P
> > >
> > > ... as opposed to something like this when JMeter is run from Windows:
> > >
> > > POST /SpringSimpleAddressBookWeb/add_contact.do HTTP/1.1
> > > Connection: keep-alive
> > > Cookie:
> > >
> >
> JSESSIONID=0000RMNYrz2DRWwXGi1zEQMNBIq:C081E072F214D42E000000D40000000109390F0B
> > > Content-Length: 48
> > > Content-Type: application/x-www-form-urlencoded
> > > User-Agent: Java/1.4.2
> > > Host: localhost:9081
> > > Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
> > >
> > > name=Lucas&phoneNumber=123&dateOfBirth=&address=
> > >
> > > I've tried invoking JMeter by using the -Dfile.encoding=ISO-8859-1 on
> > the
> > > java command line but java then seems to expect the parameters for
> > JMeter
> > > to be in EBCDIC as well! For example:
> > >
> > > /WebSphere/V6R0M0/AppServer/java/bin/java -jar
> > -Dfile.encoding=ISO-8859-1
> > > JMeter/jakarta-jmeter-2.2/bin/ApacheJMeter.jar -n -l jm.log -t
> > > YP_STRUTS_ADD.jmx
> > >
> > > yields:
> > >
> > > /test/workarea/automation/tmp:>jmenc.sh
> > > The jar file is not found: ÑÔ
> > > £
> > > a£`
> > > £
> > > `òKòaaÁ
> > > ÑÔ
> > > £
> > > K
> > > /test/workarea/automation/tmp:>
> > >
> > > Any ideas please on how to get this working? I am not a ZOS expert so
> > > hopefully the fix is simple:).
> > > Many thanks.
> > >
> > >
> > >
> > >
> > >
> > > Unless stated otherwise above:
> > > IBM United Kingdom Limited - Registered in England and Wales with
> number
> >
> > > 741598.
> > > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
> > 3AU
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-***@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-***@jakarta.apache.org
> >
> >
> >
> >
> >
> >
> >
> >
> > Unless stated otherwise above:
> > IBM United Kingdom Limited - Registered in England and Wales with number
> > 741598.
> > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
> 3AU
> >
> >
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-***@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-***@jakarta.apache.org
>
>
>
>
>
>
>
>
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>
>
>
>
>
>
Hugh Hunter
2007-07-10 20:27:30 UTC
Permalink
Been struggling at this for a while. I want to use an If Controller to
only call a sampler every 10 iterations through the test plan. So I
have a counter storing as ${COUNT} and I've tried:

${COUNT} % 10 == 0

in the If Controller as well as

${COUNT} MOD 10 == 0

Any ideas?

--Hugh

--
Hugh Hunter
Sr. QA Engineer
------------------------------------
Oversee.net
818 W. 7th St. Suite 700
Los Angeles, CA 90017
Main: 213.408.0080
Fax: 213.892.1227
***@oversee.net
www.oversee.net
------------------------------------
sebb
2007-07-10 20:47:50 UTC
Permalink
The If controller uses Javascript (Rhino).

There's some documentation here:

http://developer.mozilla.org/en/docs/JavaScript_Language_Resources

It looks like the operator is %, so I would try:

(${COUNT} % 10) == 0


S.
On 10/07/07, Hugh Hunter <***@oversee.net> wrote:
> Been struggling at this for a while. I want to use an If Controller to
> only call a sampler every 10 iterations through the test plan. So I
> have a counter storing as ${COUNT} and I've tried:
>
> ${COUNT} % 10 == 0
>
> in the If Controller as well as
>
> ${COUNT} MOD 10 == 0
>
> Any ideas?
>
> --Hugh
>
> --
> Hugh Hunter
> Sr. QA Engineer
> ------------------------------------
> Oversee.net
> 818 W. 7th St. Suite 700
> Los Angeles, CA 90017
> Main: 213.408.0080
> Fax: 213.892.1227
> ***@oversee.net
> www.oversee.net
> ------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-***@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-***@jakarta.apache.org
>
>
Loading...