Reputation: 2376
I am confused about running Karma and Protractor on a TeamCity CI server. Should I run these tests with a headless browser or not and how can I do that?
Upvotes: 2
Views: 1079
Reputation: 3680
You can use a headless browser for unit testing. If you need a headless browser with karma/jasmine,you can use PhantomJS karma launcher . You can simply specify this when you run karma init
, and it will ask you for a browser launcher in one of the steps of that configuration . or add the following to your package.json file
{
"devDependencies": {
"karma": "~0.10",
"karma-phantomjs-launcher": "~0.1"
}
}
But with protractor i recommend you to not to use a headless browser . Because you might want to see the actual happening of the testing when the protractor tests run (like what's happening with the actions and interactions in the interface of your application and such) . It is up to you. there are few headless browsers available for protractor tests along with PhantomJS for protractor
Upvotes: 2