I have many unit tests that need a lot of txt, data, html files, etc. Externally saving these files makes it easy to update test cases by adding new test cases, etc.
However, the presence of dependencies in Unit Tests brings a lot of headache in different systems and in different test groups.
What are the best practices?
- External storage and relative linking of these files into code? (causing problems in some test runners, or requires additional configuration)
- Attach all of these files to Unit Test dll and read from there (simplifies test creation).
- Saving location in hard code (obviously causing so much trouble checking code elsewhere)
How do you solve this problem?
source
share