Questions tagged [jscoverage]

JSCoverage is a tool that measures code coverage for JavaScript programs.

JSCoverage is a tool that measures code coverage for JavaScript programs.

Code coverage statistics show which lines of a program have been executed (and which have been missed). This information is useful for constructing comprehensive test suites (hence, it is often called test coverage).

JSCoverage works by instrumenting the JavaScript code used in web pages. Code coverage statistics are collected while the instrumented JavaScript code is executed in a web browser.

JSCoverage supports the complete language syntax described in the ECMAScript Language Specification (ECMA-262, 3rd edition). JSCoverage works with any modern standards-compliant web browser - including Internet Explorer (IE 6, 7, and 8), Firefox, Opera, Safari, and Google Chrome - on Microsoft Windows and GNU/Linux.

JSCoverage is free software, distributed under the GNU General Public License version 2.

Source:http://siliconforks.com/jscoverage/

31 questions
12
votes
1 answer

How to tell Sonar to use my LCOV file for Code Coverage

We have a Jenkins job that contains a bunch of javascript files. We build our project via grunt, and at the end of the build we run JSCover to run our unit tests and collect code coverage. It all works. We get a nice LCOV file. We now want to…
grayaii
  • 2,241
  • 7
  • 31
  • 47
11
votes
2 answers

Qunit + JSCoverage + Jenkins

I have started using Qunit to test my JS code. I am looking into JSCoverage to generate the coverage reports later. We have a CI server (Jenkins) which already do a few things with our PHP code and I was wondering if anyone can comment on how I can…
Sparsh Gupta
  • 2,163
  • 5
  • 19
  • 21
7
votes
1 answer

Karma coverage thresholds

I am currently using Karma's coverage within a project, I would like to enforce a threshold for the coverage to be set at and therefore make my builds on Circle CI to fail and go red due to it being lower than a set percentage.
Nick White
  • 1,602
  • 4
  • 20
  • 35
6
votes
2 answers

Running JSCoverage with Jasmine

A little new to Javascript coding, so please bear with me. I read through the following link jasmine with jscoverage automated testing However, since I don't have a Ruby project, it didn't seem to be what I wanted. Here are the steps I…
Chetter Hummin
  • 6,687
  • 8
  • 32
  • 44
6
votes
3 answers

JSCover with PhantomJS - TypeError: 'null' is not an object

When I try to run JSCover with PhantomJS, I see below ERROR: Steps followed: 1) Run the JSCover Server: java -jar ~/JSCover/target/dist/JSCover-all.jar -ws --report-dir=report 2) Run the PhantomJS runner with JSCover: *phantomjs --debug=true…
5
votes
1 answer

What is the best way to get coverage stats in cucumber js?

I'm designing my tests using the Behavior Driven Development (BDD) approach using Gherkin syntax and running my tests with Cucumber JS. I'm using Cucumber Studio to share reports and keep synced with my business stakeholders, and…
Chootti
  • 357
  • 3
  • 15
4
votes
2 answers

Rails + Capybara-webkit – javascript code coverage?

I am looking into using capybara-webkit to do somewhat close-to-reality tests of app. This is absolutely neccessary as the app features a very rich JS-based UI and the Rails part is mostly API calls. The question is: is there any tools to integrate…
Anton
  • 2,483
  • 2
  • 23
  • 35
3
votes
4 answers

No coverage information was collected, exit without writing coverage information, istanbul coverage

Please does anybody know how i can address this issue ? I have my test:coverage defined as follows. scripts{ "test:coverage": "babel-node ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha ./src/_utils/__tests__/*.js" } and when i run…
Nuru Salihu
  • 4,756
  • 17
  • 65
  • 116
3
votes
1 answer

Can I use istanbul to instrument for mocha html-cov

I'm trying to use istanbul instrument output to mocha -R html-cov but cannot get it to work. My test script is: test: post: - node_modules/.bin/istanbul cover node_modules/.bin/_mocha -dir $CIRCLE_ARTIFACTS -- -u exports -R spec -…
Simon
  • 5,158
  • 8
  • 43
  • 65
3
votes
1 answer

Nodeunit - JSCovrage

Is there a way to use JSCoverage to have code coverage for nodeunit? I know there is nodeunit2, but my code is not in lib, and I do not want to restructure my project.
Ari Porad
  • 2,834
  • 3
  • 33
  • 51
2
votes
2 answers

Any JavaScript code coverage tools for client-server apps in Google Closure?

I'm trying to get code coverage for unit tests in a Google Closure client-server project. We have code coverage for the server side, and need client side coverage. JSCover runs its own server. Our cleint side unit tests require running under our…
Mike
  • 3,084
  • 1
  • 25
  • 44
2
votes
2 answers

Istanbul :No coverage information was collected, exit without writing coverage information

I am trying to get code coverage of my node.js project . I am using mocha and istanbul for that purpose. But i am getting 0 passing Istanbul :No coverage information was collected, exit without writing coverage information Mocha and istanbul are…
user2991413
  • 521
  • 2
  • 9
  • 26
2
votes
1 answer

Is it possible to use JSCover or any other tool to get JavaScript code coverage running Java Selenium WebDriver tests in Browser?

Is there a way to run Selenium WebDriver tests in a browser (or just run a test scenario manually in a browser), and get the code coverage of the web-app written in JavaScript? Are there any other code coverage tools except JSCover that can do such…
2
votes
1 answer

"Unrecognized option: --format=COBERTURAXML" in trying to convert JSCover report to cobertura xml

I'm trying to convert JSCover to cobertura xml. Based on what i've read the command is as follows: java -cp JSCover-all.jar jscover.report.Main --format=COBERTURAXML REPORT-DIR SRC-DIRECTORY But I get an error "Error: Could not find or load main…
Black Ice
  • 21
  • 1
2
votes
1 answer

How should I gauge unit test coverage for JS ? I can't be satisfied with jscoverage

I wanna gauge unit test coverage for Javascript. jscoverage is one of the most useful tool. However, jscoverage can only gauges which the code pass or not on unit test. I wanna gauge coverage including logic. How should I gauge unit test coverage…
1
2 3