Skip to content
This repository has been archived by the owner on Oct 10, 2021. It is now read-only.

Support automated test running in local browsers #248

Open
toddself opened this issue Nov 6, 2015 · 13 comments
Open

Support automated test running in local browsers #248

toddself opened this issue Nov 6, 2015 · 13 comments

Comments

@toddself
Copy link
Contributor

toddself commented Nov 6, 2015

Problem: phantomjs development has slowed significantly and it does not support any ES6 syntax. (Although istanbul also has issues, but I can do --no-coverage). What I'd like to be able to do is use zuul as my test runner locally to run my tests in a local browser (either live or via xvfb, either way is ok with me), like how testling works.

I'm happy to put together a PR for this, but would this be a welcome addition? (Or does this currently work and I just haven't figured it out?)

@parshap
Copy link

parshap commented Nov 6, 2015

@toddself
Copy link
Contributor Author

toddself commented Nov 6, 2015

Wrong idea.

What I want is for zuul to listen to the browser's console, have the browser execute the tests, and then exit returning a non-zero status for failing tests along with console-based output (tap compatible would be great!)

--local requires you to open the browser (or you can use --open if you're lazy) but you have to visually parse the results. The idea here is automated testing using real browsers.

Alternatively phantomjs could kickstart dev again and actually release 2.0....

@parshap
Copy link

parshap commented Nov 6, 2015

Ah yes, that'd be great.

I also notice that if you call process.exit() with a non-zero exit code, zuul does not recognize that as a failure.

@vvo
Copy link
Collaborator

vvo commented Nov 10, 2015

--local requires you to open the browser (or you can use --open if you're lazy) but you have to visually parse the results. The idea here is automated testing using real browsers.

You can use saucelabs for this. If you really want real browsers local mode (+ exit code etc..) then you should implement selenium connector in zuul and then use selenium.

Otherwise this:

What I'd like to be able to do is use zuul as my test runner locally to run my tests in a local browser (either live or via xvfb, either way is ok with me), like how testling works.

Is exactly what http://karma-runner.github.io/0.13/index.html is

@vvo
Copy link
Collaborator

vvo commented Nov 10, 2015

Problem: phantomjs development has slowed significantly and it does not support any ES6 syntax.

I do use --phantom with zuul: https://github.com/defunctzombie/zuul/wiki/Phantom-js But you have to compile to ES5 (BTW you will have to compile to ES5 no matter what you do, because not all browsers are supporting ES6, nor all of it)

@toddself
Copy link
Contributor Author

phantom no longer runs under os x el capitan, so that's out. the project seems to be on life support (2.0 was never fully released and there is very little activity)

Also most browsers support a decent chunk of es6 at this point; we have a limited number of browsers to support so we're using ES6 syntax that is available in them. Transpiling just for testing is not a scenario I'd like to get into.

Saucelabs costs money and quite a lot of it unless you're working on open source and go through the hassle of opening an account. Even if you're working on open source entirely, I've found saucelabs to be a lot of hassle at times.

I'm like a 1/4 of the way through making a connector to run on a local browser; hopefully will be able to PR shortly.

@vvo
Copy link
Collaborator

vvo commented Nov 10, 2015

Transpiling just for testing is not a scenario I'd like to get into.

Indeed, either you always transpile with babel or no transpile at all.

Even if you're working on open source entirely, I've found saucelabs to be a lot of hassle at times.

Yes indeed, mostly selenium is the hassle

@vvo
Copy link
Collaborator

vvo commented Nov 10, 2015

I'm like a 1/4 of the way through making a connector to run on a local browser; hopefully will be able to PR shortly.

Sooooo cool! way to go :D

@defunctzombie
Copy link
Owner

I am happy with removing phantomjs support once this lands. I never really cared for phantomjs support anyway since it was so easy to just open a real browser.

@toddself
Copy link
Contributor Author

Well this has come full circle. I remember talking with Thorsten to see if he could get phantom re-added as we needed it for local automated testing when we both worked at Conde Nast. :)

@Hypercubed
Copy link

I recently switched several projects to zuul (some were using karma others using jsdom). I switched specifically because it is easy to run ES6 code in phantomjs using the babelify transform. Also works well with Travis CI. I hope you will keep phantomjs integration.

Also, sauce labs is ending free accounts.

@defunctzombie
Copy link
Owner

@Hypercubed hm. Good to know! Also, are all free accounts going away or just for non-open source? If they end all free accounts that would be a bummer.

@Hypercubed
Copy link

The FAQ says they are halting Free Accounts: https://support.saucelabs.com/customer/portal/articles/2204230-free-trial-faq
But it looks like there is something called Open Sauce.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants