Index: lang/perl/Garuda/trunk/t/plugins/Test-DBI/dbi.t
===================================================================
--- lang/perl/Garuda/trunk/t/plugins/Test-DBI/dbi.t (revision 33714)
+++ lang/perl/Garuda/trunk/t/plugins/Test-DBI/dbi.t (revision 33714)
@@ -0,0 +1,51 @@
+use strict;
+use t::TestGaruda;
+
+test_plugin_deps;
+test_requires 'DBD::Mock';
+plan 'no_plan';
+run_eval_expected_with_capture;
+
+__END__
+
+=== Test test without dsn
+--- input context
+plugins:
+  - module: Test::DBI
+    dsn:
+    user: root
+    target:
+        - dummyhost
+
+--- expected
+like $exception, qr/dsn required/;
+
+=== Test test with dsn
+--- input boot
+plugins:
+  - module: Test::DBI
+    retry: 0
+    dsn: DBI:Mock:
+    user: root
+    target:
+        - dummyhost
+
+--- expected
+ok $context->result_of->{DBI}->failures_count == 0;
+
+=== Test test connect failed
+--- input boot
+plugins:
+  - module: Test::DBI
+    retry: 0
+    dsn: DBI:mysql:host=%s
+    user: root
+    target:
+        - dummyhost
+
+--- expected
+ok $context->result_of->{DBI}->failures_count == 1;
+like $context->result_of->{DBI}->failures->[0]->desc,
+    qr/connect failed:.*Unknown MySQL server host 'dummyhost'/i;
+
+
Index: lang/perl/Garuda/trunk/lib/Garuda/Plugin/Test/DBI.pm
===================================================================
--- lang/perl/Garuda/trunk/lib/Garuda/Plugin/Test/DBI.pm (revision 33714)
+++ lang/perl/Garuda/trunk/lib/Garuda/Plugin/Test/DBI.pm (revision 33714)
@@ -0,0 +1,65 @@
+package Garuda::Plugin::Test::DBI;
+use strict;
+use warnings;
+use base qw/Garuda::Plugin::Test/;
+use Return::Value;
+
+use DBI;
+
+sub initialize : Hook {
+    my ( $self, $context ) = @_;
+
+    $self->config->{dsn}    or die 'config error: dsn required';
+    $self->config->{user}     ||= 'root';
+    $self->config->{password} ||= '';
+}
+
+sub connect : Test(1) {
+    my ( $self, $context, $host ) = @_;
+
+    my $conf = $self->config;
+
+    eval {
+        $self->current->{dbh} = DBI->connect(
+            sprintf( $conf->{dsn}, $host ),
+            $conf->{user}, $conf->{password},
+            { RaiseError => 1, AutoCommit => 1 }
+        );
+    };
+
+    return $@ ? failure "Connect failed: $@" : success;
+}
+
+sub ping : Test(2) {
+    my ( $self, $context, $host ) = @_;
+    return unless my $dbh = $self->current->{dbh};
+    return $dbh->ping? success : failure "Ping failed.";
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+Garuda::Plugin::Test::DBI - Test for DBI
+
+=head1 SYNOPSIS
+
+  - module: Test::DBI
+    dsn: dbi:mysql:;hostname=%s
+    user: root       # default root
+    password: abc123 # default ''
+    target:
+      - db1.mydom.net
+
+=head1 DESCRIPTION
+
+test server by DBI.pm.
+
+=head1 AUTHOR
+
+Ryo Kuroda
+Tokuhiro Matsuno <tokuhiro __AT__ mobilefactory.jp>
+
+
Index: lang/perl/Garuda/trunk/deps/Test-DBI.yaml
===================================================================
--- lang/perl/Garuda/trunk/deps/Test-DBI.yaml (revision 33714)
+++ lang/perl/Garuda/trunk/deps/Test-DBI.yaml (revision 33714)
@@ -0,0 +1,4 @@
+name: Test::DBI
+author: Ryo Kuroda
+depends:
+  DBI: 0
