Skip to content

Latest commit

 

History

History
77 lines (51 loc) · 2.56 KB

README.md

File metadata and controls

77 lines (51 loc) · 2.56 KB

flutter_template

This is a template project structure.

Articles App

Medium Articles

Clean Architecture in Flutter

Unit Testing with Clean Architecture in Flutter | Mockito

A new Flutter project with Clean Architecture to fetch thw New Work Time Articles, display article details, and see more about details from url.

Getting Started

Prerequisites

  • Flutter SDK
  • Android Studio or VS Code
  • Dart plugin for your IDE

Installing

  • Clone the repository git clone https://github.com/YAMMEN98/ny-times-flutter-app.git
  • Open the project in Android Studio or VS Code.
  • Run the app on an emulator or physical device.

Feature

  • Get all ny times articles.
  • Search articles.
  • Filter article by period
  • Display article details.
  • Apply Dark/Light theme.
  • Apply localization en/ar languages.
  • View Image And Zoom It.
  • Create a lane to generate apk automatically when upload code to the main branch.

Text Coverage

  • Apply Unit Testing .

Built With

Unit Test

To run test you should follow the steps:

  • run command flutter test
  • If you want to get coverage file from Unit Test run this.command flutter test --coverage

There is many tools to generate text coverage, we will use test_cov_console to generate coverage report, follow these steps to run it:

  • Run the following command to make sure all flutter library is up-to-date flutter pub get,
    • Run the following command to generate lcov.info on coverage directory flutter test --coverage,

    • Run the tool to generate report from lcov.info to the console flutter pub run test_cov_console,

    • You can follow and see more of parameters in test_cov_console.

    • You Can Output report to CSV file (-c, --csv, -o, --output) by flutter pub run test_cov_console -c --output=coverage/test_coverage.csv

    • Open CSV file by excel and you will see like this result:

      Text Coverage

Author

Yamen Abdullrahman - Senior Flutter Developer;