KEMBAR78
Mobile App Testing 240624 182703 | PDF | Software Testing | Unit Testing
0% found this document useful (0 votes)
32 views41 pages

Mobile App Testing 240624 182703

The document outlines the importance and processes of software testing, emphasizing its role in identifying bugs, improving software quality, and ensuring customer satisfaction. It details various testing approaches, types, and the software testing life cycle, including steps like requirement analysis, test planning, and execution. Additionally, it highlights the significance of testing in critical sectors to prevent costly and dangerous failures, supported by historical examples of software bugs causing major issues.

Uploaded by

minafaik276
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views41 pages

Mobile App Testing 240624 182703

The document outlines the importance and processes of software testing, emphasizing its role in identifying bugs, improving software quality, and ensuring customer satisfaction. It details various testing approaches, types, and the software testing life cycle, including steps like requirement analysis, test planning, and execution. Additionally, it highlights the significance of testing in critical sectors to prevent costly and dangerous failures, supported by historical examples of software bugs causing major issues.

Uploaded by

minafaik276
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Week 4: Mobile

App Testing
What Is Software Testing?
-Software testing is like checking a cake before serving
it to make sure it tastes good and looks right. In
software testing, we check if the software works
properly and does what it's supposed to do, just like
tasting the cake to see if it's delicious and not burnt
-The goal of software testing is to identify bugs, gaps,
or missing requirements in the software before it is
deployed to users, thereby ensuring its quality and
reliability.

Software Testing Steps


Validation

-Validation involves tasks to ensure the software matches


customer requirements.
-It confirms if we are building the right product as per
customer needs.
-It asks, "Are we building the right product?"
-For Example: if we are developing a calculator app,
during validation, we ensure that it includes buttons for
addition, multiplication, subtraction, and division, as well
as decimal point functionality.
-Focuses on aligning software with customer
requirements and expectations.
Verification

-Verification involves tasks to confirm that software


accurately implements specific functions.
-It asks, "Are we building the product, right?"
-Example: In a calculator app, during verification:
. Pressing 1 should display one ،and pressing 2
should show the number 12 without erasing the 1.
.Adding two numbers and pressing the + button,
then pressing the = button should show the correct
result.
.This stage focuses on ensuring that each feature of
the software works correctly as intended.
Why Is Software Testing Important?
Identifying bugs early
Software testing is important, as it helps identify any
problems early, so they can be fixed before the
delivery of the software.
Improving quality of software
Testing software helps find mistakes or bugs in the
software, and when we fix these mistakes, the software
gets better in quality.
Increasing customer satisfaction
Testing software makes sure it works well, is safe, and
runs fast, which saves time and money, and makes
customers happy.
Saving time and money
Fixing problems in the application after it's launched is
harder and more expensive. That's why it's better to test
the software regularly while we're still developing it.
Identifying weak points to save company costs and
human lives
Software used in important areas, like finance or
healthcare, can't afford to have any bugs, because it
deals with sensitive information and people's well-being.
Testing, in this case, is very important to avoid problems
that could harm both the company and its users.

Software bugs can lead to losing money and even


harming people. Throughout history, there have
been cases where not testing software properly
caused a lot of problems.

Examples where failure in testing caused


issues:
In 1994
China Airlines Airbus A300 crashed because of a
software bug, resulting in the loss of 264 lives
In 1996
A software bug caused 823 customers' U.S. bank
accounts to be credited with $920 million.
In 1999
A bug in the software caused a $1.2 billion military
satellite launch to fail.
In 2014
Nissan had to recall one million cars because of a bug with
the airbag sensors in the cars' software.

Knowledge Check
Software Testing Approaches
MANUAL TESTING

-Involves testing software without using automation


tools, where testers act as end-users to identify
unexpected behavior or bugs.

-This testing requires more effort from testers, as they


manually execute every test case and document each
step taken during the process.

-Manual testing is good for small projects with few


things to check because it's harder to do.

AUTOMATION TESTING

-Involves writing scripts and using software to test


products, automating manual processes.

-Automation tools execute tests quickly and accurately


with minimal manual intervention, reducing testing
time and increasing efficiency.

-Automation testing saves time and money compared


to manual testing, making work easier and quicker.
Software Testing Types
01) Unit Testing

