This is a migrated thread and some comments may be shown as answers.

Load Testing-Database Verification for Virtual Users

18 Answers 194 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Saravanan
Top achievements
Rank 1
Saravanan asked on 24 Jan 2015, 12:26 PM
Hi,
      In my project I am performing Load test with 5 virtual users. I want to test one Scenario below mentioned.

      First think I Want to know the SQL Database will gets Affect while I am using the users virtually in Load testing..

Scenario:

    Each user can update one Record in the SQL Database virtually..

    I want to verify all these five records were saved in the Database or not? using a step with excel sheet(Pass/Fail) after load test finished.

    I did this Scenario using test studio with one sample project..I checked the database Manually..But database was not updated.

    Is it Possible to do? Yes means, suggest me how to do this step by step?

18 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 26 Jan 2015, 11:03 PM
Hi Saravanan,

A Test Studio load test cannot perform SQL queries. All it can do is send HTTP transactions to your web server in large quantities.

Are you sure you want to do a Load Test with only 5 virtual users? That's a very small load, almost no load at all on a typical web server.

For checking the SQL DB back end, you'll be better off using a tool like SQL Server Management Studio (which you can download for free) and running your own SQL queries to see the current values. Manually run the query after running your load test then record your findings.

Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Saravanan
Top achievements
Rank 1
answered on 27 Jan 2015, 05:08 AM
Hi Cody,

Thanks for your reply. I would like to get it clear with few more doubts. 

During Load Testing, do the process run at back end? As it happens for automated test in a browser. Because when I run my recorded tests, I can see it running on my browser impacting my database. But when it comes to load test, I don't see any of those also I couldn't see the changes in my database. 

Just for example I have mentioned earlier as 5 users & SQL. It can be 100 or 500. Similarly the database can may be SQL or Oracle. What I want to know is do load tests impact my real data's. Will the scenarios I run through load test run actually to get them saved. From your words, do those HTTP transactions, impact in my database?
0
Cody
Telerik team
answered on 27 Jan 2015, 07:41 PM
Hello Saravanan,

Just for clarity, which back end processes are you referring to? The ones running on your web server, or what is normally run in a browser, such as JavaScript?

Your web server, being the other end of the communication pipe, should not be able to tell the difference between a real browser running on a client machine versus a Test Studio load test. The changes to the back end data base should still be happening when you run a load test.

A Test Studio load test does not run a browser, thus there's no UI, nor does the JavaScript engine run nor does the Silverlight engine run. Test Studio is playing back the recorded HTTP transactions just like a tape recorder. These recorded transactions are supposed to put your web application running on your web server through the exact same sequence of steps as a real browser would have, including back end DB changes.

If you're not getting the expected results in your back end DB we need to have a close look at your load test to try and figure out why it isn't working as expected. We may want to move this to a private support ticket as I'll need Fiddler traces of the load test running and a copy of your load test as well for analysis.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Saravanan
Top achievements
Rank 1
answered on 29 Jan 2015, 11:24 AM
Hi,

Thanks for the reply.

I have a user registration form, Each time user submits their details and the submitted details will be saved in database.

This is the actual process happening every time when my web test runs in browser.

I am aware that a Test Studio load test does not run a browser.A Test Studio is playing back the recorded HTTP transactions only.

Now, I just need to know that the user submitted details will be saved in database even in Load Test ?

If this is possible, Could you please send me a respective link or video samples.




0
Cody
Telerik team
answered on 30 Jan 2015, 02:24 AM
Hi Saravanan,

Yes a load test of a user registration process is supposed to cause the web application to save the data to the SQL data base just the same as a real person using the browser to register. I'm sorry I don't have a sample I can send to you. Creating such a sample would take me at least a day as there is much to setup, including the DB access.

It would be faster and easier to simply test this out on your QA (or live) system and work out any problems you run into. I'll be happy to work this with you during your trial period as your proof of concept using Test Studio and load testing.

Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Saravanan
Top achievements
Rank 1
answered on 03 Feb 2015, 04:31 AM
Hi,

Herewith,I have mentioned the video link,which describing about how i did the load test.

https://vid.me/5kg3

Please,let me know if i have done something wrong in that.

Could you please tell me your mail ID,So that i will send you the test studio project which i did the load test.

I truly appreciate, your help in resolving the problem.
0
Cody
Telerik team
answered on 03 Feb 2015, 11:08 PM
Hello Saravanan,

