Functional vs Non-functional testing
Functional Testing
Testing the functionality of software based on requirements specification, a functional specification, or in use cases. It mainly involves black box testing where the functionality of any feature is tested by providing input(test data) and the output is compared with the expected results.
Testing of functionality is done from a requirements-based or business-process-based perspective. Requirements-based testing uses a specification of the functional requirements for the system as the basis for designing tests. Requirements are prioritized based on the risk criteria and this leads to prioritizing the tests. This will ensure that the most important and critical tests are included in the testing effort.
Business-process-based testing uses knowledge of the business processes where the scenarios involved in the day-to-day business use of the system are incorporated in the test cases. Experienced-based testing is also done as a part of functional testing. Test conditions and test cases are derived from the functionality of the component or system
Example of Functional Testing
- Verify the user is able to login after entering correct credentials
- Check if incorrect credentials are entered, the system should inform the user and reload the login page.
- Check if the payment gateway throws an error when the incorrect card number is entered
- Check if the add user screen successfully add the user in the system
- Check if the future date or past date can be selected from a calendar
- Check if the item added to the cart is displayed under view cart details
Types of Functional Testing
Non- Functional Testing
Testing the non-functional aspects of the software such as performance, security, reliability, usability, portability, etc. belongs to the category of non-functional testing. It is the testing of ‘how well’ the system works. Non-functional testing is equally important as functional testing as it affects client satisfaction. Quality not only depends on the functional aspects but also depends on Time, Accuracy, Stability, correctness, and durability of a product under various adverse circumstances. It is performed after functional testing.
Example of Non-functional Testing
- Verify if the page load time should not be more than 5 secs when 1000 users accessing it simultaneously
- Verify if the application works in different types of browsers
- Check if the pages of the application are not directly accessible through URL without login.
- Check if the document of size more than 2MB cannot be uploaded into the system
Types of Non-functional Testing
- Performance Testing
- Security Testing
- Database Testing
- Maintainability Testing
- Usability Testing
- Recovery Testing
Difference between Functional and Non-functional Testing
Functional Testing | Non- functional Testing |
It focusses on testing the functionality of the software | It focusses on testing the non-functional aspects such as performance, security, usability, etc. |
It revolves upon use cases | It revolves upon user expectation |
It can be done manually or with the help of automation tool once the application is stable | It is hard to do manually and can be done with the help of a specialized tool |
It starts from the initial stage of the software life cycle | It is done after functional testing is completed |
It describes product features | It describes product properties |
It is testing the application against business requirements | It is testing the application about client expectation and non- functional requirement |
It tells how well the system is performing | It tells how well the system is responding |
Product and Domain knowledge requires to perform functional testing | Architecture and design knowledge requires to perform non-functional testing |
It is performed during unit testing, integration testing, system testing, and acceptance testing level | It is performed only during system testing |
It is mandatory to perform in all types of software | It is non-mandatory and performed based on the software needs |