SlideShare ist ein Scribd-Unternehmen logo
1 von 118
Downloaden Sie, um offline zu lesen
https://metacpan.org/source/JJNAPIORK/Catalyst-Runtime-5.90016/t
https://metacpan.org/source/JJNAPIORK/Catalyst-Runtime-5.90016/t/
                dead_recursive_chained_attributes.t
Test
Anything
Protocol
cpantesters.org
26,171
Number of CPAN Distributions on CPAN
            2012. 10. 19
23,816,487
Number of CPAN Testers Reports
         2012. 10. 19
Test::MockObject
  Test::Class   Test::Git
               Test::Deep
Test::FITesque
                 Test::TCP
 Test::mysqld
   Test::....   Test::YAML
Test::Most


Test::More


Test::Simple
Test::Simple


ok( <expression>, <description> );
Test::Simple
#!/usr/bin/env perl
use strict;
use warnings;
use Test::Simple tests => 3;

sub is_number_two {
returnshift == 2;
}

my$var = 'JEEN is married to Hanny-Mama';
ok(1+1 == 2, '1+1 = 2');
ok($var =~ /married/, 'JEEN is married');
ok(is_number_two(2), 'is_number(2) returns true?');
Test::More
ok( <expression>, <description> );
is( <got>, <expected>, <description>);
isnt( <got>, <expected>, <description>);
like( <got>, <expected>, <description>);
unlike( <got>, <expected>, <description>);
isa_ok( <got>, <expected> );
is_deeply( <HASH>, <HASH>, <description> );

SKIP: {}
TODO: {}
Test::More
#!/usr/bin/env perl
 use strict;
 use warnings;
 use Test::Base tests => 4;

 my$var = 'JEEN is married';
 my%hash1 = (
is_solo => 1,
gender => 'male'
);

my%hash2 = (
is_solo => 1,
gender => 'male',
);
ok(1+1 == 2, '1+1 = 2');
is(1+1, 2, '1+1 = 2');
like($var, qr/married/, 'JEEN is married');
is_deeply(%hash1, %hash2, 'equal hashes');
TAP::Formatter::HTML
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use Test::More tests => 2;

BEGIN{
binmodeSTDOUT, ':utf8';
};

subtest '001) 의존모듈 확인' => sub {
    use_ok 'LWP::UserAgent';
    use_ok 'URI';
    use_ok 'URI::QueryParam';
};

my$host = $ENV{TARGET_HOST} || 'http://test-domain-blah-blah';

my$ua = LWP::UserAgent->new();
$ua->timeout(10);

subtest '002) XSS' => sub {
while(<DATA>) {
s/[rn]//g;
my$uri = URI->new($host . $_);
my@query_param = $uri->query_param;
my$param_count = scalar@query_param;
formy$idx (1 .. $param_count) {
$uri->query_form({
$uri->query_form,
$query_param[$idx-1] => "<script>alert('xss');</script>"
             });
my$res_xss = $ua->get($uri);
             unlike($res_xss->decoded_content, qr{<script>alert('xss ');</script>});
        }
    }
};

done_testing();

__DATA__
......
......
......
t/
  001-xss.t
  002-sql-injection.t
  003-directory-indexing.t
  004-filedownload.t
  005-path-location.t
  006-os-command.t
  ...
  ...
  ...
$ prove -v t
t/001-xss.t ..
1..2
ok 1 - 001) 모듈 의존성 확인
   ok 1 LWP::UserAgent
   ok 2 URI
   ok 3 URI::QueryParam
ok 2 - 002) XSS
   ok ....
   ok ....
   ok ....
...
All tests successful.
Files=xx, Tests=xxx, x wallclock secs ( 0.xx usr 0.xx sys + 0.xx cusr 0.xx csys = x.xx CPU)
Result: PASS
use   strict;
use   warnings;
use   utf8;
use   Test::More;

use   Catalyst::Test 'MySocial::App';
use   HTTP::Request::Common;
use   JSON::XS;
use   MySocial::App;

my$reply = "악플은 최소한입니다.";

my$photo = MySocial::App->path_to('root', 'static', 'images', 'profile', 'pict22.jpg');
my$res = request(
   POST "/rate/1/comment",
"X-Social-Token" => "f9a077fae03cf63bc4b351344531bde91f0f26c9",
"Content_Type" => "form-data",
Content => [
reply => $reply,
photo => [ $photo->stringify, $photo->stringify, "Content-Type" => "image/jpg" ],
     ]
);

my$data = JSON::XS::decode_json($res->content);

ok($data->{success}, "리퀘스트 성공");
ok($data->{comment}, "코멘트가 있습니다.");
ok($data->{comment}->{id}, "코멘트 ID 가 제대로 존재합니다.");
ok($data->{comment}->{reply}eq$reply, "코멘트 내용이 입력한 값과 동일합니다.");
ok($data->{comment}->{user}, "코멘트 입력자가 존재합니다.");

done_testing();
└── t
 ├── 00100_controller_User.t                      ├── 00400_controller_Scrap.t
 ├── 00101_controller_User_signup.t               ├── 00401_controller_Scrap_add_category.t
 ├── 00102_controller_User_signin-out.t           ├── 00402_controller_Scrap_get_categories.t
 ├── 00103_controller_User_get_user.t             ├── 00403_controller_Scrap_delete_category.t
 ├── 00104_controller_User_friend.t               ├── 00404_controller_Scrap_add.t
 ├── 00105_controller_User_get_friends.t          ├── 00405_controller_Scrap_get_scraps.t
 ├── 00106_controller_User_unfriend.t             ├── 00406_controller_Scrap_delete_scrap.t
 ├── 00107_controller_User_update_info.t          ├── 00500_controller_Rate.t
 ├── 00108_controller_User_suggested_users.t      ├── 00501_controller_Rate_add.t
 ├── 00109_controller_User_get_users.t            ├── 00502_controller_Rate_get_rate.t
 ├── 00110_controller_User_update_devicetoken.t   ├── 00503_controller_Rate_get_rates.t
 ├── 00200_controller_Ask.t                       ├── 00504_controller_Rate_comment.t
 ├── 00201_controller_Ask_add.t                   ├── 00505_controller_Rate_get_comments.t
 ├── 00202_controller_Ask_get_ask.t               ├── 00506_controller_Rate_delete_comment.t
 ├── 00203_controller_Ask_get_asks.t              ├── 00506_controller_Rate_delete_comment.t.html
 ├── 00204_controller_Ask_comment.t               ├── 00600_controller_Notification.t
 ├── 00205_controller_Ask_get_comments.t          ├── 00601_controller_Notification_add.t
 ├── 00206_controller_Ask_delete_comment.t        ├── 00602_controller_Notification_get_notifications.t
 ├── 00300_controller_Venue.t                     ├── model_API.t
 ├── 00301_controller_Venue_add.t                 └── view_JSON.t
 ├── 00302_controller_Venue_get_venue.t
 ├── 00303_controller_Venue_get_venues.t
 ├── 00304_controller_Venue_report.t
 ├── 00305_controller_Venue_get_photos.t
 ├── 00306_controller_Venue_get_photo.t
use   strict;
use   warnings;
use   Test::More tests => 4;
use   Test::WWW::Mechanize;

my $id     = 'your_naver_id';
my $passwd = 'your_naver_password';
my $reply = 'Check! :)';
chomp($reply);

my $url = 'http://nid.naver.com/nidlogin.login';
my $mech = WWW::Mechanize->new();
$mech->get_ok($url, ‘로그인페이지에 접속’);
my $res = $mech->submit_form_ok({
    form_name => 'frmNIDLogin',
    fields    => {
        id => $id,
        pw => $passwd
    },
}, ‘폼 서브밋성공’);

my $base_url = 'http://cafe.naver.com/AttendanceView.nhn';
my $check_urls = "$base_url?search.clubid=18062050&search.menuid=6";

$mech->get_ok($check_url, ‘카페에 접속’);
$mech->field('content', $reply);
$mech->submit();
$mech->content_like(qr/$reply/, ‘댓글 등록확인’);
schema.sql
CREATE TABLE ...
CREATE TABLE ...
...
                   DBIx::Class::Fixtures
                   DBIx::Class::Migration
data.sql / json
INSERT INTO ...
INSERT INTO ...
...
use Test::More;
use Brownie::Session;

# external server
my $session = Brownie::Session->new(
    driver   => 'Mechanize',
    app_host => 'http://app.example.com:5000',
);

# PSGI app
my $session = Brownie::Session->new(
    driver => 'Mechanize',
    app    => sub { ...(PSGI app)... },
);
$ tree
├── .gitignore                     language: perl
├── .shipit                        perl:
├── .travis.yml                    -"5.16"
├── Changes                        -"5.14"
├── MANIFEST.SKIP                  -"5.12"
├── Makefile.PL                     -"5.10"
├── README.md
├── bin
│   └── zamakist
├── lib
│   └── App
│   ├── Zamakist
│   │   ├── Handler
│   │   │   └── GOM.pm
│   │   ├── Media.pm
│   │   └── Role
│   │   └── Reportable.pm
│   └── Zamakist.pm
└── t
   ├── 00_compile.t
   ├── 01_find_permalink.t
   └── test_file
     └── The.Mentalist.S04E01.HDTV.XviD-ASAP.[VTV].Scarlet.Ribbons.avi
Using worker: ppp3.worker.travis-ci.org:php-1

$   cd ~/builds
$   git clone --depth=100 --quiet git://github.com/JEEN/p5-App-Zamakist.git JEEN/p5-App-Zamakist
$   cd JEEN/p5-App-Zamakist
$   git checkout -qf df10bdfea286c9933c345c84206eaa90b8f298a6
$   perlbrew use 5.16
$   perl --version

This is perl 5, version 16, subversion 0 (v5.16.0) built for i686-linux

Copyright 1987-2012, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

$ cpanm --version
cpanm (App::cpanminus) version 1.5017
$ cpanm --quiet --installdeps --notest .
Successfully installed Text-CharWidth-0.04
Successfully installed Text-UnicodeBox-0.03
Successfully installed XML-XPathEngine-0.13
Successfully installed HTML-Tree-5.02
Successfully installed HTML-TreeBuilder-XPath-0.14
Successfully installed HTML-Selector-XPath-0.14
Successfully installed Web-Query-0.08
Successfully installed Term-ReadLine-Zoid-0.07
8 distributions installed
$ perl Makefile.PL && make test
include /home/travis/builds/JEEN/p5-App-Zamakist/inc/Module/Install.pm
include inc/Module/Install/Metadata.pm
include inc/Module/Install/Base.pm
include inc/Module/Install/Makefile.pm
Cannot determine perl version info from lib/App/Zamakist.pm
include inc/Module/Install/Scripts.pm
include inc/Module/Install/Include.pm
include inc/Test/More.pm
include inc/Module/Install/WriteAll.pm
include inc/Module/Install/Win32.pm
include inc/Module/Install/Can.pm
include inc/Module/Install/Fetch.pm
Writing Makefile for App::Zamakist
Writing MYMETA.yml and MYMETA.json
Writing META.yml
cp lib/App/Zamakist/Media.pm blib/lib/App/Zamakist/Media.pm
cp lib/App/Zamakist.pm blib/lib/App/Zamakist.pm
cp lib/App/Zamakist/Role/Reportable.pm blib/lib/App/Zamakist/Role/Reportable.pm
cp lib/App/Zamakist/Handler/GOM.pm blib/lib/App/Zamakist/Handler/GOM.pm
cp bin/zamakist blib/script/zamakist
/home/travis/perl5/perlbrew/perls/5.16/bin/perl "-Iinc" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/zamakist
PERL_DL_NONLAZY=1 /home/travis/perl5/perlbrew/perls/5.16/bin/perl "-MExtUtils::Command::MM""-e""test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t
t/00_compile.t ......... ok
t/01_find_permalink.t .. 5/7 # http://search.gomtv.com/searchjm.gom?key=The.Mentalist.S04E01.HDTV.XviD-ASAP.%5BVTV%5D.Scarlet.Ribbons&preface=0
# http://gom.gomtv.com/jmdb/view.html?intSeq=808364&preface=0&spage=1
Wide character in print at /home/travis/perl5/perlbrew/perls/5.16/lib/5.16.0/Test/Builder.pm line 1759.
# [통합] The.Mentalist.S04E01.HDTV.XviD-ASAP
t/01_find_permalink.t .. ok
All tests successful.
Files=2, Tests=8, 10 wallclock secs ( 0.03 usr 0.01 sys + 1.79 cusr 0.10 csys= 1.93 CPU)

Result:   PASS
Done. Build script exited with: 0
Jenkins   Job A   Build #1



                  Build #2
          Job B


                  Build #3
          Job C
Build
Scheduler          Project
                                    Checkout/Update


              SCM : SVN/Git


            Builder : batch/shell
                                         Build

            Workspace

             Recorder : Clover/
                Checkstyle
                                       PostBuild
             Notifier : Email/IM
