Skip to content

mmullis/coverize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coverize - Erlang Coverage Analysis Made Easy!

Perhaps not beautiful yet, but easy to use.

Created by Michael Mullis (michael@mullistechnologies.com)


A sample of the usage is in test/src/eunit_helper.erl.
--------------
Usage
--------------
In a helper file, add something like the following

%% Wrapper for cover to make command line calling easy
run_cover() ->
  SourceDirs = [
    "./src"
  ],

  coverize:run(SourceDirs,test_suite).

--------------------------
Calling from Command Line
--------------------------

./bin/cover.sh  "./src './test/src'" test_suite test ./coverage

------------------------
Calling from a Makefile
------------------------
Add a task to the Makefile that looks like this

coverage: compile
	mkdir -p coverage
	erl -noshell -pa ebin -pa test/ebin -s eunit_helper run_cover -s init stop


Then from the command line (or a script) just
  make coverage

The default location is ./coverage.
After it's done (and cover can take a while), take a look at index.html.
That's the starting point.

Hooray! It's easy!

Additionally, you'll probably want to add ./coverage to your .gitignore.

About

Erlang Coverage Analysis Made Easy!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published