Concepts and Background
Goal of Performance Testing
Minimal Entrance Criteria for Performance Testing
Minimal Exit Criteria for Performance Testing
Load Generation Strategies
Friday, October 31, 2008
Basics of Performance Testing
Wednesday, August 13, 2008
Test Case Design Techniques
In general a lot of techniques are used while designing/preparing the test cases. These techniques help us to limit the number of inputs to be tested for testing the specified range or boundaries. We will discuss about two of the most prominent of these techniques. These techniques are called
Boundary value analysis/ testing: - A test case design technique for a component in which test cases are designed which include representatives of boundary values. A testing technique using input values at, just below, and just above, the defined limits of an input domain; and with input values causing outputs to be at, just below, and just above, the defined limits of an output domain.
Equivalence Class: - A portion of a component's input or output domains for which the component's behavior is assumed to be the same from the component's specification
Equivalence Partitioning: - A test case design technique for a component in which test cases are designed to execute representatives from equivalence classes
Let's understand these two techniques using a simple example. Below given is a sample specification for a Login page of an application.
Specifications: -
1) Application is having a Login Page containing two text boxes User Name, Password. It also have two command buttons Login, Reset.
2) The Login Text box should accept alphanumeric input only.
3) The password should be a minimum of 6 characters and a maximum of 10 characters. And it should contain at least one special character, One Alphabet and One Number.
Application of Boundary Value Analysis (BVA) technique:-
BVA can be stated in other words as; if L, U are the Lower and Upper limits of a range of input, then the tendency of having a defect is most likely at values L-1, L, L+1, U-1, U, U+1.
Now let us look at the Specification#3. It says that the password should have a length between 6 to 10 characters. In this case
Lower Boundary (L) = 6
Upper Boundary (U) = 10
So we need to consider testing with input having 5 (L-1), 6 (L), 7 (L+1), 9 (U-1), 10 (U), 11 (U+1) characters as these are the value that are most likely to cause a failure/defect.
At a first look, it may not seem to have saved us from creating number of test cases. Now assume that the lower and upper bounds are 2, 100 respectively. In order to design test cases for this kind of input range imagine the test cases you need to design without using the BVA technique. At a minimum you need to test with 100 inputs. If you apply BVA for this scenario the inputs reduce to 1, 2, 3, 99, 100, and 101. May be we can check for one more input between 3, 99 to be on safe side. So the total inputs we need to use reduced to 7. Do you see the effect of applying BVA now?
Application Equivalence Class Partition technique:-
In simple terms Equivalence Class Partition can be stated as testing with one representative from each equivalence class is enough to prove the success or failure of testing with the entire equivalence class.
Let us look at the Specification#2. It says that Login text box should accept only alphanumeric input. This means no special characters allowed. Once special character comes into picture the input becomes Invalid. As long as you use combination of alphabets and Numerals (Alphanumeric) the input is Valid.
Now, we can divide our input into two partitions Valid and Invalid Input. This forms our first level of partitions.
Let's look at the valid inputs now. We can use only Numbers, Only Alphabets, and combination of both Numbers and Alphabets as input. This leads us to the new partitions Numbers Only Input, Alphabets Only Input, Alphanumeric Input. Like this we can go on identifying different partitions based on the specification and need.
So if we put all of this at one place we get the following partitions. Now, if you test one input in the Numbers Only partition, we can safely apply the result of this test to all values in the same partition. So testing with one input from each partition is enough to cover testing of the entire partition. In our example we can test with 5 inputs in total and identify the outcome of all these five partitions. So, this way we can reduce our effort to create number of test cases.
Now two more definitions that are of use and indirectly related to the concepts we discussed above.
Coverage Testing (Test Coverage):- Coverage testing is concerned with the degree to which test cases exercise or cover the logic (source code) of the software module or unit. It is also a measure of coverage of code lines, code branches and code branch combinations
Code Coverage: - An analysis method that determines, which parts of the software code have been executed (covered) by the test case suite and which parts of code have not been executed and therefore may require additional attention.
Wednesday, June 4, 2008
Project Estimation Techniques
Introduction:
Estimation is an essential part of the project management methodology. Estimation is used of a number of purposes:
- To justify the project, particularly at the proposal stage.
- To compare costs with the anticipated benefits.
- To secure the resources required to successfully deliver the project.
- To enforce the disciplines needed to make the project succeed.
- To ensure that the support impact of the project is fully understood.
- To inform and improve the software development process used.
Overview of Estimation process:
The best people to undertake estimation are the staff who is going to do the work. The staff chosen to produce an estimate is drawn from MIS, customer areas and/or service partners who have relevant experience of similar previous projects or tasks in the business area. Estimation technique is based on three components:
a) Expert judgment: i.e. consultation with qualified experts from within MIS and the organizations business and service partners. This will be supplemented by expert input from software suppliers and consultants on a need basis.
b) Experience: i.e. comparison of the proposed project or task with one or more previously completed developments.
c) Task Decomposition: i.e. decomposing the project into components, i.e. the Work Breakdown Structure, and estimating these components individually to produce an overall estimate.
The estimates are validated through peer review and are backed up by an experienced Project Manager who takes overall responsibility for the total. Estimated are reviewed throughout the project lifecycle. Estimates, and the process followed to produce them, are transparent and consistent across all MIS projects.
Base and Contingency method
In this technique all estimates will have two components the base and the contingency. The base is the minimum expected time required, i.e. when everything goes well. The contingency is the amount of trust placed on the base when risks are taken into account. The contingency is generally expressed as % of the base estimate.
For a straight forward task contingency may be between 10 to 20% and for a high risk task it may go to a level of 50% or more. Separating the base and contingency will make the estimations clear and easier. We can derive a base figure based on the experience without talking all the issues or risks that may occur. And to determine the level or % of contingency we can use any risk analysis techniques.
The contingency is based on the possibility of a risk occurring (how likely the risk going to occur) and weightage given to that risk (The effect/impact of the risk). Project contingency can be estimated in terms of money, resources or a mixture of both. Resource contingency is managed by adding a factor to individual task estimates. The Project Manager will also consider project wide risks and undertake a risk analysis to determine the correct amount of contingency to allow for them.
For providing estimates using this technique the following steps to be followed.
- Decompose the project into a list of tasks i.e. Work Breakdown Structure.
- Estimate the base and contingency (task level) for each task.
- Add all the estimations together.
- Add the project level contingency.
An important point to note here is we should not do double-counting i.e. adding contingency to both task and project level estimated for the same risk. Below is a sample to show estimation using this technique.
---------------------------------------------------- Task Name Base Contingency Total ---------------------------------------------------- Build Login UI 8 Hrs 0.8 Hrs 8.8 Hrs (10% of base) Login Validation 16 Hrs 3.2 Hrs 19.2 Hrs SP (20% of base) ----------------------------------------------------- Total 24 Hrs 4.0 Hrs 28.0 Hrs -----------------------------------------------------Total Task level estimate (Including Task Level Contingency) = 28.0 Hours Contingency at Project Level = 6.0 Hours (Based on the risk analysis) Overall Estimate = 34.0 Hours (Including both task level and project level contingency)
Three Point Estimation method
Another estimation technique that can be used in place of base and contingency method is three point estimation technique. This technique is based statistical methods, and in particular normal distribution.
For every estimate we produce three numbers/values: a = the best case estimate m = the most likely estimate b = the worst case estimate These values are used to calculate and E value for the estimate and a Standard Deviation using the following formulae: E = a + (4 * m) + (b / 6) SD = (b – a) / 6 E is the sensible estimate for the talk and is a weighted average which taken into account both the most optimistic and pessimistic estimated provided. SD is the variability or uncertainty in the task estimate, and in essence is a measure of risk.
We can use E and SD to convert these estimates to Confidence Levels as follows.
- Confidence Level in E value is approximately 50%
- Confidence Level in E value + SD is approximately 70%
- Confidence Level in E value + 2 * SD is approximately 95%
- Confidence Level in E value + 3 * SD is approximately 99.5%
For providing estimates using this technique the following steps to be followed.
- Decompose the project into a list of tasks i.e. Work Breakdown Structure.
- Estimate the E value and SD for each task.
- Calculate the E value for the total project work as E (Project work) = ∑ E (Task)
- Calculate the SD value for the project work as SD (Work) = √ ∑ SD (Task)2
- Calculate the E value for the project duration as E (Duration) = ∑ E (Critical Path Task)
- Calculate the E value for the project duration as SD (Duration = √ ∑ SD (Critical Path Task)2
- Depending on the confidence level required on estimations use the E Value and multiple of SD to calculate the final estimate.
Thursday, May 22, 2008
Concurrency Testing
Below checklist can be of use while performing the concurrency testing
- Define the data set to be tested for concurrency (including screens also)
- Outline a strategy who and how
- Define Hardware
- Execute test for Phase 1 (Data changed and updated)
- Execute test for Phase 2 (Same data changed and updated)
- Check Data at the end of each phase
Thursday, May 15, 2008
Software Test Automation
Tuesday, May 6, 2008
Testing Zero documented Applications
Abstract
Being in testing domain, each one of us may come across a situation to test an application; which does not have any documentation.
What can we do in such situations? Can we say we cannot test the application, without having any documentation? Can we…? So, how to design test strategy for such an application?
This white paper tried to compile some methods that can be applied in order to design test strategy for applications which do not have any documentation.
Introduction
I was sometimes asked to test an application which has zero documentation. I guess the people working in testing domain will come across this situation time and again. In this document I tried to compile some means and ways that can be used /applied in such situations and will help in designing the testing strategy.
Background Being in testing domain, each one of us may come across a situation to test an application; which does not have any documentation.
What can we do in such situations? Can we say we cannot test the application, without having any documentation? We cannot do that…right? So, how can we test such an application?
Ask yourself the following questions
- Whether the application under test is a project or a product?
- Is there any other application available anywhere with same or similar functionality?
- Who has developed this application? Are the developers reachable?
- Who are the targeted users of this application? Can they be contacted?
Carefully note answers to the above questions as you find them.
Approach#1: Product with Zero documentation Step#1: Assume that the application you are asked to test is a product. In this case we can rule out the option of contacting the targeted users.
Step#2: So, try the other option we have, who developed this application? After some research (varies from couple of hours to a day) you identified that the people who developed this application cannot be reached.
Step#3: You feel like you are dead locked? Don't get frightened. We still have one more option; is there any other application available anywhere with same or similar functionality?
Step#4: Good god someone somewhere in the world created a similar product is what you found after some research on web. Bingo, you got a way out.
Step#5: Try to get any documentation that product has to offer or refer the help of that product to understand what that product does. Now, based on the knowledge you gained on the other product design testing of your parent application.
Example: You are asked to test a document editing software, whose functionality is similar to Microsoft Word. In this example you can refer to the Microsoft Word Help and get a feel of what is does and what it is used for.
Step#6: Based on the information you gathered, you can design testing of your document editing software.
Note: In case you found out that you are asked to test a product and you are not able to find any other product with same or similar functionality. What should we do now? Check the section Approach#3: Shelved Project with Zero documentation and try the approach mentioned there to design your testing strategy.
Approach#2: Old Project with Zero documentation
Step#1: Assume that the application you are asked to test is a project developed long time back and is currently used by a group of users. In this case we have a very thin chance of contacting the developers.
Step#2: Also, there is a very less chance of getting the information is there any other application available anywhere with same or similar functionality?
Step#3: Hmm…what are we supposed to do now? You identified that there are some users who are using this application. There you are!!!
Step#4: Contact the users who are using this application. Ask them to explain you what they do with this application. You can have a demonstration session with them. Ask them questions about the application. Make a note of the information they provide. Now, design testing of your application based on this information.
Approach#3: Shelved Project with Zero documentation
Step#1: Assume that the application you are asked to test is a project developed long time back and is not currently used by any one. It is kind of a shelved application.
Step#2: In this case we can rule out the options of contacting users, developer. Also we have minute chances of getting information about a similar project anywhere else.
Step#3: Gosh…all roads are blocked. What is my next step?
Step#4: Well, in this case we have to rely completely on our exploration and learning capabilities? Do you have the shades of a detective? Are you a quick learner?
Step#5: Install the application or catch hold of an environment which contains your application and you are allowed to play around with the application as well as the environment.
Step#6: Start hitting each and every button you see on the application, observe what is happening. Make a note of what you understand from that. I am tired of clicking the buttons…
Step#7: Now, for a change try clicking on all the menus and sub menus that are visible on the application and note down what is happening. In this way try to play around with each object that is available in the application and make a note of what you have observed.
Step#8: Ah!!! Now, I know what will happen when I do anything with an object on the application! Wait, I see some link between these items!! Seems like I can derive business scenarios or workflows from what I did in the application!!!
Step#9: Well done, design your testing as per the business scenarios, workflows you were able to extract from your exploration.
Note: The above approach can be tried for applicability for any other situation or scenario not covered in this document
Conclusion
Once you get an idea of the various objects existing in the application under test you can use all the testing concepts like Boundary Value Analysis (BVA), Equivalence Partitioning, negative and positive testing etc. to design the test cases. Also you can determine the scope of testing, types of testing to be done like functional, User Interface etc.
Now, you gathered handful of information by applying one of the techniques mentioned above. Beware not to repeat the same mistake what others did. The reason for me to write this whitepaper, Zero documentation!!!
Document whatever information you gathered during your research or exploration. Make sure to include the following items.
- Purpose of the application
- Targeted users of the application and what they do with it.
- Business scenarios/workflows you were able to identify.
- Complex areas of application, the areas to emphasize during testing.
- Testing strategy you followed including types of testing you have done.
- Any other information of importance you identified.
- Any special notes or instructions you want to mention.
Do not forget to add a Note saying that the information mentioned in this document is purely based on your exploration and understanding.
If possible get this document reviewed by someone. If the review is not possible add another note to say that this is un-reviewed information in order to avoid any problems in future.
Hurray, you understood the application, able to design test strategy, produced some documentation. Kudos to you!!!