$ prove -lv --timer --formatter TAP::Formatter::JUnit t/*
$ cover -report clover
$ measureperl-checkstyle --max_sub_lines 60 
 --max_sub_mccabe_complexity 10 
 --directory lib > checkstyle-result.xml
http://www.ibm.com/developerworks/kr/aix/library/au-cleancode/
if ($var)            +1
unless ($var)        +1

if ($var && $var2)   +2

if ($var || $var2)   +2

my $var = $solo || ‘couple’;   +1

my $var = $yongbin eq ‘is_couple’ ? 1 : 0;   +2
39 sub gen_attr { 
40     my ($self, $req, $prop) = @_;
41 
42     my %attr = ();
43     my $sort  = $req->{sort} || 'id';
44     my $order = $req->{order} || 'desc';
45 
46     $order = 'desc' unless $order =~ /^(?:desc|asc)$/;
47     $sort  = 'id'   unless $sort  =~ /^(?:id)$/;
48 
49     $attr{order_by} = { "-$order" => "me.$sort" };
50     $attr{page} = $req->{page} || 1;
51     $attr{rows} = $req->{num} || 30;
52     $attr{page} = 1  unless $attr{page} =~ /^d+$/;
53     $attr{rows} = 30 unless $attr{rows} =~ /^(?:30|50|100)$/;
54     %attr;
55 }
SILEXY CI
Perl web app 테스트전략
Perl web app 테스트전략
Perl web app 테스트전략
Perl web app 테스트전략

Weitere ähnliche Inhalte

Was ist angesagt?

Commencer avec le TDD
Commencer avec le TDDCommencer avec le TDD
Commencer avec le TDDEric Hogue
 
Webrtc mojo
Webrtc mojoWebrtc mojo
Webrtc mojobpmedley
 
Guarding Your Code Against Bugs with Continuous Testing
Guarding Your Code Against Bugs with Continuous TestingGuarding Your Code Against Bugs with Continuous Testing
Guarding Your Code Against Bugs with Continuous TestingEric Hogue
 
What you need to remember when you upload to CPAN
What you need to remember when you upload to CPANWhat you need to remember when you upload to CPAN
What you need to remember when you upload to CPANcharsbar
 
Zen: Building Maintainable Catalyst Applications
Zen: Building Maintainable Catalyst ApplicationsZen: Building Maintainable Catalyst Applications
Zen: Building Maintainable Catalyst ApplicationsJay Shirley
 
Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101hendrikvb
 
Zend Framework Study@Tokyo vol1
Zend Framework Study@Tokyo vol1Zend Framework Study@Tokyo vol1
Zend Framework Study@Tokyo vol1Shinya Ohyanagi
 
The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6Wim Godden
 
Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門lestrrat
 
Nigel hamilton-megameet-2013
Nigel hamilton-megameet-2013Nigel hamilton-megameet-2013
Nigel hamilton-megameet-2013trexy
 
10 Catalyst Tips
10 Catalyst Tips10 Catalyst Tips
10 Catalyst TipsJay Shirley
 
I, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 OverlordsI, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 Overlordsheumann
 
Codeigniter4の比較と検証
Codeigniter4の比較と検証Codeigniter4の比較と検証
Codeigniter4の比較と検証ME iBotch
 
The why and how of moving to PHP 5.4/5.5
The why and how of moving to PHP 5.4/5.5The why and how of moving to PHP 5.4/5.5
The why and how of moving to PHP 5.4/5.5Wim Godden
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐいHisateru Tanaka
 
Joy of Six - Discover the Joy of Perl 6
Joy of Six - Discover the Joy of Perl 6Joy of Six - Discover the Joy of Perl 6
Joy of Six - Discover the Joy of Perl 6trexy
 
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Wim Godden
 

Was ist angesagt? (20)

Commencer avec le TDD
Commencer avec le TDDCommencer avec le TDD
Commencer avec le TDD
 
Webrtc mojo
Webrtc mojoWebrtc mojo
Webrtc mojo
 
Guarding Your Code Against Bugs with Continuous Testing
Guarding Your Code Against Bugs with Continuous TestingGuarding Your Code Against Bugs with Continuous Testing
Guarding Your Code Against Bugs with Continuous Testing
 
What you need to remember when you upload to CPAN
What you need to remember when you upload to CPANWhat you need to remember when you upload to CPAN
What you need to remember when you upload to CPAN
 
dotCloud and go
dotCloud and godotCloud and go
dotCloud and go
 
Zen: Building Maintainable Catalyst Applications
Zen: Building Maintainable Catalyst ApplicationsZen: Building Maintainable Catalyst Applications
Zen: Building Maintainable Catalyst Applications
 
Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101
 
Zend Framework Study@Tokyo vol1
Zend Framework Study@Tokyo vol1Zend Framework Study@Tokyo vol1
Zend Framework Study@Tokyo vol1
 
The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6
 
Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門
 
Nigel hamilton-megameet-2013
Nigel hamilton-megameet-2013Nigel hamilton-megameet-2013
Nigel hamilton-megameet-2013
 
10 Catalyst Tips
10 Catalyst Tips10 Catalyst Tips
10 Catalyst Tips
 
I, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 OverlordsI, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 Overlords
 
Mojo as a_client
Mojo as a_clientMojo as a_client
Mojo as a_client
 
Codeigniter4の比較と検証
Codeigniter4の比較と検証Codeigniter4の比較と検証
Codeigniter4の比較と検証
 
The why and how of moving to PHP 5.4/5.5
The why and how of moving to PHP 5.4/5.5The why and how of moving to PHP 5.4/5.5
The why and how of moving to PHP 5.4/5.5
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
 
Joy of Six - Discover the Joy of Perl 6
Joy of Six - Discover the Joy of Perl 6Joy of Six - Discover the Joy of Perl 6
Joy of Six - Discover the Joy of Perl 6
 
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011
 
Memory Manglement in Raku
Memory Manglement in RakuMemory Manglement in Raku
Memory Manglement in Raku
 

Ähnlich wie Perl web app 테스트전략

Api Design
Api DesignApi Design
Api Designsartak
 
Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!Anatoly Sharifulin
 
Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12Michelangelo van Dam
 
Mojolicious - A new hope
Mojolicious - A new hopeMojolicious - A new hope
Mojolicious - A new hopeMarcus Ramberg
 
Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Michelangelo van Dam
 
What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012D
 
OWASP Top 10 - DrupalCon Amsterdam 2019
OWASP Top 10 - DrupalCon Amsterdam 2019OWASP Top 10 - DrupalCon Amsterdam 2019
OWASP Top 10 - DrupalCon Amsterdam 2019Ayesh Karunaratne
 
Curscatalyst
CurscatalystCurscatalyst
CurscatalystKar Juan
 
Things Your Mother Didnt Tell You About Bundle Configurations - Symfony Live…
Things Your Mother Didnt Tell You About Bundle Configurations - Symfony Live…Things Your Mother Didnt Tell You About Bundle Configurations - Symfony Live…
Things Your Mother Didnt Tell You About Bundle Configurations - Symfony Live…D
 
Things Your Mother Didn't Tell You About Bundle Configurations - Symfony Live...
Things Your Mother Didn't Tell You About Bundle Configurations - Symfony Live...Things Your Mother Didn't Tell You About Bundle Configurations - Symfony Live...
Things Your Mother Didn't Tell You About Bundle Configurations - Symfony Live...D
 
Unit testing with zend framework tek11
Unit testing with zend framework tek11Unit testing with zend framework tek11
Unit testing with zend framework tek11Michelangelo van Dam
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesLindsay Holmwood
 
symfony on action - WebTech 207
symfony on action - WebTech 207symfony on action - WebTech 207
symfony on action - WebTech 207patter
 
Using Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkUsing Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkDirk Haun
 
Curso Symfony - Clase 4
Curso Symfony - Clase 4Curso Symfony - Clase 4
Curso Symfony - Clase 4Javier Eguiluz
 

Ähnlich wie Perl web app 테스트전략 (20)

Api Design
Api DesignApi Design
Api Design
 
Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!
 
Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12
 
Mojolicious - A new hope
Mojolicious - A new hopeMojolicious - A new hope
Mojolicious - A new hope
 
Blog Hacks 2011
Blog Hacks 2011Blog Hacks 2011
Blog Hacks 2011
 
Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012
 
What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012
 
OWASP Top 10 - DrupalCon Amsterdam 2019
OWASP Top 10 - DrupalCon Amsterdam 2019OWASP Top 10 - DrupalCon Amsterdam 2019
OWASP Top 10 - DrupalCon Amsterdam 2019
 
Curscatalyst
CurscatalystCurscatalyst
Curscatalyst
 
Perl Web Client
Perl Web ClientPerl Web Client
Perl Web Client
 
Things Your Mother Didnt Tell You About Bundle Configurations - Symfony Live…
Things Your Mother Didnt Tell You About Bundle Configurations - Symfony Live…Things Your Mother Didnt Tell You About Bundle Configurations - Symfony Live…
Things Your Mother Didnt Tell You About Bundle Configurations - Symfony Live…
 
Things Your Mother Didn't Tell You About Bundle Configurations - Symfony Live...
Things Your Mother Didn't Tell You About Bundle Configurations - Symfony Live...Things Your Mother Didn't Tell You About Bundle Configurations - Symfony Live...
Things Your Mother Didn't Tell You About Bundle Configurations - Symfony Live...
 
QA for PHP projects
QA for PHP projectsQA for PHP projects
QA for PHP projects
 
PhpBB meets Symfony2
PhpBB meets Symfony2PhpBB meets Symfony2
PhpBB meets Symfony2
 
Unit testing with zend framework tek11
Unit testing with zend framework tek11Unit testing with zend framework tek11
Unit testing with zend framework tek11
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
Hacking Movable Type
Hacking Movable TypeHacking Movable Type
Hacking Movable Type
 
symfony on action - WebTech 207
symfony on action - WebTech 207symfony on action - WebTech 207
symfony on action - WebTech 207
 
Using Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkUsing Geeklog as a Web Application Framework
Using Geeklog as a Web Application Framework
 
Curso Symfony - Clase 4
Curso Symfony - Clase 4Curso Symfony - Clase 4
Curso Symfony - Clase 4
 

Kürzlich hochgeladen

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 

Kürzlich hochgeladen (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

Perl web app 테스트전략

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 8.
  • 11. 26,171 Number of CPAN Distributions on CPAN 2012. 10. 19
  • 12. 23,816,487 Number of CPAN Testers Reports 2012. 10. 19
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18. Test::MockObject Test::Class Test::Git Test::Deep Test::FITesque Test::TCP Test::mysqld Test::.... Test::YAML
  • 19.
  • 22. Test::Simple #!/usr/bin/env perl use strict; use warnings; use Test::Simple tests => 3; sub is_number_two { returnshift == 2; } my$var = 'JEEN is married to Hanny-Mama'; ok(1+1 == 2, '1+1 = 2'); ok($var =~ /married/, 'JEEN is married'); ok(is_number_two(2), 'is_number(2) returns true?');
  • 23. Test::More ok( <expression>, <description> ); is( <got>, <expected>, <description>); isnt( <got>, <expected>, <description>); like( <got>, <expected>, <description>); unlike( <got>, <expected>, <description>); isa_ok( <got>, <expected> ); is_deeply( <HASH>, <HASH>, <description> ); SKIP: {} TODO: {}
  • 24. Test::More #!/usr/bin/env perl use strict; use warnings; use Test::Base tests => 4; my$var = 'JEEN is married'; my%hash1 = ( is_solo => 1, gender => 'male' ); my%hash2 = ( is_solo => 1, gender => 'male', ); ok(1+1 == 2, '1+1 = 2'); is(1+1, 2, '1+1 = 2'); like($var, qr/married/, 'JEEN is married'); is_deeply(%hash1, %hash2, 'equal hashes');
  • 25.
  • 26.
  • 28.
  • 29.
  • 30. #!/usr/bin/env perl use strict; use warnings; use utf8; use Test::More tests => 2; BEGIN{ binmodeSTDOUT, ':utf8'; }; subtest '001) 의존모듈 확인' => sub { use_ok 'LWP::UserAgent'; use_ok 'URI'; use_ok 'URI::QueryParam'; }; my$host = $ENV{TARGET_HOST} || 'http://test-domain-blah-blah'; my$ua = LWP::UserAgent->new(); $ua->timeout(10); subtest '002) XSS' => sub { while(<DATA>) { s/[rn]//g; my$uri = URI->new($host . $_); my@query_param = $uri->query_param; my$param_count = scalar@query_param; formy$idx (1 .. $param_count) { $uri->query_form({ $uri->query_form, $query_param[$idx-1] => "<script>alert('xss');</script>" }); my$res_xss = $ua->get($uri); unlike($res_xss->decoded_content, qr{<script>alert('xss ');</script>}); } } }; done_testing(); __DATA__ ...... ...... ......
  • 31. t/ 001-xss.t 002-sql-injection.t 003-directory-indexing.t 004-filedownload.t 005-path-location.t 006-os-command.t ... ... ...
  • 32. $ prove -v t t/001-xss.t .. 1..2 ok 1 - 001) 모듈 의존성 확인 ok 1 LWP::UserAgent ok 2 URI ok 3 URI::QueryParam ok 2 - 002) XSS ok .... ok .... ok .... ... All tests successful. Files=xx, Tests=xxx, x wallclock secs ( 0.xx usr 0.xx sys + 0.xx cusr 0.xx csys = x.xx CPU) Result: PASS
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43. use strict; use warnings; use utf8; use Test::More; use Catalyst::Test 'MySocial::App'; use HTTP::Request::Common; use JSON::XS; use MySocial::App; my$reply = "악플은 최소한입니다."; my$photo = MySocial::App->path_to('root', 'static', 'images', 'profile', 'pict22.jpg'); my$res = request( POST "/rate/1/comment", "X-Social-Token" => "f9a077fae03cf63bc4b351344531bde91f0f26c9", "Content_Type" => "form-data", Content => [ reply => $reply, photo => [ $photo->stringify, $photo->stringify, "Content-Type" => "image/jpg" ], ] ); my$data = JSON::XS::decode_json($res->content); ok($data->{success}, "리퀘스트 성공"); ok($data->{comment}, "코멘트가 있습니다."); ok($data->{comment}->{id}, "코멘트 ID 가 제대로 존재합니다."); ok($data->{comment}->{reply}eq$reply, "코멘트 내용이 입력한 값과 동일합니다."); ok($data->{comment}->{user}, "코멘트 입력자가 존재합니다."); done_testing();
  • 44. └── t ├── 00100_controller_User.t ├── 00400_controller_Scrap.t ├── 00101_controller_User_signup.t ├── 00401_controller_Scrap_add_category.t ├── 00102_controller_User_signin-out.t ├── 00402_controller_Scrap_get_categories.t ├── 00103_controller_User_get_user.t ├── 00403_controller_Scrap_delete_category.t ├── 00104_controller_User_friend.t ├── 00404_controller_Scrap_add.t ├── 00105_controller_User_get_friends.t ├── 00405_controller_Scrap_get_scraps.t ├── 00106_controller_User_unfriend.t ├── 00406_controller_Scrap_delete_scrap.t ├── 00107_controller_User_update_info.t ├── 00500_controller_Rate.t ├── 00108_controller_User_suggested_users.t ├── 00501_controller_Rate_add.t ├── 00109_controller_User_get_users.t ├── 00502_controller_Rate_get_rate.t ├── 00110_controller_User_update_devicetoken.t ├── 00503_controller_Rate_get_rates.t ├── 00200_controller_Ask.t ├── 00504_controller_Rate_comment.t ├── 00201_controller_Ask_add.t ├── 00505_controller_Rate_get_comments.t ├── 00202_controller_Ask_get_ask.t ├── 00506_controller_Rate_delete_comment.t ├── 00203_controller_Ask_get_asks.t ├── 00506_controller_Rate_delete_comment.t.html ├── 00204_controller_Ask_comment.t ├── 00600_controller_Notification.t ├── 00205_controller_Ask_get_comments.t ├── 00601_controller_Notification_add.t ├── 00206_controller_Ask_delete_comment.t ├── 00602_controller_Notification_get_notifications.t ├── 00300_controller_Venue.t ├── model_API.t ├── 00301_controller_Venue_add.t └── view_JSON.t ├── 00302_controller_Venue_get_venue.t ├── 00303_controller_Venue_get_venues.t ├── 00304_controller_Venue_report.t ├── 00305_controller_Venue_get_photos.t ├── 00306_controller_Venue_get_photo.t
  • 45. use strict; use warnings; use Test::More tests => 4; use Test::WWW::Mechanize; my $id = 'your_naver_id'; my $passwd = 'your_naver_password'; my $reply = 'Check! :)'; chomp($reply); my $url = 'http://nid.naver.com/nidlogin.login'; my $mech = WWW::Mechanize->new(); $mech->get_ok($url, ‘로그인페이지에 접속’); my $res = $mech->submit_form_ok({ form_name => 'frmNIDLogin', fields => { id => $id, pw => $passwd }, }, ‘폼 서브밋성공’); my $base_url = 'http://cafe.naver.com/AttendanceView.nhn'; my $check_urls = "$base_url?search.clubid=18062050&search.menuid=6"; $mech->get_ok($check_url, ‘카페에 접속’); $mech->field('content', $reply); $mech->submit(); $mech->content_like(qr/$reply/, ‘댓글 등록확인’);
  • 46.
  • 47.
  • 48.
  • 49. schema.sql CREATE TABLE ... CREATE TABLE ... ... DBIx::Class::Fixtures DBIx::Class::Migration data.sql / json INSERT INTO ... INSERT INTO ... ...
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69. use Test::More; use Brownie::Session; # external server my $session = Brownie::Session->new( driver => 'Mechanize', app_host => 'http://app.example.com:5000', ); # PSGI app my $session = Brownie::Session->new( driver => 'Mechanize', app => sub { ...(PSGI app)... }, );
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80. $ tree ├── .gitignore language: perl ├── .shipit perl: ├── .travis.yml -"5.16" ├── Changes -"5.14" ├── MANIFEST.SKIP -"5.12" ├── Makefile.PL -"5.10" ├── README.md ├── bin │   └── zamakist ├── lib │   └── App │   ├── Zamakist │   │   ├── Handler │   │   │   └── GOM.pm │   │   ├── Media.pm │   │   └── Role │   │   └── Reportable.pm │   └── Zamakist.pm └── t ├── 00_compile.t ├── 01_find_permalink.t └── test_file └── The.Mentalist.S04E01.HDTV.XviD-ASAP.[VTV].Scarlet.Ribbons.avi
  • 81.
  • 82. Using worker: ppp3.worker.travis-ci.org:php-1 $ cd ~/builds $ git clone --depth=100 --quiet git://github.com/JEEN/p5-App-Zamakist.git JEEN/p5-App-Zamakist $ cd JEEN/p5-App-Zamakist $ git checkout -qf df10bdfea286c9933c345c84206eaa90b8f298a6 $ perlbrew use 5.16 $ perl --version This is perl 5, version 16, subversion 0 (v5.16.0) built for i686-linux Copyright 1987-2012, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. $ cpanm --version cpanm (App::cpanminus) version 1.5017 $ cpanm --quiet --installdeps --notest . Successfully installed Text-CharWidth-0.04 Successfully installed Text-UnicodeBox-0.03 Successfully installed XML-XPathEngine-0.13 Successfully installed HTML-Tree-5.02 Successfully installed HTML-TreeBuilder-XPath-0.14 Successfully installed HTML-Selector-XPath-0.14 Successfully installed Web-Query-0.08 Successfully installed Term-ReadLine-Zoid-0.07 8 distributions installed $ perl Makefile.PL && make test include /home/travis/builds/JEEN/p5-App-Zamakist/inc/Module/Install.pm include inc/Module/Install/Metadata.pm include inc/Module/Install/Base.pm include inc/Module/Install/Makefile.pm Cannot determine perl version info from lib/App/Zamakist.pm include inc/Module/Install/Scripts.pm include inc/Module/Install/Include.pm include inc/Test/More.pm include inc/Module/Install/WriteAll.pm include inc/Module/Install/Win32.pm include inc/Module/Install/Can.pm include inc/Module/Install/Fetch.pm Writing Makefile for App::Zamakist Writing MYMETA.yml and MYMETA.json Writing META.yml cp lib/App/Zamakist/Media.pm blib/lib/App/Zamakist/Media.pm cp lib/App/Zamakist.pm blib/lib/App/Zamakist.pm cp lib/App/Zamakist/Role/Reportable.pm blib/lib/App/Zamakist/Role/Reportable.pm cp lib/App/Zamakist/Handler/GOM.pm blib/lib/App/Zamakist/Handler/GOM.pm cp bin/zamakist blib/script/zamakist /home/travis/perl5/perlbrew/perls/5.16/bin/perl "-Iinc" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/zamakist PERL_DL_NONLAZY=1 /home/travis/perl5/perlbrew/perls/5.16/bin/perl "-MExtUtils::Command::MM""-e""test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t t/00_compile.t ......... ok t/01_find_permalink.t .. 5/7 # http://search.gomtv.com/searchjm.gom?key=The.Mentalist.S04E01.HDTV.XviD-ASAP.%5BVTV%5D.Scarlet.Ribbons&preface=0 # http://gom.gomtv.com/jmdb/view.html?intSeq=808364&preface=0&spage=1 Wide character in print at /home/travis/perl5/perlbrew/perls/5.16/lib/5.16.0/Test/Builder.pm line 1759. # [통합] The.Mentalist.S04E01.HDTV.XviD-ASAP t/01_find_permalink.t .. ok All tests successful. Files=2, Tests=8, 10 wallclock secs ( 0.03 usr 0.01 sys + 1.79 cusr 0.10 csys= 1.93 CPU) Result: PASS Done. Build script exited with: 0
  • 83.
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89. Jenkins Job A Build #1 Build #2 Job B Build #3 Job C
  • 90. Build Scheduler Project Checkout/Update SCM : SVN/Git Builder : batch/shell Build Workspace Recorder : Clover/ Checkstyle PostBuild Notifier : Email/IM
  • 91.
  • 92.
  • 93.
  • 94.
  • 95.
  • 96.
  • 97. $ prove -lv --timer --formatter TAP::Formatter::JUnit t/*
  • 98. $ cover -report clover
  • 99. $ measureperl-checkstyle --max_sub_lines 60 --max_sub_mccabe_complexity 10 --directory lib > checkstyle-result.xml
  • 101. if ($var) +1 unless ($var) +1 if ($var && $var2) +2 if ($var || $var2) +2 my $var = $solo || ‘couple’; +1 my $var = $yongbin eq ‘is_couple’ ? 1 : 0; +2
  • 102.
  • 104.
  • 105.
  • 106.
  • 107.
  • 108.
  • 109.
  • 110.
  • 111.
  • 112.
  • 113.