yegor256 / phprack

phpRack Integration Testing Framework
www.phprack.com
Other
24 stars 5 forks source link

to embed JS coverage control into build cycle #79

Open yegor256 opened 11 years ago

yegor256 commented 11 years ago

migrated from Trac, where originally posted by yegor256 on 24-Nov-2010 11:16am

Thanks to #71 we can calculate JS code coverage (now it's 63%). But we don't validate this number in our build cycle. Phing doesn't control whether our JavaScript code is covered by tests or not.

Can we solve it? Can we add this validation to the build cycle?

yegor256 commented 11 years ago

migrated from Trac, where originally posted by yegor256 on 24-Nov-2010 11:17am

Adrian, can you fix it in 1 hour?

yegor256 commented 11 years ago

migrated from Trac, where originally posted by netcoderpl on 10-Dec-2010 12:30pm

JS coverage is calculated by browser JS engine. JSCoverage tool only add to js code line counters which help to do that. Currently I don't see solution for this integration, because when we want it, phing must be able to:

  1. execute browser with page where we have qunit.
  2. wait for all tests.
  3. click on coverage button
  4. get somehow result displayed in browser
yegor256 commented 11 years ago

migrated from Trac, where originally posted by yegor256 on 10-Dec-2010 12:36pm

Can't we use Rhino for this? Rhino will allow us to execute JavaScript without a browser, and produce result. What do you think?