SlideShare a Scribd company logo
1 of 24
Zombie-chaser 0.1
Going beyond skin deep
Andrew Grimm
University of New
South Wales
Overview
● Gratuitous violence and copyright violation
● Unit testing
● Mutation testing
● Heckle
● Chaser
● Zombie-chaser
● Gratuitous violence and copyright violation
Gratuitous violence and copyright violation
● See above
We don't test code
● I get a specification from my boss
● I spend a couple of weeks writing on my typewriter
● Fax it to the client
● They scan it in
● It runs first time
● And does what they wanted
● This DOESN'T happen
We all test code somehow
● SFTP code.php, make a few edits, SFTP it back to
the production server, view it in your browser
– This DOES happen
● svn update, make a few changes, try it on a
development web server, don't spot anything wrong,
push to production
– Better
● git clone, add new test, add new code, check all tests
pass, push to production
– Yay!!
Automated testing
● Term “Unit testing” sometimes misused
● Technically means testing a small portion of your
code
● Nowadays used to mean automated testing
● Sometimes automated testing is the lazier option
than manual testing even in the short-term
Automated testing = exomemory
● Your code is thousands of lines long
– You can't memorize your code
● Requirements change from the original
– You can't write once, try it out, and never touch it
again
● You can't email past-self
– The code itself needs to know what's right and wrong
An example of a test
● Given I am a fake Canadian motorcade at the 2007
APEC summit
● When I supply obviously bogus credentials to
security
● Then I should not be let in to the green zone
Mutation testing
● Evaluates thoroughness of testing
● If your code is modified, it ought to fail some of its
tests
Example of a mutation
● Modifying an APEC credential verification method,
such that it regards an invalid pass as valid and/or
vice versa
Heckle
● Main mutation tester in ruby
● Name derived from Jester (Java mutation tester)
● Uses ParseTree and ruby2ruby
● Mutates literals (eg strings) and branches (eg swaps
“if”s with “unless”s)
● Parses the program, makes changes to the parse
tree, and builds the new program
Heckle pros and cons
● Best mutator out there
● Except when it's not available
– Doesn't work with default version of ruby on
Windows
– ParseTree doesn't work on ruby 1.9
– Plans to replace ParseTree with RubyParser, which
does work on ruby 1.9
Chaser
● Modified version of heckle
● Named after the ABC comedy team, best known for
a penetration test that went horribly right
● Created to deal with unavailability of heckle on
Windows (which I no longer need)
● Uses metaprogramming to modify methods
● Intended to run under anything that's ruby
● Runs test/unit and my fork of exemplor
Chaser metaprogramming
def modify_instance_method
chaser = self
@mutated = true
@old_method = @klass.instance_method(@method_name)
@klass.class_eval do
remove_method(chaser.method_name)
define_method(chaser.method_name) do (*args)
original_value = chaser.old_method.bind(self).call(*args)
chaser.mutate_value(original_value)
end
end
end
Chaser disadvantages
● Only modifies return values (and yielded
parameters)
● Methods with side-effects will work as normal
● Ability to not call a method at all could be added
● Doesn't mutate every line
● Currently doesn't describe the mutations being done
– May be difficult task
Availability of chaser
● Chaser (actually zombie-chaser) works on:
● *nix 1.8 and 1.9
● Windows 1.8 and 1.9
● JRuby 1.8 only
– Haven't got to the bottom yet for 1.9 (see next slide)
● MacRuby: We broke it good! (see following slide)
● Haven't tried IronRuby, Rubinius, or other platforms
Availability of chaser: JRuby 1.9
Andrew-Grimms-MacBook-Pro:zombie-chaser agrimm$ jruby --1.9 -Ilib bin/zombie-chaser
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/fixture.rb:11:in `included'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:64:in `call'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:64:in `set_attributes'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:61:in `each'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:61:in `set_attributes'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:58:in `each'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:58:in `set_attributes'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:42:in `attribute'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:41:in `each'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:41:in `attribute'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/fixture.rb:76:in `register_fixture'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/fixture.rb:24:in `setup'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/priority.rb:9:in `included'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/priority.rb:8:in `class_eval'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/priority.rb:8:in `included'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/testcase.rb:82
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/testcase.rb:31:in `require'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit.rb:1
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit.rb:31:in `require'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/ui/testrunnermediator.rb:7
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/ui/testrunnermediator.rb:31:in `require'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/Users/agrimm/ruby/zombie-chaser/lib/zombie-chaser/zombie_test_chaser.rb:4
/Users/agrimm/ruby/zombie-chaser/lib/zombie-chaser/zombie_test_chaser.rb:31:in `require'
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
bin/zombie-chaser:4
/Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/fixture.rb:11:in `included': undefined method `unregister_setup_method' for nil:NilClass (NoMethodError)
from /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:64:in `call'
from /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:64:in `set_attributes'
from /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:61:in `each'
from /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:61:in `set_attributes'
from /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:58:in `each'
from /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:58:in `set_attributes'
from /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:42:in `attribute'
from /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:41:in `each'
... 16 levels...
from /Users/agrimm/ruby/zombie-chaser/lib/zombie-chaser/zombie_test_chaser.rb:31:in `require'
from /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from bin/zombie-chaser:4
Availability of chaser: MacRuby
Not even close!
[1] % ruby -Ilib -Itest -rrubygems test/test_unit.rb ~/Code/zombie-chaser
/Users/pete/Code/zombie-chaser/test/test_unit.rb:1:in `<main>': unrecognized runtime type `'
(TypeError)
[1] % ruby -v ~/Code/zombie-chaser
MacRuby version 0.6 (ruby 1.9.0) [universal-darwin10.0, x86_64]
And no, we don't recognize the runtime type either!
Thanks to Peter Hollows for running zombie-chaser on his box
Zombie-chaser
● Graphic(al) user interface for mutation testing
● Incorporated code from Chris Lloyd (et al)'s brains
● Ryan Bigg demonstrated zombino, a brains-based
game he created because brains wasn't working
● psDooM, a Doom interface to sysadmin, was also an
inspiration
Gooey metaphor
● Human running across the screen represents
running of your unit tests with unmodified code
– Equivalent to a “control” in a scientific experiment
– Fail any tests, and the human dies before zombies
appear (boring!)
● Zombies represent mutations to your code
– Each successful test is represented with a step closer
– Kill them with failing unit tests
Interfaces available
● Nethack like representation
– @ human
– Z zombie
– * dying zombie
– + dead zombie
● GUI interface
– Gosu used
Disadvantages with Zombie-chaser
● Issues shared with chaser:
– Only modifies return values and yielded parameters
– Doesn't describe the mutations
● Additional issues
– Doesn't explicitly describe which test it failed, or
how
– Stops running after the first failed test
Possible TODOs
● Add color to console based output (make dying
zombies red)
● Make it work on more platforms
● Make it work with more testing frameworks
● Fix performance and threading bugs
● Provide information that's currently not provided
● Improve GUI metaphor
● Sound and music
Gratuitous violence and copyright violation
● See above

