How to Test Reduced Motion on Android (Complete Guide)
Reduced motion testing is crucial for ensuring that Android apps are accessible and usable for users who experience motion sickness or have other sensitivities. When an app's animations and transition
Introduction to Reduced Motion Testing
Reduced motion testing is crucial for ensuring that Android apps are accessible and usable for users who experience motion sickness or have other sensitivities. When an app's animations and transitions are not properly handled, it can lead to a poor user experience, resulting in frustrated users and negative reviews. Common failures include apps that do not respect the system's reduced motion setting, causing users to experience unintended animations and transitions.
What to Test
The following test cases should be included in a comprehensive reduced motion testing plan:
- Happy path scenarios:
+ Launching the app with reduced motion enabled
+ Navigating through the app's main screens with reduced motion enabled
+ Performing common actions (e.g., scrolling, clicking buttons) with reduced motion enabled
- Error scenarios:
+ Launching the app with reduced motion enabled and encountering an error (e.g., network failure, invalid input)
+ Handling edge cases (e.g., low battery, low storage) with reduced motion enabled
- Edge cases:
+ Testing with different screen sizes and densities
+ Testing with different system font sizes
+ Testing with different accessibility settings (e.g., high contrast mode)
- Accessibility considerations for reduced motion:
+ Ensuring that the app respects the system's reduced motion setting
+ Ensuring that the app provides an alternative way to navigate (e.g., via keyboard or voice commands) for users who rely on assistive technologies
+ Ensuring that the app's animations and transitions do not cause seizures or other adverse reactions
Manual Testing Approach
To manually test reduced motion on an Android app, follow these steps:
- Enable reduced motion on the test device:
- Go to Settings > Accessibility > Motion (or Animation scale on older devices)
- Toggle the Reduced motion (or Disable animations) switch to the On position
- Launch the app and navigate through its main screens:
- Verify that the app's animations and transitions are reduced or disabled
- Verify that the app's UI is still usable and accessible
- Perform common actions and test error scenarios:
- Scroll through lists and grids
- Click buttons and navigate through the app's screens
- Test error scenarios (e.g., network failure, invalid input)
- Test edge cases and accessibility considerations:
- Test with different screen sizes and densities
- Test with different system font sizes
- Test with different accessibility settings (e.g., high contrast mode)
Automated Testing Approach
Automated testing can help ensure that reduced motion is properly handled in an Android app. The following tools and frameworks can be used:
- Android UI Automator: provides a way to automate UI interactions and verify the app's behavior
- Appium: provides a way to automate UI interactions and verify the app's behavior
- JUnit: provides a way to write unit tests and verify the app's behavior
Example code snippet using Android UI Automator:
// Import the necessary packages
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.UiAutomatorTestCase;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject;
import android.support.test.uiautomator.UiObjectNotFoundException;
import android.support.test.uiautomator.UiSelector;
// Create a test class that extends UiAutomatorTestCase
public class ReducedMotionTest extends UiAutomatorTestCase {
// Create a test method that enables reduced motion and launches the app
public void testReducedMotion() throws UiObjectNotFoundException {
// Get the device and its display
UiDevice device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());
UiObject settingsButton = device.findObject(new UiSelector().text("Settings"));
settingsButton.click();
UiObject accessibilityButton = device.findObject(new UiSelector().text("Accessibility"));
accessibilityButton.click();
UiObject motionButton = device.findObject(new UiSelector().text("Motion"));
motionButton.click();
UiObject reducedMotionSwitch = device.findObject(new UiSelector().text("Reduced motion"));
reducedMotionSwitch.click();
// Launch the app and verify its behavior
UiObject appButton = device.findObject(new UiSelector().text("My App"));
appButton.click();
// Verify that the app's animations and transitions are reduced or disabled
// ...
}
}
How SUSA Tests Reduced Motion Autonomously
SUSA tests reduced motion autonomously using its accessibility persona, which simulates a user with motion sensitivities. This persona catches issues related to reduced motion, such as:
- Apps that do not respect the system's reduced motion setting
- Apps that have animations and transitions that are not reduced or disabled
- Apps that do not provide an alternative way to navigate for users who rely on assistive technologies
SUSA also uses its power user persona to test the app's performance and behavior with reduced motion enabled. This persona catches issues related to performance and battery life, such as:
- Apps that consume excessive battery power with reduced motion enabled
- Apps that have poor performance with reduced motion enabled
By using these personas, SUSA provides a comprehensive testing solution that ensures Android apps are accessible and usable for all users, including those with motion sensitivities. SUSA's autonomous testing platform can be integrated with CI/CD pipelines using GitHub Actions, JUnit XML, or the SUSA CLI tool (available via pip install susatest-agent). This allows developers to automate their testing process and ensure that their app is thoroughly tested before each release.
Test Your App Autonomously
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.
Try SUSA Free