Get help with testing, discuss unit testing strategies etc.


Post by nickolay »

Hm.. I can see its Windows, probably also need to convert the path separators to '\'

Post by klodoma »

nickolay wrote: Mon May 27, 2019 3:08 pm Hm.. I can see its Windows, probably also need to convert the path separators to '\'
I'll try. I'll run it on linux too to see what happens.

Post by klodoma »

klodoma wrote: Mon May 27, 2019 3:15 pm
nickolay wrote: Mon May 27, 2019 3:08 pm Hm.. I can see its Windows, probably also need to convert the path separators to '\'
I'll try. I'll run it on linux too to see what happens.
Feedback:
On linux

I have some positives!!
bin/webdriver local/examples/sencha-extjs/index-no-ui.html --headless --debug --include code_coverage --nyc.reporter=text --nyc.include='**/**/*code_coverage*/**/*.js'
This delivers me some coverage report (ignored the content for the moment).

On windows
here it seems that --nyc.include doesn't work. Tried ** patterns, include all patterns, it seems it doesn't work.
If I use --nyc.all then I get coverage report on windows too

Post by nickolay »

Regarding the missing proxy requests. There's an option in ChromeDriver, that specifies for which hosts to bypass the proxy and it does work (if I set it to 'local' I can reproduce the issue you have with "localhost"). However setting it empty string does nothing, so I guess ignoring proxy for "localhost" is hardcoded somewhere in Chrome itself as browser). Setting it as command line argument for the browser did not help either. So probably need to work around in this case.

The workaround is to use any other host name, like "local" or "lh", which can be aliased to 127.0.0.1 in `/etc/hosts` or similar. I'll add a note to code coverage guide.

Post by nickolay »

Regarding the non-working `--nyc.include` on windows - seems one just need to use double quotes for this config. Some specifics of windows terminal. Works fine for me after this, can you confirm? I'll add a note in coverage guide as well.
screenshot6.jpg
screenshot6.jpg (200.32 KiB) Viewed 2414 times

Post by klodoma »

nickolay wrote: Mon May 27, 2019 6:19 pm Regarding the non-working `--nyc.include` on windows - seems one just need to use double quotes for this config. Some specifics of windows terminal. Works fine for me after this, can you confirm? I'll add a note in coverage guide as well.
Yes, I can confirm that with double quotes, it works on windows.

Good, at least we have some results now, I will have a look next at the coverage content.

Post Reply