Use property user.home in java tests #26820
-
Hello, I’m trying to test an export function in my code, and I’m using for that the following Java property: Before running any test, I run the following commands: But when the test runs, I get the following error: java.io.FileNotFoundException: /home/runner\BooksExports\Toto.docx (Permission denied) This is the code where I get the error:
I can’t figure out why I’m not able to create this file. Maybe I just can’t do that because it’s not allowed… Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Manerial:
Looks like your test is trying to create a file named |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answer ! You’re right, I had to update my folder separators. |
Beta Was this translation helpful? Give feedback.
Looks like your test is trying to create a file named
runner\BooksExports\Toto.docx
in/home/
. Note that the backslashes aren’t directory separators on Linux! 😉