Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maheshj01/flutter-testing

Automated Testing a Sample Flutter project using Gherkins Language #BDD
https://github.com/maheshj01/flutter-testing

bdd flutter flutter-test testing

Last synced: 28 days ago
JSON representation

Automated Testing a Sample Flutter project using Gherkins Language #BDD

Awesome Lists containing this project

README

        

# 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```


### Medium :https://medium.com/@maheshmnj/testing-your-flutter-app-f08ebc54beb9

## 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:

- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)

For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), 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.