Test2-Harness-UI
view release on metacpan or search on metacpan
missing features, and things that will change.
DESCRIPTION
This package provides a web UI for yath logs.
SYNOPSIS
The easiest thing to do is use the yath ui path/to/logfile command,
which will create a temporary postgresql db, load your log into it,
then launch the app in starman on a local port that you can visit in
your browser.
SOURCE
The source code repository for Test2-Harness-UI can be found at
https://github.com/Test-More/Test2-Harness-UI/.
MAINTAINERS
Chad Granum <exodist@cpan.org>
features, and things that will change.
# DESCRIPTION
This package provides a web UI for yath logs.
# SYNOPSIS
The easiest thing to do is use the `yath ui path/to/logfile` command, which
will create a temporary postgresql db, load your log into it, then launch the
app in starman on a local port that you can visit in your browser.
# SOURCE
The source code repository for Test2-Harness-UI can be found at
`https://github.com/Test-More/Test2-Harness-UI/`.
# MAINTAINERS
- Chad Granum <exodist@cpan.org>
lib/App/Yath/Tester/UI.pm view on Meta::CPAN
use Test2::Harness::UI::Util qw/dbd_driver qdb_driver share_dir share_file/;
use Test2::Harness::UI::UUID qw/gen_uuid/;
use Scope::Guard qw/guard/;
use File::Temp qw/tempfile/;
use Importer Importer => 'import';
our @EXPORT = qw/start_yathui_server/;
use Test2::Harness::UI::Util::HashBase qw{
+schema <db <dsn <config <socket <port +_starman_pid
};
our $DRIVER = skipall_unless_can_db(['PostgreSQL', 'MySQL']);
$DRIVER =~ s{^.*::}{}g;
note("Using driver '$DRIVER'");
sub start_yathui_server {
return __PACKAGE__->new(@_);
}
lib/App/Yath/Tester/UI.pm view on Meta::CPAN
single_user => 1,
show_user => 1,
email => 'exodist7@gmail.com',
);
$self->{+CONFIG} = $config;
my $pid = fork // die "Could not fork: $!";
unless ($pid) {
my $guard = guard {
warn "Scope Leak in starman";
posix::_exit(255);
};
local $ENV{HARNESS_UI_DSN} = $dsn;
local $ENV{YATH_UI_SCHEMA} = $schema;
require(pkg_to_file("Test2::Harness::UI::Schema::$schema"));
my $user = $config->schema->resultset('User')->create({username => 'root', password => 'root', realname => 'root', user_id => gen_uuid()});
my $project = $config->schema->resultset('Project')->create({name => 'test', project_id => gen_uuid()});
exec('starman', '-Ilib', '--listen' => ($self->{+PORT} ? ":$self->{+PORT}" : $self->{+SOCKET}), '--workers', 5, share_file('psgi/test.psgi')),
}
$self->{+_STARMAN_PID} = $pid;
return $self if $self->{+PORT};
my $interval = 0.2;
my $counter = 0;
until (-S $self->{+SOCKET}) {
sleep $interval;
$counter += $interval;
# Only wait 20 seconds;
croak "Timed out waiting for starman" if $counter >= 20;
}
return $self;
}
sub subtest {
my $self = shift;
my ($name, $sub) = @_;
my $ctx = context();
lib/Test2/Harness/UI.pm view on Meta::CPAN
features, and things that will change.
=head1 DESCRIPTION
This package provides a web UI for yath logs.
=head1 SYNOPSIS
The easiest thing to do is use the C<yath ui path/to/logfile> command, which
will create a temporary postgresql db, load your log into it, then launch the
app in starman on a local port that you can visit in your browser.
=head1 SOURCE
The source code repository for Test2-Harness-UI can be found at
F<https://github.com/Test-More/Test2-Harness-UI/>.
=head1 MAINTAINERS
=over 4
( run in 1.156 second using v1.01-cache-2.11-cpan-e93a5daba3e )