More Related Content

What's hot

Testing untestable code - STPCon11
Testing untestable code - STPCon11Testing untestable code - STPCon11
Testing untestable code - STPCon11Stephan Hochdörfer
 
JDD 2016 - Sebastian Malaca - You Dont Need Unit Tests
JDD 2016 - Sebastian Malaca - You Dont Need Unit TestsJDD 2016 - Sebastian Malaca - You Dont Need Unit Tests
JDD 2016 - Sebastian Malaca - You Dont Need Unit TestsPROIDEA
 
Testing Legacy Rails Apps
Testing Legacy Rails AppsTesting Legacy Rails Apps
Testing Legacy Rails AppsRabble .
 
TDD Walkthrough - Encryption
TDD Walkthrough - EncryptionTDD Walkthrough - Encryption
TDD Walkthrough - EncryptionPeterKha2
 
TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012Pietro Di Bello
 
Code refactoring workshop (in Javascript)
Code refactoring workshop (in Javascript)Code refactoring workshop (in Javascript)
Code refactoring workshop (in Javascript)Ilias Bartolini
 
Working With Legacy Code
Working With Legacy CodeWorking With Legacy Code
Working With Legacy CodeAndrea Polci
 
Groovy / comparison with java
Groovy / comparison with javaGroovy / comparison with java
Groovy / comparison with javaLiviu Tudor
 
[Webinar] Qt Test-Driven Development Using Google Test and Google Mock
[Webinar] Qt Test-Driven Development Using Google Test and Google Mock[Webinar] Qt Test-Driven Development Using Google Test and Google Mock
[Webinar] Qt Test-Driven Development Using Google Test and Google MockICS
 
An introduction to mutation testing
An introduction to mutation testingAn introduction to mutation testing
An introduction to mutation testingdavidmus
 
XPDays Ukraine: Legacy
XPDays Ukraine: LegacyXPDays Ukraine: Legacy
XPDays Ukraine: LegacyVictor_Cr
 
Mutation Testing
Mutation TestingMutation Testing
Mutation TestingESUG
 
C++ Unit Test with Google Testing Framework
C++ Unit Test with Google Testing FrameworkC++ Unit Test with Google Testing Framework
C++ Unit Test with Google Testing FrameworkHumberto Marchezi
 
Introduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed ShreefIntroduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed ShreefAhmed Shreef
 
Unit Test Your Database
Unit Test Your DatabaseUnit Test Your Database
Unit Test Your DatabaseDavid Wheeler
 
Refactoring legacy code driven by tests - ENG
Refactoring legacy code driven by tests - ENGRefactoring legacy code driven by tests - ENG
Refactoring legacy code driven by tests - ENGLuca Minudel
 

What's hot (19)

Testing untestable code - STPCon11
Testing untestable code - STPCon11Testing untestable code - STPCon11
Testing untestable code - STPCon11
 
JDD 2016 - Sebastian Malaca - You Dont Need Unit Tests
JDD 2016 - Sebastian Malaca - You Dont Need Unit TestsJDD 2016 - Sebastian Malaca - You Dont Need Unit Tests
JDD 2016 - Sebastian Malaca - You Dont Need Unit Tests
 
Testacular
TestacularTestacular
Testacular
 
Testing Legacy Rails Apps
Testing Legacy Rails AppsTesting Legacy Rails Apps
Testing Legacy Rails Apps
 
TDD Walkthrough - Encryption
TDD Walkthrough - EncryptionTDD Walkthrough - Encryption
TDD Walkthrough - Encryption
 
TDD & BDD
TDD & BDDTDD & BDD
TDD & BDD
 
TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012
 
Code refactoring workshop (in Javascript)
Code refactoring workshop (in Javascript)Code refactoring workshop (in Javascript)
Code refactoring workshop (in Javascript)
 
Working With Legacy Code
Working With Legacy CodeWorking With Legacy Code
Working With Legacy Code
 
Groovy / comparison with java
Groovy / comparison with javaGroovy / comparison with java
Groovy / comparison with java
 
[Webinar] Qt Test-Driven Development Using Google Test and Google Mock
[Webinar] Qt Test-Driven Development Using Google Test and Google Mock[Webinar] Qt Test-Driven Development Using Google Test and Google Mock
[Webinar] Qt Test-Driven Development Using Google Test and Google Mock
 
Zend Framework 2 - PHPUnit
Zend Framework 2 - PHPUnitZend Framework 2 - PHPUnit
Zend Framework 2 - PHPUnit
 
An introduction to mutation testing
An introduction to mutation testingAn introduction to mutation testing
An introduction to mutation testing
 
XPDays Ukraine: Legacy
XPDays Ukraine: LegacyXPDays Ukraine: Legacy
XPDays Ukraine: Legacy
 
Mutation Testing
Mutation TestingMutation Testing
Mutation Testing
 
C++ Unit Test with Google Testing Framework
C++ Unit Test with Google Testing FrameworkC++ Unit Test with Google Testing Framework
C++ Unit Test with Google Testing Framework
 
Introduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed ShreefIntroduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed Shreef
 
Unit Test Your Database
Unit Test Your DatabaseUnit Test Your Database
Unit Test Your Database
 
Refactoring legacy code driven by tests - ENG
Refactoring legacy code driven by tests - ENGRefactoring legacy code driven by tests - ENG
Refactoring legacy code driven by tests - ENG
 

Viewers also liked

Actividad 4.2 tic
Actividad 4.2 ticActividad 4.2 tic
Actividad 4.2 ticmirilenatic
 
Clasificación de las tic
Clasificación de las ticClasificación de las tic
Clasificación de las ticArmando Guerra
 
Principios para la selección y utilización de medios-TIC
Principios para la selección y utilización de medios-TICPrincipios para la selección y utilización de medios-TIC
Principios para la selección y utilización de medios-TICsofest
 
Кабидулова Гульдана+Ветеринарная клиника+Конкуренты
Кабидулова Гульдана+Ветеринарная клиника+КонкурентыКабидулова Гульдана+Ветеринарная клиника+Конкуренты
Кабидулова Гульдана+Ветеринарная клиника+КонкурентыГульдана Кабидулова
 
Emisor receptor
Emisor receptorEmisor receptor
Emisor receptorRalgloui16
 
Creative Team Building Perth
Creative Team Building PerthCreative Team Building Perth
Creative Team Building Perthsteve dalton
 
R & B Wheel Horse Stables - Standard Article - VGTCOA Show
R & B Wheel Horse Stables - Standard Article - VGTCOA ShowR & B Wheel Horse Stables - Standard Article - VGTCOA Show
R & B Wheel Horse Stables - Standard Article - VGTCOA ShowRBWheelHorseStables
 
