JavaScript How can I properly test my web application?

AI Thread Summary
To effectively test a web application designed for high concurrency, particularly with around 2000 simultaneous users and numerous database transactions, several strategies are recommended. One approach is to simulate user interactions through automated bot users, potentially using tools like Selenium for browser automation. This allows for testing the application's response to user inputs in real-time. Phased user testing is also suggested, starting with a smaller user base and gradually increasing the load to monitor performance and identify issues. Understanding the application's architecture is crucial; for instance, technologies like Java Enterprise with REST calls may require different testing setups compared to others like PHP. Additionally, developers should consider scripting solutions using languages like Python or Perl to automate the generation of user requests, enabling the simulation of high user loads without the need for multiple physical machines. This method can help in logging errors and assessing the application's stability under stress. Overall, a well-planned testing strategy that incorporates both automated tools and gradual scaling can ensure the application performs reliably under expected user loads.
SlurrerOfSpeech
Messages
141
Reaction score
11
I'm building a web application that will have a lot of client-server action because (if everything goes as planned) there will be around 2000 users at once and a lot of database transactions happening with each user because I've set up event listeners that auto-save answers to questions on the web page as each user fills it out. How can I properly test it?
 
Technology news on Phys.org
You can program some bot users? You could also try to phase groups of users in. 500 a week and perform fixes as needed.
 
It really depends on what you've built. If this was a Java Enterprise server with lots of REST calls, I would set up several machines to test the calls with multi-threaded requests. If you're trying to simulate walking through a series of web pages, submitting answers and then handling the response pages, you've got your work cut out for yourself.
 
  • Like
Likes Silicon Waffle
Greg Bernhardt said:
You can program some bot users?

How should I do that? Open a bunch of different browser windows and paste in the JavaScript console some code that simulates filling out the survey? That was going to be my plan.
 
Use Selenium. I use it at work for automated testing of websites.
 
Do you or can you require some kind of registration or login procedure in order to use this application? Then you can start with a low cap on the number of users, and increase it as you gain experience with how the system performs.
 
SlurrerOfSpeech said:
I'm building a web application that will have a lot of client-server action because (if everything goes as planned) there will be around 2000 users at once and a lot of database transactions happening with each user because I've set up event listeners that auto-save answers to questions on the web page as each user fills it out. How can I properly test it?
You may need to learn what is and is not common or shared among users; whether the shared data is accessed randomly by or scheduled for access from users; whether your web application already handles this in its source code, which leads readers to another question as to what technologies yours has been built upon (e.g MS ASP.NET technology already offers you solid grounds to play around with synchronicity, model and controller communication channels, and above all the multi-threading issues that are much harder to resolve with use of e.g PHP, etc.
Your question makes me think your company doesn't seem to have, or even if it does, a good QA team. They do have training and are set with or learned to acquire skills and specific mindset particularly when running into tests required for a software application. If you are one of the developers of this application, instead of setting up many computers around as clients, which I don't think sounds practical, you can build some scripts (i.e with either python or perl, for example, which already offers you its threading capability) to automate 2000 or larger numbers of users to send requests to your application then observe its outputs or/and log any's failed attempts or faults, etc.
 
Back
Top