Writing a Test Case for software development is not an easy task. We present you with a sample Test Case in deep detail.
Before you start your collection with Test Cases, it is important to choose their format, standard, and template. Here it is important to specify that there are some prerequisites that must be present to start with the tests. In this case, this means that we already have, for example, a ready-made part of the software, that we have prepared a clear plan about our audience (users who will use our software product), what will be the working environment, etc. BVOP states that quality in the context of project management is one of the most important parameters that is measured, monitored, and controlled. Reference: Factors affecting the quality of the project https://bvop.org/posts/quality-in-project-management/
Test Case Example for Manual and Automation Testing
Test Case 1:
As a user of the online mobile banking application, I would like to make a money transfer order. To achieve the ultimate goal, I must go through the following steps:
1) Find the menu “Create New Payment Transaction”
2) I must be able to choose one of the predefined forms, which must be 200 in number.
3) After successfully selecting a predefined template, I must be redirected to the page with additional information about the transaction.
4 After the redirect, I must be able to enter the following fields:
“Select a Currency” – I must be able to choose from predefined currency values, which are as follows – BGN, EUR, USD.
“Transaction Amount” – I must be able to enter the exact amount for the transaction. The field should only accept Integers.
“Transaction Details” – here I have to enter information about the reason for the transaction. The field accepts free text with a character limit of 56.
“Sender First Name” – this field must be filled in automatically by the system. It must inherit the user’s “First Name” when registering in the mobile application.
“Sender Last Name” – this field must be filled in automatically by the system. It must inherit the user’s “Last Name” when registering in the mobile application.
“Payment System” – the user must choose between the following two predefined values: Bisera & RINGS.
“Select a transaction date” – the user should be able to choose from the following 4 predefined options: Now, Tomorrow morning, Last day of the week, Last day of the month “.
5 After the user has successfully filled in all the fields from point 4) and giving consent by pressing the “OK” button, which is part of the bottom action bar of the mobile application, the user must be successfully redirected to the screen for entering data for the recipient of the bank order.
6 As a user, in this step I must be able to define the following fields that are required to complete the transaction. The fields I need to fill in are the following:
“Recipients First Name” – the field must accept Free Text up to 24 characters.
“Recipients Last Name” – the field must accept Free Text up to 24 characters.
“Recipients IBAN” – the field must accept free text (letter characters & integers) up to 45 characters.
“Recipients BIC” – the field must accept free text (letter characters & integers) up to 12 characters.
“Recipients Bank Name” – the field must be free text up to 54 characters.
7 After successfully completing these fields, the system should prompt me the following message: “Would you like to save the following recipient’s transaction details, so that you can make your next transaction quicker?”. At this step, I need to have a choice of the following two options:
“Save the recipient’s transaction details and continue to finalize the transaction”
“I would like to finalize the transaction without saving the Recipient’s Transaction Details”
8 After filling in all the required fields in steps 6 and 7, as a user I should be able to give my consent to continue with the bank order process, after pressing the “ok” button, which should again be part of the bottom action bar of the mobile application.
9 Once I have given my consent, the system must redirect me to the next screen. On it, I have to enter a summary of the complete information related to the bank transfer, ie all the fields that we have already defined in the previous steps. This includes:
9.1. Payment Transaction Template
9.2 Recipient’s Transaction Details
Recipients First Name
Recipients Last Name
Recipients Bank Name
9.3 Payment Transaction Details
Sender First Name
Sender Last Name
9.4 Account Details
Current Available Amount
Post Transaction Account Amount
The field values must correspond to the values entered by the user in the previous steps. Exceptions are the fields, which we have already discussed, that are automatically redefined by the system of the previous steps.
Another exception is the following two fields:
Current Available Amount – this field must deduct the exact current amount to the corresponding account of the user who selected in the previous steps. The amount on the screen must correspond to the actual amount available to the user for the respective account before the time of the transaction.
Post Transaction Account Amount – here the system must show the exact amount of the user account after completing the bank order.
10 As a consumer, I must be able to move forward again in the process of finalizing my bank order. For this purpose, I must be able to give my consent by pressing the “OK” button, which again must be part of the bottom action bar of the mobile application.
11 Once I have given my consent, the system must redirect me to the confirmation screen. On it, as a user, I should see the following message: “You are about to finalize the transaction. Would you like to finalize the payment or edit the transaction details? ”.
In this step, I must have a choice between the following two options:
“I would like to Edit the Transaction Details” – after selecting this option, the user should be returned to step 1 after pressing the “OK” button.
“I would like to finalize the transaction”
12 If the user selects the 2nd option and gives his consent by pressing the “OK” button, then he must be redirected to the next screen.
13 On this screen the user should see the following message “We are processing the payment. Please note that it might take 30 seconds to complete it. ”.
14 There should also be a timer on this screen that is easily recognizable and counts down the remaining time for processing the bank order. The processing time is 30 seconds and the user must be able to see in real-time the current remaining processing time.
15 During the time required to process a bank order, the user has the following two options:
Wait for the remaining time for the bank order to be processed.
To stop the operation by pressing the “Cancel” button, which should be part of the left side of the bottom action bar. If the user chooses this option, he must be redirected to the home page of the mobile application.
After successfully going through all the steps we defined above, the user must be able to complete his bank order successfully.
Full Regression strategy
So far, we have been able to cover the full path of the user who has to travel to make a bank order. For this purpose, we not only wrote the main test case but at each step we defined several smaller test cases, which are key to cover the user cycle, given the ultimate goal – the successful implementation of bank transfer.
Here, however, it is important to note that we could significantly supplement the test cases. An important clarification is that this type of case is directly dependent on the changes made, their scope, severity, etc. The above steps could be defined as part of our larger test plan and become part of our Full Regression strategy. Read also: User Stories Real Example. How to create user stories. Example of Acceptance Criteria and Definitions of Done
In addition, when developing this type of software application, we must provide additional tests such as Performance, Stress & Load Tests. They would give us an idea of how our application behaves in different environments example: high user traffic, the presence of many payment orders, which can lead to increased processing time if they overlap queues, what is the real-time to load a given screen, shape, etc.
Most critical steps of user flow
The last type of test is Data Verification. In this case, our application uses different types of data that are absolutely necessary for the successful completion of this type of transaction. For this purpose, we could check whether the data entered by the user correspond directly to the data we have saved in the database. Here you have to keep in mind the different types of fields, their limitations, backend processing, formatting, etc. This is a common practice when testing applications that work with sensitive data.
In the long run, we could also build a strategy for automated tests. The purpose of these tests will be to cover the most critical steps of user flow.
An example of this can be the whole flow, which we have already described above. Another bonus from the development of this type of tests is that not only do we guarantee the specific quality of our software product, but also in the long run we could drastically reduce the time required for testing in each version are the result of specific dependencies arising from recent changes in our build.