Skip to content

Commit

Permalink
Merge pull request #17 from frojasg/chores/update-how-test-are-run
Browse files Browse the repository at this point in the history
Small improvements in the documentation
  • Loading branch information
parroty committed Dec 31, 2015
2 parents 6470af9 + 80f30ee commit 0610e79
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ defmodule ExCheck.SampleTest do

property :implies do
for_all x in int do
#implies skip samples that does not satisfy the predicate. Also, it prints x when skip a sample
implies x >= 0 do
x >= 0
end
Expand Down Expand Up @@ -110,21 +111,28 @@ end
#### Run

```Shell
$ MIX_ENV=test mix test test/sample_test.exs
.............................................................................................
Ran 100 tests
....x.....xx.x.xxxx.xxxx...xxxx...xx.xxxx...x.....x.x.xx...xx.x...xxx..x...xx..xxxxx..xxxx...
Ran 50 tests
.............................................................................................
Ran 100 tests
.............................................................................................
Ran 100 tests
.............................................................................................
Ran 100 tests
.

Finished in 0.2 seconds (0.1s on load, 0.03s on tests)
5 tests, 0 failures
mix test test/sample_test.exs
..................................................................................................................................................................................................................xxx....x.xx..xxx.x.xx.xx..x...x..x..xx.xx..xx.xx.x..x.x..x..x......x.xx............x.x..x..x...xxx..x..x..xx.x..xx.xx.x......x.xxx.xx..xx.x.x.x.xx.x.xx......xx..xxxx..x....xxx.xxxxx.xxxxx..xx...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Finished in 0.2 seconds (0.1s on load, 0.08s on tests)
948 tests, 0 failures
```

You can also add the optional flag --trace to get additional output
```Shell
mix test test/sample_test.exs --trace

ExCheck.SampleTest
* implies_property........xx.x.x..x..xx.xxx..x.x.x.x..x..x..xx....x.x.xx.xxxxxx..xx...x...xx.x...x.x..xxxxx..x...x......xxxxx.x.x..xxx.x..x.xx..xx..xxxx.x.x..xx.......x..xx.xx...x...x...xxx.xxx.x.xx.xx * implies_property (14.7ms)
* square_property........................................................................................................................................................................................ * square_property (4.1ms)
* push_list_property..................................................................................................................................................................................... * push_list_property (14.7ms)
* square_with_iteration_count_property (0.7ms)......................
* such_that_property..................................................................................................................................................................................... * such_that_property (4.8ms)
* concat_list_property................................................................................................................................................................................... * concat_list_property (25.4ms)


Finished in 0.1 seconds (0.1s on load, 0.06s on tests)
942 tests, 0 failures
```


Expand Down

0 comments on commit 0610e79

Please sign in to comment.