Hello,

I am working my way through the angular tutorial
<https://docs.angularjs.org/tutorial/> working with the angular-phonecat
<https://github.com/angular/angular-phonecat> example app and having some
trouble with doing the automated testing parts of it on the Ubuntu 12.04
VPS server where I do most of my development. Coming from a python
background and having only passing familiarity with node.js, the initial
bit of the tutorial has involved a fair amount of yak-shaving with tools I
have not before used heavily.

On a headless server, running unit tests with `npm test` initially raised
an error due to its inability to use Chrome. I was able to fix this by
editing test/karma.conf.js and replacing `browsers : ['Chrome'],` with
`browsers
: ['PhantomJS'],` on line 18 and adding 'karma-phantomjs-launcher', to the
plugins array on line 21.

However, I've not yet been able to get `npm run protractor`to work on a
headless server. I've worked my way through this blog post
<https://www.exratione.com/2013/12/angularjs-headless-end-to-end-testing-with-protractor-and-selenium/>to
no avail. I see from this stackoverflow post
<http://stackoverflow.com/questions/1418082/is-it-possible-to-hide-the-browser-in-selenium-rc>
that juliemr linked to in a closed ticket from 7 months ago
<https://github.com/angular/protractor/issues/393> that there are clearly
options for how to do this*.* However I before I dig into protractor,
selenium, etc, I wanted to see if this list has any advice on three
questions:
1) Is there actually a "one, and preferably only one" way to run end-to-end
tests on a headless Ubuntu 12.04 server?
2)  To what degree should I pause learning angular.js in order to first get
a solid understanding of karma.js, protractor.js, npm, node.js, and these
other javascript libraries?
3) Given that I have figured out how to run unit tests on a headless
server, is this a common enough setup that it is worth modifying the
tutorial to say how to do that?

cheers,
Andrew

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to