Testing of ASP.NET WebPage

Hello,

I have an application developed in ASP.NET (Classic NOT Core). I need to through load on application, I have done browser recording and HAR too. but when i run test from k6 it doesn’t submit data; how can i submit data through Load test in K6

Hello and welcome to the forum!

Chances are that when replaying the script, you are not receiving the expected responses, and that this subsequently leads to stuff not happening as expected either. The likely culprit is hard-coded values (tokens, session IDs, etc.) that haven’t been correlated; it is fairly unusual for a script to work without modification after generation from a recording.

Have a read through the article and see if you can find any dynamic values in the generated script. If you find them, you’ll need to figure out where they came from (most likely in a previous response.body), add some code to extract them into a variable, and substitute the hard-coded value with the variable wherever it appears in the script.

Hi Tom,

Thanks for your answer, do you have any example or any document for this implementation?

The linked article (https://k6.io/docs/examples/correlation-and-dynamic-data/) does mention some examples of ASP.NET dynamic values. Specifically, you may find __VIEWSTATE and __EVENTVALIDATION hidden form fields. If you can share a URL or the generated script (via a DM) then I may be able to advise further.

Here the files link;

HAR file and JS of Web page is included.

[admin edit, removed link to potentially sensitive info]

The very first request in the script is already sending __VIEWSTATE, __VIEWSTATEGENERATOR, and __EVENTVALIDATION fields in some POST data. These will have been sent to the client during an earlier request that doesn’t appear to be in the recording. You’ll need to recapture the traffic, starting at the same URL the user would in their browser (i.e. http.xxx-xxx-xxx:92/) before then navigating to the login link that takes you to /Account/Login.aspx.

You’ll then need to look through the received response.body contents to see where the aforementioned variables are sent to the client by the server. Without including the request that generates these variables, you won’t be able to proceed beyond the login.