Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run same tests on different servers using prove?

I am using the Perl prove testing utility (TAP::Harness) to test my program.
I need to run the same tests first on a local computer, then on a remote computer.
(Test programs should connect to localhost or to remote host, respectively)

How can I pass parameters (test_server) to tests using prove? I should use environment or there is better solution?

like image 713
Oleg Razgulyaev Avatar asked Sep 02 '10 10:09

Oleg Razgulyaev


1 Answers

Environment variable sounds good, since you do not have easy access to higher abstraction means to pass data like command-line options or function parameters.

We already have prior art in the variables TEST_VERBOSE, AUTOMATED_TESTING, RELEASE_TESTING which influence how tests are run.

like image 90
daxim Avatar answered Sep 25 '22 19:09

daxim