Giter VIP home page Giter VIP logo

flutter-testing's Introduction

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.

flutter-testing's People

Contributors

maheshj01 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.