Errors while saving tests to src/em
thudnlancer opened this issue · 2 comments
I met an error when I tried the example of black-box testing following the guide of blackbox.md, the backtrace is as follow:
java.nio.file.AccessDeniedException: C:\Program Files\evomaster\app\src
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.createDirectory(Unknown Source)
at java.nio.file.Files.createDirectory(Unknown Source)
at java.nio.file.Files.createAndCheckIsDirectory(Unknown Source)
at java.nio.file.Files.createDirectories(Unknown Source)
at org.evomaster.core.output.service.TestSuiteWriter.saveToDisk(TestSuiteWriter.kt:199)
at org.evomaster.core.output.service.TestSuiteWriter.writeTests(TestSuiteWriter.kt:81)
at org.evomaster.core.Main$Companion.writeTests(Main.kt:661)
at org.evomaster.core.Main$Companion.writeTests$default(Main.kt:632)
at org.evomaster.core.Main$Companion.initAndRun(Main.kt:185)
at org.evomaster.core.Main$Companion.main(Main.kt:84)
at org.evomaster.core.Main.main(Main.kt)
Other important info:
- version of EvoMaster (EM) used : 2.0.0
- how EM is run (eg, if from JAR or from one of its OS installers) : installed from window's installer but is run in command line with the .jar file in app folder
- version of applicable runtimes (eg, JVM, NodeJS and .Net). For Java, can paste the output of
java --version
: java version "1.8.0_321" - command-line options used to run EM : same as black-box testing example in blackbox.md, --blackBox true --bbSwaggerUrl https://api.apis.guru/v2/specs/collegefootballdata.com/4.4.12/openapi.yaml --outputFormat JAVA_JUNIT_4 --maxTime 30s --ratePerMinute 60
It raised error after * Going to save 26 tests to src/em, and with WARN
16:53:15.911 [main] WARN o.e.c.o.service.HttpWsTestCaseWriter - Currently no assertions are generated for response type: text/html;charset=utf-8
sry, I've solved this problem by running it in admin power shell
Hi,
thanks for reporting this.
Such case (ie default output folder is not writable) should be detected immediately (and not at the end of the search), with a meaningful error message