How to do effective Performance Testing
Author: Priyank Vyas
SEED Info tech Ltd.
Applying effective technique always need well defined goals. In next few pages we discuss what goals and what methodology should be applied to achieve these goals. Performance testing is done to measure -
Response time
Scalability
Throughput
How to achieve Performance goals?
Unlike any other testing it also requires some strategy like Performance Benchmarking is applied. Steps are as follows
1.Planning
2.Record
3.Modify
4.Execute
5.Analyze
Planning- Planning is most important phase of testing. In this phase we have to identify concurrent users and emulate user actions. In planning phase following question must be answered.
What is the expected average number of concurrent events?
What is the expected peak number of concurrent events in a typical hour?
This illustration shows that concurrent users are the users those are accessing application’s same functionality at same time.
Not only have we had to understand no of users as well as their activities
- How often each activity is accomplished.
- What activities is most performance intensive.
It is not possible to perform testing for all requirements because that can increase cost of testing and it requires architecture scaling to tune the performance of system.
To make our application better we apply 80-20 rules i.e. identify 20 percent requirements that can affect 80 percent functionalities. Work to improvise those 20 percent only. Although it depends only on user psychology of user but we have some benchmarking parameters for different functions.
After benchmarking project time has one measurable objective, otherwise it’s a subjective matter to achieve.
To emulate user actions we have to recognize types of users
· Naïve user
· Intermediate user
· Expert user
Record- In this phase of we record all the user activities in appropriate tool. All the activities those are defined in planning phase are the basis of test script. Some tips while recording script-
· Ensure your tests represent the fact that real users react to the application.
· Make sure that data being entered is unique for each simulated user.
· If there is more than one way for a user to accomplish a task in the application, your test must represent that. Different paths through the system often stress different parts of the system.
· If users will be accessing the system via different connection rates, test those rates.
Modify- This phase of strategy help tester to understand user activity more closely, so he can emulate all these activity in his test.
Take a very simple example for that, “Currently you are testing ABC corporation bank’s ATM application. Bank is planning to open 50 ATM outlets across the city. First tester need to identify concurrent users on ATM because it is not necessary that every time user is using application. From 10 – 5 pm are office hours or working hours in that period of time concurrent users are less but in evening 5 pm to night 11 pm and morning 8 am to 10 am the users will be more and from night 11 pm to morning 8 am hardly any user is available.
After that analysis tester will divide these ATM utilization hours into normal working hours and peak working hours. Tester will prepare script according to peak and normal working hour and will test the application. This seems a good test but consider following scenario
In festive vacation the user load is increased drastically. Now you have to consider this scenario also, otherwise system performance could be badly affected. To implement this condition tester will not going to re generate script, he will select the previously recorded test and modify that. In this scenario he will increase the number of concurrent users.
Modification in same test as per changed scenario makes test more effective and can reduce the effort to regenerate tests.
Modifying script means not only to introduce change in scripting part it also can be execution scenario also viz. in previous example we are not changing script or user action, only execution scenario is modified by increasing the virtual users.
Execution- In this phase, SUT execution takes place. One practical issue raised here i.e. for 5-10 users, human user can execute test but 100 or more then how execution will be performed. The solution is Vuser or virtual user technology.
Vusers emulate the actions of human users by performing typical business processes.
Analysis- Result analysis of performance result is very important phase. In performance testing, tester needs to analyze lots of graphs.
There are different parameters those are calculated such as response time, throughput, server health, monitoring graphs of system under test, hits per second, no of responses per second etc.
In Performance Benchmarking the goals those are defined can achieved in following manner
· Response Time- Compare response time graphs against benchmark model
· Scalability – Execution of SUT for planned numbers of concurrent users
· Throughput – Execution of test on different servers configurations
By applying this strategy tester can get specified goals of performance.
Wednesday, November 12, 2008
Subscribe to:
Post Comments (Atom)
1 comment:
Hi,
This is really a useful information for me. Could you please also post some IMP question from certification point of view as I am planning to appear for the same.
Thanks
Post a Comment