Your budget buddy welcomes you to read our fourth and last blog of this month. In this blog we would be explaining about the software testing methods we chose and how we implemented it.
A software's success or failure is evaluated based on it's ability to deliver the requirements, fulfilling the user's expectation and running without faults. There are multiple software testing techniques to measure and determine the software quality.
TESTING PHASES
- Unit Testing
- Integration Testing
- System Testing
- Acceptance Testing
Software quality and assurance is verified and validated using Static & dynamic testing methods. We used Black Box and White box testing methods to implement the testing phases.
BLACK BOX TESTING
Black box testing uses a specification-oriented test design and it should not involve the internal logic. The tested cases are framed with a set of characteristics. These characteristics can define on how a system works and how/when to stop the testing. So using these test cases derived from use cases scenarios.
We will describe few use case scenarios to define how we used black box testing in our Software Development Life Cycle. Below are the five uses cases which were tested by users
| Test Case ID | Scenario | Data Value 1 | Expected Output 1 | Data Value 2 | Expected Value 2 | Actual Results |
|---|---|---|---|---|---|---|
| Add an income | 1. Open the application and 2. Select the navigation drawer 2. Click the add income 3. Enter the amount 4. Select the date 5. Choose a category and account 6. Choose recurrence 7. Click the Add Income | 1. Amount = 670 2. Date = 16/06/2019 3. Category = Salary 4. Account = Card 5. Recurrence = Monthly | Data inserted message pops up | 1. Amount = 70.50 2. Date = 19/06/2019 3. Category = Part-time 4. Account = Cash 5. Recurrence = One Time | Data inserted message pops up | Data inserted in both the cases |
| Remove Pin | 1. Open the application 2. select the navigation drawer 3. Click the Settings 4. Select Off 5. Click the Set authorization switch /Change Pin | Authorization Switch = Off | Authorization Off is displayed | Authorization Switch = Off | Authorization Off is displayed | Authorization OFF |
| Add Pin | 1. Open the application 2. Select the navigation drawer 3. Click the settings 4. Select On Enter Pin 5. Click the Set authorization switch /Change Pin | Authorization switch = OnPin = 1424 | Authorization ON - Pin set | Authorization switch = OnPin = 1 | Authorization On - Pin Set | Authorization On - Pin set; |
| Add an income category | 1. Open the application 2. Select the navigation drawer 3. Click the settings 4. Select Add Income Category 5. Entered a category 6. Click the Add Income Category | Add Income Category = Salary | Category inserted | Add Income category = Rent | Category inserted | Category inserted |
| Export the expense/income to email | 1. Open the application 2. Select the navigation drawer 3. Click the Report 4. Choose Date 5. Press Send report | Date = 6, Year= 2019 | Email sent | Date = 1, Year= 2019 | 1. No Income 2. No Expenses Email sent | Email sent |
Data values used in these above use cases adhere to either Equivalence classes or boundary value analysis.
WHITE BOX TESTING
White-Box Testing is a type of testing which involves test case design by knowing the internal logic.
The following classes were tested using White-Box Testing:
1.LoginActivity: Validate user credentials
Following code is the main method in the authorization class where it checks the user entered PIN is correct or not to launch the application. The code which starts executing once the user clicks the submit button is highlighted and line 59-69 are button click listerner, getting value from database and check whether data is there in the database. The main condition is at line 70 which is explained below.

Cases:
Incorrect PIN
When incorrect PIN is entered the condition at line 70 fails and jumps to line 73 executing where it prompts the user to enter correct PIN
Correct PIN
When a correct PIN is entered the condition at line 70 passes and the application activities are launched

2.Add new category
Following code is the method in the Settings class which checks and adds the new category entered by the user into the database.

Cases:
No category information Given
Condition at 67 fails and jumps to line 76 where it prompts the user to enter the correct category
Category data provided - Inserted successfully
Condition at 67 passes and tries to insert the data at line 68. Checks the condition whether data is inserted successfully at line 69 and passes to display category inserted
Category data provided - Not inserted successfully
Condition at 67 fails and tries to insert the data at line 68. Checks the condition whether data is inserted successfully at line 69 and fails. Jumps to line 73-74

3.Add email
Following code is the main method to add email for sending the monthly report in the report fragment class which checks and adds the email id entered by the user into the database.

Cases:
Email id - correct format
Check whether the id entered is in the correct format and passes this condition at line 162. Line 163-165 gets executed where email is entered is added to the databases and displays the same
Email id- Wrong format
When the email is entered is not in the correct format this condition at line 162 fails and lines 167-168 executes which prompts the user to enter the email id in correct format.

4.Threshold Change
Following code is the main method in threshold fragment to add threshold values for each category.

Cases:
Threshold not entered properly
Threshold value entered doesn’t have numbers alone and the condition at line 51 fails and moves to line 62 which prompts the user to enter the correct value
Threshold entered properly and inserted successfully
Threshold value entered is in correct format and line 52-58 gets executed to insert the threshold value in the database.
Threshold not interested
Threshold value if not inserted in the database then line 59-60 gets executed

5.Visualize pie chart
Following code is the main method in Visualisation fragment class to set up the pie chart.

Cases:
Chart created successfully
Category and expense values gets added in loop at line 143-145. Line 146-149 to add the data and 152-155 to set up the chart.

SUMMARY OF CHANGES
The following new changes have been added compared to the advance prototype in this Beta Prototype.
NEW FEATURES
The following new REQUIREMENTS were requested by the customer which we added into our user stories and completed
Exporting monthly data
Export monlthy income and expense report to the email id provided by the user.
Threshold values
User can set threshold value for each category now and a comparison between threshold and monthly expense is provided as a chart. Also notification is provided when the threshold increases while adding a new expense.
CHANGES IN EXISTING FEATURES
The following changes in existing features were requested by the customer.
New visual representation
In addition to pie charts representing category data, bar charts has been added representing yearly expenses based on monthly and category data.
Forget pin
An option has been added for the user to set an email id and send the pin the mail when the user forgets.