Open GoogleCodeExporter opened 8 years ago
Does this patch work for 1.3.4.b?
Original comment by bret.lit...@gmail.com
on 10 May 2012 at 10:51
It does work in 1.3.4.b, here is a jar built from the previously posted patch.
(If you don't want to download and built it yourself)
Original comment by bret.lit...@gmail.com
on 24 May 2012 at 9:23
Attachments:
Does anyone have an example of our they are using this patch? I need this
solution.
Original comment by jason.do...@gmail.com
on 10 Sep 2012 at 5:17
It might be a bit more involved than what you are looking for, but I have a
github repo that uses this for testing requirejs modules in jsTestDriver and
PhantomJS.
https://github.com/blittle/jstesting
Original comment by bret.lit...@gmail.com
on 10 Sep 2012 at 5:31
Thanks for the link. I was able to get it working with RequireJS and our large
Backbone app.
Original comment by jason.do...@gmail.com
on 11 Sep 2012 at 3:27
Glad to hear it helped, I'll try to keep that updated with various gotchas in
getting this all working. Sometimes jsTestDriver will die on things and it is
hard to debug as to what happened. More often than not though, it seems like it
is a requirejs module loading issue that stops the rest of the process.
Original comment by bret.lit...@gmail.com
on 11 Sep 2012 at 3:38
I was happily surprised when I got it to work because I too have encountered
many issues between JsTestDriver and RequireJS. Our app is not a small or
simple one, but JsTestDriver tests and analyzes it in 2-3 seconds. Loading our
source files in the "serve" section was the key, as loading them in the "load"
section required them to be named modules, and there's no way we're going to
maintain something like that. I only wish that browser launching and
auto-capture were a little more robust (i.e. usable).
In your repo do you use a patched version of JsTestDriver/Coverage?
Original comment by jason.do...@gmail.com
on 12 Sep 2012 at 3:21
Yes, the repo automatically includes the patched version that Paul posted. If
you find some better ways of doing things, go ahead and fork that repo and add
to it. I appreciate your feedback and look forward to more mature tools and
frameworks in the future.
Original comment by bret.lit...@gmail.com
on 12 Sep 2012 at 8:32
[deleted comment]
[deleted comment]
For anyone interested, here's an example that uses this patch:
In the conf file:
plugin:
- name: "coverage"
jar: "../plugins/coverage-1.3.5.serve-patch.jar"
module: "com.google.jstestdriver.coverage.CoverageModule"
args: "includesRegex: /js/app/.*\\.js$, excludesRegex: /js/lib/.*\\.js$"
In this example, we include for coverage all the js files inside js/app, and
exclude all the js files inside js/lib.
(Note that the regex tests over the full file path)
I'm attaching the latest patched jar (1.3.5 at the time of writing) of the
coverage plugin in case someone needs it.
If I can help, feel free to email me.
Cheers, from La Paz, Bolivia
Original comment by edgarinv...@gmail.com
on 1 Nov 2012 at 8:37
Attachments:
Really helpful, I have 2 different projects, 1 is not using requirejs and
working pretty well without this patch, producing code coverage report from a
dev environment to continuous build environment. A second project using
requirejs and AMDLoaderPlugin, we use the serve section, I got it working just
fine on macOS production code coverage report using phantomjs as browser agent.
What I'm struggling with is that when I run on linux, the logs show that the
instrumentation doesn't kick in and no coverage report is produced 'No lines of
coverage found.' toward the end.
Any idea of what could cause the discrepancy?
I'm using phantom 1.7.0 in both environment, and I would assume macos is fairly
close to our linux box.
Original comment by sbard...@gmail.com
on 7 Mar 2013 at 7:05
Forget about my last comment, I found out that the integration server was using
a root path matching the exclusion pattern.
Thanks for this wonderful patch.
Original comment by sbard...@gmail.com
on 7 Mar 2013 at 8:38
Could you please share source for this coverage plugin? I am trying to
integrate coverage plugin with phantomjs and I was not able to get it working.
Original comment by bestwayt...@gmail.com
on 2 Nov 2013 at 3:36
Original issue reported on code.google.com by
Paul.Ly...@gmail.com
on 9 Dec 2011 at 3:32Attachments: