Jmeter Performance test on ASP.net form losing ses

2019-07-28 03:41发布

Hi guys i have a very strange problem. I am tasked to conduct several performance tests on an old Webpage (2004 - something). The module that is under test is created with ASP.net forms. Im using Jmeter for the task. I have used Chrome extention (Blazemeter) to generate the starting script.

But a very strange problem occurs all other pages of the form are fine and dandy... except a page for file upload where upon trying to proceed(Make a POST request) it loses its session and you are redirected to another screen with generic- Would you like to continue last session type of messages appear.

In order to try to debug the problem i wrote a simple Post request on IntelliJ and everything works fine when executed.

I then returned to Jmeter and punched in everything identical to the script and i still get the same problem.

I then decided to try the Jmeter recording proxy ( in case the blazemeter is faulty and assigns some values incorectly) And while i was manualy browsing the form the problem Appears! - when i click on proceed on that specific upload form with the jmeter proxy turned on, it loses session and it shows the "continue last session screen". And i am baffled as to how a simple proxy that records could mess up the sessions. I tried it with a normal proxy (not the Jmeter one) and everything works. So it seems that the problem is in Jmeter or some settings. Have you guys ever encountered such a problem , or have some insight as to what might cause such behavior. Additional info:

I have worked on ASP.net form before and i am extracting __VIEWSTATE __EVENTARGUMENT and a couple of other hidden variables from the previous response and passing them to the request.

I am using the Multipart/form-data for the upload file module POST and passing the file properly.

As a standart i am using KeepAlive and Follow Redirects but i have tried Redirect Automatically or all of the above switched off.

There is a Cookie Manager set up on Test Plan level and it is working in HC4 - compatibility(tried all others too) based on the requests its working properly.

Cache Manager to 5000 elements.

Certificates seem to be properly imported (for the Jmeter proxy).

I am at this point baffled as to why Jmeter refuses to act properly and i would be very gratefull if someone could help me.

1条回答
Deceive 欺骗
2楼-- · 2019-07-28 03:48

Hi guys il just post an update since i found a work around. So if i record everything with blazemeter (since jmeter proxy doesnt allow me) and after on the upload step i delete the steps and just write a manual request in the body with multipart/form tick turned off and just write the multipart stuff in the headers it seems to work. I still have no idea why it behaves this way.

查看更多
登录 后发表回答