I am running an evaluation of Siesta Trial, version 5.2.2 and I am facing several issues with the code coverage.
I would appreciate help to understand and get it working.
First, I am executing this on 2 environments: Ubuntu 18 (running in VirtualBox) and Windows 10 system.
First of all, I am starting a webserver in the trial folder:
php -S localhost:80
I execute the following code and get different results on linux/windows:
bin/webdriver localhost/examples/sencha-extjs/ --headless --nyc.reporter=text --include code_coverage --nyc.include='**/*.js'
On Linux: On Windows: Now on linux there is some code coverage present, on windows not, but I still don't get it how it works.
Following the 2 documentations:
https://www.bryntum.com/blog/siesta-5-1-0-released/
https://www.bryntum.com/docs/siesta/#!/guide/code_coverage
I tried several examples, but none works.
For example:
bin/webdriver localhost/examples/sencha-extjs/ --nyc.include='**/5.code_coverage' --nyc.reporter=text --include code_coverage
Launching test suite, OS: Linux, agent: Chrome 74.0.3729.169
[PASS] 5.code_coverage/010_range.t.js
[PASS] 5.code_coverage/020_event.t.js
[PASS] 5.code_coverage/030_loader.t.js
[PASS] 5.code_coverage/040_pageUrl.t.js
7 passed, 0 failed assertions took 6.812s to complete
----------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files | 0 | 0 | 0 | 0 | |
----------|----------|----------|----------|----------|-------------------|
A second question I have is: how do you execute this code? You must have a webserver running or you map "examples" in your /etc/hosts file?
> bin/webdriver examples/sencha-extjs --nyc.include='**/5.code_coverage' --nyc.reporter=html --include code_coverage