Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

karma tests on chromium

Tags:

Is it possible to run karma tests with chromium browser, in order to run these karma tests on linux box which has an open source version of chrome in it?

like image 974
Kamal Reddy Avatar asked Jun 01 '13 13:06

Kamal Reddy


People also ask

How do I run a karma test in Chrome?

To launch Chrome from karma, we need to use karma-chrome-launcher. Run the command npm install karma-chrome-launcher --save to install to the application. Add the karma-chrome-launcher plugin to the plugins list in your karma.

How do I run a karma test on my browser?

You need to run it with singleRun = false in karma. conf. js and then click the button on the top corner that says "DEBUG". Then you should see the output and it won't disappear or close.

How do I run a karma test without a browser?

Correct - Karma requires a browser to run. BUT - you can run Chrome in Headless mode, which means although you do need the browser installed, it will not open it's UI, and you can therefore run the tests purely through an SSH session for example.

What is karma in testing?

Karma is a node-based test tool that allows you to test your JavaScript codes across multiple real browsers. A node-based tool is any tool that needs the Nodejs engine installed for it to run and can be accessed (installed) through the node package manager (npm).


1 Answers

You could also set the CHROME_BIN environment variable to chromium

export CHROME_BIN=/usr/bin/chromium-browser 
like image 104
user1067920 Avatar answered Sep 22 '22 00:09

user1067920