Assignment
Unit: 1. Mobile Testing
1. Long Answer Questions (Descriptive)
- Define Mobile Testing. Explain its
importance in the current IT industry.
- Discuss different mobile platforms
available for testing.
- Explain the various mobile device
types and their impact on testing.
- Compare Native apps, Hybrid
apps, and Mobile Web apps with examples.
- Differentiate between Device
Testing and Application Testing.
- Explain Emulator, Simulator,
and Real Device Testing with advantages and disadvantages.
- Discuss the key differences
between Emulator and Simulator.
- What are the different approaches
to mobile UI testing? Explain with examples.
- Write a detailed note on Mobile
Test Planning and Tools used in the industry.
- Compare Android Testing
Frameworks with iOS Testing Frameworks.
2. Short Answer Questions
- What is Mobile Testing?
- List two popular mobile platforms.
- Give two examples of Native
applications.
- What is the purpose of using
Emulators?
- Define Simulator in mobile
testing.
- Mention one key difference between
Emulator and Simulator.
- What is Mobile Web Testing?
- Name two popular Android testing
frameworks.
- Name one iOS testing framework.
- What is device fragmentation in
mobile testing?
3. Multiple Choice Questions (MCQs)
- Which of the following is NOT a
mobile platform?
a) Android
b) iOS
c) Windows
d) Linux Server
Answer: d) Linux Server - Native apps are:
a) Developed using web technologies
b) Developed for a specific platform
c) Platform-independent
d) None of the above
Answer: b) Developed for a specific platform - Which tool is commonly used for
Android UI testing?
a) Espresso
b) XCTest
c) Selenium
d) Appium only
Answer: a) Espresso - Emulator mimics:
a) Hardware and software environment
b) Only hardware
c) Only operating system
d) None
Answer: a) Hardware and software environment - Simulator mimics:
a) Hardware environment
b) Software behavior of a device
c) Both hardware and software
d) Only network performance
Answer: b) Software behavior of a device - Mobile Web applications run on:
a) Device memory
b) Web browsers
c) Native SDKs
d) App stores
Answer: b) Web browsers - Which is an iOS testing framework?
a) Espresso
b) XCTest
c) JUnit
d) Robotium
Answer: b) XCTest - Which of the following tools can
test both Android and iOS apps?
a) Espresso
b) XCTest
c) Appium
d) JUnit
Answer: c) Appium
4. Fill in the Blanks
- _______ testing checks
applications on different mobile devices and platforms.
Answer: Mobile - Applications developed
specifically for one platform are called _______ apps.
Answer: Native - Applications that combine native
and web technologies are called _______ apps.
Answer: Hybrid - _______ mimics both hardware and
software environment of a device.
Answer: Emulator - _______ mimics only the software
behavior of a device.
Answer: Simulator - Testing on actual mobile hardware
is called _______ testing.
Answer: Real Device - _______ framework is commonly used
for Android UI testing.
Answer: Espresso - _______ framework is commonly used
for iOS UI testing.
Answer: XCTest - Planning and selecting appropriate
tools is a crucial step in _______ testing.
Answer: Mobile - _______ apps are accessed through
browsers on mobile devices.
Answer: Mobile Web
5. Descriptive Notes / Programs
A. Native vs Hybrid vs Mobile Web Apps
- Native Apps: Developed using
platform-specific SDKs (e.g., Android Studio for Android, Xcode for iOS).
Best performance but higher cost.
- Hybrid Apps: Combination of native and web;
use frameworks like Ionic, React Native. Portable but slower.
- Mobile Web Apps: Browser-based, accessed via
URLs. Cost-effective but limited access to device features.
B. Key Difference: Emulator vs Simulator
Feature |
Emulator (Android) |
Simulator (iOS) |
Mimics |
Hardware +
Software |
Software only |
Performance |
Slower (since
it mimics hardware too) |
Faster |
Accuracy |
High (close
to real device) |
Limited (no
hardware replication) |
Example |
Android
Emulator |
iOS Simulator |
C. Mobile Testing Tools (Planning & Execution)
- Appium → Cross-platform testing tool
(Android + iOS).
- Espresso → Google’s framework for Android
UI testing.
- XCTest → Apple’s framework for iOS
testing.
- Robotium → Open-source framework for
Android.
- Selendroid → For Android automation.
D. Hardware Perspective in Mobile Testing
- Screen sizes & resolutions
- Battery usage & performance
- Memory and storage
- Network conditions (WiFi, 3G, 4G,
5G)
- Sensors (GPS, Camera,
Accelerometer)
E. Example – UI Test in Espresso (Android)
@Test
public void testLoginButton() {
onView(withId(R.id.login_button))
.perform(click());
onView(withId(R.id.welcome_message))
.check(matches(withText("Welcome
User!")));
}
F. Example – UI Test in XCTest (iOS)
func testLoginButton() {
let app =
XCUIApplication()
app.buttons["login_button"].tap()
XCTAssert(app.staticTexts["Welcome User!"].exists)
}
Unit: 2. Mobile Testing Application
1. Long Answer Questions (Descriptive)
- Explain Functional Testing
in mobile applications with examples.
- Discuss the importance of Performance
Testing in mobile testing.
- Define Stress Testing and
explain its role in mobile application stability.
- What is Security Testing?
Explain common vulnerabilities in mobile apps.
- Discuss the process and objectives
of Usability Testing in mobile testing.
- What is Compatibility Testing?
Why is it critical for mobile apps?
- Explain Laboratory Testing
and its scope in mobile applications.
- Discuss the need and methods of Power
Consumption Testing in mobile apps.
- Define Interrupt Testing.
Provide examples of scenarios that need to be tested.
- What is Recoverability Testing?
Explain with real-world examples.
- Explain Installation Testing
and Uninstallation Testing in mobile applications.
- Write notes on Updates Testing
in mobile applications.
- Explain Certification Testing
and its importance before releasing mobile apps.
- Compare the advantages of real
device testing with emulator/simulator testing.
- Write about the disadvantages
of real device and emulator/simulator testing.
2. Short Answer Questions
- What is the main purpose of
Functional Testing?
- Define Stress Testing in one line.
- Mention two goals of Security
Testing.
- Which testing type checks mobile
app friendliness for end-users?
- Write one example of Compatibility
Testing.
- What is Laboratory Testing in
mobile apps?
- What does Interrupt Testing check?
- Give one disadvantage of
Emulator-based testing.
- Which testing ensures the app is
removed completely from the device?
- What is Certification Testing?
3. Multiple Choice Questions (MCQs)
- Which type of testing ensures that
all features of the mobile app work as expected?
a) Security Testing
b) Functional Testing
c) Performance Testing
d) Stress Testing
Answer: b) Functional Testing - Which testing evaluates how fast a
mobile app runs under different conditions?
a) Usability Testing
b) Performance Testing
c) Stress Testing
d) Compatibility Testing
Answer: b) Performance Testing - Which type of testing checks the
app’s behavior under extreme load?
a) Stress Testing
b) Compatibility Testing
c) Recoverability Testing
d) Power Testing
Answer: a) Stress Testing - Which testing ensures user data
and transactions are safe?
a) Usability Testing
b) Compatibility Testing
c) Security Testing
d) Installation Testing
Answer: c) Security Testing - Which testing type focuses on app
friendliness and user experience?
a) Functional Testing
b) Usability Testing
c) Laboratory Testing
d) Interrupt Testing
Answer: b) Usability Testing - Which testing ensures apps work on
multiple platforms/devices?
a) Compatibility Testing
b) Performance Testing
c) Stress Testing
d) Security Testing
Answer: a) Compatibility Testing - Which testing ensures proper
working during incoming calls or SMS?
a) Recoverability Testing
b) Interrupt Testing
c) Usability Testing
d) Laboratory Testing
Answer: b) Interrupt Testing - Which testing checks how well the
app recovers after failure?
a) Recoverability Testing
b) Security Testing
c) Performance Testing
d) Usability Testing
Answer: a) Recoverability Testing - Which testing validates app
installation/uninstallation procedures?
a) Stress Testing
b) Installation Testing
c) Compatibility Testing
d) Certification Testing
Answer: b) Installation Testing - Which testing ensures the app
meets guidelines of App Stores?
a) Compatibility Testing
b) Certification Testing
c) Usability Testing
d) Power Testing
Answer: b) Certification Testing
4. Fill in the Blanks
- _______ testing verifies that all
functions of an app work correctly.
Answer: Functional - _______ testing measures app
speed, responsiveness, and stability.
Answer: Performance - _______ testing is performed under
heavy load or extreme conditions.
Answer: Stress - Protecting user data in apps is
the goal of _______ testing.
Answer: Security - _______ testing checks whether an
app is user-friendly.
Answer: Usability - _______ testing ensures an app
works across devices, OS, and networks.
Answer: Compatibility - Testing in controlled network environments
is known as _______ testing.
Answer: Laboratory - _______ testing checks app
performance when the device receives a call/SMS.
Answer: Interrupt - _______ testing validates app
recovery after a crash.
Answer: Recoverability - Apps must pass _______ testing
before publishing in app stores.
Answer: Certification
5. Descriptive Notes / Practical Examples
A. Functional Testing
- Ensures all modules of the app
work as expected.
- Example: Login, Signup, Search,
Payment gateway validation.
B. Performance Testing
- Tests app speed, memory usage, CPU
utilization.
- Example: Opening app in less than
3 seconds.
C. Stress Testing
- Tests the app under high load.
- Example: 10,000 users hitting
server simultaneously.
D. Security Testing
- Ensures encryption, data protection,
secure payments.
- Example: Checking SQL Injection,
authentication bypass.
E. Usability Testing
- Tests UI design, accessibility,
and user satisfaction.
- Example: Easy navigation in an
e-commerce app.
F. Compatibility Testing
- Tests app across Android/iOS
versions, device screen sizes.
G. Interrupt Testing
- Example: Incoming call during
video playback.
H. Power Consumption Testing
- Measures battery drain due to app
usage.
I. Recoverability Testing
- Example: Resume payment after app
crash.
J. Installation/Uninstallation/Update Testing
- Ensure proper
installation/uninstallation.
- Example: App updates without data
loss.
K. Certification Testing
- Ensures compliance with Google
Play / Apple App Store guidelines.
6. Advantages & Disadvantages
Advantages of Real Device Testing
- High accuracy (real performance,
battery, hardware).
- Validates network conditions
(4G/5G, WiFi).
- Detects actual device-specific
bugs.
Advantages of Emulator/Simulator Testing
- Cost-effective (no physical device
needed).
- Easy debugging and fast setup.
- Useful in early development phase.
Disadvantages of Real Device Testing
- Expensive (many devices required).
- Maintenance is difficult.
- Time-consuming setup.
Disadvantages of Emulator/Simulator Testing
- Cannot replicate exact real-world
performance.
- Limited in hardware testing
(battery, sensors).
- Slower than real devices under
complex scenarios.
Unit: 3. APPIUM
1. Long Answer Questions (Descriptive)
- Explain in detail how APPIUM
works as a mobile automation testing framework.
- What are the prerequisites to
use APPIUM for mobile testing?
- Discuss the step-by-step procedure
to install APPIUM Desktop on your system.
- Explain the use of APPIUM
Inspector with an example.
- How do you attach an Android
Emulator to APPIUM for testing?
- Write and explain an APPIUM
Test Case for a Native Android Calculator app.
- Discuss the limitations of
using APPIUM in mobile testing.
- What are the common errors
encountered in APPIUM and how do you troubleshoot them?
- Compare APPIUM with other
mobile automation frameworks.
- Why is APPIUM widely used for cross-platform
mobile automation testing?
2. Short Answer Questions
- What is APPIUM?
- Which programming languages are
supported by APPIUM?
- Name two prerequisites for using
APPIUM.
- What is the role of APPIUM Inspector?
- How do you connect an Android
Emulator to APPIUM?
- Write one advantage of APPIUM.
- Give one limitation of APPIUM.
- Which protocol does APPIUM use
internally for automation?
- Name one common error faced while
using APPIUM.
- Which mobile platforms are supported
by APPIUM?
3. Multiple Choice Questions (MCQs)
- APPIUM is primarily used for:
a) Web Automation
b) Mobile Automation
c) Desktop Automation
d) API Automation
Answer: b) Mobile Automation - APPIUM uses which protocol for
communication?
a) FTP
b) HTTP
c) JSON Wire Protocol
d) SOAP
Answer: c) JSON Wire Protocol - APPIUM Inspector is used for:
a) Inspecting UI elements
b) Running test cases
c) Debugging errors
d) Installing applications
Answer: a) Inspecting UI elements - Which of the following is a
prerequisite for APPIUM?
a) Android Studio SDK
b) Eclipse only
c) JMeter
d) Docker
Answer: a) Android Studio SDK - APPIUM supports automation for:
a) Android only
b) iOS only
c) Both Android and iOS
d) Windows only
Answer: c) Both Android and iOS - Which of the following is a
limitation of APPIUM?
a) Cross-platform support
b) Slow execution speed
c) Multiple language support
d) Supports real devices
Answer: b) Slow execution speed - Common error in APPIUM when device
not found:
a) APK Not Signed
b) ADB Device Not Found
c) JSON Error
d) Emulator Crash
Answer: b) ADB Device Not Found - APPIUM test scripts can be written
in:
a) Only Java
b) Java & Python only
c) Multiple languages (Java, Python, C#, Ruby, etc.)
d) Only JavaScript
Answer: c) Multiple languages (Java, Python, C#, Ruby, etc.)
4. Fill in the Blanks
- APPIUM is an open-source tool used
for _______ testing.
Answer: Mobile Automation - APPIUM works on the _______
protocol for communication.
Answer: JSON Wire - The tool used to inspect UI
elements in APPIUM is called _______.
Answer: APPIUM Inspector - To connect an Android Emulator, we
need to use the _______ tool from Android SDK.
Answer: ADB (Android Debug Bridge) - APPIUM Desktop is available for
platforms like _______, _______, and _______.
Answer: Windows, macOS, Linux - APPIUM test cases can be written
in programming languages such as _______ and _______.
Answer: Java, Python (and many more) - A common error in APPIUM when the
device is not detected is _______.
Answer: ADB Device Not Found - APPIUM cannot directly automate _______
mobile apps.
Answer: Built-in system (like Contacts, Camera on some devices) - To test iOS apps using APPIUM,
_______ operating system is required.
Answer: macOS - APPIUM uses _______ server
internally to communicate with devices.
Answer: Node.js
5. Descriptive Notes / Practical Examples
A. How APPIUM Works
- APPIUM acts as a server written
in Node.js.
- Uses JSON Wire Protocol to
communicate between client and mobile device.
- Works with native, hybrid, and
mobile web apps.
- Test scripts run in multiple languages
(Java, Python, C#, JS).
B. Prerequisites to use APPIUM
- Install Java JDK and set
environment variables.
- Install Android Studio (SDK +
ADB).
- Install Node.js.
- Install APPIUM Desktop.
- Connect Android Emulator or Real
Device with USB debugging enabled.
C. Install APPIUM Desktop
- Download APPIUM Desktop from official site.
- Install on Windows/macOS/Linux.
- Start APPIUM server and set
configurations.
D. APPIUM Inspector
- GUI tool that allows inspecting
app UI elements.
- Provides element locators like id,
xpath, accessibilityId.
- Example: Inspect login button →
get XPath → use in test script.
E. Attach Android Emulator to APPIUM
- Start Android Emulator via
Android Studio.
- Run adb devices command to ensure connection.
- Configure Emulator details in
APPIUM capabilities.
4.
{
5.
"platformName":
"Android",
6.
"deviceName":
"emulator-5554",
7.
"appPackage":
"com.android.calculator2",
8.
"appActivity":
"com.android.calculator2.Calculator"
9.
}
F. APPIUM Test Case Example – Calculator App (Java)
import io.appium.java_client.MobileElement;
import io.appium.java_client.android.AndroidDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import java.net.URL;
public class CalculatorTest {
public static
void main(String[] args) throws Exception {
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("platformName", "Android");
caps.setCapability("deviceName", "emulator-5554");
caps.setCapability("appPackage", "com.android.calculator2");
caps.setCapability("appActivity",
"com.android.calculator2.Calculator");
AndroidDriver<MobileElement> driver = new
AndroidDriver<>(new URL("http://127.0.0.1:4723/wd/hub"), caps);
MobileElement two = driver.findElementById("com.android.calculator2:id/digit_2");
MobileElement plus =
driver.findElementById("com.android.calculator2:id/op_add");
MobileElement three =
driver.findElementById("com.android.calculator2:id/digit_3");
MobileElement equals = driver.findElementById("com.android.calculator2:id/eq");
MobileElement result =
driver.findElementById("com.android.calculator2:id/result");
two.click();
plus.click();
three.click();
equals.click();
System.out.println("Result:
" + result.getText()); // Expected: 5
driver.quit();
}
}
G. Limitations of APPIUM
- Slower execution compared to
native tools (Espresso/XCTest).
- Limited support for some gestures.
- Cannot test built-in apps in some
OS versions.
- Requires complex setup for iOS
testing.
H. Common Errors & Troubleshooting
- ADB Device Not Found → Check USB debugging, run adb devices.
- Appium Server Not Starting → Check Node.js installation.
- Session Not Created Exception → Incorrect Desired Capabilities.
- Element Not Found → Use correct locator strategy
(xpath, id, etc.).
- Port Already in Use → Change APPIUM server port
(default 4723).
Unit: 4. UiAutomator & Android Debug Bridge (ADB)
1. Long Answer Questions (Descriptive)
- Explain in detail what UiAutomatorViewer
is and its importance in mobile test automation.
- Describe the steps to download
and install UiAutomator.
- How do you use UiAutomatorViewer
to inspect elements of a mobile app?
- Write the procedure to find
objects and identify UI elements for automation using
UiAutomatorViewer.
- What are the common errors
encountered while using UiAutomatorViewer, and how can they be
resolved?
- Explain Android Debug Bridge
(ADB) in detail with its use cases.
- Discuss the process of USB
debugging and ADB configuration.
- How can you connect an Android
Emulator with ADB?
- Write the procedure to connect a real
Android device with ADB for testing.
- How do you configure ADB for
Wi-Fi support, and what are its benefits?
2. Short Answer Questions
- What is UiAutomatorViewer used
for?
- Which package provides UiAutomator
tools?
- Name two errors commonly faced
while using UiAutomatorViewer.
- What does ADB stand for?
- How do you enable USB Debugging on
Android devices?
- Which command is used to check
connected devices with ADB?
- How do you connect to an emulator
using ADB?
- Write the command to connect a
device to ADB over Wi-Fi.
- Give one limitation of
UiAutomatorViewer.
- Which command starts ADB in server
mode?
3. Multiple Choice Questions (MCQs)
- UiAutomatorViewer is mainly used
for:
a) Debugging Java Programs
b) Inspecting Android UI Elements
c) Installing APKs
d) Running Emulator
Answer: b) Inspecting Android UI Elements - The tool UiAutomatorViewer comes
bundled with:
a) JDK
b) Android SDK
c) Appium
d) Eclipse
Answer: b) Android SDK - To list connected devices via ADB,
the command is:
a) adb devices
b) adb list
c) adb show devices
d) adb info
Answer: a) adb devices - ADB is used for:
a) Automating Web Apps
b) Interacting with Android Devices
c) Debugging Desktop Apps
d) Configuring Wi-Fi router
Answer: b) Interacting with Android Devices - To connect an emulator with ADB,
one must use:
a) Emulator Configuration Wizard
b) adb connect localhost:5555
c) adb emulator attach
d) adb connect deviceName
Answer: b) adb connect localhost:5555 - Which of the following is NOT a
feature of UiAutomatorViewer?
a) Screenshot capture
b) Locating element properties
c) Writing test cases directly
d) Identifying resource IDs
Answer: c) Writing test cases directly - The command to install an APK via
ADB is:
a) adb add
b) adb apkinstall
c) adb install
d) adb push apk
Answer: c) adb install - To restart ADB server, the command
is:
a) adb kill-server && adb start-server
b) adb reset
c) adb reboot-server
d) adb restart
Answer: a) adb kill-server && adb start-server
4. Fill in the Blanks
- UiAutomatorViewer is used to _______ Android app UI
elements.
Answer: Inspect - UiAutomatorViewer comes as part of
the _______.
Answer: Android SDK - ADB stands for _______.
Answer: Android Debug Bridge - The command to check connected
devices is _______.
Answer: adb devices - To enable ADB, one must enable
_______ on the Android device.
Answer: USB Debugging - To connect a device over Wi-Fi,
first connect via _______ cable.
Answer: USB - The command to install APK using
ADB is _______.
Answer: adb install - The command to capture a log from
a device using ADB is _______.
Answer: adb logcat - UiAutomatorViewer displays element
properties such as _______, _______ and _______.
Answer: resource-id, class, text - The default port for ADB over
Wi-Fi is _______.
Answer: 5555
5. Descriptive Notes / Practical Examples
A. What is UiAutomatorViewer?
- A GUI tool bundled with Android
SDK.
- Used to inspect UI components
of Android apps.
- Helps automation testers identify
element properties like resource-id, class, text, xpath.
B. Download & Install UiAutomator
- Install Android Studio or
SDK tools.
- UiAutomatorViewer is located
inside SDK/tools/bin/ directory.
- Run uiautomatorviewer command to launch.
C. Using UiAutomatorViewer
- Connect device/emulator with USB
debugging enabled.
- Launch UiAutomatorViewer → take
screenshot of the app.
- Click on any UI component → view
properties (id, class, xpath).
- Use these properties in automation
test scripts (Appium/UiAutomator).
D. Common Errors in UiAutomatorViewer
- Device not found → Check if adb devices lists the device.
- Blank screenshot → Ensure app is in foreground.
- Permission denied → Enable USB debugging &
install drivers.
E. What is ADB (Android Debug Bridge)?
- A command-line tool to
communicate with Android devices.
- Allows installing apps, copying
files, capturing logs, debugging.
- Part of Android SDK.
F. USB Debugging & ADB Configuration
- Enable Developer Options → turn on
USB Debugging.
- Connect phone via USB cable.
- Run adb devices to check connection.
G. Connecting Emulator with ADB
adb devices
adb connect localhost:5555
- Emulator will show up as a
connected device.
H. Connecting Real Android Device with ADB
adb devices
adb -s <deviceID> install app.apk
- <deviceID> is shown in adb devices output.
I. Configure ADB for Wi-Fi Support
- Connect device via USB.
- Run:
3.
adb tcpip 5555
4.
adb connect
<device_ip>:5555
- Remove USB cable → device remains
connected over Wi-Fi.