Skip to content

bhuwanwritescode/my_test_app

Repository files navigation

Test Shop - Flutter Automation Test App

A simple Amazon-like Flutter app built for automation testing. It includes vertical scrolling, horizontal scrolling, form submission, date picker, and dropdown — all with unique Key identifiers for easy test targeting.

Prerequisites

  • Flutter SDK (3.x or later)
  • A connected device or emulator/simulator

Verify your setup:

flutter doctor

Run the App

# Get dependencies
flutter pub get

# Run on connected device / emulator
flutter run

# Run on a specific platform
flutter run -d chrome      # Web
flutter run -d macos       # macOS desktop
flutter run -d ios         # iOS simulator
flutter run -d android     # Android emulator

App Overview

Home Page (home_screen)

Element Key Pattern Type
Search bar search_field TextField
Promo banner promo_banner Container
Category chips (0-7) category_0 ... category_7 Horizontal scroll
Deal cards (0-9) deal_card_0 ... deal_card_9 Horizontal scroll
Product tiles (0-14) product_tile_0 ... product_tile_14 Vertical list
Add to cart buttons add_to_cart_0 ... add_to_cart_14 IconButton
Cart icon cart_button IconButton
Bottom navigation nav_home, nav_deals, nav_orders, nav_profile BottomNav

Profile / Form Page (profile_screen)

Navigate here by tapping Profile in the bottom nav.

Element Key Type
Full Name name_field TextFormField
Email email_field TextFormField
Phone phone_field TextFormField
Date of Birth dob_picker DatePicker (tap)
Address address_field TextFormField
City city_field TextFormField
Zip Code zip_field TextFormField
Country country_dropdown DropdownButtonFormField
Newsletter newsletter_checkbox CheckboxListTile
Submit submit_button ElevatedButton

After submission, a success screen shows all entered values with keys like success_name, success_email, etc.

What It Looks Like

Once running, you will see:

  1. Home - Orange-themed Amazon-like page with a search bar, promo banner, horizontally scrollable categories and deals, and a vertical product list with add-to-cart buttons.
  2. Form - A shipping info form with text fields, date picker, country dropdown, newsletter checkbox, and a submit button with validation.

Useful for Automation

All interactive elements have unique Key(...) values, making them easy to locate with:

  • Appium - find_element(:accessibility_id, 'search_field')
  • Flutter Driver - find.byValueKey('search_field')
  • Integration Tests - find.byKey(const Key('search_field'))

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors