Unit Test Coverage Report

Get help with testing, discuss unit testing strategies etc.


User avatar
Hakim
Posts: 58
Joined: Fri Apr 26, 2019 3:00 pm

Re: Unit Test Coverage Report

Post 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?

User avatar
nickolay
Core Developer
Core Developer
Posts: 3466
Joined: Mon May 16, 2011 10:48 am

Re: Unit Test Coverage Report

Post 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.
We offer training in both Ext JS and our products, read more here.
Read the API documentation

User avatar
Hakim
Posts: 58
Joined: Fri Apr 26, 2019 3:00 pm

Re: Unit Test Coverage Report

Post by Hakim »

I ran the cmd below, but the index.html comes empty.

Code: Select all

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

User avatar
nickolay
Core Developer
Core Developer
Posts: 3466
Joined: Mon May 16, 2011 10:48 am

Re: Unit Test Coverage Report

Post by nickolay »

You mean the `/Siesta/Repor/index.html` file has size of 0?
We offer training in both Ext JS and our products, read more here.
Read the API documentation

User avatar
Hakim
Posts: 58
Joined: Fri Apr 26, 2019 3:00 pm

Re: Unit Test Coverage Report

Post by Hakim »

Ah, not with size of zero.
Here is the scenario: Image

User avatar
nickolay
Core Developer
Core Developer
Posts: 3466
Joined: Mon May 16, 2011 10:48 am

Re: Unit Test Coverage Report

Post 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.
We offer training in both Ext JS and our products, read more here.
Read the API documentation

User avatar
Hakim
Posts: 58
Joined: Fri Apr 26, 2019 3:00 pm

Re: Unit Test Coverage Report

Post 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

User avatar
nickolay
Core Developer
Core Developer
Posts: 3466
Joined: Mon May 16, 2011 10:48 am

Re: Unit Test Coverage Report

Post 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.
We offer training in both Ext JS and our products, read more here.
Read the API documentation

Post Reply