0
0
Testing Fundamentalstesting~10 mins

Device fragmentation challenges in Testing Fundamentals - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to identify the device type for testing.

Testing Fundamentals
device_type = get_device_info().[1]
Drag options to blanks, or click blank then click option'
Anetwork_status
Bbattery_level
Cos_version
Dscreen_size
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing battery_level or network_status which do not define device type.
2fill in blank
medium

Complete the code to check if the app supports the device OS version.

Testing Fundamentals
if device_os_version [1] supported_versions:
Drag options to blanks, or click blank then click option'
Ain
Bequals
Cnot in
Dgreater
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'equals' which is not valid syntax for membership.
3fill in blank
hard

Fix the error in the code to correctly log device capabilities.

Testing Fundamentals
log('Device capabilities: ' + [1] )
Drag options to blanks, or click blank then click option'
AdeviceCapabilities
Bdevice_capabilities
CdeviceCapabilities.toString()
Ddevice_capabilities.toString()
Attempts:
3 left
💡 Hint
Common Mistakes
Using camelCase variable names or calling toString() in Python.
4fill in blank
hard

Fill both blanks to filter devices with screen width greater than 720 and OS version 'Android'.

Testing Fundamentals
filtered_devices = [d for d in devices if d.[1] [2] 720 and d.os == 'Android']
Drag options to blanks, or click blank then click option'
Ascreen_width
B>
C<
Dscreen_height
Attempts:
3 left
💡 Hint
Common Mistakes
Using screen_height or less than operator which filters wrong devices.
5fill in blank
hard

Fill all three blanks to create a test report dictionary with device name, OS, and status.

Testing Fundamentals
test_report = { [1]: device.name, [2]: device.os, [3]: 'Passed' }
Drag options to blanks, or click blank then click option'
A'device_name'
B'os_version'
C'test_status'
D'device_id'
Attempts:
3 left
💡 Hint
Common Mistakes
Using unclear or unrelated keys like 'device_id'.