I'm having trouble wrapping my head around Karma. I'd like to:
The goal: being able to automate tests which ensures that our site works on all platforms and browsers, not only the ones available to me locally.
Is this possible? I'm struggling to find any good guides for setting this stuff up.
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.
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 can start a webdriver server on your remote servers and configure karma to use the karma-webdriver-launcher to run the tests on the browsers from your webdriver servers.
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