2015-09-24 ASIP Santé RIR "Sensibiliser les usagers aux enjeux de la e-santé,...
2015-09-24 ASIP Santé RIR "Sensibiliser les usagers aux enjeux de la e-santé,...2015-09-24 ASIP Santé RIR "Sensibiliser les usagers aux enjeux de la e-santé,...
2015-09-24 ASIP Santé RIR "Sensibiliser les usagers aux enjeux de la e-santé,...ASIP Santé
 
2015-09-24 ASIP Santé RIR "MSSanté, présentation de l’annuaire des profession...
2015-09-24 ASIP Santé RIR "MSSanté, présentation de l’annuaire des profession...2015-09-24 ASIP Santé RIR "MSSanté, présentation de l’annuaire des profession...
2015-09-24 ASIP Santé RIR "MSSanté, présentation de l’annuaire des profession...ASIP Santé
 
Mapa "Inteligencia Emocional de Daniel Goleman" 4
Mapa "Inteligencia Emocional de Daniel Goleman" 4Mapa "Inteligencia Emocional de Daniel Goleman" 4
Mapa "Inteligencia Emocional de Daniel Goleman" 4Eduardo Avila
 
Guía didáctica m tic 2
Guía didáctica m tic 2Guía didáctica m tic 2
Guía didáctica m tic 2sofest
 

Viewers also liked (14)

Actividad 4.2 tic
Actividad 4.2 ticActividad 4.2 tic
Actividad 4.2 tic
 
Clasificación de las tic
Clasificación de las ticClasificación de las tic
Clasificación de las tic
 
Principios para la selección y utilización de medios-TIC
Principios para la selección y utilización de medios-TICPrincipios para la selección y utilización de medios-TIC
Principios para la selección y utilización de medios-TIC
 
Кабидулова Гульдана+Ветеринарная клиника+Конкуренты
Кабидулова Гульдана+Ветеринарная клиника+КонкурентыКабидулова Гульдана+Ветеринарная клиника+Конкуренты
Кабидулова Гульдана+Ветеринарная клиника+Конкуренты
 
Emisor receptor
Emisor receptorEmisor receptor
Emisor receptor
 
Creative Team Building Perth
Creative Team Building PerthCreative Team Building Perth
Creative Team Building Perth
 
Flip side of fat pay
Flip side of fat payFlip side of fat pay
Flip side of fat pay
 
R & B Wheel Horse Stables - Standard Article - VGTCOA Show
R & B Wheel Horse Stables - Standard Article - VGTCOA ShowR & B Wheel Horse Stables - Standard Article - VGTCOA Show
R & B Wheel Horse Stables - Standard Article - VGTCOA Show
 
Työsuhteen päättyminen ja työntekijän oikeudet
Työsuhteen päättyminen ja työntekijän oikeudetTyösuhteen päättyminen ja työntekijän oikeudet
Työsuhteen päättyminen ja työntekijän oikeudet
 
2015-09-24 ASIP Santé RIR "Sensibiliser les usagers aux enjeux de la e-santé,...
2015-09-24 ASIP Santé RIR "Sensibiliser les usagers aux enjeux de la e-santé,...2015-09-24 ASIP Santé RIR "Sensibiliser les usagers aux enjeux de la e-santé,...
2015-09-24 ASIP Santé RIR "Sensibiliser les usagers aux enjeux de la e-santé,...
 
2015-09-24 ASIP Santé RIR "MSSanté, présentation de l’annuaire des profession...
2015-09-24 ASIP Santé RIR "MSSanté, présentation de l’annuaire des profession...2015-09-24 ASIP Santé RIR "MSSanté, présentation de l’annuaire des profession...
2015-09-24 ASIP Santé RIR "MSSanté, présentation de l’annuaire des profession...
 
Mapa "Inteligencia Emocional de Daniel Goleman" 4
Mapa "Inteligencia Emocional de Daniel Goleman" 4Mapa "Inteligencia Emocional de Daniel Goleman" 4
Mapa "Inteligencia Emocional de Daniel Goleman" 4
 
Marketing politico taller jovenes
Marketing politico taller jovenesMarketing politico taller jovenes
Marketing politico taller jovenes
 
Guía didáctica m tic 2
Guía didáctica m tic 2Guía didáctica m tic 2
Guía didáctica m tic 2
 

Similar to Zombie chaser 0.1

Writing Tests with the Unity Test Framework
Writing Tests with the Unity Test FrameworkWriting Tests with the Unity Test Framework
Writing Tests with the Unity Test FrameworkPeter Kofler
 
Unit testing legacy code
Unit testing legacy codeUnit testing legacy code
Unit testing legacy codeLars Thorup
 
