Saturday, February 21, 2009

Finite State Machine Approach for Web Performance Testing

Effective performance of Web based systems impacts the profitability of the enterprises that makes use of them. The real time application of the web based system hugely depends on the behavior of the user. During the performance test time the biggest challenge is to generate the synthetic workload mimicking the request patterns of real time users. Any mismatch between the synthetic workload compared to live user can significantly corrupts the performance test results. However, it is very difficult to know precisely what a real workload’s characteristics will be, performance testing methodology must provide the flexibility to conduct a controlled sensitivity analysis on the characterizations of the workload model’s attributes.
One such method to minimize the mismatch is usage of Finite State Machines (FSM) to represent the user scenarios for the web performance testing. A FSM consists of sets of states, inputs and outputs. Upon applying a set of inputs results in transition of one state to another generating a set of outputs. Further to make the environment more of “live type”, a probabilistic FSM model can be built upon Statistical models such as Markov’s Chain. Each state of the Markov’s Chain represents the different request types supported by the Web application. The navigation of the user from different sessions within the web application is modeled through the Transition states of Probabilistic FSM. The coolest thing about Probabilistic FSM is that the each transition is associated with a probability. The Sum of all the state’s outgoing transitions equals to one. The transition probability represents the likelihood of a user choosing a particular transition from a state from all the allowed transitions. Traversing through the Markov chain, a trace of synthetic workload can be created for performance testing.

The basic constraint of Probabilistic FSM is their complex nature. Building a FSM requires a certain effort on the part of the performance tester to specify the application model. As different web applications can have different scenarios, building a generalized FSM is difficult. However, for business sensitive applications accurate performance testing is of high need. It is advantageous to go for a thorough performance testing with more accurate synthetic workload. In such scenarios, implementing FSM type methodology would be useful.
Further Reading:
[1] Andrews, A., Offutt, J. and Alexander, R. “Testing Web-Applications by Modeling with FSMs”. Software Systems andModeling. Vol. 4, No. 3, pp. 326-345, July 2005.
[2] Mahnaz Shams, Diwakar Krishnamurthy, Behrouz Far “A Model-Based Approach for Testing the Performance of Web Applications” Proceedings of the Third International Workshop on Software Quality Assurance (SOQUA’06).

 

Post on October 26 2:21 AM at http://nextnewton.spaces.live.com

No comments: