weixin_33720452 2017-04-19 13:02 采纳率: 0%
浏览 123

在JMeter中捕获Cookie

I am facing issue for AJAX call in jmeter.

A new Ajax Token generated every time by taking value of cookies

efpcookieiQmdOSdtYvVcktctGnNfrwCC4350121699716256984xxxxxxxxx=nAgvF4MhWoTTb7NTV8zaowCC;

I need to pass the cookie in the following URL:

http://www.example.com/?usecase=maintain_account&command=load_acc_type_command&guid=${uid6}&commandorigin=0.create_account_step1_view&fpid=efpcookieiQmdOSdtYvVcktctGnNfrwCC4350121699716256984xxxxxxxxx&view=create_account_step1_view&pipe=ajax&hash=hash1287912XXXX&ajaxtoken=${ajaxtokan}&accProdId=1

How can I capture this?

  • 写回答

1条回答 默认 最新

  • 衫裤跑路 2017-04-19 13:39
    关注

    Edit the jmeter.properties file inside the JMeter bin directory, and set CookieManager.save.cookies=true

    Restart JMeter and add a HTTP Cookie Manager. Now, just replace the Cookie value with ${COOKIE_fpid}, this is:

    usecase=maintain_account&command=load_acc_type_command&guid=${uid6}&commandorigin=0.create_account_step1_view&fpid=${COOKIE_fpid}&view=create_account_step1_view&pipe=ajax&hash=hash1287912XXXX&ajaxtoken=${ajaxtokan}&accProdId=1

    评论

报告相同问题?