A little background about this - Each person may have their own way of testing or finding issues. They may not necessarily find my method helpful to understand the basics, this is something i'm trying to generalize for the newcomers in software/ firmware testing. My intention is to make a series out of it, if i can and get enough motivation to write the basic stuffs.
So far we know what is a software, environment, SDLC, STLC, different types of software testing. Now, we will see how to test a software with example.
Lets start a test for the Student loan program or sometimes call calculator. What is does is, it gives the amount of how much you need to pay per month as well as how much it will cost you through out the year. You can also see how making extra payments will affect your pay off date. You can google search it and practice it on any of them.
So we will be doing a functional testing on a project. I usually starts from the Home screen. In our example, above is the home screen.
Testing steps:
-
This is one of the quickest way to find issues is to perform a data validation using the following criteria for the sample project. For positive data it should accept the amount, for negative / invalid data it should handle it and display proper error message.
-
Make sure the required field are either marked or on submit application displays error messages on required fields .
-
Make sure the entered Loan amount is okay using the validation criterias.
-
Confirm that if for example the loan amount can not take a negative value, it should display error message stating that and should not blow up. User need to know the min and max value. It could be mentioned with the error message or it could be mentioned as a label.
-
For loan term, it can be either year or month. If we enter a year, it will display the corresponding month and if we enter a year it will display the corresponding month. Make sure that it behaves this way.
-
Confirm that if for example the loan term month can not take decimal value then it should display error message.
-
As label indicates, Interest rate value would be a percent number. That means it will be later divided by 100. Make sure it passes the data validation criteria.
-
For the Loan start date, depending on how it designed according to the Specs, i would assume it should be forward date. I can’t be sure whether it was designed this way or not, it looks like it allows previous dates/ years.
-
Finally, when all data inputs are okay and values are valid, then clicking on Calculate button will display the value on Monthly Payment.
-
Verify the Calculate button displays the correct value for per month. Verify it using the following formula in excel or manually. We need to make sure the calculation is right. For excel you can write the formula on B6 field as “=PMT(B4/B5, B3*B5, -B2)” to get the monthly payment.
-
Make sure that, even the Monthly Payment field is a text fields which looks similar to input field it should not allow entering any value on this field. This will be a GUI testing. Check with Specs.
-
Also notice that the amount field text box is not aligned with all other text box for a prefix of “$”. I would double check with the UI specs for this as well.
- Check for any default values. On this particular case, it was displaying an example format on each text box. As soon as user starts typing on those fields, they were disappeared which was expected. Confirm that the application calculates based on the amount you entered, not the default amounts.
- Check the spelling of all the labels.
Data Validation Criteria
Field Name
Criteria
Common/ All
- Null / empty / blank space as input and thus check for the Required fields.
-
Check for the Min field length.
-
Check for the Max field length.
-
Check the data type and determine the possible invalid inputs.
-
Enter single quote ( ‘ ) to check whether database can handle it.
-
Enter valid input combinations
Loan Amount
-
Negative amount - It should display error message.
-
Amount with decimal point up to max input.
-
Amount with single point decimal point.
-
Long number up to max input allowed.
-
Enter String instead of numeric value.
-
Enter different characters instead of numeric value.
-
Enter commas with a numeric entry.
-
Try with valid ranges, should accept the data without any complain.
Loan Term
-
From above snapshot, it looks like it can take real numbers as number of years and numeric for months. Number of years should also allow to accept whole numeric numbers.
-
For loan term in year, enter min and max allowed real number.
-
For loan term in month, enter min and max allowed numeric number.
-
For loan term in month, enter a number with decimal point. It should display error message as decimal number in month is not allowed.
-
Try the negative numbers in both year and month. Should not be allowed.
-
Try with valid ranges, should accept the data without any complain.
Interest Rate
-
Enter values ranging from min (0) to max(99).
-
Enter values below and above the min and max correspondently.
-
Enter whole number .
-
Enter number with decimal points.
Loan Start Date
-
Allows to select Year, Month, Day from the dropdown list.
-
Should not allow to write anything on these fields.
Now where do you get these things? If you are lucky enough to work with a structure company, chances are you will get this document right away. Else, you will have to prepare it by yourself. Most of the times, it is basically a one time document, you just add them according to project and new fields.
So far we have done the functionality testing. Now we need to test few other things for this web application:
-
Make sure this web application is accessible using other browsers.
-
Make sure the loan term month and years auto calculation script works.
-
Make sure web browser session & cookies does not expire while you are working on it. Testing cookies (sessions) are deleted either when cache is cleared or when they reach their expiry.
-
Make sure every time you visit this page, should always come as blank form.
-
Make sure multiple load is handled correctly.
-
Make sure concurrent entry does not create any issue.
-
Make sure the refresh or F5 works properly. It should update the page correctly. Any changes made on the page and submit button was not pressed, refreshing the screen should discard that entry and refresh the page with original entry.
-
Make sure browser back button and forward button works properly. When the back button is pressed and then the forward button is pressed, make sure it comes with blank page/ session. It should not just keep the previous entries.
-
Make sure web application does not allow to take input using the URL submission. For example, whatever the name of the website and application, try appending the word “?amount=234560” without the quotes. If it accepts the value and changes the value of the amount field then this could possibly be vulnerable to the BOSS people (hackers).
This is one of the quickest way to find issues is to perform a data validation using the following criteria for the sample project. For positive data it should accept the amount, for negative / invalid data it should handle it and display proper error message.
Make sure the required field are either marked or on submit application displays error messages on required fields .
Make sure the entered Loan amount is okay using the validation criterias.
Confirm that if for example the loan amount can not take a negative value, it should display error message stating that and should not blow up. User need to know the min and max value. It could be mentioned with the error message or it could be mentioned as a label.
For loan term, it can be either year or month. If we enter a year, it will display the corresponding month and if we enter a year it will display the corresponding month. Make sure that it behaves this way.
Confirm that if for example the loan term month can not take decimal value then it should display error message.
As label indicates, Interest rate value would be a percent number. That means it will be later divided by 100. Make sure it passes the data validation criteria.
For the Loan start date, depending on how it designed according to the Specs, i would assume it should be forward date. I can’t be sure whether it was designed this way or not, it looks like it allows previous dates/ years.
Finally, when all data inputs are okay and values are valid, then clicking on Calculate button will display the value on Monthly Payment.
Verify the Calculate button displays the correct value for per month. Verify it using the following formula in excel or manually. We need to make sure the calculation is right. For excel you can write the formula on B6 field as “=PMT(B4/B5, B3*B5, -B2)” to get the monthly payment.
Make sure that, even the Monthly Payment field is a text fields which looks similar to input field it should not allow entering any value on this field. This will be a GUI testing. Check with Specs.
Also notice that the amount field text box is not aligned with all other text box for a prefix of “$”. I would double check with the UI specs for this as well.
Field Name
|
Criteria
|
Common/ All
|
|
Loan Amount
|
|
Loan Term
|
|
Interest Rate
|
|
Loan Start Date
|
|
Make sure this web application is accessible using other browsers.
Make sure the loan term month and years auto calculation script works.
Make sure web browser session & cookies does not expire while you are working on it. Testing cookies (sessions) are deleted either when cache is cleared or when they reach their expiry.
Make sure every time you visit this page, should always come as blank form.
Make sure multiple load is handled correctly.
Make sure concurrent entry does not create any issue.
Make sure the refresh or F5 works properly. It should update the page correctly. Any changes made on the page and submit button was not pressed, refreshing the screen should discard that entry and refresh the page with original entry.
Make sure browser back button and forward button works properly. When the back button is pressed and then the forward button is pressed, make sure it comes with blank page/ session. It should not just keep the previous entries.
Make sure web application does not allow to take input using the URL submission. For example, whatever the name of the website and application, try appending the word “?amount=234560” without the quotes. If it accepts the value and changes the value of the amount field then this could possibly be vulnerable to the BOSS people (hackers).
http://www.someweb.com/calculators/college-planning/loan-calculator.aspx?amount=234560
-
Make sure it can distinguish between an entry from human vs entry from automated bot. Using the Captcha it protects entry from bots. Otherwise, at any point, any bot can keep entering the values and thus creating load on the site. Other people may not be able to access it at certain point.
- Check all other links on the web page. It should not display any dead link on the page.
Other observation
If you search for Student loan calculator you will find links. Click on them and you will get a webpage that will display the student loan amortization details. Many of them used to be open like the one i have chosen. Then after getting bombarding by the testing tutorial classes, they put it under user registration. This site should also have done it, otherwise, they are vulnerable to many points like steps 7, 8 if not many more. Also they were not using the Https as well!
If we summaries it then you will see, through out these steps we have performed,
- Functional Testing,
- Usability Testing,
- GUI Testing,
- Compatibility Testing,
- Load Testing,
- Performance Testing,
- Security Testing and
- some other common web application properties testing.
Few things we did not do here as they were not applicable. For example, Database testing - as no database was involved, Web service connectivity - single page calculates value. This is how you need to correlate the theory of testing and implement and perform it as needed on software.
This is how i would try to test this project. This was a very narrow function example. I would say, a software is consist of such small functions and once we identify the features, we will be able to perform testing on each individual pieces.
Next, may be i'll try few more examples to give more idea. I'll also try to include at least one example for firmware testing in future. . And I would urge people to excuse my mistakes during writing up this series. I test other works, does not necessiarily means that I can’t make mistakes
Everybody has their own way of doing it and I respect all of them as long as it covers everything.
Make sure it can distinguish between an entry from human vs entry from automated bot. Using the Captcha it protects entry from bots. Otherwise, at any point, any bot can keep entering the values and thus creating load on the site. Other people may not be able to access it at certain point.
Other observation
If you search for Student loan calculator you will find links. Click on them and you will get a webpage that will display the student loan amortization details. Many of them used to be open like the one i have chosen. Then after getting bombarding by the testing tutorial classes, they put it under user registration. This site should also have done it, otherwise, they are vulnerable to many points like steps 7, 8 if not many more. Also they were not using the Https as well!
If we summaries it then you will see, through out these steps we have performed,
- Functional Testing,
- Usability Testing,
- GUI Testing,
- Compatibility Testing,
- Load Testing,
- Performance Testing,
- Security Testing and
- some other common web application properties testing.
Few things we did not do here as they were not applicable. For example, Database testing - as no database was involved, Web service connectivity - single page calculates value. This is how you need to correlate the theory of testing and implement and perform it as needed on software.