I heard that access to the database is incorrect during testing.
But what about file manipulation? Things like cp, mv, rmand touchmethods in FileUtils.
If I write a test and actually run commands (moving files, renaming files, creating directories, etc.), I can test them. But I need to โcancelโ every command that I executed before running the test again. Therefore, I decided to write all the code for the "cancellation", but it seems like a waste of time, because I really do not need to "cancel".
I really want to see how others do it. How would you test, for example, when creating a large number of static files?
source
share