bin/selenium-regen

filter: Statementstmt 90.0% 18 / 20 Branchbran 50.0% 1 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 80.0% 4 / 5 Podpod n/a totaltotal 76.6% 23 / 30 CC 2 SCAR 9.8
CC
2
Cov
79%
usage
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
« blib/lib/WWW/Selenium/Utils/PostResults.pm ↑ Summary lib/WWW/Selenium/Utils/CGI.pm »
1 #!/usr/bin/perl
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶use WWW::Selenium::Utils qw(generate_suite);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use Getopt::Long;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 my $quiet = 0;
9 2 my $base;
10 my $perdir;
11 2 my $index;
12 2 ▶GetOptions(
Branch: 1 branch
BranchTrueFalseTotal
&GetOptions("quiet", \$quiet, "base=s", \$base, "d|perdir", \$perdir, "index=s", \$index) or usage() 2 0 2
13 'quiet' => \$quiet,
14 'base=s' => \$base,
15 'd|perdir' => \$perdir,
16 'index=s' => \$index,
17 ) or usage();
18  
19 2 my $testdir = shift;
20  
21 2 generate_suite( test_dir => $testdir,
22 verbose => !$quiet,
23 base_href => $base,
24 perdir => $perdir,
25 index => $index,
26 );
27  
28  
29 0 ▶sub usage {
Subroutine usage: not called CC=2 SCAR=17.9
30 0 ▶ my $msg = shift || '';
Condition0%0/2
shift() || ''
l!l
00
MC/DC0%0/1
shift() || ''
shift()
Truth table0%0/2
A
A= shift()
Aresult
11
00
31 0 die <<EOT;
32 $msg
33 USAGE: $0 [options] [/path/to/selenium/tests]
34  
35 Options:
36 --quiet Won't print informative output
37 --base=<base> Sets the base href for generated html files
38 -d or --perdir Creates a seperate TestSuite.html for each
39 sub-directory.
40 --index=<file> Create a html index of all the TestSuite.html files
41  
42 This script will convert any .wiki files in the tests/ directory
43 to regular .html format selenium test files. It will then put
44 all tests/*.html files into tests/TestSuite.html
45  
46 The TestSuite.html file contains links to all of the test files.
47 The files are sorted by filename in the TestSuite. However, the
48 TestSuite will show the title of the test file instead of the
49 filename. This allows you to manipulate the ordering of your
50 testcases without changing the user-visible names.
51  
52 The path to the selenium tests can be read from a config file.
53 The default config file location is PREFIX/etc/selutils.conf,
54 where PREFIX is perl's install prefix. The prefix can also be
55 specified in the \$SELUTILS_ROOT environment variable.
56  
57 EOT
58 }
« blib/lib/WWW/Selenium/Utils/PostResults.pm ↑ Summary lib/WWW/Selenium/Utils/CGI.pm »