Test automation expert days
Test automation   expert daysTest automation   expert days
Test automation expert daysOren Rubin
 
Best practices for ansible
Best practices for ansibleBest practices for ansible
Best practices for ansibleGeorge Shuklin
 
Creating a mature puppet system
Creating a mature puppet systemCreating a mature puppet system
Creating a mature puppet systemrkhatibi
 
Creating a Mature Puppet System
Creating a Mature Puppet SystemCreating a Mature Puppet System
Creating a Mature Puppet SystemPuppet
 
Property-based testing an open-source compiler, pflua (FOSDEM 2015)
Property-based testing an open-source compiler, pflua (FOSDEM 2015)Property-based testing an open-source compiler, pflua (FOSDEM 2015)
Property-based testing an open-source compiler, pflua (FOSDEM 2015)Igalia
 
Test-Driven Development (TDD) in Swift
Test-Driven Development (TDD) in SwiftTest-Driven Development (TDD) in Swift
Test-Driven Development (TDD) in SwiftAmey Tavkar
 
A la découverte des google/mock (aka gmock)
A la découverte des google/mock (aka gmock)A la découverte des google/mock (aka gmock)
A la découverte des google/mock (aka gmock)Thierry Gayet
 
Test driven development - Zombie proof your code
Test driven development - Zombie proof your codeTest driven development - Zombie proof your code
Test driven development - Zombie proof your codePascal Larocque
 
Introduction of Tools for providing rich user experience in debugger
Introduction of Tools for providing rich user experience in debuggerIntroduction of Tools for providing rich user experience in debugger
Introduction of Tools for providing rich user experience in debuggerNaoto Ono
 
2016 10-04: tdd++: tdd made easier
2016 10-04: tdd++: tdd made easier2016 10-04: tdd++: tdd made easier
2016 10-04: tdd++: tdd made easierChristian Hujer
 
Best practices for JavaScript RIAs
Best practices for JavaScript RIAsBest practices for JavaScript RIAs
Best practices for JavaScript RIAsCarlos Ble
 
JUnit 4 Can it still teach us something? - Andrzej Jóźwiak - Kariera IT Łodź ...
JUnit 4 Can it still teach us something? - Andrzej Jóźwiak - Kariera IT Łodź ...JUnit 4 Can it still teach us something? - Andrzej Jóźwiak - Kariera IT Łodź ...
JUnit 4 Can it still teach us something? - Andrzej Jóźwiak - Kariera IT Łodź ...Andrzej Jóźwiak
 
Lessons Learned When Automating
Lessons Learned When AutomatingLessons Learned When Automating
Lessons Learned When AutomatingAlan Richardson
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Lars Thorup
 

Similar to Zombie chaser 0.1 (20)

Writing Tests with the Unity Test Framework
Writing Tests with the Unity Test FrameworkWriting Tests with the Unity Test Framework
Writing Tests with the Unity Test Framework
 
Unit testing legacy code
Unit testing legacy codeUnit testing legacy code
Unit testing legacy code
 
Test automation expert days
Test automation   expert daysTest automation   expert days
Test automation expert days
 
Best practices for ansible
Best practices for ansibleBest practices for ansible
Best practices for ansible
 
Creating a mature puppet system
Creating a mature puppet systemCreating a mature puppet system
Creating a mature puppet system
 
Creating a Mature Puppet System
Creating a Mature Puppet SystemCreating a Mature Puppet System
Creating a Mature Puppet System
 
Ui Testing with Ghost Inspector
Ui Testing with Ghost InspectorUi Testing with Ghost Inspector
Ui Testing with Ghost Inspector
 
Property-based testing an open-source compiler, pflua (FOSDEM 2015)
Property-based testing an open-source compiler, pflua (FOSDEM 2015)Property-based testing an open-source compiler, pflua (FOSDEM 2015)
Property-based testing an open-source compiler, pflua (FOSDEM 2015)
 
Test-Driven Development (TDD) in Swift
Test-Driven Development (TDD) in SwiftTest-Driven Development (TDD) in Swift
Test-Driven Development (TDD) in Swift
 
Tdd in swift
Tdd in swiftTdd in swift
Tdd in swift
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
MSL2008. Debugging
MSL2008. DebuggingMSL2008. Debugging
MSL2008. Debugging
 
A la découverte des google/mock (aka gmock)
A la découverte des google/mock (aka gmock)A la découverte des google/mock (aka gmock)
A la découverte des google/mock (aka gmock)
 
Test driven development - Zombie proof your code
Test driven development - Zombie proof your codeTest driven development - Zombie proof your code
Test driven development - Zombie proof your code
 
