-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coverage via proxy on PhantomJS (Selenium automation). #220
Comments
JSCover can collect coverage when run as a proxy, but it is preferable to instrument the JavaScript first and not use the proxy mode unless pre-instrumenting is not possible. This approach should work fine (I've used PhantomJS too via Ghostdriver) I'm guessing in your second version of FireFox, the 404 is occurring because you haven't manually configured the proxy in the browser. Can you just replace |
Indeed I've missed the manual proxy configuration for Firefox. I've tried also alternative C# configurations, e.g.
or
Still no results. To avoid confusion with Firefox verifications, what I've alternatively tried is to navigate to the results page using the driver itself:
but got 404: There are reports related to There is more confusion with the proxy setup for PhantomJS as seen e.g. in ariya/phantomjs#12420 or ariya/phantomjs#11619 so I'm not sure where the problem actually is. |
It looks like a PhantomJS proxy issue - that last test you did seems to confirm it. |
Thanks for your time. |
I'd like to collect code coverage statistics during few coded UI tests execution.
I'm working with JSCover 1.0.23-SNAPSHOT, XUnit 2.1.0, Selenium.WebDriver 2.48.2, PhantomJS 2.0.0 and basic ASP.NET MVC 4 application hosted in IISExpress 10 on Win7 machine.
When using JSCover through proxy on Firefox, everything works as expected:
Start JSCover with proxy args:
Setup WebDriver in C#:
Invoke few tests:
Expect results to be generated (awesome!):
When using JSCover through proxy on PhantomJS instead, unfortunately either it doesn't work, or I'm doing something incorrectly:
Start JSCover with proxy args (same as before):
Start PhantomJS:
Setup WebDriver in C#:
Invoke few tests (same as before):
Expect unavailable results (checking in Firefox browser, by pasting expected results URL manually):
Supplementary logs:
Is it possible to configure coverage that or similar way?
I'm interested in proxy version in particular, I haven't tried explicit instrumentation.
Also I'm not sure if this is a problem related to JSCover, or maybe some other component used here.
Regards
The text was updated successfully, but these errors were encountered: