Annyce Davis

Helping you write beautiful code

  • Home
  • Public Speaking
  • About Me
  • Courses
  • Life

Bash Scripting for Flutter Tests and Code Coverage Reports

March 19, 2019 by Annyce Davis Leave a Comment

Do you have a development task that is mostly a series of commands? Do you have to perform that task on a regular basis? If so, a script might be just what you need. Over the years I’ve wanted to learn bash scripting several times. Yet there’s always something else that takes priority and my desire to script takes a back seat. Not any more!

I finally decided to start learning how to write bash scripts and I want to share it with you in case you’d like to do the same. At the bottom of this post, I’ve listed several resources that I’m using to help me on this journey. If you’re an Android developer, you can use Gradle to handle many automated tasks. If you want to learn about Gradle on Android or how to create a Gradle plugin, check out my course here.

On to the script. It does the following:

  • Runs the unit and widget tests for a Flutter application
  • Generates a code coverage report
  • Removes the unwanted files from the coverage output
  • Converts the coverage data to HTML
  • Opens the HTML page in your browser

I’m going to break down what each section of the script does so that you can start having fun creating your own scripts! (This post assumes you are already familiar with programming and related concepts.)

Continue Reading

Newsletter

Start a new tech group on Meetup

Follow Me

Dev Machine Setup – Mobile Development

A new machine. Now what? Time to set it all up. Inevitably I end up going back and forth from my old machine or worse yet, my memory, to figure out what needs … [Read More...]

Dagger Multibinding in Dynamic Feature Modules

We're adding the use of dynamic feature modules to our app. This will help us to improve build speeds, conditionally include features and decouple our code. As … [Read More...]

Categories

  • Android (49)
  • Career (2)
  • Communication (3)
  • Flutter (1)
  • Git (4)
  • Gradle (4)
  • Grails (23)
  • Java (8)
  • JavaScript (6)
  • Kotlin (10)
  • Life (4)
  • Public Speaking (21)
  • RxJava (1)
  • Software Development (3)
  • Twitter (3)
  • Uncategorized (11)
  • Video Course (4)

Copyright © 2021 · Beautiful Pro Theme on Genesis Framework · WordPress · Log in