I'm asking for best practice.
Usually I put all unit tests into t/, but what about integration tests?
Where are the best place for integration tests? And how them will be named?
There isn't a globally accepted naming/location convention for integration tests that I am aware of in Perl.
From my observations most people put everything under t/.
Some folk split tests up into sub-directories under t/ (so you might have integration tests in a separate t/integration/ directory).
Some folk use a file-prefix (so you might have integration tests named 'I-whatever.t').
Some folk don't care - and just throw everything into the same directory.
I've occasionally seen folk separate out a group of tests into a separate directory at the same level as 't/' - but that's been usually for tests that are not normally run (e.g. author specific tests for CPAN dists) rather than for integration vs unit).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With