/
README
47 lines (32 loc) · 1.09 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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.