SlideShare a Scribd company logo
1 of 60
Download to read offline
Test Continuous
Kang-min Liu <gugod@gugod.org>
Continuous Testing

http://groups.csail.mit.edu/pag/continuoustesting/
Eclipse Plugin
     For Java
JUnit
Foo.java
FooTest.java
Changed

Foo.java
FooTest.java
Changed

Foo.java
FooTest.java
                     auto run
HEY
We   Perl
Test::Continuous
http://search.cpan.org/dist/Test-Continuous
DEMO
perl -MTest::Continuous -e runtests'




              murmur: There should be a better way...
---------------------------------------------
/Users/gugod/dev/Acme-Greeting/t/01.english.t (Wstat: 65280 Tests: 5
Failed: 1)
 Failed test: 5
 Non-zero exit status: 255
 Parse errors: Bad plan. You planned 4 tests but ran 5.
Files=1, Tests=5, 0 wallclock secs ( 0.00 usr 0.01 sys + 0.05 cusr 0.01
csys = 0.07 CPU)
Result: FAIL
[MSG]: /Users/gugod/Acme-Greeting/t/01.english.t was changed.
/Users/gugod/dev/Acme-Greeting/t/01.english......ok

---------------------------------------------
Result: PASS
[MSG]: /Users/gugod/dev/Acme-Greeting/t/01.english.t was changed.
/Users/gugod/dev/Acme-Greeting/t/01.english......ok

---------------------------------------------
What It Does...
1. Scan modified files
2. Find all tests requiring a re-run.
3. Run those tests
4. Report PASS / FAIL
5. GOTO 1
How it’s done
1. Scan modified files. File::Modified
2. Find all tests requiring a re-run.
   Module::ExtractUse
3. Run those tests. App::Prove
4. Report PASS / FAIL. Log::Dispatch
5. GOTO 1. while(1)
CPANFTW
CPAN For The Win
Good For...
Test Driven
Development
Test Driven
Refactoring
<CODE>
What It Does (1st day)

1. Wait until any file is modified
2. Run all tests
3. Report PASS / FAIL
4. GOTO 1
Run ALL tests
Wasting Time
Write less test
bad software
hate software
Run as few tests
  as possible
   Module::ExtractUse
Only run .t if that’s
    modified
dependency of .t
Moose.pm   moose.t



Cow.pm      cow.t



 OX.pm      fight.t
Moose.pm   moose.t



Cow.pm      cow.t



 OX.pm      fight.t
Moose.pm   moose.t



Cow.pm      cow.t



 OX.pm      fight.t
Moose.pm   moose.t



Cow.pm      cow.t



 OX.pm      fight.t
Moose.pm   moose.t



Cow.pm      cow.t



 OX.pm      fight.t
Log::Dispatch based
    notification
    Should be easy extend
Log::Dispatch::Screen
---------------------------------------------
/Users/gugod/dev/Acme-Greeting/t/01.english.t (Wstat: 65280 Tests: 5
Failed: 1)
 Failed test: 5
 Non-zero exit status: 255
 Parse errors: Bad plan. You planned 4 tests but ran 5.
Files=1, Tests=5, 0 wallclock secs ( 0.00 usr 0.01 sys + 0.05 cusr 0.01
csys = 0.07 CPU)
Result: FAIL
[MSG]: /Users/gugod/Acme-Greeting/t/01.english.t was changed.
/Users/gugod/dev/Acme-Greeting/t/01.english......ok

---------------------------------------------
Result: PASS
[MSG]: /Users/gugod/dev/Acme-Greeting/t/01.english.t was changed.
/Users/gugod/dev/Acme-Greeting/t/01.english......ok

---------------------------------------------
/me   Mac
Good developing
   platform


       and macbook air is so shiny
Growl
                    Universal Reminder




http://growl.info
Growl
                    Universal Reminder




http://growl.info
Log::Disptach::MacGrowl
       auto-used if installed
