Professional Web Applications Themes

Understanding the Devel::Cover module generated reports - PERL Modules

Can anybody please help me in understanding Devel::Cover module in Perl? Your help is greatly appreciated. I am trying to use the module Devel::Cover and I can't understand the coverage report. This is my environment Solaris 2.8, Perl 5.8.5 and Devel::Cover v0.47 I am executing a test program which tests the following modules AAAAA.pm BBBBB.pm CCCCC.pm DDDDD.pm EEEEE.pm FFFFFF.pm I am having a test program called validate which executes the test programs v_code_AAAAA.t, v_code_BBBBB.t, v_code_CCCCC.t, v_code_DDDDD.t and v_code_EEEEE.t and v_code_FFFFF.t. Each of these programs includes the required, respective modules. In the validate program I have a similar code ***************************************** #! ...

  1. #1

    Default Understanding the Devel::Cover module generated reports

    Can anybody please help me in understanding Devel::Cover module in
    Perl? Your help is greatly appreciated. I am trying to use the module
    Devel::Cover and I can't understand the coverage report.

    This is my environment

    Solaris 2.8, Perl 5.8.5 and Devel::Cover v0.47

    I am executing a test program which tests the following modules
    AAAAA.pm
    BBBBB.pm
    CCCCC.pm
    DDDDD.pm
    EEEEE.pm
    FFFFFF.pm

    I am having a test program called validate which executes the test
    programs v_code_AAAAA.t, v_code_BBBBB.t, v_code_CCCCC.t,
    v_code_DDDDD.t and v_code_EEEEE.t and v_code_FFFFF.t. Each of these
    programs includes the required, respective modules.

    In the validate program I have a similar code

    *****************************************
    #! /opt/ABCDEF/perl/bin/perl -w -I/opt/ABCDEF/bin/lib

    use strict;
    use Test::Harness qw(&runtests $verbose);

    my tests;
    tests = sort glob "v_code_*.t";

    $Test::Harness::verbose = 1;
    Test::Harness::runtests (tests);
    exit 0;
    ***************************************
    But when I run the coverage report this code using the following
    commands
    Perl -Mdevel::Cover validate
    Cover -report html

    1. I don't see the CCCCC module and the FFFFF module in the coverage
    report.
    2. Also for the module that shows up (AAAAA, BBBBB, DDDDD and EEEEE)
    in the coverage report when I look into the subroutine coverage I
    don't see all the subroutine that are being tested show up in the
    coverage report.

    But when I run the individual test programs separately I am able to
    see that the subroutine where covered as covered in the test program.


    Thanks
    -Siva
    Siva Guest

  2. #2

    Default Understanding the Devel::Cover module generated reports

    Can anybody please help me in understanding Devel::Cover module in
    Perl? Your help is greatly appreciated. I am trying to use the module
    Devel::Cover and I can't understand the coverage report.

    This is my environment

    Solaris 2.8, Perl 5.8.5 and Devel::Cover v0.47

    I am executing a test program which tests the following modules
    AAAAA.pm
    BBBBB.pm
    CCCCC.pm
    DDDDD.pm
    EEEEE.pm
    FFFFFF.pm

    I am having a test program called validate which executes the test
    programs v_code_AAAAA.t, v_code_BBBBB.t, v_code_CCCCC.t,
    v_code_DDDDD.t and v_code_EEEEE.t and v_code_FFFFF.t. Each of these
    programs includes the required, respective modules.

    In the validate program I have a similar code

    *****************************************
    #! /opt/ABCDEF/perl/bin/perl -w -I/opt/ABCDEF/bin/lib

    use strict;
    use Test::Harness qw(&runtests $verbose);

    my tests;
    tests = sort glob "v_code_*.t";

    $Test::Harness::verbose = 1;
    Test::Harness::runtests (tests);
    exit 0;
    ***************************************
    But when I run the coverage report this code using the following
    commands
    Perl -Mdevel::Cover validate
    Cover -report html

    1. I don't see the CCCCC module and the FFFFF module in the coverage
    report.
    2. Also for the module that shows up (AAAAA, BBBBB, DDDDD and EEEEE)
    in the coverage report when I look into the subroutine coverage I
    don't see all the subroutine that are being tested show up in the
    coverage report.

    But when I run the individual test programs separately I am able to
    see that the subroutine where covered as covered in the test program.


    Thanks
    -Siva
    Siva Guest

  3. #3

    Default Understanding the Devel::Cover module generated reports

    Can anybody please help me in understanding Devel::Cover module in
    Perl? Your help is greatly appreciated. I am trying to use the module
    Devel::Cover and I can't understand the coverage report.

    This is my environment

    Solaris 2.8, Perl 5.8.5 and Devel::Cover v0.47

    I am executing a test program which tests the following modules
    AAAAA.pm
    BBBBB.pm
    CCCCC.pm
    DDDDD.pm
    EEEEE.pm
    FFFFFF.pm

    I am having a test program called validate which executes the test
    programs v_code_AAAAA.t, v_code_BBBBB.t, v_code_CCCCC.t,
    v_code_DDDDD.t and v_code_EEEEE.t and v_code_FFFFF.t. Each of these
    programs includes the required, respective modules.

    In the validate program I have a similar code

    *****************************************
    #! /opt/ABCDEF/perl/bin/perl -w -I/opt/ABCDEF/bin/lib

    use strict;
    use Test::Harness qw(&runtests $verbose);

    my tests;
    tests = sort glob "v_code_*.t";

    $Test::Harness::verbose = 1;
    Test::Harness::runtests (tests);
    exit 0;
    ***************************************
    But when I run the coverage report this code using the following
    commands
    Perl -Mdevel::Cover validate
    Cover -report html

    1. I don't see the CCCCC module and the FFFFF module in the coverage
    report.
    2. Also for the module that shows up (AAAAA, BBBBB, DDDDD and EEEEE)
    in the coverage report when I look into the subroutine coverage I
    don't see all the subroutine that are being tested show up in the
    coverage report.

    But when I run the individual test programs separately I am able to
    see that the subroutine where covered as covered in the test program.


    Thanks
    -Siva
    Siva Guest

  4. #4

    Default Understanding the Devel::Cover module generated reports

    Can anybody please help me in understanding Devel::Cover module in
    Perl? Your help is greatly appreciated. I am trying to use the module
    Devel::Cover and I can't understand the coverage report.

    This is my environment

    Solaris 2.8, Perl 5.8.5 and Devel::Cover v0.47

    I am executing a test program which tests the following modules
    AAAAA.pm
    BBBBB.pm
    CCCCC.pm
    DDDDD.pm
    EEEEE.pm
    FFFFFF.pm

    I am having a test program called validate which executes the test
    programs v_code_AAAAA.t, v_code_BBBBB.t, v_code_CCCCC.t,
    v_code_DDDDD.t and v_code_EEEEE.t and v_code_FFFFF.t. Each of these
    programs includes the required, respective modules.

    In the validate program I have a similar code

    *****************************************
    #! /opt/ABCDEF/perl/bin/perl -w -I/opt/ABCDEF/bin/lib

    use strict;
    use Test::Harness qw(&runtests $verbose);

    my tests;
    tests = sort glob "v_code_*.t";

    $Test::Harness::verbose = 1;
    Test::Harness::runtests (tests);
    exit 0;
    ***************************************
    But when I run the coverage report this code using the following
    commands
    Perl -Mdevel::Cover validate
    Cover -report html

    1. I don't see the CCCCC module and the FFFFF module in the coverage
    report.
    2. Also for the module that shows up (AAAAA, BBBBB, DDDDD and EEEEE)
    in the coverage report when I look into the subroutine coverage I
    don't see all the subroutine that are being tested show up in the
    coverage report.

    But when I run the individual test programs separately I am able to
    see that the subroutine where covered as covered in the test program.


    Thanks
    -Siva
    Siva Guest

  5. #5

    Default Re: Understanding the Devel::Cover module generated reports

    [email]csivak24yahoo.co.uk[/email] (Siva) wrote in message news:<c2e93573.0408170737.4bd5bce8posting.google. com>...
    > Can anybody please help me in understanding Devel::Cover module in
    > Perl? Your help is greatly appreciated. I am trying to use the module
    > Devel::Cover and I can't understand the coverage report.
    >
    Easy on that "Post message" button, Siva. You posted the same message
    4 times.

    I'm not going to answer your question directly, but, as a fellow new
    user of Devel::Cover, I will share my own experience. I've been using
    it to improve the test coverage of my CPAN module List::Compare. This
    distribution is set up in a very CPAN-standard format, i.e., all the
    tests are named *.t, are held in the /t subdirectory and are listed in
    the MANIFEST. Once I've saved my edits, I change to the directory
    where Makefile.PL is located and proceed as follows (as per
    Devel::Cover doentation):

    perl Makefile.PL
    make
    cover - delete # this deletes any previous Devel::Cover
    # database in the same directory tree
    HARNESS_PERL_SWITCHES=-MDevel::Cover make test
    cover

    The last command generates the HTML version of the coverage reports.
    I also like to get this in a plain-text file, for which I call

    cover cover_db -report=text > [arbitrarily_named_file.txt]

    If you've got your module and tests set up in the standard format,
    then this should work for you. HTH.

    jimk
    Jim Keenan Guest

Similar Threads

  1. [RFC] Devel::Dependencies
    By Jean-Louis Leroy in forum PERL Modules
    Replies: 4
    Last Post: January 17th, 04:48 PM
  2. Replies: 1
    Last Post: October 23rd, 02:03 PM
  3. Question about Devel::Cover
    By Himal in forum PERL Miscellaneous
    Replies: 3
    Last Post: July 11th, 12:18 PM
  4. Devel::Coverage
    By Himal in forum PERL Miscellaneous
    Replies: 3
    Last Post: July 2nd, 08:58 PM
  5. depmod reports unresolved symbols but module loads (and works) anyway
    By Mephisto in forum Linux Setup, Configuration & Administration
    Replies: 0
    Last Post: June 27th, 09:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139