You're viewing old version number 26. - Current version

1 min

Perl testing info links

Perl's "Test::More" and "WWW::Mechanize" to test a web site.



At command prompt in Junco code directory, one up from the testing 't' subdirectory, do the following to execute all the test .t scripts:
prove t

Read more about "prove" in the Test::Harness module.

http://search.cpan.org/~ovid/Test-Harness-3.29/bin/prove


  • https://metacpan.org/module/Log::Log4perl - powerful logging API for your application
    • Log::Log4perl lets you remote-control and fine-tune the logging behaviour of your system from the outside. It implements the widely popular (Java-based) Log4j logging package in pure Perl.

http://blogs.perl.org/users/ovid/2013/03/discoverable-tests-and-creating-testing-standards.html

http://modernperlbooks.com/mt/2012/08/why-i-use-perl-testing.html

http://www.distinctquality.com/blog/2007/01/30/automated-testing-with-perl/


Unit Testing CGI Programs

http://search.cpan.org/~rgarcia/perl-5.10.0/lib/Test/Tutorial.pod

http://search.cpan.org/~thaljef/Test-Perl-Critic-1.02/lib/Test/Perl/Critic.pm

http://search.cpan.org/~dwheeler/Test-Pod-1.48/lib/Test/Pod.pm

http://search.cpan.org/~pjcj/Devel-Cover-1.08/lib/Devel/Cover.pm

http://search.cpan.org/~mschwern/Test-Simple-0.98/lib/Test/Simple.pm

http://perldoc.perl.org/Test/More.html

http://en.wikipedia.org/wiki/Test::More

http://search.cpan.org/dist/Test-Simple/lib/Test/More.pm

http://search.cpan.org/~ovid/Test-Harness-3.29/lib/Test/Harness.pm

http://perlmeme.org/tutorials/writing_test_harness.html

http://www.thegeekstuff.com/2013/08/perl-test-more-examples/

http://jothut.com/cgi-bin/junco.pl/blogpost/301/17May2013/Test-Automation-using-Perl

Testing a (Perl) Web application without a lot of setup
http://szabgab.com/testing-a-perl-web-application-without-a-lot-of-setup.html

http://stackoverflow.com/questions/4017103/how-can-i-automate-website-testing-with-perl

However, there are non-http approaches to testing Perl side code of the web apps as well:

Have all non-presentation logic nicely modularized away, and test it as usual using Test::More or your other favorite test frameworks.

Test presentation (or presentation+logic) by using your web framework in command line mode, emulating running on web server. CGI.pm allows that, as well as EmbPerl. Not sure about Catalyst apps.

http://search.cpan.org/~ilyam/HTTP-WebTest-2.04/lib/HTTP/WebTest.pm

http://search.cpan.org/~ilyam/HTTP-WebTest-2.04/lib/HTTP/WebTest/Cookbook.pod

http://search.cpan.org/~ether/WWW-Mechanize-1.73/lib/WWW/Mechanize.pm

http://search.cpan.org/~petdance/WWW-Mechanize-1.66/lib/WWW/Mechanize/Examples.pod#___top

http://docs.seleniumhq.org/

http://search.cpan.org/~mattp/Test-WWW-Selenium-1.36/lib/WWW/Selenium.pm

http://stackoverflow.com/questions/1747772/integration-testing-for-a-web-app

http://search.cpan.org/~gaas/libwww-perl-6.05/lib/LWP/Simple.pm

http://testanything.org/wiki/index.php/Main_Page
http://en.wikipedia.org/wiki/Test_Anything_Protocol

https://metacpan.org/module/PETDANCE/Test-Harness-2.64/lib/Test/Harness/TAP.pod

http://perlunit.sourceforge.net

http://www.cpantesters.org

http://c2.com/cgi/wiki?PerlUnit

http://www.extremeperl.org/bk/unit-testing

http://search.cpan.org/~mcast/Test-Unit-0.25/lib/Test/Unit.pm

http://www.perlmonks.org/?node_id=469927

[X] http://perldoc.perl.org/Test/More.html

[X] http://stackoverflow.com/questions/502644/how-can-i-do-unit-testing-in-perl

I'd add my vote to picking up Test::More before going any further in Perl testing. The Perl testing community is fairly well united around the Test Anything Protocol, and you'll want to play around with Test::More to understand how it works and how tools like prove and Test::Harness::Archive can help automate and distribute testing.

If you want to just "jump right in", I think Test::Class provides xTest facilities with a TAP backend. I haven't used it at all (I'm a Test::More person myself), but it's very highly rated.

http://stackoverflow.com/questions/499967/how-do-i-determine-the-longest-similar-portion-of-several-strings/500518#500518

[X] http://stackoverflow.com/questions/533553/perl-build-unit-testing-code-coverage-a-complete-working-example

http://stackoverflow.com/questions/468675/how-can-i-test-a-standalone-perl-script

http://www.perl.com/pub/2001/12/04/testing.html

http://search.cpan.org/dist/Test-Class

http://search.cpan.org/dist/Test-Simple

http://search.cpan.org/dist/Test-Harness

http://xprogramming.com/articles/manual-testing-does-exist-and-it-is-bad/

http://www.developsense.com/blog/2013/02/manual-and-automated-testing/

#programming - #perl - #testing

From JR's : articles
319 words - 4900 chars - 1 min read
created on
updated on - #
source - versions

Related articles
Testing module to keep in mind - November 2002 - Jul 18, 2014
Perl Critic and Diag - Oct 09, 2013
Perl testing info links - Dec 03, 2013
Perl code for string processing - Jul 06, 2013
Perl and Curl - Mar 23, 2015
more >>



A     A     A     A     A

© 2013-2017 JotHut - Online notebook

current date: Oct 31, 2024 - 11:31 p.m. EDT