-It is software testing, where individual units or


components of a software application are tested in
isolation.
-The purpose of unit testing is to validate that each unit
of the software performs as expected.
Who
Usually, software developers perform unit tests, but
software testers also need to conduct some unit testing
to ensure everything works well.
when
During app development, developers usually do unit
testing. This means they check if each piece of code does
its job correctly. Testing is necessary to make sure the
code works as intended
How
Unit testing is often done using automation, but it can
also be done manually if needed.

02) Integration Testing

-The purpose of integration testing is to verify that these


units work together correctly and interface with each
other as expected.
Who
Integration testing is mostly done by developers after
they've checked and put together different parts of the
software. Sometimes, testers also join in to help with
this type of testing alongside developers to ensure
everything works well together.
when
Integration testing typically happens after unit testing
and before system testing. It helps identify and fix
problems early in the development process, even before
a feature is fully developed
How
It is a software testing technique, where individual
units or components of a software application are
combined and tested as a group
03) System Testing

The purpose of system testing is to verify that the


software meets specified requirements and functions
correctly in its intended environment.
Who
System testing is typically performed by dedicated
software testers or quality assurance (QA)
professionals.
When
System testing is the third step in the software
development process. It usually happens after integration
testing
How
It is a software testing technique, where the entire
software application is tested as a complete and
integrated system

04) Regression Testing

-It is like double-checking to make sure that fixing one


thing in the software didn't accidentally break
something else.
-This helps ensure that the software remains reliable
and bug-free, even as it gets updated or modified.
Who
It is typically performed by software testers or quality
assurance (QA) engineers.
when
It involves re-testing the parts of the software that
were working fine before any changes were made, just
to be sure they're still working properly after the
changes.
How
Regression testing is usually done with automated tools
because they can test the software quickly and multiple
times without needing a person to do it.
Software Testing Life Cycle
Step 1
Requirement Analysis
-Input (Documenting Requirements):
Gathering information from stakeholders,
documentation, or other sources about what the
software should do and how it should work.
-Steps (Analyzing and Identifying Tasks):
Analyzing the requirements to identify different tasks,
scenarios, and functionalities that the software should
support based on the gathered information.
-Output (Testing Plan):
Making a high-level plan to test all parts of the software
and make sure everything works as it should.

Step 2
Test Planning

-Input (Testing Objectives):


Set clear goals for testing depending on the high level
test plan gained from the requirement analysis phase
to understand what needs to be tested and how to
measure if the testing is successful.
-Steps (Timeline and Test Approach):
..Plan the timeline for testing activities, including start
and end dates, and deadlines.
..Decide on the approach and methods to be used for
testing, including tools and techniques.
Output (Output and Deliverables):
..Document all the test scenarios and expected outcomes.
..Identify the information and materials needed for
testing and ensure they are prepared and available during
testing.

Step 3
Test Case Development

-Input (List of Test Cases):


Create a full list of test cases which was prepared in the
test planning phase covering different parts of the
software, including regular and tough situations.

-Steps (Test Case Details and Prioritization):


..For each test case:
..Define the actions to be performed, the data or
information required, and the expected outcomes.
..Prioritize test cases based on importance or impact.

-Output (Special Scripts and Automated Testing):


..Develop special scripts or automated tests to execute
test cases automatically.
..This helps in efficient testing of scenarios and reduces
manual effort.
.Step 4
Test Environment Setup

-Input: referring to the information and materials


needed for testing during the test planning phase such
as:
..Tools and resources required for testing activities.
..Different environments to check software
compatibility.

-Steps:
..Set up tools and resources needed for testing
activities.
..Ensure the testing environment mirrors the real-world
environment.
..Check the software across different environments to
ensure compatibility.

-Output:
..Prepare everything needed for testing.
..Make sure the software works in different
environments.
..Find and solve any bugs to make sure the software
works for everyone.
Step 5
Test Execution

-Input:
..Test cases and scenarios were created during the
"Test Case Development" phase.
..Test environment set up during the "Test Environment
Setup" phase.

-Steps:
..Run the prepared test cases and scenarios to check
how the software behaves in different situations.
..Record the results of each test, noting which tests
passed, which failed, and any bugs encountered.

