Integrating Flutter with Coveralls

by Jan 28, 2018Flutter1 comment

This post quickly presents snippet on how to integrate Flutter app with Coveralls, which will give you feedback on test coverage in your app. Let’s get to it!

Integrating with Travis

At first, we need to integrate our app with Travis. The best starting point would be Yegor Jbanov’s post on Testing Flutter app with Travis. I highly recommend reading it first.

In my case I had to specify two directories in which tests were placed (since otherwise flutter test only run unit tests), so my initial .travis.yml file looked like this:

. . .

Adding project to Coveralls

In order to add a project to Coveralls, all you need to do is Sign In with your GitHub account, go to Add Repos and pick repository you would like to integrate.

Then, when you go to Repos, you should see your project.

. . .

Updating .travis.yml

To properly invoke coveralls on Travis build you need to change .travis.yml file as shown:

. . .

Profit

And that’s it! Now after proper build on Travis, you will be able to see your test coverage.

What is more, you can add a badge (like this Coverage Status) to your project’s readme so that everyone will know how well your app is tested. To do that, go to repo’s detail page on Coveralls, click EMBED above BADGE icon and copy code snippet you need. 🙂

The full example is available here.

If you have any questions, feel free to leave a comment 🙂

Marcin Szałek

Founder of Fidev

Flutter enthusiast since Alpha release in 2017. Believes that sharing is caring, which lead him to start a technical blog dedicated fo Flutter in its early days. Loves to see beautiful designs become real apps and is willing to help make it happen. Enjoys sunny beaches far from home.

Join the newsletter!

Join the newsletter to keep track with latest posts and get my special Widget to animate views' entrances without any hassle for FREE!

Check out other posts!

Stripe Checkout in Flutter Web

Stripe Checkout in Flutter Web

Flutter Web is getting more mature every day. If you want to accept payments using Stripe Checkout in your Flutter web application, this article is just for you!

Stripe Checkout in mobile Flutter app

Stripe Checkout in mobile Flutter app

Have you ever struggled to integrate card payments into your mobile Flutter app? If so, today is your lucky day! In this post, I present how to use Stripe Checkout in the Flutter app without any hassle!

Interacting with Widgets using Framy

Interacting with Widgets using Framy

Have you ever developed a widget or a page and you wanted to make sure it works correctly in different scenarios but then it turned out that you can’t just reproduce all the cases you want to cover? Framy may solve such problems!

Share This

Share This

Share this post with your friends!