Introduction of Tools for providing rich user experience in debugger
Introduction of Tools for providing rich user experience in debuggerIntroduction of Tools for providing rich user experience in debugger
Introduction of Tools for providing rich user experience in debugger
 
2016 10-04: tdd++: tdd made easier
2016 10-04: tdd++: tdd made easier2016 10-04: tdd++: tdd made easier
2016 10-04: tdd++: tdd made easier
 
Best practices for JavaScript RIAs
Best practices for JavaScript RIAsBest practices for JavaScript RIAs
Best practices for JavaScript RIAs
 
JUnit 4 Can it still teach us something? - Andrzej Jóźwiak - Kariera IT Łodź ...
JUnit 4 Can it still teach us something? - Andrzej Jóźwiak - Kariera IT Łodź ...JUnit 4 Can it still teach us something? - Andrzej Jóźwiak - Kariera IT Łodź ...
JUnit 4 Can it still teach us something? - Andrzej Jóźwiak - Kariera IT Łodź ...
 
Lessons Learned When Automating
Lessons Learned When AutomatingLessons Learned When Automating
Lessons Learned When Automating
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)
 

More from Andrew Grimm

Finding Japanese Flatmates with Ruby (English and Japanese)
Finding Japanese Flatmates with Ruby (English and Japanese)Finding Japanese Flatmates with Ruby (English and Japanese)
Finding Japanese Flatmates with Ruby (English and Japanese)Andrew Grimm
 
Git Tips and Tricks
Git Tips and TricksGit Tips and Tricks
Git Tips and TricksAndrew Grimm
 
Tootle returning to rails
Tootle returning to railsTootle returning to rails
Tootle returning to railsAndrew Grimm
 
Finding Japanese flatmates with Ruby
Finding Japanese flatmates with RubyFinding Japanese flatmates with Ruby
Finding Japanese flatmates with RubyAndrew Grimm
 
YHA Japan travel night (internet version)
YHA Japan travel night (internet version)YHA Japan travel night (internet version)
YHA Japan travel night (internet version)Andrew Grimm
 
Curing AIDS, with programming
Curing AIDS, with programmingCuring AIDS, with programming
Curing AIDS, with programmingAndrew Grimm
 
Avoiding niseko syndrome
Avoiding niseko syndromeAvoiding niseko syndrome
Avoiding niseko syndromeAndrew Grimm
 
Curing AIDS, with programming
Curing AIDS, with programmingCuring AIDS, with programming
Curing AIDS, with programmingAndrew Grimm
 
Memoirs of a programmer (internet version)
Memoirs of a programmer (internet version)Memoirs of a programmer (internet version)
Memoirs of a programmer (internet version)Andrew Grimm
 
Japanese: a programmers language
Japanese: a programmers languageJapanese: a programmers language
Japanese: a programmers languageAndrew Grimm
 
Ruby for newbies Lake Ainsworth
Ruby for newbies Lake AinsworthRuby for newbies Lake Ainsworth
Ruby for newbies Lake AinsworthAndrew Grimm
 
Ruby 1.8.8 and professor
Ruby 1.8.8 and professorRuby 1.8.8 and professor
Ruby 1.8.8 and professorAndrew Grimm
 
Sapporo ruby kaigi
Sapporo ruby kaigiSapporo ruby kaigi
Sapporo ruby kaigiAndrew Grimm
 
How to talk like a ge1sha
How to talk like a ge1shaHow to talk like a ge1sha
How to talk like a ge1shaAndrew Grimm
 
All I want for Matz-mas
All I want for Matz-masAll I want for Matz-mas
All I want for Matz-masAndrew Grimm
 
Mistakes I have made
Mistakes I have madeMistakes I have made
Mistakes I have madeAndrew Grimm
 
Nihon go do you speak it
Nihon go do you speak itNihon go do you speak it
Nihon go do you speak itAndrew Grimm
 

More from Andrew Grimm (20)

Finding Japanese Flatmates with Ruby (English and Japanese)
Finding Japanese Flatmates with Ruby (English and Japanese)Finding Japanese Flatmates with Ruby (English and Japanese)
Finding Japanese Flatmates with Ruby (English and Japanese)
 
Git Tips and Tricks
Git Tips and TricksGit Tips and Tricks
Git Tips and Tricks
 
RuboCop
RuboCopRuboCop
RuboCop
 
Tootle returning to rails
Tootle returning to railsTootle returning to rails
Tootle returning to rails
 
Finding Japanese flatmates with Ruby
Finding Japanese flatmates with RubyFinding Japanese flatmates with Ruby
Finding Japanese flatmates with Ruby
 
