Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

JavaScript How can I properly test my web application?

  1. Feb 25, 2016 #1
    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?
  2. jcsd
  3. Feb 25, 2016 #2
    You can program some bot users? You could also try to phase groups of users in. 500 a week and perform fixes as needed.
  4. Feb 25, 2016 #3


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    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.
  5. Feb 25, 2016 #4
    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.
  6. Feb 25, 2016 #5
    Use Selenium. I use it at work for automated testing of websites.
  7. Feb 25, 2016 #6


    User Avatar

    Staff: Mentor

    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.
  8. Mar 8, 2016 #7
    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.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted