Uicov
UICov is a tool to calculate coverage of automated tests made with Selenium WebDriver, Calabash, Appium or other tools.
UICov is written on Ruby and tested with ruby (MRI) versions 1.9.3, 2.0.0, 2.1.5 and 2.2.1
The tool does NOT require you to write tests on ruby. It parses test's logs. Therefore your tests might be written on any programming language. What is needed is comprehensive log files and optionally model files.
The following UI entities are covered:
- Screens.
- Transitions (actions that change current screen).
- Actions ('business' actions made on the screen).
- Elements (web elements accessed by tests).
- Checks (different kinds of assertions made on the screen).
Installation
gem install uicov
Usage
Create template from model
uicov gentpl $model-file1 $model-file2 ...
Generally speaking the model files and template are optional. However if you want to inspect coverage holes and see the whole picture you will have to create a model and template.
Gather coverage
uicov gather $log-file1 $log-file2 ...
The gather
command will parse your log files and create coverage file.
Generate coverage report
uicov report $template $coverage-file1 $coverage-file2 ...
The report
command will generate html-report for coverage.
More usage examples
Adapting to your log file format
To adjust tool to your log file format use option --pattern-file=$filename
of gather
command.
uicov gather -pattern-file=$filename $log-file1 $log-file2 ...
The format of file is:
UICov::patterns_override :log do
set_current_screen /Your pattern here/
set_transition /Your pattern here/
set_action /Your pattern here/
set_check /Your pattern here/
set_element /Your pattern here/
end
Example: https://github.com/budabum/uicov/blob/master/test/data/patt1.rb
License
The gem is available as open source under the terms of the MIT License.