CHROME_BIN not set for single karma test run

I have a Typescript project with karma. I installed the karma plugin and I can run all tests. For that I have to set the environment variable CHROME_BIN=/usr/bin/chromium in the run configuration (although it is configured in my ~/.bashrc). But when I want to run a single test by clicking on the green arrows between the code and the line number in the editor, the variable is not set. I configured the variable also in the settings for the Terminal ("Tools > Terminal"). I restarted IntelliJ. But that all has no effect.

How can I configure an environment variable that is applied to my tests?

IntelliJ IDEA 2022.1.1 (Ultimate Edition)
Build #IU-221.5591.52
Runtime version: amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.17.0-3-amd64 (Debian)
Karma (221.5591.19)


Try editing Karma run configuration template: set the CHROME_BIN environment variable there, save the configuration. New configurations created from gutter/right-click menus will use these settings, you won't need to care of specifying them for each configuration


Thank you, Elena! That worked for me!


Please sign in to leave a comment.