Log::Disptach::MacGrowl
       auto-used if installed
Not good enough...
Only check .pm
 dependency
      .pm → .t
       .c → .t
     .conf → .t
     .yaml → .t
Shallow Dependency
Animal.pm           Moose.pm




Cow.pm      cow.t   moose.t
isa
Animal.pm            Moose.pm




Cow.pm       cow.t   moose.t
isa
Animal.pm            Moose.pm



 isa


Cow.pm       cow.t   moose.t
isa
Animal.pm            Moose.pm



 isa                     tested by


Cow.pm       cow.t   moose.t
isa
Animal.pm                     Moose.pm



 isa                              tested by
            tested
              by
Cow.pm                cow.t   moose.t
isa
Animal.pm                     Moose.pm



 isa                              tested by
            tested
              by
Cow.pm                cow.t   moose.t
isa
Animal.pm                         Moose.pm
               tested by

 isa                                  tested by
                       animal.t
            tested
              by
Cow.pm                cow.t       moose.t
Should clearly notified
    what’s failed
No High-Def cute
  looking icon
  ICON DESIGNER WANTED
Future
• Better Dependency Detection
 • Convention based (For Catalyst / Jifty /
    Others)
  • Configuration based
• Support other Universal Reminder on
  other platform. (Twitter!)
END
Happy Testing

More Related Content

Viewers also liked (7)

Equipos
EquiposEquipos
Equipos
 
razvijanje Indie iger
razvijanje Indie igerrazvijanje Indie iger
razvijanje Indie iger
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
 
My Learning Experience
My Learning ExperienceMy Learning Experience
My Learning Experience
 
perlbrew yapcasia 2010
perlbrew yapcasia 2010perlbrew yapcasia 2010
perlbrew yapcasia 2010
 
Same but Different
Same but DifferentSame but Different
Same but Different
 
Turismo 2.0 Mallorca (BRECHA DIGITAL )
Turismo 2.0 Mallorca (BRECHA DIGITAL )Turismo 2.0 Mallorca (BRECHA DIGITAL )
Turismo 2.0 Mallorca (BRECHA DIGITAL )
 

Similar to Test Continuous

Django’s nasal passage
Django’s nasal passageDjango’s nasal passage
Django’s nasal passage
Erik Rose
 
Testing Salt States (part 1)
Testing Salt States (part 1)Testing Salt States (part 1)
Testing Salt States (part 1)
jasondenning
 

Similar to Test Continuous (20)

testing for people who hate testing
testing for people who hate testingtesting for people who hate testing
testing for people who hate testing
 
Don't Leave Windows Broken
Don't Leave Windows BrokenDon't Leave Windows Broken
Don't Leave Windows Broken
 
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
 
Django’s nasal passage
Django’s nasal passageDjango’s nasal passage
Django’s nasal passage
 
TDD super mondays-june-2014
TDD super mondays-june-2014TDD super mondays-june-2014
TDD super mondays-june-2014
 
Clearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad DecisionsClearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad Decisions
 
Who will test your tests?
Who will test your tests?Who will test your tests?
Who will test your tests?
 
Using the Power to Prove
Using the Power to ProveUsing the Power to Prove
Using the Power to Prove
 
DevSecCon Tel Aviv 2018 - Integrated Security Testing by Morgan Roman
DevSecCon Tel Aviv 2018 - Integrated Security Testing by Morgan RomanDevSecCon Tel Aviv 2018 - Integrated Security Testing by Morgan Roman
DevSecCon Tel Aviv 2018 - Integrated Security Testing by Morgan Roman
 
Puppet Camp Düsseldorf 2014: Continuously Deliver Your Puppet Code with Jenki...
Puppet Camp Düsseldorf 2014: Continuously Deliver Your Puppet Code with Jenki...Puppet Camp Düsseldorf 2014: Continuously Deliver Your Puppet Code with Jenki...
Puppet Camp Düsseldorf 2014: Continuously Deliver Your Puppet Code with Jenki...
 
