Need help to print the json response values urgent!

20 views
Skip to first unread message

obulesh c

unread,
May 30, 2024, 6:41:27 AMMay 30
to jmeter-...@googlegroups.com
Hi,
 From the following response, I need to save the values like Bin, binLow, binHigh, level, isAllowed in a csv file. 
I used beanshell post processor, not able to bet values saved
image.png

{
    "BinLookUpResponseMessage": {
        "binDetails": [
            {
                "isAllowed": "Yy",
                "country": "xxx",
                "binSource": "xxx",
                "binLookUpTable": "yyyy",    
                "autoPaymentMethod": yyy,
                "level": "uuuuu",
                "bin": "56656",
                "paymentMethodID": "123243",
                "cardType": "vcx",
                "binPkID": "434545sds",
                "extendedBin": "23443534"
            },
            {
                "isAllowed": "Yx",
                "country": "xxx",
                "binSource": "xxxx",
                "binLookUpTable": "yyyyys",
                "autoPaymentMethod": boolean,
                "paymentMethodID": "2535345",
                "binHigh": "23423523",
                "cardType": "JCX",
                "binLow": "343245345",
                "binPkID": "21423325"
            }
        ],
        "status": "SUCCESS",
        "responseCode": "1"
    }
}


--

 Obulesh

 Lead QA Engineer

Hyderabad,India

 Evergent.com


This email (including any attachments) may contain material that is confidential or proprietary and is for the sole use of the intended recipient.  The use, review, disclosure, or distribution by others or forwarding without express permission is strictly prohibited. If you have received this transmission in error, please immediately notify the sender and delete all copies including any attachments.

Dmitri T

unread,
May 31, 2024, 2:36:00 AMMay 31
to jmeter-plugins
  1. Using Beanshell is some form of a performance anti-pattern, since JMeter 3.1 you should use JSR223 Test Elements and Groovy language for scripting
  2. Using Beanshell/Groovy code for writing values into a file is not the best idea, in case of concurrent high-throughput test when different threads will be writing into the same file it will result into data corruption and loss so I would suggest considering migrating to JSON Extractor and Flexible File Writer instead
Reply all
Reply to author
Forward
0 new messages