Skip to content

maheshj01/flutter-Testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flutter Testing using BDD

A Sample Flutter project showing Bloc Architecture and BDD Testing using Gherkins plugin.

  • Clone the project
  • Run flutter pub get
  • Run the tests using dart test_driver/test_config.dart

Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Flutter Folder Structure

📁 android
📁 build
📁 ios
📁 assets
> > 📁 fonts
> > > 📑 Raleway-Regular.ttf
> > > 📑 Raleway-Italic.ttf
> > 📁 images
> > > 🖼️ image1.jpg
> > > 🖼️ image2.jpg
> > 📁 icons
> > > 🖼️ cloudicon.png
> > > 🖼️ thumbsupicon.png
📁 lib
> 📁 bloc
> > 📑 home_page_bloc.dart
> > 📑 login_page_bloc.dart
> 📁 services
> > 📁 sqflite
> > 📁 api_manager
> 📁 pages
> > 📑 home_page.dart
> > 📑 login_page.dart
> 📁 models
> > 📑 user_model.dart
> > 📑 sample_model.dart
> 📁 widgets
> > 📑 circular_button_widget.dart
> > 📑 common_widget.dart
> 📁 test
> > 📑 homepagewidget.dart
> > 📑 custombuttonwidget.dart
> 📁 test_driver
> > 📁 features
> > > 📑 login.feature
> > > 📑 home.feature
> > 📁 steps
> > > 📑 loginstep.dart
> > 📑 test_config.dart
> 📁 const
> > 📑 color_const.dart
> > 📑 string_const.dart
🐳 docker
📑 jenkins
📑 pubspec.yaml
📑 Readme.md

--------------------------------------------------------------# Summary #-------------------------------------------------------------

📁 BLOC

we use this folder to manage the state of our widgets across screens. each file in the bloc folder should correspond to a specific page data must flow through pages-->bloc-->services-->models-->pages(ui)

📁 Services

  • 📁 Sqflite

    • this folder will contain all the database related stuff CRUD irrespective of the type of database
  • 📁 api_manager

    • here we do all the api requests and http calls.

📁 Pages

  • this folder contains all the frontend pages of your application

📁 widgets

  • In this folder we write the custom widgets,that we have to reuse in mutiple pages

📁 models

  • here you write all your pojo/model classes to pass the data objects across screens

📁 test (TDD)

  • this folder is by default created by flutter sdk when we create a new project here we do the widget testing

📁 test_driver (BDD)

📁 steps

  • here we have to write the steps to implement the feature files

📁 features

  • this file contains the features in the gherkins language for the bdd

📁 const

  • this folder contains some string and color files to use them at mutiple places inorder to keep the code clean and have some meaningful strings and colors in the code.

About

Automated Testing a Sample Flutter project using Gherkins Language #BDD

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published