-Output:
..Test reports summarizing the test results, including
pass/fail status and any bugs found.
..Communication with the development team to
address and fix any identified bugs.
..Regression testing to ensure the software still works
correctly after fixing bugs or making changes.
Step 6
Test Closure

-Input:
Test reports from the "Test Execution" phase.

-Steps:
..Check that all reported bugs have been resolved by
the development team.
..Think about what was learned during testing and how
to do better next time.
..Write down ideas for making testing even better in the
future.

-Output:
..A report with suggestions for improving testing in the
future.
..Confirmation that all identified bugs are resolved and
the testing phase is complete.
Quiz
Why is automation testing considered more efficient than manual
testing?

It saves time and money.


It involves executing tests slowly.
It requires more effort from testers.
It is only suitable for small projects.

Match the testing technique with its description:


Automation tools require minimal manual intervention during
testing.

False True

When we test how different parts of a car, such as the engine,


brakes, and lights, work together smoothly, what type of testing is
this?

Car Testing
Robot Testing
System Testing
Integration Testing

What is the main focus of the "Requirement Analysis" phase in


the software testing process?

Fixing bugs
Writing code
Understanding software objectives
Executing test cases
How is system testing different from unit and integration testing?

Testing the entire software application as an integrated system


Reducing the need for further testing
Testing software components as a group
Testing individual units in isolation

What type of testing is needed to ensure that the 'Add to Cart'


button in an online shopping app function correctly by adding items
to the cart and increasing the total price?

Cart Testing Unit Testing


Regression Testing Shopping Testing
During the testing process of a racing game, which phase are we in
when we create detailed manual and automated scripts to test the
flow of the first level?

Test Case Development Requirements Analysis


Testing Levels Testing Execution

What is the key advantage of identifying weak points early through


testing?

Introduction of more bugs into the software


Increase in bugs causing customer dissatisfaction
Reducing the need for further testing
Saving company costs and potential harm to human lives

Test execution involves running test cases to validate the


functionality of the software.

False True

When we test each part of a robot toy separately to make sure its
arms, legs, and lights work, what type of testing is that?

Regression Testing Unit Testing


Robot Testing System Testing

During which phase do testers decide which test cases are most
important for the product?

Test Execution
Test Case Development
Requirement Analysis
Test Planning
Match the software testing process phase with its description:
What is the main focus of unit testing?

Combining units and testing as a group


Testing individual components in isolation
Validating software requirements
Testing the entire software application

What is one benefit of software testing?

Increased software bugs


Improved software quality
Reduced development time
Decreased customer satisfaction

In our calculator app, we noticed that if you try to divide any number
by 0, the app crashes. We fixed this by adding a message that says you
can't divide by 0. Now we want to test and make sure that fixing this
problem didn't cause any new problems with other parts of the app.
What kind of testing is this?

Calculator Testing
Regression Testing
System Testing
Integration Testing
What does regression testing involve?

Evaluating the ease of use of a software application


Identifying weaknesses in security measures
Re-testing parts of the software that were working fine before any
changes
Assessing software performance under extreme conditions
Adding New Components
LISTPICKER
Lets the user choose from a
list of items. It has an
associated button. When
the button is clicked, the
chooser appears.

From the User Interface


Section in the Palette:

1. Drag a ListPicker
component to the screen.
NOTIFIER
Displays notifications or alerts to
the user within a mobile
application. It provides a way for
the app to communicate important
information, warnings, or prompts
to the user in real-time.

From the User Interface Section in


the Palette:
2. Drag a Notifier component to
the screen.
TEXTTOSPEECH
Converts text into speech. It
allows users to add a voice
output feature to their
mobile applications,
enabling the app to speak
text-based content aloud.

From the Media Section in


the Palette:
3. Drag a TextToSpeech
component to the screen.
Customizing ListPicker Component
Check Task Completion: Coding Process
In Blocks Section: Update the elements displayed in the
ListPicker whenever any button in the application is
clicked.
Step 1

1. Click on the ListPicker component.


2. Drag and drop the “Set ListPicker1.Elements to” block.
3. Hover over the "Tasks" global variable and drag “get global Tasks”.
Step 2

4. Add the 2 blocks to the “When Add.Click” event.


5. Duplicate and add to the “When Delete.Click” event.
6. Duplicate and add to the “When Update.Click” event.
7. Duplicate and add to the “When Screen1.Initialize” event.

