Test Continuous
Upcoming SlideShare
Loading in...5
×
 

Test Continuous

on

  • 4,317 views

 

Statistics

Views

Total Views
4,317
Views on SlideShare
4,247
Embed Views
70

Actions

Likes
0
Downloads
43
Comments
0

6 Embeds 70

http://blog.gugod.org 49
http://gugod.org 10
http://coderwall.com 7
http://www.linkedin.com 2
http://pub.gugod.org 1
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Test Continuous Test Continuous Presentation Transcript

  • 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