Unanswered question

Waiting for a server response

For performance testing I need to upload a file and have the program extract information. Processing the file causes a loading bar to display. When running validation tests, all steps after this one fail because Neoload does not allow the program to finish loading the file. Referencing the attached diagrams 1 and 2, I would like the program to wait until the value of the 'Number of Events' XPath displays a value other than 0.

How might I be able to do this?

Thomas H.
Thomas H.

Thomas H.

Level
0
55 / 100
points

Answers

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

I do not know if it's your case but usually when there's a processing on backend server, there's a request polling that is issued by the browser to check the completion.

Did you have such polling request while recording your test? If yes then you can reproduce that behavior with NeoLoad using a while loop action  and exctract the server response until the processing is finished.

If not then it would mean that the server only sends back a response when the processing is completed. But in that case i do not see why you get the behavior you described.

Thomas H.
Thomas H.

Thomas H.

Level
0
55 / 100
points

Talking to the developers, the server sends a complete status to the client once the upload is complete and does not poll. When running the performance test the upload process should take over a minute to complete, however it finishes in a fraction of a second and when checking the application manually, the file was never uploaded.

How does Neoload check the server response? Is there a way I can verify that Neoload did record the server response correctly?

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

Ok that means that the issue is not that NeoLoad does not wait till the upload is completed but the upload is not working at all. The issue is not with the response but more with the request sent.

In your first description you said that you run a validation test. Are you talking about a check virtual user?

In other words does the check virtual user work? From your screen shot we can see that there's a parameter related to your zip file that is uploaded. Does it mean that the content of that file is embedded inside that POST request?

I would expect a POST multi-part type request to upload a file and not a POST form request.

 

 

Thomas H.
Thomas H.

Thomas H.

Level
0
55 / 100
points

By validation I do mean the check a user path option. The check virtual user does not fail on any steps, however when using Neoload and manually checking the program after running a performance test or check a user path test, the file was never uploaded.

When viewing the 'Upload' step, Neoload recorded that the file was uploaded, but the application did not detect any data within the .zip file, the 'Number of Events' field still displays 0. On the next transaction 'Import', the application should extract all relevant data and add it to the database. Once complete another server response is sent to the client. This process should take around a minute to complete, but Neoload states that the process took less than a second.

The previous 'Select' transaction, contains a POST multi-part request which handles the upload of the file. The POST request in my original post does reference the .zip file in the 'ctl00_ContentPlaceHolder1_radImportUpload_ClientState' parameter. The 'Import' POST request also references the uploaded .zip file using the 'ctl00$ContentPlaceHolder 1$ServerExportLocationHiddenField' parameter. This location is on the server.
I do believe this file gets uploaded successfully because the application performs a redirect if the filepath is invalid. This causes the rest of the performance transactions to fail.

The 'Select' transaction selects the .zip file, 'Upload' extracts preliminary information from .xml files in the .zip, and 'Import' imports records from the remaining .xml files into database tables.

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

Ok i now understand that your POST multi-part request is inside that select container. So if you run your check virtual user, you can see the binary content of your zip file in that request and i assume that you get the same response from the server compared to the recording right?

If it's the case then, it means that the issue might be on the two next POST requests. It might be due to dynamic parameters.

From your screen shots, first i would check if the VIEWSTATEGENERATOR value is dynamic. In your check virtual user check if the server sent a new value for that parameter. If yes then it means it's dynamic and you have to use a variable extractor.

Then there's that hidHullNo parameter with "78" as value. You should also check if the server sends back a different value.

Finally there's a hidV42_Import parameter. You should check if it's always "42" as value or not.

If your server sent back a response after few seconds instead of minute that it means that it was expecting different parameters value.

I do not have your project so i guessed what this dynamic values could be based on your screen shots from the more obvious to the less ones.

 

Thomas H.
Thomas H.

Thomas H.

Level
0
55 / 100
points

Thank you for you help! The error was being caused by one of the sections of one of the complex variables referencing a file size. I am able to make it work by manually changing this variable prior to testing.
Is there a way I can create a variable to read the size of the file? No parameters in the program explicitly reference the file's size.

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

If you know in advance which file will be uploaded can't you also in advance get the size of all your files so you can store them in a NeoLoad variable with the file name to be uploaded?