"After picking one task from ListPicker" Event


Step 1

1. Click on the ListPicker component.


2. Drag the “When ListPicker1.AfterPicking do” block.
Step 2

3. Click on the Notifier component.


4. Drag the “Call Notifier1.ShowChooseDialog” block inside the event.
Step 3

5. Drag 4 “Empty Text” blocks from the Text palette.


6. Add an empty text to the message parameter and write “Have you
finished your task?".
7. Add an empty text to the title parameter and write “Completion?”.
8. Add an empty text to the button1Text parameter and write “YES”.
9. Add an empty text to the button2Text parameter and write “NO”.
"After clicking a button in the notification
message" Event
Step 1

1. Click on the Notifier component.


2. Drag “When Notifier1.AfterChoosing do” event.
Step 2
3. To check whether
the user clicked “YES”
or “NO”, drag the “if-
else-if” block from the
Control palette.
4. Click on the control
icon on the “if-else-if”
block.

5. Remove the “else”


statement from the
block.
Step 3

6. Drag a comparison block from the Logic palette.


7. Hover over the “choice” local variable in the event, and drag “get
choice”.
8. Drag an empty text block from the Text palette and write the first
choice “YES”.
Step 4

9. If the user clicked the “YES” button, meaning he is done with this
task, then we have to remove the task from his tasks list and drag the
“remove list item” block from the Lists palette.
10. Hover over the “Tasks” global variable, and drag “get global Tasks”.
Step 5

11. To determine the index, we'll use the index corresponding to the
task clicked in the ListPicker. Drag the 'ListPicker1.SelectionIndex' block
from the ListPicke component.
Step 6

12. After removing the task, we need to speak out a message to the
user. From the TextToSpeech component, drag the “call
TextToSpeech1.Speak” block.
13. Drag an empty text block from the Text palette and write the
message “Congratulations! You Finished One of Your Tasks”.
Step 7

14. If the user clicked the "NO" button, meaning he is not done with
the task, we will ignore the notification and continue using the app,
duplicate the if statement condition, add it to the "else-if" statement,
change the text to “NO”
15. From the Notifier component, drag the “call
Notifier1.DismissProgressDialog” block.
Testing New Feature
Step1: Requirements Analysis
-To initiate the testing phase, a precise understanding of
the requirements is essential, marking the initial step in
testing.
-Let's remember what was required for the newly added
feature: adding a button to open a list of tasks.
-Upon selection of a task from the list, the application
prompts whether the task is completed or not.
-If the user confirms task completion, the expectation is
for the application to remove the task from the To-Do
List.
Step2: Test Planning
-Test Planning is the second phase, where we put
together a plan or strategy for the testing process and
also specify the testing types we will use.
Test Cases:
Test Case 1 (Unit Testing)
Verifying that the ListPicker includes all the tasks from our
list.
Test Case 2 (Integration Testing)
Make sure the ListPicker and the Notifier work together.
For example, see if picking a task makes a notification pop
up to ask if it's done.
Test Case 3 (Integration Testing)
Test the ListPicker alongside the Delete and Update
buttons. Make sure any changes to the list show up
correctly in the ListPicker.
Test Case 4 (Integration Testing)
Test Notifier with the ListPicker. When the message pops
up, choose 'No' to see if the app keeps running without
deleting anything.
Test Case 5 (Integration Testing)
Test the 'YES' option to make sure that:
-A message confirming completion shows up.
-The completed task gets removed from both the to-do
list and ListPicker choices.
Test Case 6 (System Testing)
Ensure seamless system operation. Perform various
actions together to detect interdependencies.
Step3: Test Case Development
The third phase involves designing the test cases and
their corresponding scripts.
Test Cases’ Scripts:
Test Case 1 (Unit Testing)
-Click on the input field and type the name of the first
task, 'Swimming Class.’
-Click on the Add Button.
-Repeat steps 1 and 2 three times to add three tasks:
Swimming Class, Studying, Play Music.
-Click on the 'Your tasks' button, which is the ListPicker.
-Expected outcome: We should see the three tasks listed.
Test Case 2 (Integration Testing)
-Click on the ListPicker button labeled 'Your tasks.’
-Select a task from the list of three and click on it.
-Expected outcome: A notification box should appear
with the message 'Have you finished this task?' along
with two options, 'YES' or 'NO'.