YHA Japan travel night (internet version)
YHA Japan travel night (internet version)YHA Japan travel night (internet version)
YHA Japan travel night (internet version)
 
Curing AIDS, with programming
Curing AIDS, with programmingCuring AIDS, with programming
Curing AIDS, with programming
 
Avoiding niseko syndrome
Avoiding niseko syndromeAvoiding niseko syndrome
Avoiding niseko syndrome
 
Curing AIDS, with programming
Curing AIDS, with programmingCuring AIDS, with programming
Curing AIDS, with programming
 
Memoirs of a programmer (internet version)
Memoirs of a programmer (internet version)Memoirs of a programmer (internet version)
Memoirs of a programmer (internet version)
 
Rubyist in oz
Rubyist in ozRubyist in oz
Rubyist in oz
 
Japanese: a programmers language
Japanese: a programmers languageJapanese: a programmers language
Japanese: a programmers language
 
Ruby for newbies Lake Ainsworth
Ruby for newbies Lake AinsworthRuby for newbies Lake Ainsworth
Ruby for newbies Lake Ainsworth
 
Ruby 1.8.8 and professor
Ruby 1.8.8 and professorRuby 1.8.8 and professor
Ruby 1.8.8 and professor
 
Sapporo ruby kaigi
Sapporo ruby kaigiSapporo ruby kaigi
Sapporo ruby kaigi
 
How to talk like a ge1sha
How to talk like a ge1shaHow to talk like a ge1sha
How to talk like a ge1sha
 
All I want for Matz-mas
All I want for Matz-masAll I want for Matz-mas
All I want for Matz-mas
 
Mistakes I have made
Mistakes I have madeMistakes I have made
Mistakes I have made
 
Ampersand method
Ampersand methodAmpersand method
Ampersand method
 
Nihon go do you speak it
Nihon go do you speak itNihon go do you speak it
Nihon go do you speak it
 

Recently uploaded

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 

