1

I generated a test suite with evosuite for a project. Some of the tests relate to reading/writing files and use absolute paths to access them, which results in tests only succeeding if the project is located at the exact same location in the local filesystem.

Is there a way to turn this off? That means, can I set a flag or something to generate tests which use relative positions for their test files?

Thanks!

1 Answers1

0

EvoSuite uses a virtual file system when dealing with files. As such, there is no option turn off absolute paths, as the machine where you run the tests should have no impact on those tests. However, not all Java API related to files are currently mocked in EvoSuite. If you are experiencing problems, it might just be a bug in EvoSuite. In such case, you could provide more info here on the generated tests you got or make a bug report at https://github.com/EvoSuite/evosuite/issues

arcuri82
  • 885
  • 1
  • 8
  • 17