zsh: command not found: genhtml (Flutter + Code Coverage using Codemagic)
Asked Answered
F

1

6

I'm new in DevOps, I want to create code coverage from unit testing result in Flutter.

And this is our command to run that:

flutter test --coverage && genhtml coverage/lcov.info --output=coverage

And this is the result:

00:03 +1: All tests passed!                                                                                                                                                                         
zsh: command not found: genhtml

Does somebody know how to fix it?

And also when I running this:

open coverage/index.html

This is the result:

The file /Users/rrifafauzikomara/Documents/speed-interviews-flutter/coverage/index.html does not exist.

Does somebody know how to fix it?

This is my tutorial that I followed

Flournoy answered 21/5, 2020 at 14:8 Comment(4)
it looks like genhtml is not present in your PATH ... could you try echo $PATH and check /usr/bin/ is in itSqueal
Last login: Thu May 21 21:14:45 on ttys001 rrifafauzikomara@rs-macbook-pro ~ % echo $PATH /Users/rrifafauzikomara/Documents/flutter/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin rrifafauzikomara@rs-macbook-pro ~ % This is the result of echi $PATHFlournoy
the output of which genhtml?Squeal
the output of echo $PATH in my terminalFlournoy
Z
3

You need to install "lcov" to access genhtml command.

On windows:

sudo apt-get update sudo apt-get install lcov

On macOS:

brew install lcov

You can get commands for more platforms here: https://command-not-found.com/genhtml

Zendejas answered 9/2 at 9:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.