Recently uploaded (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 

Zombie chaser 0.1

  • 1. Zombie-chaser 0.1 Going beyond skin deep Andrew Grimm University of New South Wales
  • 2. Overview ● Gratuitous violence and copyright violation ● Unit testing ● Mutation testing ● Heckle ● Chaser ● Zombie-chaser ● Gratuitous violence and copyright violation
  • 3. Gratuitous violence and copyright violation ● See above
  • 4. We don't test code ● I get a specification from my boss ● I spend a couple of weeks writing on my typewriter ● Fax it to the client ● They scan it in ● It runs first time ● And does what they wanted ● This DOESN'T happen
  • 5. We all test code somehow ● SFTP code.php, make a few edits, SFTP it back to the production server, view it in your browser – This DOES happen ● svn update, make a few changes, try it on a development web server, don't spot anything wrong, push to production – Better ● git clone, add new test, add new code, check all tests pass, push to production – Yay!!
  • 6. Automated testing ● Term “Unit testing” sometimes misused ● Technically means testing a small portion of your code ● Nowadays used to mean automated testing ● Sometimes automated testing is the lazier option than manual testing even in the short-term
  • 7. Automated testing = exomemory ● Your code is thousands of lines long – You can't memorize your code ● Requirements change from the original – You can't write once, try it out, and never touch it again ● You can't email past-self – The code itself needs to know what's right and wrong
  • 8. An example of a test ● Given I am a fake Canadian motorcade at the 2007 APEC summit ● When I supply obviously bogus credentials to security ● Then I should not be let in to the green zone
  • 9. Mutation testing ● Evaluates thoroughness of testing ● If your code is modified, it ought to fail some of its tests
  • 10. Example of a mutation ● Modifying an APEC credential verification method, such that it regards an invalid pass as valid and/or vice versa
  • 11. Heckle ● Main mutation tester in ruby ● Name derived from Jester (Java mutation tester) ● Uses ParseTree and ruby2ruby ● Mutates literals (eg strings) and branches (eg swaps “if”s with “unless”s) ● Parses the program, makes changes to the parse tree, and builds the new program
  • 12. Heckle pros and cons ● Best mutator out there ● Except when it's not available – Doesn't work with default version of ruby on Windows – ParseTree doesn't work on ruby 1.9 – Plans to replace ParseTree with RubyParser, which does work on ruby 1.9
  • 13. Chaser ● Modified version of heckle ● Named after the ABC comedy team, best known for a penetration test that went horribly right ● Created to deal with unavailability of heckle on Windows (which I no longer need) ● Uses metaprogramming to modify methods ● Intended to run under anything that's ruby ● Runs test/unit and my fork of exemplor
  • 14. Chaser metaprogramming def modify_instance_method chaser = self @mutated = true @old_method = @klass.instance_method(@method_name) @klass.class_eval do remove_method(chaser.method_name) define_method(chaser.method_name) do (*args) original_value = chaser.old_method.bind(self).call(*args) chaser.mutate_value(original_value) end end end
  • 15. Chaser disadvantages ● Only modifies return values (and yielded parameters) ● Methods with side-effects will work as normal ● Ability to not call a method at all could be added ● Doesn't mutate every line ● Currently doesn't describe the mutations being done – May be difficult task
  • 16. Availability of chaser ● Chaser (actually zombie-chaser) works on: ● *nix 1.8 and 1.9 ● Windows 1.8 and 1.9 ● JRuby 1.8 only – Haven't got to the bottom yet for 1.9 (see next slide) ● MacRuby: We broke it good! (see following slide) ● Haven't tried IronRuby, Rubinius, or other platforms
  • 17. Availability of chaser: JRuby 1.9 Andrew-Grimms-MacBook-Pro:zombie-chaser agrimm$ jruby --1.9 -Ilib bin/zombie-chaser /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/fixture.rb:11:in `included' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:64:in `call' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:64:in `set_attributes' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:61:in `each' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:61:in `set_attributes' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:58:in `each' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:58:in `set_attributes' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:42:in `attribute' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:41:in `each' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:41:in `attribute' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/fixture.rb:76:in `register_fixture' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/fixture.rb:24:in `setup' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/priority.rb:9:in `included' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/priority.rb:8:in `class_eval' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/priority.rb:8:in `included' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/testcase.rb:82 /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/testcase.rb:31:in `require' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit.rb:1 /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit.rb:31:in `require' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/ui/testrunnermediator.rb:7 /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/ui/testrunnermediator.rb:31:in `require' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' /Users/agrimm/ruby/zombie-chaser/lib/zombie-chaser/zombie_test_chaser.rb:4 /Users/agrimm/ruby/zombie-chaser/lib/zombie-chaser/zombie_test_chaser.rb:31:in `require' /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' bin/zombie-chaser:4 /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/fixture.rb:11:in `included': undefined method `unregister_setup_method' for nil:NilClass (NoMethodError) from /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:64:in `call' from /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:64:in `set_attributes' from /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:61:in `each' from /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:61:in `set_attributes' from /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:58:in `each' from /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:58:in `set_attributes' from /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:42:in `attribute' from /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/test-unit-2.0.7/lib/test/unit/attribute.rb:41:in `each' ... 16 levels... from /Users/agrimm/ruby/zombie-chaser/lib/zombie-chaser/zombie_test_chaser.rb:31:in `require' from /Users/agrimm/ruby/jruby/jruby-1.4.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from bin/zombie-chaser:4
  • 18. Availability of chaser: MacRuby Not even close! [1] % ruby -Ilib -Itest -rrubygems test/test_unit.rb ~/Code/zombie-chaser /Users/pete/Code/zombie-chaser/test/test_unit.rb:1:in `<main>': unrecognized runtime type `' (TypeError) [1] % ruby -v ~/Code/zombie-chaser MacRuby version 0.6 (ruby 1.9.0) [universal-darwin10.0, x86_64] And no, we don't recognize the runtime type either! Thanks to Peter Hollows for running zombie-chaser on his box
  • 19. Zombie-chaser ● Graphic(al) user interface for mutation testing ● Incorporated code from Chris Lloyd (et al)'s brains ● Ryan Bigg demonstrated zombino, a brains-based game he created because brains wasn't working ● psDooM, a Doom interface to sysadmin, was also an inspiration
  • 20. Gooey metaphor ● Human running across the screen represents running of your unit tests with unmodified code – Equivalent to a “control” in a scientific experiment – Fail any tests, and the human dies before zombies appear (boring!) ● Zombies represent mutations to your code – Each successful test is represented with a step closer – Kill them with failing unit tests
  • 21. Interfaces available ● Nethack like representation – @ human – Z zombie – * dying zombie – + dead zombie ● GUI interface – Gosu used
  • 22. Disadvantages with Zombie-chaser ● Issues shared with chaser: – Only modifies return values and yielded parameters – Doesn't describe the mutations ● Additional issues – Doesn't explicitly describe which test it failed, or how – Stops running after the first failed test
  • 23. Possible TODOs ● Add color to console based output (make dying zombies red) ● Make it work on more platforms ● Make it work with more testing frameworks ● Fix performance and threading bugs ● Provide information that's currently not provided ● Improve GUI metaphor ● Sound and music
  • 24. Gratuitous violence and copyright violation ● See above