This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 246221 - Coverage does not show after running all tests
Summary: Coverage does not show after running all tests
Status: RESOLVED WORKSFORME
Alias: None
Product: javascript
Classification: Unclassified
Component: Testing (show other bugs)
Version: 8.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-03 17:40 UTC by vkhashin
Modified: 2019-03-26 06:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
karma_coverage (341.81 KB, application/x-zip)
2014-08-03 17:40 UTC, vkhashin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vkhashin 2014-08-03 17:40:33 UTC
Created attachment 148498 [details]
karma_coverage

From the test case

-Open karma_coverage project
-Right click on project and select Code Coverage | Collect and display code coverage
-restart IDE
-open file js/a/src2.js (there is no Code coverage toolbar)
-right click on the project properties and move mouse pointer to "code coverage" menu item. Code coverage toolbar appears at the bottom of the editor.
-Click on All Tests button in coverage toolbar
-IDE do not shows code coverage
-Click on All Tests button again two times
-Now it's ok
But if i press "Report..." button and press "Run All Tests" in the reports window all works fine.

Product Version: NetBeans IDE 8.0.1 RC1 (Build 201408011942)
Java: 1.7.0_65; Java HotSpot(TM) 64-Bit Server VM 24.65-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_65-b17
System: Linux version 3.11.0-26-generic running on amd64; UTF-8; en_US (nb)
User directory: /home/vitaliy/.netbeans/8.0.1rc1
Cache directory: /home/vitaliy/.cache/netbeans/8.0.1rc1
Comment 1 Vladimir Riha 2014-08-03 17:58:17 UTC
(In reply to vkhashin from comment #0)
> -open file js/a/src2.js (there is no Code coverage toolbar)

Works for me, the toolbar is displayed

> -right click on the project properties and move mouse pointer to "code
> coverage" menu item. Code coverage toolbar appears at the bottom of the
> editor.

This would disable code coverage as it was already enabled. So I skipped this step

> -Click on All Tests button in coverage toolbar
> -IDE do not shows code coverage

It works for me, it is not instant, Karma server has to start and execute tests, it could take a moment. 

So the problem is that if you click on "All tests" button in code coverage toolbar, the first invocation does not show code coverage? Does it happen all the time? Are the tests actually executed on the 1st invocation?



Product Version: NetBeans IDE 8.0.1 RC1 (Build 201408031330)
Java: 1.8.0_11; Java HotSpot(TM) Client VM 25.11-b03
Runtime: Java(TM) SE Runtime Environment 1.8.0_11-b12
System: Linux version 3.13.0-32-generic running on i386; UTF-8; en_US (nb)
Comment 2 vkhashin 2014-08-03 18:09:59 UTC
Yes the problem is that if i click on "All tests" button in code coverage toolbar, the second invocation shows code coverage? In the first invication as in the second i get output:

"/home/vitaliy/NetBeansProjects/karma_coverage/node_modules/karma/bin/karma" "start" "/home/vitaliy/NetBeansProjects/karma_coverage/config/karma.conf.js" "--port" "9876"
INFO [karma]: Karma v0.12.19 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 36.0.1985 (Linux)]: Connected on socket 5yhS8DgmnDcqa7aiDJdU with id 29505452
Chrome 36.0.1985 (Linux): Executed 0 of 2 SUCCESS (0 secs / 0 secs)
LOG: 'A'
Chrome 36.0.1985 (Linux): Executed 0 of 2 SUCCESS (0 secs / 0 secs)
Chrome 36.0.1985 (Linux) LOG: 'A'
ERROR: 'A'
Chrome 36.0.1985 (Linux): Executed 0 of 2 SUCCESS (0 secs / 0 secs)
Chrome 36.0.1985 (Linux) ERROR: 'A'
LOG: 1
Chrome 36.0.1985 (Linux): Executed 0 of 2 SUCCESS (0 secs / 0 secs)
Chrome 36.0.1985 (Linux) LOG: 1
WARN [web-server]: 404: /someUrl
Chrome 36.0.1985 (Linux): Executed 1 of 2 SUCCESS (0 secs / 0.012 secs)
Chrome 36.0.1985 (Linux): Executed 2 of 2 SUCCESS (0 secs / 0.013 secs)
Chrome 36.0.1985 (Linux): Executed 2 of 2 SUCCESS (0.019 secs / 0.013 secs)

Test result window open and shows 100%
Comment 3 Tomas Mysik 2014-08-04 05:42:14 UTC
Can you reliably reproduce it? Or is it random? BTW you need to wait for a while because Karma needs to generate the XML log and NetBeans then must parse it (this takes a while, especially for large(r) projects).

However, I cannot reproduce it with the latest dev build so closing as WORKSFORME.

Thanks.

Product Version: NetBeans IDE Dev (Build 20140804-a5ccc9a75f08)
Java: 1.7.0_65; Java HotSpot(TM) 64-Bit Server VM 24.65-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_65-b17
System: Linux version 3.13.0-32-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 4 peterpen 2019-03-26 06:18:13 UTC
I am very excited to play the roblox free roblox game online full free just a single click here http://robloxfreerobuxgenerator.com/ it is the fully free game all the time here the more online players play this board game thanks for visit.