You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2019/09/11 10:47:13 UTC

[Bug 63744] New: use nogui mode start jmeter with arg -J[propname]=[propvalue],when propvalue is jsonobject, jsonobject will miss "

https://bz.apache.org/bugzilla/show_bug.cgi?id=63744

            Bug ID: 63744
           Summary: use nogui mode start jmeter with arg
                    -J[propname]=[propvalue],when propvalue is jsonobject,
                    jsonobject will miss "
           Product: JMeter
           Version: 5.0
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: 1134903504@qq.com
  Target Milestone: JMETER_5.2

Created attachment 36779
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36779&action=edit
jmeter.log file

use nogui mode start jmeter with arg -J[propname]=[propvalue],when propvalue is
jsonobject, jsonobject will miss "

such as:

jmeter -n -t testplan.jmx -l testreport.jtl
-Juser.cardInfos=[{"cardHolderNumber":"4693966212189886","cardExpirationMonth":"10","cardExpirationYear":"23","securityCode":"565","cardHolderFirstName":"qiuhua","cardHolderLastName":"yang"},{"cardHolderNumber":"4693967295215523","cardExpirationMonth":"10","cardExpirationYear":"23","securityCode":"565","cardHolderFirstName":"qiuhua","cardHolderLastName":"yang"},{"cardHolderNumber":"4693960111089859","cardExpirationMonth":"10","cardExpirationYear":"23","securityCode":"565","cardHolderFirstName":"qiuhua","cardHolderLastName":"yang"}]

 in testplan.jmx, 

log.info(props.getProperty("user.cardInfos"));

but log output 
[{cardHolderNumber:4693966212189886,cardExpirationMonth:10,cardExpirationYear:23,securityCode:565,cardHolderFirstName:qiuhua,cardHolderLastName:yang},{cardHolderNumber:4693967295215523,cardExpirationMonth:10,cardExpirationYear:23,securityCode:565,cardHolderFirstName:qiuhua,cardHolderLastName:yang},{cardHolderNumber:4693960111089859,cardExpirationMonth:10,cardExpirationYear:23,securityCode:565,cardHolderFirstName:qiuhua,cardHolderLastName:yang}]

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63744] use nogui mode start jmeter with arg -J[propname]=[propvalue],when propvalue is jsonobject, jsonobject will miss "

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63744

--- Comment #2 from 杨秋华 <11...@qq.com> ---
(In reply to Felix Schumacher from comment #1)
> Thanks for the report. The most likely reason for this behavior is missing
> escapes in your shell command.
> 
> Have a look at your shell manual to know how the shell handles special
> characters like word.


this is my shell:

jmeter -n -t E:\opt\jmeter\test-plan\webgate-v1u0.jmx -l
E:\opt\jmeter\test-report\20190911-9fd28f36de314c578eb8ad3f8cd32cde.jtl
-Jmapi.domain=https://mapi.innertest3.ipaylinks.com
-Jmapi.merchantId=500000000001503 -Jmapi.pkey.md5=666
-Jmapi.carrierId=www.pay.com
-Jmapi.notifyUrl=http://172.16.1.210:50011/asyncNotify.htm
-Jmapi.redirectUrl=http://47.100.32.200:50011/redirect2u0.htm
-Jmapi.transAmt=1234 -Jmapi.currency=USD -Jmapi.settleCurrency=USD
-Jmapi.dcc=EDC -Jwebgate.domain=http://api.innertest3.ipaylinks.com
-Jwebgate.partnerId=10000003781 -Jwebgate.pkey.md5=666
-Jwebgate.siteId=www.pay.com
-Jwebgate.noticeUrl=http://101.132.162.77:50001/notify.htm
-Jwebgate.returnUrl=http://101.132.162.77:50001/redirect.htm
-Jwebgate.orderAmount=1234 -Jwebgate.currencyCode=CNY
-Jwebgate.settlementCurrencyCode=CNY -Jwebgate.payType=EDC
-Jwebgate.cardInfos=[{"cardHolderNumber":"4693966212189886","cardExpirationMonth":"10","cardExpirationYear":"23","securityCode":"565","cardHolderFirstName":"qiuhua","cardHolderLastName":"yang"},{"cardHolderNumber":"4693967295215523","cardExpirationMonth":"10","cardExpirationYear":"23","securityCode":"565","cardHolderFirstName":"qiuhua","cardHolderLastName":"yang"},{"cardHolderNumber":"4693960111089859","cardExpirationMonth":"10","cardExpirationYear":"23","securityCode":"565","cardHolderFirstName":"qiuhua","cardHolderLastName":"yang"}]
-Jjmeter.save.saveservice.output_format=xml

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63744] use nogui mode start jmeter with arg -J[propname]=[propvalue],when propvalue is jsonobject, jsonobject will miss "

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63744

--- Comment #4 from Felix Schumacher <fe...@internetallee.de> ---
(In reply to 杨秋华 from comment #3)
> (In reply to Felix Schumacher from comment #1)
> > Thanks for the report. The most likely reason for this behavior is missing
> > escapes in your shell command.
> > 
> > Have a look at your shell manual to know how the shell handles special
> > characters like word.
> 
> How should I escape this shell script?

That depends on your shell. I guess you use Windows and a cmd shell, so I
googled for "windows cmd escape quotes" and my first result was:
https://stackoverflow.com/questions/7760545/escape-double-quotes-in-parameter

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63744] use nogui mode start jmeter with arg -J[propname]=[propvalue],when propvalue is jsonobject, jsonobject will miss "

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63744

--- Comment #3 from 杨秋华 <11...@qq.com> ---
(In reply to Felix Schumacher from comment #1)
> Thanks for the report. The most likely reason for this behavior is missing
> escapes in your shell command.
> 
> Have a look at your shell manual to know how the shell handles special
> characters like word.

How should I escape this shell script?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63744] use nogui mode start jmeter with arg -J[propname]=[propvalue],when propvalue is jsonobject, jsonobject will miss "

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63744

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
                 OS|                            |All
             Status|NEW                         |RESOLVED

--- Comment #1 from Felix Schumacher <fe...@internetallee.de> ---
Thanks for the report. The most likely reason for this behavior is missing
escapes in your shell command.

Have a look at your shell manual to know how the shell handles special
characters like word.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 63744] use nogui mode start jmeter with arg -J[propname]=[propvalue],when propvalue is jsonobject, jsonobject will miss "

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63744

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|JMETER_5.2                  |---
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

-- 
You are receiving this mail because:
You are the assignee for the bug.