0
0
Testing Fundamentalstesting~20 mins

Device fragmentation challenges in Testing Fundamentals - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Device Fragmentation Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Why is device fragmentation a challenge in mobile app testing?

Device fragmentation means there are many different devices with various screen sizes, OS versions, and hardware. Why does this make testing mobile apps harder?

ABecause the app might behave differently on different devices, requiring more tests to cover all cases.
BBecause all devices run the same OS version, so testing on one device is enough.
CBecause device fragmentation reduces the number of devices to test on.
DBecause device fragmentation only affects desktop applications, not mobile apps.
Attempts:
2 left
💡 Hint

Think about how different devices might show or run the app differently.

🧠 Conceptual
intermediate
1:30remaining
Which testing approach best handles device fragmentation?

Given many device types, which testing approach helps cover most device differences efficiently?

AUsing device emulators and real devices to test a representative sample of devices.
BSkipping testing on devices with older OS versions.
CTesting only on the newest device model available.
DTesting only on devices from one manufacturer.
Attempts:
2 left
💡 Hint

Think about balancing cost and coverage.

Predict Output
advanced
2:00remaining
What is the output of this device compatibility check code?

Consider this Python code snippet that checks device compatibility based on OS version and screen size.

Testing Fundamentals
devices = [
    {'name': 'DeviceA', 'os_version': 10, 'screen_size': 5.5},
    {'name': 'DeviceB', 'os_version': 9, 'screen_size': 6.1},
    {'name': 'DeviceC', 'os_version': 11, 'screen_size': 4.7}
]

compatible_devices = [d['name'] for d in devices if d['os_version'] >= 10 and d['screen_size'] >= 5.0]
print(compatible_devices)
A['DeviceA', 'DeviceC']
B['DeviceB']
C['DeviceA']
D['DeviceB', 'DeviceC']
Attempts:
2 left
💡 Hint

Check which devices have OS version 10 or higher and screen size 5.0 or larger.

assertion
advanced
2:00remaining
Which assertion correctly verifies app UI adapts to different screen sizes?

You want to check if the app's main button width adjusts correctly on devices with screen width 320 and 480 pixels.

Given button_width is the actual width in pixels, which assertion is best?

Testing Fundamentals
screen_width = 320  # or 480
button_width = get_button_width(screen_width)  # returns button width in pixels
Aassert button_width > screen_width
Bassert button_width == screen_width * 0.8
Cassert button_width == 320 or button_width == 480
Dassert button_width < 0
Attempts:
2 left
💡 Hint

The button should be 80% of the screen width.

framework
expert
2:30remaining
Which test framework feature best supports testing across many device types?

In a test automation framework, which feature helps efficiently run tests on multiple device configurations to handle fragmentation?

ARunning tests only on a single device to save time.
BIgnoring device differences and testing only UI elements.
CHardcoding device names inside each test case.
DParameterization to run the same test with different device settings automatically.
Attempts:
2 left
💡 Hint

Think about running the same test many times with different inputs.