Page 2 of 2

Re: Unit Test Coverage Report

Posted: Thu Mar 12, 2020 3:07 pm
by Hakim
one more question: Here is the UI I could see from the generated index.html :Image.

However, I need see my files names similar to the one in the image I sent previously. How does that work?

Re: Unit Test Coverage Report

Posted: Thu Mar 12, 2020 3:15 pm
by nickolay
Do you combine the application files into single bundle? If so, might need to either use some development mode, in which the application files are loaded on-demand. Or, you can pre-instrument source files before bundling.

Re: Unit Test Coverage Report

Posted: Thu Mar 12, 2020 4:32 pm
by Hakim
I ran the cmd below, but the index.html comes empty.
siesta-5.3.1-standard/bin/webdriver localhost:1841/myApp/test/Siesta/test.html --include UT --coverage-report-format=HTML --coverage-report-dir /Siesta/Report --nyc.instrument=false

Re: Unit Test Coverage Report

Posted: Thu Mar 12, 2020 5:29 pm
by nickolay
You mean the `/Siesta/Repor/index.html` file has size of 0?

Re: Unit Test Coverage Report

Posted: Fri Mar 13, 2020 9:52 am
by Hakim
Ah, not with size of zero.
Here is the scenario: Image

Re: Unit Test Coverage Report

Posted: Fri Mar 13, 2020 10:47 am
by nickolay
But previously you received some results in it?

Do you combine the application files into single bundle? If so, might need to either use some development mode, in which the application files are loaded on-demand. Or, you can pre-instrument source files before bundling.

Also read about the --nyc.include option in the https://www.bryntum.com/docs/siesta/#!/guide/code_coverage - it controls what files are instrumented.

Re: Unit Test Coverage Report

Posted: Fri Mar 13, 2020 2:00 pm
by Hakim
the app files are combined into a single bundle! okay, here is the part I am confused about.
use some development mode, in which the application files are loaded on-demand. Or, you can pre-instrument source files before bundling.
I could not understand
pre-instrument source files
or
usage of development mode

Re: Unit Test Coverage Report

Posted: Fri Mar 13, 2020 2:17 pm
by nickolay
The development mode is a mode that is common for the ExtJS app - in that mode application loads from individual files, not from the bundle. If you don't have it, the only option would be to pre-instrument the sources.

See the "Pre-instrumenting the source code" section in the code coverage guide.