recentpopularlog in

kme : unittesting   49

bats-core/bats-core: Bash Automated Testing System |
Bash Automated Testing System. Contribute to bats-core/bats-core development by creating an account on GitHub.
shellscripting  bash  testing  framework  unittesting  automation  devel  alternative  to  ts  bats 
january 2019 by kme
Test::Trap -
use Test::More;
use Test::Trap;

my @r = trap { some_code(@some_parameters) };
is ( $trap->exit, 1, 'Expecting &some_code to exit with 1' );
is ( $trap->stdout, '', 'Expecting no STDOUT' );
like ( $trap->stderr, qr/^Bad parameters; exiting\b/, 'Expecting warnings.' );
testing  unittesting  errorhandling  signals  perl  library  module  solution 
october 2014 by kme
Writing a test harness
Good reference for ExtUtils::MakeMaker, because it actually tells you what's in the "Makefile.PL":
If we write a file called ~/workspace/www/Makefile.PL that contains just these two lines:

use ExtUtils::MakeMaker;

then automated running of test file (and LOTS more besides) is available.
testing  unittesting  devel  webdevel  perl  solution 
october 2014 by kme
An Introduction to Testing -
This article ACTUALLY tells you how to invoke tests from the command line, e.g.:
perl -MTest::Harness -e "runtests 'truth.t'";
perl  unittesting  devel  webdevel  xp  newbie  reference  solution 
october 2014 by kme

Copy this bookmark:

to read