Professional Documents
Culture Documents
Testing - Doc - 52 - 58
Testing - Doc - 52 - 58
Submitted to
Dr. Saifuddin Md. Tareeq
Professor and Chairperson,
Department of CSE, DU
Dr. Sarker Tanveer Ahmed
Assistant Professor, Department of
CSE, DU
Submitted by
San Ibn Ashraf
Roll no.: 52
Sakib Ahmad
Roll no.: 58
TABL E OF C ON TEN TS
1. Unit Testing
1.1 Static testing
2. Integration Testing
2.1 Bottom up testing
3. System testing
3.1 Functional testing
1 Static testing
.
1.1.1 Walk through
Code Formatting:
▪ In the codes, proper alignment and white space should be
maintained and unwanted trailing white spaces and empty
spaces should be removed.
▪ You have ensured that proper naming conventions for
CamelCase have been followed.
▪ The commented codes should be removed as it makes the code
look disorganized.
Maintainability:
▪ Readability is important as it helps others to check the code
easily. The code is easily readable as it is properly organized.
Reusability:
▪ We have uploaded our code to GitHub which will help
anyone to further develop the applications and reuse it again
later at any point.
Reliability:
▪ The exception handler can be further improved to handle a
wide range of scenarios.
Security:
▪ Google Firebase is enough for security in most cases for
general users.
1.2 Dynamic testing
1.2.1 Black box testing
Several test cases have been run and the results are given
below;
Test Case 1: Create new account.
Input: User will provide some of his personal information
like name, email, age etc.
Output: An verification email will send to his email account
and if verified, new account will be created.
Test Case 2: User Signing-in.
Input: Types user credentials.
Output: If logged successfully, user is moved to main
activity screen.
Test Case 3: User wants to add or edit budget details.
Input: Users selects “My Budget” option from main screen.
Output: User will enter into “My Budget” option and will
be able to add or edit budget items.
Test Case 4: User wants to save daily expenses.
Input: Users selects “Daily” option from main screen.
Output: User will enter into “Daily” option and will be able
to save daily expenses item-wise.
Test Case 5: User wants to save weekly expenses.
Input: Users selects “Weekly” option from main screen.
Output: User will enter into “Weekly” option and will be
able to save weekly expenses item-wise.
Test Case 6: User wants to see analysis of expenses.
Input: Users selects “Analytics” option from main screen.
Output: User will enter into “Analytics” option and will be
able to see details analysis of expense.
Test Case 7: Users wants to see past history of expenses.
Input: Users selects “History” option from main screen.
Output: User will enter into “History” option and will be
able to search for past details of expenses.
Page 6 of
1.2.1.1 Range partitioning
In our app we take user input with buttons for most of the
activities. So, we do not have to worry much about range
values. But there are also some string inputs in some
activities in our app.
We used Java built in data type String for those inputs. The
maximum length of String in Java is 0 to 2147483647. That
means we can have 2147483647 characters in our string input
at most. In real world this is impossible and impractical to
give have these many characters to be in a string. Therefore,
the limitation of output for the range of a particular value is
irrelevant in our app. The only limit for our output is the
capacity.
1.2.1.2 Set partitioning
Test Case 1:
Input: Type valid email and password in the signing in
field.
Output: For correct info, user is moved to main activity
screen.
Discussion: For valid input, the output is as expected.
Test Case 2:
Input: In the search box of “History”, select any date which
has information about expenses.
Output: Shows details of the expenses of that day.
Discussion: For valid input, the output is as expected.
Test Case 3:
Input: In the budget field of “My Budget”, type “ansddh”
as input
Output: Shows warning (invalid type of input, expected
type is number)
Discussion: For garbage input, a warning message is
shown.
Page 7 of
1.2.2 White box testing
Test Case 1:
Input: Select ‘add budget item’ option from “My Budget”
and fill up the provided fields.
Output: The newly created budget item will be
showed in the item fields.
Discussion: The functionality of add budget item is
working properly.
Test Case 2:
Input: Select “Daily”, “Weekly” or “Monthly” option.
Output: Users will be able to save expenses item-wise.
Discussion: The functionality of saving expenses is
working properly.
Test Case 3:
Input: In the search bar of “History”, a date is selected
Example: 1 February, 2022
Output: Shows the detail information of expenses of that
day.
Discussion: The functionality of the fixture is working .
Page 8 of
1.2.2.2 Branch and conditional coverage
The home screen of the application has buttons for navigating
My Budget, Daily, Weekly, Monthly, Analytics and History.
Here the control flow of every condition is tested by some test
cases:
Test Case 1:
If we click on the signup button, it will take user to create
new account page.
Here the new user will have to give some personal
information like name, age, profession, email address
etc.
Test Case 2:
If a user clicks on “My Budget” option it will enable the
user to add or edit budget items.
Test Case 3:
If a user clicks on “Daily” option it will enable the user to
save daily expenditure item-wise.
Test Case 4:
If a user clicks on “Weekly” option it will enable the user
to save weekly expenditure item-wise.
Test Case 5:
If a user clicks on “Monthly” option it will enable the user
to save monthly expenditure item-wise.
Test Case 6:
If a user clicks on “Analytics” option it will enable the
user to see and compare the expenses and budget item-
wise in a detailed way.
Test Case 7:
If a user clicks on “History” option it will enable the user
to search and see the expenses of a selected day.
Page 9 of
1.2.2.3 Path Coverage
An example is given below considering the number of
distinct paths through the program is traversed at least once
Test Case:
On the main screen of our application, there is a navigation
menu which includes My Budget, Daily, Weekly, Monthly,
Analytics and History.
If a user clicks on “My Budget” option it will enable the user
to add or edit budget items.
If a user clicks on “Daily” option it will enable the user to
save daily expenditure item-wise.
If a user clicks on “Weekly” option it will enable the user to
save weekly expenditure item-wise.
If a user clicks on “Monthly” option it will enable the user to
save monthly expenditure item-wise.
If a user clicks on “Analytics” option it will enable the user
to see and compare the expenses and budget item-wise in a
detailed way.
If a user clicks on “History” option it will enable the user to
search and see the expenses of a selected day.
Log out option is uses for logging out from the application.
Page 10 of
2. Integration Testing
We are going to use all three strategies to test the interface among
subsystems and interactions among software modules. We will use
bottom-up, top-down, and sandwich testing modules to locate if there
are any errors in the app.
2.1 Bottom up testing
Page 11 of
MonthlySpendingActivity: In the main screen, there is a option
called “Monthly”. If a user selects this,(s)he will be able to save monthly
expenses. We have checked the subsystem and it works fine. We can
move back to main screen from this activity.
Page 12 of
2.2 Top down testing
The top-level submodules in our app are - RegistrationActivity,
LoginActivity, ForgetPasswordActivity, AboutAppActivity ,
AccountActivity, in a hierarchical manner. Their sub-modules and
interactions are given below:
RegistrationActivity: This part of the app enable the new user to create
new account. We checked the subsystem and were satisfied with the
result.
AboutAppActivity: If any new user wants to know about how to use the
app or what the app does, this part will provide the information. We have
checked the subsystem and it works fine.
Page 13 of
2.3 Sandwich testing
The submodules in our application are -
AboutAppActivity,AccountActivity,ForgetPasswordActivity,
DailyAnalyticsActivity,HistoryActivity,LoginActivity,Main
Activity,MonthlyAnalyticsActivity,MonthlySpendingActivity
,RegistrationActivity,SelectAnalyticsActivity,TodaySpendin
gActivity,SetBudgetActivity,WeekSpendingActivity,
WeeklyAnalyticsActivity. Submodules and interactions during test
cases are given below:
Test Case 1:
The user clicks the user account button and creates
his/her account using a google account. Then they
can log into their account and add or edit their
budget details. Interaction between navigation
options, home and data update requests these sub-
modules worked fine and perfectly.
Test Case 2:
If a user clicks on one specific option from the
main screen, they will enter into their
selected option and interact with the app .
If the user selects any date from the provided
calender in the “History” option, user will be
able to see detail information of expenditure
and budget of that day.
Page 14 of
3. System testing
In this section, System testing, we will discuss about the behavior of our
entire system.
3.1 Functional testing
Test Case 1:
User can Set/Edit Personal Profile Details
Input: User gives Name, age, mobile number, Email, password.
Output: Information saved on the Firebase real-time database.
Discussion: Functional requirement of user can set or edit
Personal Profile Details is checked and it works perfectly.
Test Case 2:
User can add or edit budget item.
Input: User clicks on add button inside the My Budget option and provide
needed information or clicks on any budget item and then change and save.
Output: Budget item saved or edited as user wanted.
Output: The blood group of having these users will be shown.
Discussion: Functional requirement of user can add or edit budget
item is checked and it works perfectly.
Page 15 of
Test Case 3:
User can save his/her expenditure on daily, weekly or monthly basis
Input: User selects Daily, Weekly or Monthly option and save
expenses.
Output: Information about expenses are saved on the Firebase real-
time database.
Discussion: Functional requirement of user can save his/her
expenditure on daily, weekly or monthly basis is checked and it
works perfectly.
Test Case 4:
User can see the analysis of expenses and budget on daily, weekly or
monthly basis.
Input: User selects Daily, Weekly or Monthly inside the Analytics
option.
Output: Information about expenses and budget are shown on the
sc r e e n .
Discussion: Functional requirement of user can see the analysis of
expenses and budget on daily, weekly or monthly basis. is checked
and it works perfectly.
Test Case 5:
User can see past history of expenses anytime.
Input: User selects a specific date on the provided calender.
Output: Information about that day are shown
Discussion: Functional requirement of user can see past history of
expenses anytime is checked and it works perfectly.
Page 16 of
3.2 Performance testing
Test Case 1:
Input: User sends data to the admin for database
update.
Output: Data can be seen only by admin.
Discussion: The confidentiality of data is maintained.
Test Case 2:
Input: User sends data to admin for database update.
Output: The exact data sent by user is received by system
admin. The data is not manipulated.
Discussion: The integrity of data is maintained.
Test Case 3:
Input: User uses the app roughly and sends harmful data to
app admin.
Output: App doesn’t crash or take any harmful data.
Discussion: The availability of the system is maintained.
Page 17 of
3.2.2 Timing testing
Our application MyBudget, can be run in real-time mode. But in
offline no functionalities are available. It gives real time
response when the device is online.
Test Case 1:
Input: User selects add new budget item in
navigation menu.
Output: Enables the user to add new budget item.
Discussion: Just a not considerable delay for showing real-
time information.
Test Case 2:
Input: User selects Analytics option from the navigation
menu.
Output: Shows the co m p a r i s o n o f e x p e n s e s a n d
budget item-wise.
Discussion: Just a not considerable delay for showing real-
time information. Delay depends on internet speed and Google’s
API.
Page 18 of
3.2.3 Volume testing
Here we check if the app can handle big amount of data given by the
user. Also check when many users give data same time then if the
app works properly or not.
Test Case 1:
Input: User sends User Name with 1000123 letters.
Output: Data is received and ignored.
Discussion: System avoids unrealistic datasets.
Test Case 2:
Input: 30 users give data at the same time.
Output: All the data sent by users is received by system
admin. The app handled all the data easily and did not crash.
Discussion: Many users can use the app and send data at
the same time.
Issue 2:
Some block comments were missing in the codes.
Fix: Necessary block comments were added.
Page 19 of
3.3.2 Beta test
Issue 1:
There was a sizing issue while navigating the application
from a tablet.
Fix: An appropriate device frame skin was implemented.
Issue 2:
Some buttons were not properly aligned in some old devices.
Fix: An appropriate design changes were implemented.
Page 20 of