But first of all: how do you compare functional testing and non functional testing after all? Based on what criteria? Is the fail/pass threshold enough?
At a first glance, it sure looks like there's nothing but the “non” — functional vs non functional — that differentiates the two software testing methodologies, right?
Unlike other “pairs” of testing methods compared to one another: functional vs unit testing or functional testing vs integration testing...
Are there actually 2 different sets of requirements? Can we be talking about 2 different sets of “checks”? … about 2 different types of objectives to be reached by the end of the testing lifecycle?
Is the major difference between these 2 approaches to software testing actually a matter of WHAT vs HOW?
… and so the “slab” of questions rolls down the slope getting bigger and bigger...
So I'd better jump straight to answering your legitimate question:
“What do you understand by functional and nonfunctional testing?”
Here's a handful of:
- “enlightening” so-called definitions of the two testing methods
- … backed up by examples of functional and non functional testing techniques
- ... and by a concise side-by-side comparison
The Difference Between Functional Testing and Non Functional Testing Is...
… the difference between functional and non functional requirements itself!
Let me detail:
- functional requirements (or the "WHAT?"): they point out precisely WHAT actions specific features of the tested software should perform; these planned “actions/behaviours” are determined according to business necessities and client requirements
- non functional requirements (or the "HOW?"): they describe HOW the tested software system should execute the defined actions; they describe the parameters to be reached in terms of performance and usability and which are dictated by the client's feedback and execution necessities/specific quality concerns
Do you see the differences in approach, goals and objectives?
Basically, according to the set of requirements given you know which one of the two testing methodologies to opt for and how to plan your whole testing strategy:
- you'll be focusing on checking that the implemented features meet the client's specifications (functional testing); that all the defined business processes, searches, integrations and/or data manipulation actions are being correctly carried out
- or you'll be focusing on how well the software performs in certain given scenarios (non functional testing), on accurately assessing the software's usability and to what extent it meets the customer expectations
Functional Testing Usually Includes...
… multiple testing techniques. Moreover, it's a manual & automated testing “combo”.
Speaking of which, here are the most popular techniques used when testing an app the “functional way”:
- error guessing: identifying those areas where functional issues are most likely to occur and testing these specific areas more... extensively
- installation testing: checking that the app's been properly installed
- regression testing: checking whether newly implemented functionalities/features haven't negatively impacted the existing functionality
- boundary value analysis: testing the numerical inputs' boundaries
- unit testing: testing small units of the software one by one; checking how they perform individually rather than as components of a whole infrastructure
- sanity testing: checking specific functional ranges of the tested software
- integration testing: testing the app as a whole, detecting any possible bugs affecting inter-unit communication
Note: functional tests have very well defined pass/fail criteria; a specific result is expected from any input.
Whereas Non Functional Testing Usually Includes...
… its specific set of testing techniques and does require (and this is another major difference between functional testing and non functional testing) creativity, as well.
And a higher level of technical expertise!
… for you'll be assessing the software's usability and determining whether it meets the client's standards of quality (rather than simply checking points off a functional requirements list).
And now, speaking of the non functional techniques that you should get a grip on using:
- stress testing: testing the app's overall performance under “severe” conditions (e.g. server issues, minimal hard drive space, low resources etc.)
- security testing: non functional tests meant to determine how well protected the data is and to “detect” any possible security vulnerabilities
- recovery testing: tests which help you determine how quickly the system could recover after a critical issue/a major crash
- load testing: testing the app's performance in several “hostile” environments (using different numbers of users)
- compliance testing: tests which assess whether the software complies with a specific set of industry regulations or company-specific standards
- volume testing: testing the app's performance in a context of a heavy load of data being processed
- usability testing: assessing the apps overall usability, whether its GUI is consistent etc.
Notes:
- Ensure your non functional testing process' success by leveraging non functional testing tools rather than by manually testing your app
- Turn your client's feedback into gold and always be ready to update your list of non functional rerqurements: it's he/she who'll add pricesless new checks to your strategy and increase your chances to meet his/her expectations
- Wherever possible, strive to create measurable and quantifiable non functional tests... wherever possible, since, of course, you won't be able to structure them by the pass/fail criteria (which are specific to functional tests)
Functional Testing and Non Functional Testing EXEMPLIFIED
Now let's talk... examples!
Practical, real-life examples of testing scenarios where these 2 methodologies are applied:
EXAMPLE 1:
- Functional testing: when the email notifications is enabled, the user gets a message and email notifications get sent (the “WHAT”)
- Non functional testing: email notifications get sent within 3 minutes (the "HOW")
EXAMPLE 2:
- Functional Testing: when a user clicks the settings menu he instantly accesses the settings page
- Non Functional testing: that specific setting page has a look and feel which is consistent with the GUI
Final Thoughts
Completely different approaches to software testing... different objectives to be reached... different sets of techniques used... different requirements to consider, to comply with and to meet...
In short: the differences between functional testing and non functional testing are far more substantial than you might have expected.