Thank you for the video. I see it in how you are creating a new load test and recording a new user profile from an existing web test. The only concern I have is that you did not select any of the dynamic targets. Our recommendation is to select them all unless your web developer instructs you differently.

I'll be happy to review your project, but we really need all communication, including file attachments to reside within our online system. I realize this is a public forum. If you prefer you can create your own private support ticket and attach anything confidential in there. If it's larger than 20MB (which is larger than our email system would accept anyway) just let me know and I'll provide an alternate upload location.

I'm still unsure what you want me to look at after I receive your project. I don't see any problem i.e. everything is working as expected that I see so far. So what exactly should I be looking for in your project?


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Saravanan
Top achievements
Rank 1
answered on 05 Feb 2015, 09:01 AM
Thanks for your support.

Through our previous conversations, I came to know that a load test is supposed to make changes in the database.

I did load testing for two web applications:

1. A sample web application which is created by me.

Whenever I did a load test for my sample web application, its working fine reflecting the changes in the database .

2. The Web Application which are testing.

Whenever I do a load test for this web application, there are no changes in database.

Developers have included AJAX in our web application to communicate with the server using asynchronous post back.

Herewith, I have attached two screenshots which differs in selecting Dynamic Targets while doing load test for above applications.

Screenshot 1 - My Sample Web Application 
Screenshot 2 - Web Application which is assigned to me to do load test.

I would like to know whats the problem in doing load test for the web applications with an AJAX functionalities.





0
Cody
Telerik team
answered on 09 Feb 2015, 07:39 PM
Hello Saravanan,

Since every web application is literally a custom application (either small such as your sample web application, or large like the web application you're trying to load test) the list of dynamic targets is expected to be different. Dynamic targets are created by both the web developer and the web programming technology framework used to create the web application.

I doubt the problem is with any AJAX postbacks. A real AJAX postback happens within JavaScript running in the browser. A Test Studio load test does not run the JavaScript engine, meaning there is no JavaScript running. Instead it is echoing back the HTTP transactions, including those that represent AJAX postbacks, that were recorded in the User Profile, just like a tape recorder.

To figure out why the load test of your main web application is not working as expected I need two more pieces of information:

1) A copy of the load test you're tried to run. This is a .tstest file on disk. Put it into a .zip file and attach that.
2) A Fiddler trace of the load test trying to run.

When capturing the Fiddler trace please adjust your load test to start and end with only 1 virtual user. Any more than one and it becomes impossible to follow the traffic in the trace.

Also have a look to see if you are getting any fault users as shown in the attached screen shot. You want this to stay at 0. A faulted user means that something went seriously wrong trying to follow the steps in the user profile such that the virtual user was unable to complete all of the steps. Obviously if the steps could not be completed then it's very unlikely you'll see any changes to your back end data base, sort of like a user started a registration process then closed the browser window before clicking the final submit button.

I look forward to hearing back from you.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Saravanan
Top achievements
Rank 1
answered on 10 Feb 2015, 08:42 AM
Hi Coddy,

Thanks for your reply.

I have uploaded the attachments requested and provided the drop box link here:

https://www.dropbox.com/sh/g2q8wt5rfxv2w5l/AAA7yW5gBqQJEpQwhCjtH04Qa?dl=0

A fiddler trace (.saz) file has been attached and I just want to let you know the following details:

Developers have used 

1. AJAX in our web application to communicate with the server using asynchronous post back.

2. MVVM pattern used in almost all web application projects.

I would like to know, a web application with this type of functionalities will reflect the changes in database while doing a load test.

Please help me on this.


0
Cody
Telerik team
answered on 10 Feb 2015, 08:10 PM
Hi Saravanan,

In the drop box I find a copy of your test project. This is good and is part of the information I need.

The attached Fiddler trace however appears to be a trace of the application running normally in Chrome, or of the web test running and being recorded by the load test. It is not a Fiddler trace of the load test running as I previously requested in item 2.

I am also very concerned with how many HTTP transactions are targeting "localhost". You should be running a load test against an external box running as a web server, not a web application running on your local machine. Using your local machine to both be the web server and run a load test will not give you realistic information, especially when "localhost" is involved.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Saravanan
Top achievements
Rank 1
answered on 11 Feb 2015, 04:30 AM
Hi Coddy,

Thanks for your valuable guidance.

