Functional testing is performed during software development to ensure that the software functions correctly. In functional testing, testers identify the intended function of an application and execute a series of tests to ensure its compliance with the intended outcomes. Functional testing aims to ensure that a piece of software meets the customers’ specific functional requirements.
Before performing functional testing, what types of test cases should you keep in mind when writing them? What are the scenarios that need to be considered?
In this tutorial, we will deliberate on the scenario to comprehend various functional tests in order to gain a more profound understanding.
A web-based HRMS portal (for instance, https://www.orangehrm.com/) where the user logs in using their username and password. The login page contains two text fields for username and password. The interface also includes two buttons, namely Login and Cancel.
The user will be directed to the HRMS homepage when the login is successful. The ‘Cancel’ button halts the login process.
- The user id field needs at least 6 characters and a maximum of 10. It can have numbers (0-9), letters (a-z, A-z), special characters (only underscore, period, and hyphen). It can’t be left empty. The user id must commence with a numerical value or character. It can’t have special letters or symbols.
- The password field requires a minimum of 6 characters and a maximum of 8 characters, including numbers (0-9), letters (a-z, A-Z), and all special characters. There is no way it can be blank.
A variety of functional testing techniques can be employed to examine the above-mentioned use-case scenario.
Functional testing techniques
Conduct a thorough evaluation of the system to ascertain whether all components are functioning flawlessly in conjunction.
The scenario illustrates that this would involve evaluating the customer’s journey, which would include the HRMS application’s initial launch, the entry of precise credentials, the navigation to the main page, the execution of tasks, and the exit from the system. This test makes sure that the process goes smoothly and doesn’t have any mistakes.
2. Equivalence Tests
Test data is divided into partitions referred to as equivalence data instances. In this test, the data in each part must respond the same way. Consequently, it is imperative to conduct a single test across all partitions. If the condition fails in one partition, it will fail in all other partitions.
Since the user ID field is limited to 10 characters, it should behave the same way when more than 10 characters are entered.
3. Boundary Value Tests
These tests are used to determine how the system will behave when data limits are implemented.
Since the user id needs to be at least 6 characters long, this test will be used to see how the system responds when less than 6 characters are entered.
4. Decision-based Tests
These tests are initiated to ascertain potential system outcomes upon the fulfillment of a particular condition.
There are several decision-based tests that can be undertaken.
- If the user enters the wrong information, the system will tell them and make them log in again.
- The users’ session should launch when the right credentials are entered, triggering the system to direct them to the main interface.
- If the user enters the right information, but they want to stop logging in, the system won’t take them to the main page.
- Instead, it is recommended that the login page be refreshed.
5. Ad-hoc Tests
These tests uncover ambiguities that may not have been uncovered by the other tests. Ad-hoc tests are designed with the objective of compromising the system and evaluating its response.
The given example shows how a quick test could be run to see if the following is true.
The administrator deletes a user’s account while they are still logged in. This happens even when the user is doing work. The test would examine whether the application behaved appropriately in such a circumstance.
So, whenever you begin to write the test cases for Functional Testing. It is possible to retain all of these types of functional testing techniques.