Forums

Posting in these forums is disabled. These forums will be available for archive purposes. Please join the new forums at the links below:

  • yui-support - replaces the `YUI 3.x` and `YUI 3 Gallery` forums.
    We have created the following discussion categories within this group to aid discoverability for these most-used topics:
    • Charts for YUI Charts support.
    • DataTable for YUI DataTable support.
    • Gallery for YUI Gallery support, including support for published Gallery components as well as the Gallery process in general.
    • Tools for support of YUI’s suite of developer tools such as selleck, shifter, grover, yogi, etc.
    • Everything Else for questions that don’t fit one of the categories above, we’ve got you covered here.
  • yui-deprecated - replaces the `YUI 2.x` forum and the forums of other deprecated products (`YUI Doc`, `Builder`, `YUI PHP Loader`, etc.).
  [ 5 posts ]
New Topic | Post Reply | Print view
Previous topic | Next topic

Daniel Ji

  • Username: humblepie
  • Joined: Tue Feb 28, 2012 10:30 am
  • Posts: 147
  • GitHub: humblepie
  • Gists: humblepie
  • Offline
  • Profile
Tags:
  • event
  • github

code coverage with yeti

Post Posted: Tue Nov 27, 2012 3:15 pm
Hi everyone,

The quick guide at https://github.com/yui/yeti says that
Quote:
Yeti automatically includes a line coverage summary if your tests were instrumented with YUI Test Coverage.


But how do I do this? I'm running yeti with the --query 'filter=coverage', but the coverage part isn't working.

I tried to subscribe to the 'complete' event of the Y.Test.Runner and then call report() on using runner.getCoverage(), but getCoverage() always returns null.

Thank.

Daniel Ji

  • Username: humblepie
  • Joined: Tue Feb 28, 2012 10:30 am
  • Posts: 147
  • GitHub: humblepie
  • Gists: humblepie
  • Offline
  • Profile
Tags:
  • github
  • yuitest

Re: code coverage with yeti

Post Posted: Tue Nov 27, 2012 4:45 pm
Found my answer: https://github.com/yui/yuitest/wiki/Code-Coverage

From what I gather on the upcoming tools (yogi and 'friends'), this manual step might not be necessary though.

Daniel Ji

  • Username: humblepie
  • Joined: Tue Feb 28, 2012 10:30 am
  • Posts: 147
  • GitHub: humblepie
  • Gists: humblepie
  • Offline
  • Profile
Tags:
  • node instrument yui test files

Re: code coverage with yeti

Post Posted: Wed Nov 28, 2012 2:54 pm
istanbul is another option to instrument your JS files. It runs on node.

You just run the command: istanbul instrument

customcommander

YUI Contributor

  • Offline
  • Profile
Tags:
  • number
  • ticket

Re: code coverage with yeti

Post Posted: Mon Feb 18, 2013 2:38 pm
Hi,

I'm having the same problem on a Windows 7 and OSX Lion desktops with the latest release of Yeti.

As an example I've created a very simple file that contains just one function getNumber that returns always the same number: 10.

I've got the yui-coverage* jar and instrumented that file (which works really fine) and included it in to a test runner (which contains a dead simple 'should return 10' test case).

When I run 'yeti testrunner.html' I get a report saying that my agent has connected and that my test has completed sucessfully.

The problem is that I just don't get that code coverage report.

If I open Firebug when my agent connects and subscribe to the COMPLETE_EVENT of the Y.Test.Runner I can get the Y.Test.Runner.getCoverage() output, but it seems to me it's too late.

It looks like there is a failure in automatically report these coverage data back to Yeti.

I suppose my problem is covered by this ticket
http://yuilibrary.com/projects/yeti/ticket/120

I can't access the code for the samples right now but I'm happy to provide them if that helps.

Thanks.

Daniel Ji

  • Username: humblepie
  • Joined: Tue Feb 28, 2012 10:30 am
  • Posts: 147
  • GitHub: humblepie
  • Gists: humblepie
  • Offline
  • Profile
Tags:
  • ticket

Re: code coverage with yeti

Post Posted: Tue Feb 19, 2013 10:16 am
@customcommander

Hey, a few weeks ago Reid accepted the ticket you referenced. Hopefully, a fix will be rolled out :)
  [ 5 posts ]
New Topic | Post Reply | Print view
Previous topic | Next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum