I'm writing a selenium test in kotest - I'm implem...
# kotest
r
I'm writing a selenium test in kotest - I'm implementing a
TestListener
so that if
TestResult.isErrorOrFailure
I can use
RemoteWebDriver.getScreenshotAs
to capture the output. However, I need to save the file somewhere... is there a way to work out an output directory for kotest? I guess it would be very dependent on how kotest was bring run (gradle, maven, stadalone, whatever), so probably not, but thought I'd ask if anyone had any bright ideas.
j
Kotest can create temporary directories, but I don't think that's what you want 🤔
When you set
writeSpecFailureFile
to true, it makes a directory named
.kotest
- so you could piggyback on that and set up your .gitignore appropriately
r
I was hoping to put them in the same place the build tool puts test result files, but I'd guess kotest has no way of knowing where that is.
j
Right, it might now if it was invoked by Gradle, but not by some generic runner 🤔
s
We should expose this. This is a good feature request.
👍 1