-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add browser test suite to CI #2079
Comments
this is necessary before we do any release post-2.4.4. |
Any preference on how this should be done?
|
How much do we value cross-browser integration/acceptance tests over just plain-old automated browser tests in, e.g. phantomjs? Most of our IE8 issues thus far could have been detected with a grep (it's almost always We could certainly kill two birds with one stone, but I feel like the initial focus might be just hooking up basic browser tests with CI? |
Cross browser testing would be nice. But even testing in Phantom would help. You could take the two tasks on separately. Phantom only tests could be done on Travis.
You can use Sauce Connect on Travis and have your tests run in as many browsers as you want on every commit (PRs included). You'll find the same thing elsewhere, but here's an example Karma and Travis config and |
@tschaub From your link at https://docs.travis-ci.com/user/sauce-connect/
This is why my comment mentioned:
|
You're right @danielstjules. Was thinking I'd used it elsewhere, but I've only set it up for pull requests issued from the same origin. Makes sense that the |
No worries :) But I agree, with your earlier point. We could definitely break this down into multiple tasks. |
Yes, yes, and yes. Some notes/questions:
|
I agree with this. Get something running w Phantom on Travis. |
Unfortunately no, we'd need to write our own integration tests. Our browser unit tests aren't really unit tests. Some of them fail, for example, to show that error handling works in the html reporter. So we'd need to write tests that wrap and verify that functionality. |
Sounds good to me! |
re cross-browser compatibility: if we're just looking at testing our JavaScript, there are two browsers. IE8 and everything else. afaik per kangax's tables, anything else non-ES5-compliant has insignificant usage. |
Hmm, this isn't quite what I meant. I'm not sure how helpful those "browser" tests are. I mean just running the entire suite of server-side tests, excluding inappropriate ones. We should have tests for the HTML reporter as it's integral to mocha's browser functionality. whether those are the existing tests or new ones, I dunno. |
There are two projects that Mochify uses to get the browserified tests running in PhantomJS and on SauceLabs. These should get you somewhere pretty quickly. For PhantomJS, that is https://github.com/mantoni/phantomic
And for WebDriver / SauceLabs support, it's https://github.com/mantoni/min-webdriver
In both cases, the raw script is executed without any wrappers or framework. |
@danielstjules Did you make any progress here? |
Is this something that could be helped/fixed by someone outside the project such as myself? E.g. does it just need to get to the point where firing off a bunch of PhantomJS tests (or something like that) can be done just by an NPM command and then adding that command to the CI server is trivial? Or is it going to be more a matter of getting the CI server or a third-party testing service set up such that only a team member really should have the access needed? I'm wondering because, if this is going to block any other fixes from getting published, I as a user would be eager to try to push it through. That and I need to explore automated JS testing anyway, and I figure there must be at least some overlap with automated testing for Mocha itself, so it might be a great learning opportunity. |
Also, what's the relationship between this issue and #1732? |
Sorry for the delay. This one is a dupe of #1732. I've closed #1732 due to having a much shorter discussion. I believe what we want is to have every PR tested on at least IE8. To accomplish so, I think I've used SauceLabs + zuul for some other projects (thanks to @ndhoule for mentioning it in #1732). I'll take a shot this morning, see what comes out. I appreciate the positive and constructive comments you've left around a few issues, btw. :) |
Should hopefully catch some issues going forward. Very simple cross-browser tests with testling.com/saucelabs would be nice too.
The text was updated successfully, but these errors were encountered: