Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perl: integration tests

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?

like image 597
bor Avatar asked Oct 18 '12 08:10

bor


1 Answers

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).

like image 88
adrianh Avatar answered Oct 11 '22 21:10

adrianh