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?
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.
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.
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.
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).
You could also set the CHROME_BIN environment variable to chromium
export CHROME_BIN=/usr/bin/chromium-browser
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With