0% found this document useful (0 votes)
5 views4 pages

Experiment No 9

The document outlines Experiment No. 09 focused on UI Testing for the SereniTunes mobile application, utilizing Flutter's integration_test package. It details the importance of UI and integration testing, including a specific test case for the Login and Signup screens to ensure all components function as expected. The experiment concluded with successful execution of the test, validating the UI elements and interactions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views4 pages

Experiment No 9

The document outlines Experiment No. 09 focused on UI Testing for the SereniTunes mobile application, utilizing Flutter's integration_test package. It details the importance of UI and integration testing, including a specific test case for the Login and Signup screens to ensure all components function as expected. The experiment concluded with successful execution of the test, validating the UI elements and interactions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Experiment No: 09

Aim: UI Testing. To test how different features are supported by the UI


Theory

UI Testing is a type of testing where we verify that the application's visual components (buttons,
text fields, icons, etc.) appear and behave as expected. In Android, UI Automator is used to test
app UI interactions across system and app boundaries. In Flutter, however, we perform similar
testing using the integration_test package, which mimics UIAutomator-style testing by
simulating taps, entering text, and checking widget visibility.
Why UI Testing?

• To verify that screens render correctly.


• To ensure proper navigation and input behavior.
• To detect UI bugs before the app goes live.
Technologies Used:

• Flutter
• Firebase (for authentication)
• integration_test Flutter package

• flutter_test for widget matchers and interactions


Introduction to Integration Testing

Integration Testing in Flutter verifies that a complete flow or set of features works together as
expected in a real-world scenario. It goes beyond unit and widget testing by simulating user
behavior across screens and interactions, using real device or emulator environments.
Importance of Integration Testing

• Validates that multiple widgets, services, and logic components function together
correctly.
• Helps uncover bugs that occur only during full feature flows.
Components of Flutter Integration Testing

• IntegrationTestWidgetsFlutterBinding: Binds test framework to the app.


• WidgetTester: Provides methods to interact with the app (e.g., tap, enterText,
pumpAndSettle).
• find: Locates widgets using key, text, type, etc.
• expect: Asserts UI results after interaction.
1. Test Name
Login and Signup Screen UI Test

2. Test Case

Step Action Expected Result


1 Launch the SereniTunes application App loads and displays the Sign In screen
2 Check for Email and Password Input fields for both are visible and editable
input fields
3 Check for "Sign in" button Sign in button is visible and enabled
4 Tap on "Don't have an account? Navigates to the Sign Up screen
Sign Up"
5 Check for Welcome text Text like "Welcome to SereniTunes" is
visible
6 Verify presence of all SignUp fields Fields for Name, Email, Password

7 Check for "Sign Up" button


Sign up button is visible and enabled

8 Tap on "Sign Up" button Validates form and proceeds with account
creation (if input is valid)
9 End the test All UI elements validated without failure

3. Test Description

This test validates the Login and Signup screens of the SereniTunes mobile
application. It ensures that all critical UI components are visible and functioning as
expected, including text fields, buttons, and navigational links. The test begins with
verifying the login screen, then simulates user interaction by navigating to the signup screen
and confirming the visibility of all relevant input fields and elements. This ensures a smooth
onboarding flow and confirms UI integrity after each frame render.
Implementation

1. Created the UI Test File:

Fig 1: integration_test/auth_test.dart
Command to run a test case: flutter test integration_test/auth_test.dart

The test passed successfully, verifying all widgets and interactions.

Conclusion:

In this experiment, I successfully created and executed a UI integration test using Flutter’s
integration_test package. This allowed me to test real UI behavior, including rendering, text
entry, and button taps. The test ensured that all expected UI elements on the LoginScreen
and SignupScreen were present and functioning correctly.

You might also like