Hi everyone !
So I was trying to push a little project to github pages, everything works fine locally but when I try to deploy it, it fails on the
testing
part saying this :
Copy code
> Failed to execute all tests:
:browserTest: java.lang.IllegalStateException: Errors occurred during launch of browser for testing.
- Opera
- Firefox
- Chromium
Please make sure that you have installed browsers.
Or change it via
browser {
testTask {
useKarma {
useFirefox()
useChrome()
useSafari()
}
}
}
I know that the issue is related to the fact that it can't find firefox / chromium / opera... But how can I make it so tests are run correctly when deploying without having to remove the whole UI related part in my tests ?
r
Robert Jaros
09/27/2021, 5:33 PM
Copy code
useKarma {
useChromeHeadless()
}
d
Dra
09/27/2021, 5:39 PM
Yeah, I could do this but I can't test only
ChromeHeadless
.... Can I ? Aren't Firefox / Safari too different ?
b
Big Chungus
09/27/2021, 5:44 PM
Well chrome has over 80% market share these days, so not sure it's that essential to support other browsers to the limit
d
Dra
09/27/2021, 5:54 PM
K, I'll do that then... will need to find the arch package to make it work locally ig
e
ephemient
09/27/2021, 10:57 PM
you could use a different configuration in different environments?
Copy code
if (providers.environmentVariable("CI").forUseAtConfigurationTime().isPresent()) useChromeHeadless() else { useFirefox(); useChrome(); useSafari() }