<p>Can someone suggest some good automated test suite framework for Perl?</p>

[{'answer_id': 49694, 'author': 'Leon Timmermans', 'author_id': 4727, 'author_profile': 'https://Stackoverflow.com/users/4727', 'pm_score': 0, 'selected': False, 'text': '<p>I\'d go for Test::More, or in general, anything that outputs <a href="http://en.wikipedia.org/wiki/Test_Anything_Protocol" rel="nofollow noreferrer">TAP</a></p>\n'}, {'answer_id': 49703, 'author': 'Jagmal', 'author_id': 4406, 'author_profile': 'https://Stackoverflow.com/users/4406', 'pm_score': 0, 'selected': False, 'text': '<p>As of now, we use Test::More but current issue is that we have to run all the test files manually for testing. What I am looking for is a more of automated framework which can do incremental testing/build checks etc.</p>\n\n<p>A wrapper around Test::More for that would be ideal but anything better and more functional would be fine too.</p>\n\n<p>I am going through PerlUnit to see if that helps.</p>\n'}, {'answer_id': 49721, 'author': 'Leon Timmermans', 'author_id': 4727, 'author_profile': 'https://Stackoverflow.com/users/4727', 'pm_score': 2, 'selected': False, 'text': '<p>If I understand you correctly you are looking for <a href="http://search.cpan.org/~andya/Test-Harness/lib/TAP/Harness.pm" rel="nofollow noreferrer">TAP::Harness</a></p>\n'}, {'answer_id': 49762, 'author': 'ChrisN', 'author_id': 3853, 'author_profile': 'https://Stackoverflow.com/users/3853', 'pm_score': 2, 'selected': False, 'text': '<p>If you\'re using <a href="http://search.cpan.org/perldoc?ExtUtils::MakeMaker" rel="nofollow noreferrer">ExtUtils::MakeMaker</a> or <a href="http://search.cpan.org/perldoc?Module::Build" rel="nofollow noreferrer">Module::Build</a>, then you can run all your tests automatically by entering the command "make test" or "Build test", which will execute any *.t files in your project\'s t/ subfolder.</p>\n\n<p>If you\'re not using either of these, then you can use <a href="http://search.cpan.org/perldoc?TAP::Harness" rel="nofollow noreferrer">TAP::Harness</a> to automate execution of multiple test scripts.</p>\n\n<p>To actually write the tests, use <a href="http://search.cpan.org/perldoc?Test::More" rel="nofollow noreferrer">Test::More</a> or any of the modules that others have suggested here.</p>\n'}, {'answer_id': 50516, 'author': 'zigdon', 'author_id': 4913, 'author_profile': 'https://Stackoverflow.com/users/4913', 'pm_score': 0, 'selected': False, 'text': "<p>Are you aware of the 'prove' utility (from App::Prove)?  You can tell it to run all the tests recursively in a given directory, with or without verbosity, etc.</p>\n"}, {'answer_id': 50982, 'author': 'Matthew Watson', 'author_id': 3839, 'author_profile': 'https://Stackoverflow.com/users/3839', 'pm_score': 1, 'selected': False, 'text': '<p>Personally, I like Test::Most, its basically Test::More with some added cool features.</p>\n'}, {'answer_id': 53764, 'author': 'EvdB', 'author_id': 5349, 'author_profile': 'https://Stackoverflow.com/users/5349', 'pm_score': 3, 'selected': False, 'text': '<p>As long as you are using tests that produce TAP (Test Anything Protocol) output you might find this to be useful: <a href="http://sourceforge.net/projects/smolder" rel="nofollow noreferrer">http://sourceforge.net/projects/smolder</a></p>\n'}, {'answer_id': 67732, 'author': 'brian d foy', 'author_id': 2766176, 'author_profile': 'https://Stackoverflow.com/users/2766176', 'pm_score': 3, 'selected': False, 'text': '<p>Check out <a href="http://testers.cpan.org" rel="nofollow noreferrer">CPAN Testers</a>, which have a lot of tools for automated testing. Most of that should be on CPAN so you\'ll be able to modify it to meet your needs. It\'s also very easy to write your own tester using TAP::Harness.</p>\n\n<p>What exactly do you need to do and how are you trying to fit it into your process?</p>\n'}, {'answer_id': 70367, 'author': 'Ovid', 'author_id': 8003, 'author_profile': 'https://Stackoverflow.com/users/8003', 'pm_score': 6, 'selected': True, 'text': '<p>It really depends on what you\'re trying to do, but here\'s some background for much of this.</p>\n\n<p>First, you would generally write your test programs with Test::More or Test::Simple as the core testing program:</p>\n\n<pre><code>use Test::More tests =&gt; 2;\n\nis 3, 3, \'basic equality should work\';\nok !0, \'... and zero should be false\';\n</code></pre>\n\n<p>Internally, Test::Builder is called to output those test results as TAP (<a href="http://testanything.org/wiki/index.php/Main_Page" rel="noreferrer">Test Anything Protocol</a>).  Test::Harness (a thin wrapper around TAP::Harness), reads and interprets the TAP, telling you if your tests passed or failed.  The "prove" tool mentioned above is bundled with Test::Harness, so let\'s say that save the above in the t/ directory (the standard Perl testing directory) as "numbers.t", then you can run it with this command:</p>\n\n<pre><code>prove --verbose t/numbers.t\n</code></pre>\n\n<p>Or to run all tests in that directory (recursively, assuming you want to descend into subdirectories):</p>\n\n<pre><code>prove --verbose -r t/\n</code></pre>\n\n<p>(--verbose, of course, is optional).</p>\n\n<p>As a side note, don\'t use TestUnit.  Many people recommend it, but it was abandoned a long time ago and doesn\'t integrate with modern testing tools.</p>\n'}, {'answer_id': 70632, 'author': 'Eric Wilhelm', 'author_id': 11580, 'author_profile': 'https://Stackoverflow.com/users/11580', 'pm_score': 2, 'selected': False, 'text': '<blockquote>\n  <p>we have to run all the test files\n  manually for testing</p>\n</blockquote>\n\n<p>You certainly want to be using prove (runs your test) and/or Module::Build (builds your code and then runs your tests using the same test harness code which prove uses internally.)</p>\n'}, {'answer_id': 72448, 'author': 'Peter Stuifzand', 'author_id': 1633, 'author_profile': 'https://Stackoverflow.com/users/1633', 'pm_score': 0, 'selected': False, 'text': '<p>For automated testing in perl take a look at <a href="http://search.cpan.org/dist/Test-Harness/" rel="nofollow noreferrer">Test::Harness</a>, which contains the <code>prove</code> tool.</p>\n\n<p>The <code>prove</code> tool can be executed with the following command:</p>\n\n<pre><code>prove -r -Ilib t\n</code></pre>\n\n<p>This will recursivly test all *.t files in the \'t/\' directory, while adding <code>lib</code> to the include path.</p>\n'}, {'answer_id': 72545, 'author': 'Darren Meyer', 'author_id': 7826, 'author_profile': 'https://Stackoverflow.com/users/7826', 'pm_score': 1, 'selected': False, 'text': '<p>The test suite framework of choice is <a href="http://search.cpan.org/search?query=test%3A%3Aharness&amp;mode=module" rel="nofollow noreferrer">Test::Harness</a>, which takes care of controlling a test run, collecting the results, etc.</p>\n\n<p>Various modules exist to provide certain kinds of tests, the most common of which can be found in <a href="http://search.cpan.org/search?query=test%3A%3Asimple&amp;mode=module" rel="nofollow noreferrer">Test::Simple</a> and <a href="http://search.cpan.org/search?query=test%3A%3Amore&amp;mode=module" rel="nofollow noreferrer">Test::More</a> (both are included in the Test-Simple distribution).  The entire Test namespace on the CPAN is dedicated to specialized unit-testing modules, the majority of which are designed to be run under Test::Harness.</p>\n\n<p>By convention, tests are stored in the t/ directory of a project, and each test file uses the file extension .t ; tests are commonly run via</p>\n\n<pre><code> prove t/*.t\n</code></pre>\n\n<p>Module distributions typically include a make target named \'test\' that runs the test suite before installation.  By default, the CPAN installation process requires that tests pass after the build before a module will be installed.</p>\n'}, {'answer_id': 72824, 'author': 'Jonathan Swartz', 'author_id': 9942, 'author_profile': 'https://Stackoverflow.com/users/9942', 'pm_score': 3, 'selected': False, 'text': '<p>Have you seen <a href="http://sourceforge.net/projects/smolder" rel="nofollow noreferrer">smolder</a>?</p>\n\n<p>"Smoke Test Aggregator used by developers and testers to upload (automated or manually) and view smoke/regression tests using the Test Anything Protocol. Details and trends are graphed and notifications provided via email or Atom feeds."</p>\n'}, {'answer_id': 74897, 'author': 'adrianh', 'author_id': 13165, 'author_profile': 'https://Stackoverflow.com/users/13165', 'pm_score': 2, 'selected': False, 'text': '<p>You said:</p>\n\n<blockquote>\n  <p>"What I am looking for is a more of automated framework which can do incremental testing/build checks etc"</p>\n</blockquote>\n\n<p>Still not entirely sure what you\'re after. As others have mentioned you want to look at things that are based on Test::Harness/TAP. The vast majority of the Perl testing community uses that framework - so you\'ll get much more support (and useful existing code) by using that.</p>\n\n<p>Can you talk a little more about what you mean by "incremental testing/build checks"?</p>\n\n<p>I\'m guessing that you want to divide up your tests into groups so that you\'re only running certain sets of tests in certain circumstances?</p>\n\n<p>There are a couple of ways to do this. The simplest would be to just use the file system - split up your test directories so you have things like:</p>\n\n<pre>\n\ncore/\n database.t\n infrastructure.t\nstyle/\n  percritic.t\nui/\n  something.t\n  something-else.t\n</pre>\n\n<p>And so on... you can then use the command line "prove" tool to run them all, or only certain directories, etc. </p>\n\n<p>prove has a lot of useful options that let you choose which tests are run and in which order (e.g. things like most-recently-failed order). This - all by itself - will probably get you towards what you need.</p>\n\n<p>(BTW it\'s important to get a recent version of Test::Simple/prove/etc. from CPAN. Recent versions have much, much more functionality). </p>\n\n<p>If you\'re of an OO mindset, or have previous experience of xUnit frameworks, than you might want to take a look at Test::Class which is a Perl xUnit framework that\'s build on top of the TAP/Test::Harness layer. I think it\'s quite a lot better than PerlUnit - but I would say that since I wrote it :-)</p>\n\n<p>Check out delicious for some more info on Test::Class <a href="http://delicious.com/tag/Test::Class" rel="nofollow noreferrer">http://delicious.com/tag/Test::Class</a></p>\n\n<p>If this isn\'t what you\'re after - could you go into a bit more detail on what functionality you want?</p>\n\n<p>Cheers,</p>\n\n<p>Adrian</p>\n'}]
['https://Stackoverflow.com/questions/49652', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4406/']