Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

how to send different response wrt request for same service

Nihar1991
Nihar1991 Posts: 52

Hi,

I have a situation where i need to send different response for different request body but the service is same.

for example: below service triggered on search page, after clicking add to cart, on product details page.

https://imservices-qa1-usch01.corporate.ingrammicro.com:9043/ESProductSearchCA_v4_0
authentication
User: IMONLINE
PW: IMONLINE12345

different request:
{}
{"id":"IMKeywordRedirect","params":{"keyword":"31115t"}}
{}
{"id":"IMproductSearchV6","params":{"branch":"40","pageSize":16,"pageStart":0,"resellersid":["40121290","000001"],"keywords":["31115T"],"customerKey":"40121290","webvisibleflag":true,"authindex":"im.authorization.ca_en","sboindex":"im.sbo.ca_en","negativeauthindex":"im.authorization-negative.ca_en","custpromoindex":"im.custpromo.ca_en","filters":[],"techspecpagesize":20}}

{}
{"id":"IMproductSummaryV6","params":{"branch":"40","pageSize":2,"pageStart":0,"resellersid":["40121290","000001"],"customerKey":"40121290","webvisibleflag":true,"listOfProducts":["A300-31115T"],"authindex":"im.authorization.ca_en","sboindex":"im.sbo.ca_en","negativeauthindex":"im.authorization-negative.ca_en","custpromoindex":"im.custpromo.ca_en"}}

{}
{"id":"IMproductDetails","params":{"branch":"40","material":["A300-31115T"],"resellersid":["40121290","000001"],"customerKey":"40121290","authindex":"im.authorization.ca_en","negativeauthindex":"im.authorization-negative.ca_en","sboindex":"im.sbo.ca_en","custpromoindex":"im.custpromo.ca_en"}}

and the response also different for each request body. so while creating virtual asset using traffic file i did not get any corelation options, so it's not working properly.

i have attached the traffic file

Thanks
Nihar Arisal

Tagged:

Comments

  • Ireneusz Szmigiel
    Ireneusz Szmigiel Posts: 227 ✭✭✭

    Hi Nihar1991,

    correct me, if I'm wrong, but it looks that request body should be unique.
    If this is true then user body content correlation. More information you can find in documentation here Customizing Request Matching and Correlations
    Check part regarding Request Body Correlations.
    Keep in mind, that you can use more then one element from request to correlate response.

    --
    Ireneusz Szmigiel
    http://www.catb.org/esr/faqs/smart-questions.html

  • Nihar1991
    Nihar1991 Posts: 52

    Hi Ireneusz Szmigiel,

    yes, the request body for the same services is different. and if we use request body correlation, it's taking one req/res pair. so we are getting same response for any kind of request. and also we did not get any autocorrelation while creating a virtual asset.
    can you please help me with this.

    Thanks
    Nihar Ranjan Arisal