• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 323
  • Last Modified:

How to print only failed tests in Tests::More in Perl?

Hi,
In writing test in Perl by using Tests::More, how can I just print the failed tests on the screen.

Currently, it prints all tests as ok or not ok.

Thanks,
0
Tolgar
Asked:
Tolgar
1 Solution
 
wilcoxonCommented:
You need to use Test::Harness.  The simplest way is to use either ExtUtils::MakeMaker or Module::Build to create a Makefile (or Build file) which will use it automatically on the test target.

Alternately, you can use it directly.  Create a script something like this...
use strict;
use warnings;
use Test::Harness;
runtests(qw(testfile1 testfile2 testfile3 ...));

Open in new window


And use that script to run your tests.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now