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:
- 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).
gem install uicov
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.
uicov gather $log-file1 $log-file2 ...
gather command will parse your log files and create coverage file.
Generate coverage report
uicov report $template $coverage-file1 $coverage-file2 ...
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
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
The gem is available as open source under the terms of the MIT License.