I have attached the .saz file and I have done this by using Fiddler Cap (http://www.telerik.com/fiddler/fiddlercap)

If I have misunderstood a Fiddler trace, please correct me.

[Note : .saz file as a zip file in an attachment]
0
Cody
Telerik team
answered on 11 Feb 2015, 06:10 PM

Hi Saravanan,

Thank you for trying to get the Fiddler trace again. Unfortunately again it does not contain the correct data. I recorded this video as a demonstration how to capture the data that I need. Be sure that FiddlerCap is being run on the machine that is acting as your execution server (which is the component that generates the load traffic being sent to your web server). In my video my one machine is running both Test Studio and my execution server:
http://screencast.com/t/sTo6ZfNEY

Regards,

Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Saravanan
Top achievements
Rank 1
answered on 13 Feb 2015, 07:19 AM
Hi Cody,

Herewith, I have enclosed a fiddler trace of my load test.

I would like to know the following details:

Whenever I submit a user details in the web application, it will be saved in the database with a unique serial number which is a primary key.

In a load test, I have chosen a capture from existing web test method. After capturing, I can see that a unique serial number and my data’s are captured in Dynamic Targets.

I did a load test for 5 Users as a result only one record is saved in the database. No records were inserted for remaining users.

A load test will perform with N number of virtual users for the user profile I have captured. Since, the serial number is unique then how a load test will insert a same data in the database for every virtual user?



0
Cody
Telerik team
answered on 16 Feb 2015, 06:11 PM
Hello Saravanan,

Thank you for the new Fiddler trace. It's very close to the information I need. It appears to be cut off, the load test did not finish running even once. The last session in the Fiddler trace is step 27 as shown in the first attached screen shot. Fiddler also will not record anything sent to LocalHost. Do I have a current copy of your load test? Did you update the copy in DropBox?

Looking at your load test you sent me via DropBox I notice you have 5 Think Times all set at 10 seconds each as shown in the second attached screen shot. That's a total of 50 seconds of Think Time i.e. 50 seconds of the load test sitting idle doing nothing but waiting. That seems excessive to me. This may explain why the Fiddler trace appears to be cut off, the load test simply did not run long enough to get through all the HTTP transactions plus think times. The Fiddler trace covers 36 seconds of time as shown in the third attached screen shot.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Saravanan
Top achievements
Rank 1
answered on 17 Feb 2015, 07:20 AM
Thanks for your support.

Here is the new fiddler trace of my load test run. Hope, it will help.

Could you please give me more clarity whether the below features will have any impact on Load Test. 

1. Is a load Test applicable for the Web Applications developed by using MVVM Pattern and Ajax.

2. A load test performing with N number of virtual users for the user profile I have captured. If the serial number is unique then how a load test will insert a same data in the database for every virtual user?

 
0
Saravanan
Top achievements
Rank 1
answered on 17 Feb 2015, 08:35 AM

You can find the fiddler trace of my load test run file in the below mentioned drop box link :

https://www.dropbox.com/sh/9pncgbyybpfxlwn/AAAu4mWfpiZRTh9zrIYlc7n0a?dl=0
0
Cody
Telerik team
answered on 19 Feb 2015, 12:32 AM
Hi Saravanan,

1. Is a load Test applicable for the Web Applications developed by using MVVM Pattern and Ajax.

Answer: Yes, a Test Studio load test doesn't care whether the application uses MVVM pattern or not, and doesn't care if the application uses Ajax or not. Keep in mind that while a load test is running there is no UI, no JavaScript, no browser or browser DOM. The load test is sending and receiving raw HTTP packets which makes it agnostic for what the application is trying to do or the technology being used in the application.

2. A load test performing with N number of virtual users for the user profile I have captured. If the serial number is unique then how a load test will insert a same data in the database for every virtual user?

Answer: I have to respond to your question with another question: Where does this unique serial number come from? How is it generated? My concern here is that Test Studio does not run JavaScript. If JavaScript is being used to generate a random/unique serial number, then this won't work. Test Studio can only play back the pre-recorded HTTP requests, just like a tape recorder. Every single HTTP request will be identical with the exception of cookies and dynamic targets which can echo back data sent to the browser by the server, but only in the syntax keyword=value. It cannot part JSON or XML data in order to detect dynamic targets.

Thank you for the new Fiddler trace. It looks complete to me. I am concerned by what I see in it. I recorded my comments in this video:
http://screencast.com/t/ayYluz7B


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Saravanan
Top achievements
Rank 1
Answers by
Cody
Telerik team
Saravanan
Top achievements
Rank 1
Share this question
or