Puppet Camp Duesseldorf 2014: Toni Schmidbauer - Continuously deliver your pu...
Puppet Camp Duesseldorf 2014: Toni Schmidbauer - Continuously deliver your pu...Puppet Camp Duesseldorf 2014: Toni Schmidbauer - Continuously deliver your pu...
Puppet Camp Duesseldorf 2014: Toni Schmidbauer - Continuously deliver your pu...
 
55 New Features in Java 7
55 New Features in Java 755 New Features in Java 7
55 New Features in Java 7
 
Unit Testing Lots of Perl
Unit Testing Lots of PerlUnit Testing Lots of Perl
Unit Testing Lots of Perl
 
owasp top 10
owasp top 10owasp top 10
owasp top 10
 
Continuous Integration Testing in Django
Continuous Integration Testing in DjangoContinuous Integration Testing in Django
Continuous Integration Testing in Django
 
Testing Salt States (part 1)
Testing Salt States (part 1)Testing Salt States (part 1)
Testing Salt States (part 1)
 
Rocket Fuelled Cucumbers
Rocket Fuelled CucumbersRocket Fuelled Cucumbers
Rocket Fuelled Cucumbers
 
Idiot proofing your code
Idiot proofing your codeIdiot proofing your code
Idiot proofing your code
 
PagerDuty | OSCON 2016 Failure Testing
PagerDuty | OSCON 2016 Failure TestingPagerDuty | OSCON 2016 Failure Testing
PagerDuty | OSCON 2016 Failure Testing
 
JUTE Workshop
JUTE WorkshopJUTE Workshop
JUTE Workshop
 

More from Kang-min Liu

Elasticsearch 實戰介紹
Elasticsearch 實戰介紹Elasticsearch 實戰介紹
Elasticsearch 實戰介紹
Kang-min Liu
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In Perl
Kang-min Liu
 

More from Kang-min Liu (16)

o̍h Tai-gi
o̍h Tai-gio̍h Tai-gi
o̍h Tai-gi
 
The architecture of search engines in Booking.com
The architecture of search engines in Booking.comThe architecture of search engines in Booking.com
The architecture of search engines in Booking.com
 
Elasticsearch 實戰介紹
Elasticsearch 實戰介紹Elasticsearch 實戰介紹
Elasticsearch 實戰介紹
 
Perlbrew
PerlbrewPerlbrew
Perlbrew
 
Git
GitGit
Git
 
Learning From Ruby (Yapc Asia)
Learning From Ruby (Yapc Asia)Learning From Ruby (Yapc Asia)
Learning From Ruby (Yapc Asia)
 
YAPC::Tiny Introduction
YAPC::Tiny IntroductionYAPC::Tiny Introduction
YAPC::Tiny Introduction
 
Integration Test With Cucumber And Webrat
Integration Test With Cucumber And WebratIntegration Test With Cucumber And Webrat
Integration Test With Cucumber And Webrat
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In Perl
 
Javascript Tutorial
Javascript TutorialJavascript Tutorial
Javascript Tutorial
 
Javascript Basic
Javascript BasicJavascript Basic
Javascript Basic
 
Handlino - RandomLife
Handlino - RandomLifeHandlino - RandomLife
Handlino - RandomLife
 
Jformino
JforminoJformino
Jformino
 
網頁程式還可以怎麼設計
網頁程式還可以怎麼設計網頁程式還可以怎麼設計
網頁程式還可以怎麼設計
 
OSDC.tw 2008 Lightening Talk
OSDC.tw 2008 Lightening TalkOSDC.tw 2008 Lightening Talk
OSDC.tw 2008 Lightening Talk
 
Happy Designer 20080329
Happy Designer 20080329Happy Designer 20080329
Happy Designer 20080329
 

Recently uploaded

Recently uploaded (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
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, ...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
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...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Test Continuous