0
0
Testing Fundamentalstesting~20 mins

Mobile-specific test cases in Testing Fundamentals - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Mobile Testing Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why is testing on multiple screen sizes important for mobile apps?

Mobile devices come in many screen sizes. Why must testers check the app on different screen sizes?

ABecause smaller screens do not support touch input
BTo ensure the app layout adapts and remains usable on all screen sizes
CBecause larger screens always run apps faster
DTo reduce the app size for smaller screens
Attempts:
2 left
💡 Hint

Think about how the app looks and works on phones vs tablets.

Predict Output
intermediate
2:00remaining
What is the output of this mobile network state test code?

Consider this pseudocode that checks network state on a mobile device:

network = getNetworkState()
if network == 'wifi':
    print('Connected to WiFi')
elif network == 'cellular':
    print('Using mobile data')
else:
    print('No network')

If the device is in airplane mode, what will be printed?

ANo network
BUsing mobile data
CConnected to WiFi
DError: network variable undefined
Attempts:
2 left
💡 Hint

Airplane mode disables all network connections.

assertion
advanced
2:00remaining
Which assertion correctly verifies the app handles low battery warning on mobile?

You want to test that the app shows a warning message when battery level is below 15%. Which assertion is correct?

Testing Fundamentals
battery_level = 10
warning_displayed = app.checkLowBatteryWarning(battery_level)
# Which assertion below is correct?
Aassert warning_displayed == True
Bassert warning_displayed != True
Cassert warning_displayed = True
Dassert warning_displayed == False
Attempts:
2 left
💡 Hint

Remember the syntax for equality check in assertions.

🔧 Debug
advanced
2:00remaining
Find the bug in this mobile orientation test code

Here is code to detect if the device is in landscape mode:

def isLandscape(width, height):
    if width > height:
        return True
    else
        return False

What is the bug?

AParameters should be height, width instead
BWrong comparison operator, should be width < height
CMissing colon after else
DFunction should return string, not boolean
Attempts:
2 left
💡 Hint

Check syntax carefully after else statement.

framework
expert
2:00remaining
Which mobile testing framework supports both Android and iOS with a single codebase?

You want to automate tests for a mobile app on both Android and iOS using one codebase. Which framework is best?

AJUnit
BEspresso
CXCUITest
DAppium
Attempts:
2 left
💡 Hint

Consider cross-platform support.