开发者

Testing traffic on a webapp (Spring, Hibernate, Java)

开发者 https://www.devze.com 2023-04-09 04:59 出处:网络
I am developing a webapp and am looking into how I can automate testing of the web site such as seeing how it copes with multiple concurrent users / heavy traffic.Could anyone point me in the directio

I am developing a webapp and am looking into how I can automate testing of the web site such as seeing how it copes with multiple concurrent users / heavy traffic. Could anyone point me in the direction of any software or techniques I could be using to help me do this?

I am also looking into how to automate testing things at the front end? For example 开发者_如何学JAVAI have unit tested all of my business logic at the backend, but them am unsure as to what I should be do in order to automate testing of everything else.


For heavy traffic testing, I've been using JMeter. For front end testing, I'm using Selenium.


Beside Apache JMeter, which generates artificial load and allows you to test performance, there are two main technologies for testing accurately performance during operation:

  • Tagging Systems (like Google Analytics)
  • Access Log File Analysis

With tagging you create an account with Google Analytics and add some JavaScript code to the relevant places of your code, that allows the browser of your visitors to connect to GA and get captured there.

The Access log file holds all information about each session. There is a data overload, so data has to be Extracted, Transformed and Loaded (ETL) to a database. The evaluation can be then performed in nearly real-time. You can create some dashboard application that does the ETL and displays the status of you application in nearly real time.


I had same need some years ago while developing a large scale webapp. I've been using Apache JMeter as for automation testing, and Yourkit Java Profiler for profiling Heap JVM usage and actually found lot of memory leaks!

cheers


Selenium to test the flow and expected results

Yorkit to profile CPU and Memory usage => excellent to track concurrency issues and memory leaks

Spring Insight to visually understand your application performance / load +

  • See the SQL executed for any page request => with drill down to the corresponding source code
  • Find pages which are executing slowly and drill into the cause
  • Verify your application's transactions are working as designed

Spring Insight is deployable as a stand alone war (Tomcat / tC Server / etc..)

0

精彩评论

暂无评论...
验证码 换一张
取 消