And this is how we create the script


for each test case.
Step4: Environment Setup

-During this phase, we assemble all the necessary


components for our testing procedures, ensuring that
we have the infrastructure, tools, and resources ready
to effectively carry out the testing activities.
-Specifically, we need a mobile device with the MIT
App Inventor app installed.
-With this setup, we can install our app on the device
and start testing.
Step5: Test Execution

Now it’s time to put the testing into action.


We should open the mobile device and install our app to
run the test case scripts and make observations.

Test Case 1 (Unit Testing)


-Adding 3 tasks will be our first action.
-Next, we'll verify their presence in the ListPicker.
-Upon confirmation, we'll conclude that the first test
has succeeded smoothly.
Test Case 2 (Integration Testing)
-We'll choose one of the tasks and observe the notifier's
functionality.
-Upon observation, we'll note the appearance of a
notification message inquiring about task completion.
-Consequently, this test case will also be considered
successful.
Test Case 3 (Integration Testing)
-Evaluate the ListPicker interaction with the buttons.
-Remove a task and confirm its absence in both the
ListView and ListPicker.
-Next, test the update feature by updating a task.
-Confirm the modifications in the ListView and verify
them in the ListPicker.
-As a result, this test case will demonstrate successful
execution without any problems.
Test Case 4 (Integration Testing)
-The test assesses how the application responds to
choices in the notification message.
-Proceed to the ListPicker, choose the 'Studying' task,
and select 'NO’.
-Ensure that the application operates as expected, with
no impact on tasks.
-Therefore, this test case showcases successful
execution.
Test Case 5 (Integration Testing)
-Attempt to select 'YES' and observe task deletion with a
corresponding message.
-Select 'Studying' and click 'YES', but notice the message
displaying while the task remains in both the list and
ListPicker.
-Repeat the process with another task, yielding the same
outcome.
-On the third attempt, encountered an error.
-So, we've found a problem that needs fixing.
Updating the code to fix the issue

-Issue: The task remains in the listView and


listPicker even after selecting 'yes' in the
notification.
-Review the relevant code section, where we
remove the task from the global variable but
forget to update the listView and listPicker.
-To address this, we'll insert additional blocks
to ensure proper updating of these
components post-deletion.

-We need to check if this change affects anything else by


doing another round of testing.
-After we re-download the app and add new tasks, we'll
try deleting them again to make sure everything works
correctly.
-Now, we can try to perform system testing and ensure
that everything is ready. This concludes step five.
Step6: Test Cycle Closure
-In the final step, we aim to learn from our mistakes.
-We compiled a report detailing the test cases we
executed.
-The report includes the outcomes of these test cases.
-Additionally, any adjustments made during the testing
process are documented.
Which phase involves gathering all necessary tools for testing
procedures?

Test Planning Test Case Development


Environment Setup Test Execution

n which category of the palette can the "Notifier" component be


found?

Storage Layout
Media User Interface

What is the primary function of the "ListPicker" component?

Display the list of items on the screen.


Let the user choose from a list of items.
Convert text into speech.
Provide a way for the app to communicate important information.

"TextToSpeech" component allows users to convert spoken words


into written text within the application.

True False

The "when Notifier1.AfterChoosing" Event in MIT App Inventor is


triggered when:

The "Notifier" component is initialized


The user dismisses a notification
The user selects an option in the notification
The "Notifier" component is destroyed
A b
C d

In our app, when are the ListPicker and ListView components


updated?

When Add button is clicked


When Delete button is clicked
When Update button is clicked
All of the above

In which type of testing is the ListPicker component verified to include


all tasks from the list?

Unit Testing
Integration Testing
System Testing
Regression Testing

A b
C d
Which menu is used to import file to MIT App Inventor?

Connect Build
Projects Help

Test Case 3 focuses on verifying the ListPicker's behavior with Delete


and Update buttons. What happens when a task is deleted by
pressing on the delete button?

The task disappears from the ListPicker only.


The task is removed from both the ListPicker and ListView.
A notification prompts the user to confirm deletion.
TextToSpeech announces the deletion of the task.

You might also like