SlideShare ist ein Scribd-Unternehmen logo
1 von 39
Downloaden Sie, um offline zu lesen
TAP in Depth
                        Michael Peters
                             Plus Three, LP




YAPC::NA 10
Pittsburgh, PA
TAP
Test Anything Protocol
 ●   And we do mean *anything*
      ●   Mainly used for regression testing code
      ●   Could be used for systems monitoring,
          performance testing, etc
 ●   1987, current version 13
 ●   Patient Zero was Perl, but the infection has since
     spread to lots of other languages
 ●   Ongoing work to make an IETF standard
Definitions
Test
 ●   or an "assertion" (ok/not ok)
 ●   smallest granule of measurement
 ●   did it do what we wanted
Stream
 ●   or a "set"
 ●   a group of tests
 ●   usually output of running a single test file, but is not
     necessarily tied to a file or any specific output.
Test Suite
 ●   A group of TAP streams
Definitions
Harness
 ●   A process which collects a group of TAP streams
Plan
 ●   number of tests that are expected to be run in a given
     stream
Directive
 ●   Changes the meaning of a given test
 ●   TODO/SKIP
Reason
 ●   Explains the "why" of a directive
Definitions
Description
 ●   What is the test asserting? What functionality is
     being tested?
Producer
 ●   Anything that generates TAP
Consumer
 ●   Anything that processes TAP
      ●   Could just blindly echo it
      ●   Usually parses it
Document Structure
TAP version 13
1..7
ok 1 - Input file opened
not ok 2 - First line of the input valid
ok 3 - Read the rest of the file
# Can't load Digest::MD5. This modules is needed
# to run some optional tests
ok 4 # SKIP MD5 library not installed
ok 5 # SKIP MD5 library not installed
not ok 6 - Correct summary # TODO Not written yet
ok 7 - File closed
Document Structure
Line Oriented Protocol
 ●   Everything is separated by a new-line (CRLF)
 ●   Not everything fits on 1 line
 ●   Everything starts and ends on it's own line
Encoding
 ●   Everything is UTF-8
 ●   Unless the Producer/Consumer agree otherwise
1 Version, 1* plans, 0+ tests,
0* comments, 0* ignored elements
Document Structure
TAP version 13
1..7
ok 1 - Input file opened
not ok 2 - First line of the input valid
ok 3 - Read the rest of the file
# Can't load Digest::MD5. This modules is needed
# to run some optional tests
ok 4 # SKIP MD5 library not installed
ok 5 # SKIP MD5 library not installed
not ok 6 - Correct summary # TODO Not written yet
ok 7 - File closed
Document Structure
TAP version 13
1..7
ok 1 - Input file opened
not ok 2 - First line of the input valid
ok 3 - Read the rest of the file
# Can't load Digest::MD5. This modules is needed
# to run some optional tests
ok 4 # SKIP MD5 library not installed
ok 5 # SKIP MD5 library not installed
not ok 6 - Correct summary # TODO Not written yet
ok 7 - File closed
Document Structure
TAP version 13
1..7
ok 1 - Input file opened
not ok 2 - First line of the input valid
ok 3 - Read the rest of the file
# Can't load Digest::MD5. This modules is needed
# to run some optional tests
ok 4 # SKIP MD5 library not installed
ok 5 # SKIP MD5 library not installed
not ok 6 - Correct summary # TODO Not written yet
ok 7 - File closed
Document Structure
TAP version 13
1..7
ok 1 - Input file opened
not ok 2 - First line of the input valid
ok 3 - Read the rest of the file
# Can't load Digest::MD5. This modules is needed
# to run some optional tests
ok 4 # SKIP MD5 library not installed
ok 5 # SKIP MD5 library not installed
not ok 6 - Correct summary # TODO Not written yet
ok 7 - File closed
Document Structure
TAP version 13
1..7
ok 1 - Input file opened
not ok 2 - First line of the input valid
ok 3 - Read the rest of the file
# Can't load Digest::MD5. This modules is needed
# to run some optional tests
ok 4 # SKIP MD5 library not installed
ok 5 # SKIP MD5 library not installed
not ok 6 - Correct summary # TODO Not written yet
ok 7 - File closed
Document Structure
TAP version 13
1..7
ok 1 - Input file opened
not ok 2 - First line of the input valid
ok 3 - Read the rest of the file
# Can't load Digest::MD5. This modules is needed
# to run some optional tests
ok 4 # SKIP MD5 library not installed
ok 5 # SKIP MD5 library not installed
not ok 6 - Correct summary # TODO Not written yet
ok 7 - File closed
Document Structure
TAP version 13
1..7
ok 1 - Input file opened
not ok 2 - First line of the input valid
ok 3 - Read the rest of the file
# Can't load Digest::MD5. This modules is needed
# to run some optional tests
ok 4 # SKIP MD5 library not installed
ok 5 # SKIP MD5 library not installed
not ok 6 - Correct summary # TODO Not written yet
ok 7 - File closed
Document Structure
TAP version 13
1..7
ok 1 - Input file opened
not ok 2 - First line of the input valid
ok 3 - Read the rest of the file
# Can't load Digest::MD5. This modules is needed
# to run some optional tests
ok 4 # SKIP MD5 library not installed
ok 5 # SKIP MD5 library not installed
not ok 6 - Correct summary # TODO Not written yet
ok 7 - File closed
Document Structure
TAP version 13
1..7
ok 1 - Input file opened
not ok 2 - First line of the input valid
ok 3 - Read the rest of the file
# Can't load Digest::MD5. This modules is needed
# to run some optional tests
ok 4 # SKIP MD5 library not installed
ok 5 # SKIP MD5 library not installed
not ok 6 - Correct summary # TODO Not written yet
ok 7 - File closed
Document Structure
TAP version 13
1..7
ok 1 - Input file opened
not ok 2 - First line of the input valid
ok 3 - Read the rest of the file
# Can't load Digest::MD5. This modules is needed
# to run some optional tests
ok 4 # SKIP MD5 library not installed
ok 5 # SKIP MD5 library not installed
not ok 6 - Correct summary # TODO Not written yet
ok 7 - File closed
Document Structure
TAP version 13
1..7
ok 1 - Input file opened
not ok 2 - First line of the input valid
ok 3 - Read the rest of the file
# Can't load Digest::MD5. This modules is needed
# to run some optional tests
ok 4 # SKIP MD5 library not installed
ok 5 # SKIP MD5 library not installed
not ok 6 - Correct summary # TODO Not written yet
ok 7 - File closed
Pass vs Fail
Tests
 ●   "ok" == pass
 ●   "not ok" == fail
 ●   Yay! binary!
Pass vs Fail
Tests
 ●   "ok" == pass
 ●   "not ok" == fail
 ●   If only it were that simple
 ●   Directives!

            Normal                 TODO                SKIP

             ok                     pass *               pass

             not ok                 pass                 fail **

 * a passing TODO might indicate that a test shouldn't be a TODO anymore
 ** SKIP means the test wasn't run, so it shouldn't be able to fail
Pass vs Fail
Streams
●   Can fail if any of the following are true
    (1) Any tests in this stream failed
    (2) Tests run did not agree with the plan
    (3) Other factors
         ●   process exit codes (non-zero)
         ●   HTTP status code
●   Passed only if none of the above are true and
    (1) There was at least 1 passing test - or -
    (2) There was a "skip all"
     ●   1..0 # SKIP some module not installed
Pass vs Fail
Test Suites
 ●   Fails if there are any streams that failed
 ●   Passes if nothing failed and there's at least 1 stream
 ●   Pass or fail at the suite level is boolean
      ●   Tools can show percentages
      ●   But even a 99.999% pass is still a fail
Producing
Perl Modules
 ●   Test::More (classic and for good reasons)
Producing
Perl Modules
 ●   Test::More (classic and for good reasons)
 ●   Test::Builder
Producing
Perl Modules
 ●   Test::More (classic and for good reasons)
 ●   Test::Builder
 ●   Test::Most
Producing
Perl Modules
 ●   Test::More (classic and for good reasons)
 ●   Test::Builder
 ●   Test::Most
 ●   Test::Class
Producing
Perl Modules
 ●   Test::More (classic and for good reasons)
 ●   Test::Builder
 ●   Test::Most
 ●   Test::Class
 ●   Test::LongString, Test::WWW::Mechanize,
     Test::Exception, Test::File::Contents,
     Test::HTML::Content, Test::MockObject, Test::Pod,
     Test::Warn, Test::WWW::Selenium,
     Test::NoWarnings, Test::Output,
     Test::Number::Delta, Test::Perl::Critic
Producing
Other Languages
●   Javascript →Test.Simple
●   C/C++ →libtap, libtap++
●   PHP → phpt, PHPUnit, SimpleTest or Apache-Test
●   Java →JTap
●   Ruby →taptap, Bacon
●   Python → PyTAP
●   Also Haskell, Erlang, Forth, C#, Shell, Postgres
Consuming
Perl
 ●   Test::Harness
 ●   prove
 ●   TAP::Harness
 ●   TAP::Harness::Archive
 ●   GUI Test Runner
 ●   Smolder
Comming Soon to a terminal near you
Nested TAP
●   Group related blocks of TAP together in the same
    stream
    ●   Mimic xUnit style
    ●   Aggregate TAP streams
Comming Soon to a terminal near you
Nested TAP
 1..3
     1..3
     ok 1 - guests arrived on time
     ok 2 - table was available
     ok 3 - order correct
 ok 1 - guests served
     1..2
     ok 1 - chicken is fried
     not ok - steak is medium well
 not ok 1 - food prepared properly
     1..2
     ok 1 # SKIP guests did not come back
     ok 2 # SKIP guests did not come back
 ok 1 # SKIP guests did not come back
Comming Soon to a terminal near you
Metadata
●   Everything is crammed into the descriptions or
    comments
    not   ok - fooey, Bug #123
    #     Failed test 'fooey, Bug #123'
    #     at barry.pl line 20.
    #     got: foo bar
    #     expected: bar foo
●   If you want to do anything useful with the information
    in that message you need to parse it. Parsing error
    messages is evil
Comming Soon to a terminal near you
Metadata
●Data should be structured (YAML-ish)
 not ok - fooey
 ---
 file     : barry.pl
 line     : 20
 want     : foo bar
 have     : bar foo
 display : >
     Failed test 'fooey' at barry.pl line 20.
     want: "foo bar"
     have: "bar foo"
 Bug-ID : 123
...
Comming Soon to a terminal near you
Metadata
●   Opens up a whole world of possibilities
     ●   Visual diffs on want/have
     ●   Tagging
     ●   Linking between systems (source code, specs, issue
         tracking)
●   Consumers can show or hide what ever they want or
    understand.
●   Unknown uses (standardization vs growth)
Usage Scenarios

Typical Perl tests
Usage Scenarios

Automated Javascript Testing




* example from Michael Schwern - http://use.perl.org/~schwern/journal/39092
Usage Scenarios

Automated Javascript Testing
Usage Scenarios

Automated Javascript Testing
TAP in Depth
             Michael Peters
                  Plus Three, LP




 Thanks!
Questions?

Weitere ähnliche Inhalte

Was ist angesagt?

My talk on Piter Py 2016
My talk on Piter Py 2016My talk on Piter Py 2016
My talk on Piter Py 2016Alex Chistyakov
 
TDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and GomegaTDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and GomegaEddy Reyes
 
Beginning with Composer - Dependency manager in php
Beginning with Composer  - Dependency manager in php Beginning with Composer  - Dependency manager in php
Beginning with Composer - Dependency manager in php Yogesh Salvi
 
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
 
ARB_gl_spirv implementation in Mesa: status update (XDC 2018)
ARB_gl_spirv implementation in Mesa: status update (XDC 2018)ARB_gl_spirv implementation in Mesa: status update (XDC 2018)
ARB_gl_spirv implementation in Mesa: status update (XDC 2018)Igalia
 
Creating a reasonable project boilerplate
Creating a reasonable project boilerplateCreating a reasonable project boilerplate
Creating a reasonable project boilerplateStanislav Petrov
 
Go Programming language, golang
Go Programming language, golangGo Programming language, golang
Go Programming language, golangBasil N G
 
Cpp Testing Techniques Tips and Tricks - Cpp Europe
Cpp Testing Techniques Tips and Tricks - Cpp EuropeCpp Testing Techniques Tips and Tricks - Cpp Europe
Cpp Testing Techniques Tips and Tricks - Cpp EuropeClare Macrae
 
Introduction of Distributed version control system (mainly Mercurial)
Introduction of Distributed version control system (mainly Mercurial)Introduction of Distributed version control system (mainly Mercurial)
Introduction of Distributed version control system (mainly Mercurial)Fred Lin
 
Clang Analyzer Tool Review
Clang Analyzer Tool ReviewClang Analyzer Tool Review
Clang Analyzer Tool ReviewDoug Schuster
 
Testing cloud and kubernetes applications - ElasTest
Testing cloud and kubernetes applications - ElasTestTesting cloud and kubernetes applications - ElasTest
Testing cloud and kubernetes applications - ElasTestMicael Gallego
 
Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev
 Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev
Making Your Own Static Analyzer Using Freud DSL. Marat VyshegorodtsevYandex
 
Funcargs & other fun with pytest
Funcargs & other fun with pytestFuncargs & other fun with pytest
Funcargs & other fun with pytestBrianna Laugher
 
MUTANTS KILLER - PIT: state of the art of mutation testing system
MUTANTS KILLER - PIT: state of the art of mutation testing system MUTANTS KILLER - PIT: state of the art of mutation testing system
MUTANTS KILLER - PIT: state of the art of mutation testing system Tarin Gamberini
 
Google hangouts test ppt
Google hangouts test pptGoogle hangouts test ppt
Google hangouts test pptIan Nagy
 
Testing, Learning and Professionalism — 20171214
Testing, Learning and Professionalism — 20171214Testing, Learning and Professionalism — 20171214
Testing, Learning and Professionalism — 20171214David Rodenas
 
Golang 101
Golang 101Golang 101
Golang 101宇 傅
 
The Ring programming language version 1.6 book - Part 181 of 189
The Ring programming language version 1.6 book - Part 181 of 189The Ring programming language version 1.6 book - Part 181 of 189
The Ring programming language version 1.6 book - Part 181 of 189Mahmoud Samir Fayed
 

Was ist angesagt? (20)

My talk on Piter Py 2016
My talk on Piter Py 2016My talk on Piter Py 2016
My talk on Piter Py 2016
 
TDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and GomegaTDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and Gomega
 
Beginning with Composer - Dependency manager in php
Beginning with Composer  - Dependency manager in php Beginning with Composer  - Dependency manager in php
Beginning with Composer - Dependency manager in php
 
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
 
Mutation testing in Java
Mutation testing in JavaMutation testing in Java
Mutation testing in Java
 
ARB_gl_spirv implementation in Mesa: status update (XDC 2018)
ARB_gl_spirv implementation in Mesa: status update (XDC 2018)ARB_gl_spirv implementation in Mesa: status update (XDC 2018)
ARB_gl_spirv implementation in Mesa: status update (XDC 2018)
 
Creating a reasonable project boilerplate
Creating a reasonable project boilerplateCreating a reasonable project boilerplate
Creating a reasonable project boilerplate
 
Go Programming language, golang
Go Programming language, golangGo Programming language, golang
Go Programming language, golang
 
Cpp Testing Techniques Tips and Tricks - Cpp Europe
Cpp Testing Techniques Tips and Tricks - Cpp EuropeCpp Testing Techniques Tips and Tricks - Cpp Europe
Cpp Testing Techniques Tips and Tricks - Cpp Europe
 
Introduction of Distributed version control system (mainly Mercurial)
Introduction of Distributed version control system (mainly Mercurial)Introduction of Distributed version control system (mainly Mercurial)
Introduction of Distributed version control system (mainly Mercurial)
 
Clang Analyzer Tool Review
Clang Analyzer Tool ReviewClang Analyzer Tool Review
Clang Analyzer Tool Review
 
Testing cloud and kubernetes applications - ElasTest
Testing cloud and kubernetes applications - ElasTestTesting cloud and kubernetes applications - ElasTest
Testing cloud and kubernetes applications - ElasTest
 
Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev
 Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev
Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev
 
Funcargs & other fun with pytest
Funcargs & other fun with pytestFuncargs & other fun with pytest
Funcargs & other fun with pytest
 
MUTANTS KILLER - PIT: state of the art of mutation testing system
MUTANTS KILLER - PIT: state of the art of mutation testing system MUTANTS KILLER - PIT: state of the art of mutation testing system
MUTANTS KILLER - PIT: state of the art of mutation testing system
 
Google hangouts test ppt
Google hangouts test pptGoogle hangouts test ppt
Google hangouts test ppt
 
Testing, Learning and Professionalism — 20171214
Testing, Learning and Professionalism — 20171214Testing, Learning and Professionalism — 20171214
Testing, Learning and Professionalism — 20171214
 
Golang 101
Golang 101Golang 101
Golang 101
 
Slides
SlidesSlides
Slides
 
The Ring programming language version 1.6 book - Part 181 of 189
The Ring programming language version 1.6 book - Part 181 of 189The Ring programming language version 1.6 book - Part 181 of 189
The Ring programming language version 1.6 book - Part 181 of 189
 

Andere mochten auch

Enterprise Resource Planning (ERP) and Change in the City of Cape Town
Enterprise Resource Planning (ERP) and Change in the City of Cape TownEnterprise Resource Planning (ERP) and Change in the City of Cape Town
Enterprise Resource Planning (ERP) and Change in the City of Cape TownNirvesh Sooful
 
Western cape broadband strategy (industry briefing)
Western cape broadband strategy (industry briefing)Western cape broadband strategy (industry briefing)
Western cape broadband strategy (industry briefing)Nirvesh Sooful
 
Broad band 14march2012-pgw_cindustrypresentation
Broad band 14march2012-pgw_cindustrypresentationBroad band 14march2012-pgw_cindustrypresentation
Broad band 14march2012-pgw_cindustrypresentationNirvesh Sooful
 
Safipa conference (2011)
Safipa conference (2011)Safipa conference (2011)
Safipa conference (2011)Nirvesh Sooful
 
Bridging the digital divide – access. content and skills.
Bridging the digital divide – access. content and skills.Bridging the digital divide – access. content and skills.
Bridging the digital divide – access. content and skills.Nirvesh Sooful
 
Presentation to DPLG May2006
Presentation to DPLG May2006Presentation to DPLG May2006
Presentation to DPLG May2006Nirvesh Sooful
 
Using ICT to enable government supply chain and procurement processes
Using ICT to enable government supply chain and procurement processesUsing ICT to enable government supply chain and procurement processes
Using ICT to enable government supply chain and procurement processesNirvesh Sooful
 
ITWeb Conference June06 Open Source for Local Government
ITWeb Conference June06 Open Source for Local GovernmentITWeb Conference June06 Open Source for Local Government
ITWeb Conference June06 Open Source for Local GovernmentNirvesh Sooful
 
Improving Local Government Procurement through the use of technology
Improving Local Government Procurement through the use of technology Improving Local Government Procurement through the use of technology
Improving Local Government Procurement through the use of technology Nirvesh Sooful
 

Andere mochten auch (9)

Enterprise Resource Planning (ERP) and Change in the City of Cape Town
Enterprise Resource Planning (ERP) and Change in the City of Cape TownEnterprise Resource Planning (ERP) and Change in the City of Cape Town
Enterprise Resource Planning (ERP) and Change in the City of Cape Town
 
Western cape broadband strategy (industry briefing)
Western cape broadband strategy (industry briefing)Western cape broadband strategy (industry briefing)
Western cape broadband strategy (industry briefing)
 
Broad band 14march2012-pgw_cindustrypresentation
Broad band 14march2012-pgw_cindustrypresentationBroad band 14march2012-pgw_cindustrypresentation
Broad band 14march2012-pgw_cindustrypresentation
 
Safipa conference (2011)
Safipa conference (2011)Safipa conference (2011)
Safipa conference (2011)
 
Bridging the digital divide – access. content and skills.
Bridging the digital divide – access. content and skills.Bridging the digital divide – access. content and skills.
Bridging the digital divide – access. content and skills.
 
Presentation to DPLG May2006
Presentation to DPLG May2006Presentation to DPLG May2006
Presentation to DPLG May2006
 
Using ICT to enable government supply chain and procurement processes
Using ICT to enable government supply chain and procurement processesUsing ICT to enable government supply chain and procurement processes
Using ICT to enable government supply chain and procurement processes
 
ITWeb Conference June06 Open Source for Local Government
ITWeb Conference June06 Open Source for Local GovernmentITWeb Conference June06 Open Source for Local Government
ITWeb Conference June06 Open Source for Local Government
 
Improving Local Government Procurement through the use of technology
Improving Local Government Procurement through the use of technology Improving Local Government Procurement through the use of technology
Improving Local Government Procurement through the use of technology
 

Ähnlich wie TAP In Depth

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
 
Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...
Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...
Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...Alex Balhatchet
 
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...Nagios
 
Puppet Camp Paris 2014: Test Driven Development
Puppet Camp Paris 2014: Test Driven DevelopmentPuppet Camp Paris 2014: Test Driven Development
Puppet Camp Paris 2014: Test Driven DevelopmentPuppet
 
20140408 tdd puppetcamp-paris
20140408 tdd puppetcamp-paris20140408 tdd puppetcamp-paris
20140408 tdd puppetcamp-parisJohan De Wit
 
Testing Salt States (part 1)
Testing Salt States (part 1)Testing Salt States (part 1)
Testing Salt States (part 1)jasondenning
 
Php Inspections (EA Extended): The Cookbook
Php Inspections (EA Extended): The CookbookPhp Inspections (EA Extended): The Cookbook
Php Inspections (EA Extended): The CookbookVladimir Reznichenko
 
Test::Kantan - Perl and Testing
Test::Kantan - Perl and TestingTest::Kantan - Perl and Testing
Test::Kantan - Perl and TestingTokuhiro Matsuno
 
Testing sync engine
Testing sync engineTesting sync engine
Testing sync engineIlya Puchka
 
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
 
Successful Joomla migrations that don't hurt Search Engine Rankings
Successful Joomla migrations that don't hurt Search Engine RankingsSuccessful Joomla migrations that don't hurt Search Engine Rankings
Successful Joomla migrations that don't hurt Search Engine RankingsJoomla Day South Africa
 
NovaProva, a new generation unit test framework for C programs
NovaProva, a new generation unit test framework for C programsNovaProva, a new generation unit test framework for C programs
NovaProva, a new generation unit test framework for C programsGreg Banks
 
Kyua and Jenkins: Testing Framework for BSD
Kyua and Jenkins: Testing Framework for BSDKyua and Jenkins: Testing Framework for BSD
Kyua and Jenkins: Testing Framework for BSDCraig Rodrigues
 
20140406 loa days-tdd-with_puppet_tutorial
20140406 loa days-tdd-with_puppet_tutorial20140406 loa days-tdd-with_puppet_tutorial
20140406 loa days-tdd-with_puppet_tutorialgarrett honeycutt
 
Beyond unit tests: Deployment and testing for Hadoop/Spark workflows
Beyond unit tests: Deployment and testing for Hadoop/Spark workflowsBeyond unit tests: Deployment and testing for Hadoop/Spark workflows
Beyond unit tests: Deployment and testing for Hadoop/Spark workflowsDataWorks Summit
 
What Your Tech Lead Thinks You Know (But Didn't Teach You)
What Your Tech Lead Thinks You Know (But Didn't Teach You)What Your Tech Lead Thinks You Know (But Didn't Teach You)
What Your Tech Lead Thinks You Know (But Didn't Teach You)Chris Riccomini
 

Ähnlich wie TAP In Depth (20)

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)
 
Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...
Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...
Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...
 
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...
 
IntroTestMore
IntroTestMoreIntroTestMore
IntroTestMore
 
IntroTestMore
IntroTestMoreIntroTestMore
IntroTestMore
 
Puppet Camp Paris 2014: Test Driven Development
Puppet Camp Paris 2014: Test Driven DevelopmentPuppet Camp Paris 2014: Test Driven Development
Puppet Camp Paris 2014: Test Driven Development
 
20140408 tdd puppetcamp-paris
20140408 tdd puppetcamp-paris20140408 tdd puppetcamp-paris
20140408 tdd puppetcamp-paris
 
Testing Salt States (part 1)
Testing Salt States (part 1)Testing Salt States (part 1)
Testing Salt States (part 1)
 
Php Inspections (EA Extended): The Cookbook
Php Inspections (EA Extended): The CookbookPhp Inspections (EA Extended): The Cookbook
Php Inspections (EA Extended): The Cookbook
 
Perl wants you
Perl wants youPerl wants you
Perl wants you
 
Test::Kantan - Perl and Testing
Test::Kantan - Perl and TestingTest::Kantan - Perl and Testing
Test::Kantan - Perl and Testing
 
Getting testy with Perl
Getting testy with PerlGetting testy with Perl
Getting testy with Perl
 
Testing sync engine
Testing sync engineTesting sync engine
Testing sync engine
 
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
 
Successful Joomla migrations that don't hurt Search Engine Rankings
Successful Joomla migrations that don't hurt Search Engine RankingsSuccessful Joomla migrations that don't hurt Search Engine Rankings
Successful Joomla migrations that don't hurt Search Engine Rankings
 
NovaProva, a new generation unit test framework for C programs
NovaProva, a new generation unit test framework for C programsNovaProva, a new generation unit test framework for C programs
NovaProva, a new generation unit test framework for C programs
 
Kyua and Jenkins: Testing Framework for BSD
Kyua and Jenkins: Testing Framework for BSDKyua and Jenkins: Testing Framework for BSD
Kyua and Jenkins: Testing Framework for BSD
 
20140406 loa days-tdd-with_puppet_tutorial
20140406 loa days-tdd-with_puppet_tutorial20140406 loa days-tdd-with_puppet_tutorial
20140406 loa days-tdd-with_puppet_tutorial
 
Beyond unit tests: Deployment and testing for Hadoop/Spark workflows
Beyond unit tests: Deployment and testing for Hadoop/Spark workflowsBeyond unit tests: Deployment and testing for Hadoop/Spark workflows
Beyond unit tests: Deployment and testing for Hadoop/Spark workflows
 
What Your Tech Lead Thinks You Know (But Didn't Teach You)
What Your Tech Lead Thinks You Know (But Didn't Teach You)What Your Tech Lead Thinks You Know (But Didn't Teach You)
What Your Tech Lead Thinks You Know (But Didn't Teach You)
 

Kürzlich hochgeladen

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
"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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
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
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 

Kürzlich hochgeladen (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
"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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
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
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 

TAP In Depth

  • 1. TAP in Depth Michael Peters Plus Three, LP YAPC::NA 10 Pittsburgh, PA
  • 2. TAP Test Anything Protocol ● And we do mean *anything* ● Mainly used for regression testing code ● Could be used for systems monitoring, performance testing, etc ● 1987, current version 13 ● Patient Zero was Perl, but the infection has since spread to lots of other languages ● Ongoing work to make an IETF standard
  • 3. Definitions Test ● or an "assertion" (ok/not ok) ● smallest granule of measurement ● did it do what we wanted Stream ● or a "set" ● a group of tests ● usually output of running a single test file, but is not necessarily tied to a file or any specific output. Test Suite ● A group of TAP streams
  • 4. Definitions Harness ● A process which collects a group of TAP streams Plan ● number of tests that are expected to be run in a given stream Directive ● Changes the meaning of a given test ● TODO/SKIP Reason ● Explains the "why" of a directive
  • 5. Definitions Description ● What is the test asserting? What functionality is being tested? Producer ● Anything that generates TAP Consumer ● Anything that processes TAP ● Could just blindly echo it ● Usually parses it
  • 6. Document Structure TAP version 13 1..7 ok 1 - Input file opened not ok 2 - First line of the input valid ok 3 - Read the rest of the file # Can't load Digest::MD5. This modules is needed # to run some optional tests ok 4 # SKIP MD5 library not installed ok 5 # SKIP MD5 library not installed not ok 6 - Correct summary # TODO Not written yet ok 7 - File closed
  • 7. Document Structure Line Oriented Protocol ● Everything is separated by a new-line (CRLF) ● Not everything fits on 1 line ● Everything starts and ends on it's own line Encoding ● Everything is UTF-8 ● Unless the Producer/Consumer agree otherwise 1 Version, 1* plans, 0+ tests, 0* comments, 0* ignored elements
  • 8. Document Structure TAP version 13 1..7 ok 1 - Input file opened not ok 2 - First line of the input valid ok 3 - Read the rest of the file # Can't load Digest::MD5. This modules is needed # to run some optional tests ok 4 # SKIP MD5 library not installed ok 5 # SKIP MD5 library not installed not ok 6 - Correct summary # TODO Not written yet ok 7 - File closed
  • 9. Document Structure TAP version 13 1..7 ok 1 - Input file opened not ok 2 - First line of the input valid ok 3 - Read the rest of the file # Can't load Digest::MD5. This modules is needed # to run some optional tests ok 4 # SKIP MD5 library not installed ok 5 # SKIP MD5 library not installed not ok 6 - Correct summary # TODO Not written yet ok 7 - File closed
  • 10. Document Structure TAP version 13 1..7 ok 1 - Input file opened not ok 2 - First line of the input valid ok 3 - Read the rest of the file # Can't load Digest::MD5. This modules is needed # to run some optional tests ok 4 # SKIP MD5 library not installed ok 5 # SKIP MD5 library not installed not ok 6 - Correct summary # TODO Not written yet ok 7 - File closed
  • 11. Document Structure TAP version 13 1..7 ok 1 - Input file opened not ok 2 - First line of the input valid ok 3 - Read the rest of the file # Can't load Digest::MD5. This modules is needed # to run some optional tests ok 4 # SKIP MD5 library not installed ok 5 # SKIP MD5 library not installed not ok 6 - Correct summary # TODO Not written yet ok 7 - File closed
  • 12. Document Structure TAP version 13 1..7 ok 1 - Input file opened not ok 2 - First line of the input valid ok 3 - Read the rest of the file # Can't load Digest::MD5. This modules is needed # to run some optional tests ok 4 # SKIP MD5 library not installed ok 5 # SKIP MD5 library not installed not ok 6 - Correct summary # TODO Not written yet ok 7 - File closed
  • 13. Document Structure TAP version 13 1..7 ok 1 - Input file opened not ok 2 - First line of the input valid ok 3 - Read the rest of the file # Can't load Digest::MD5. This modules is needed # to run some optional tests ok 4 # SKIP MD5 library not installed ok 5 # SKIP MD5 library not installed not ok 6 - Correct summary # TODO Not written yet ok 7 - File closed
  • 14. Document Structure TAP version 13 1..7 ok 1 - Input file opened not ok 2 - First line of the input valid ok 3 - Read the rest of the file # Can't load Digest::MD5. This modules is needed # to run some optional tests ok 4 # SKIP MD5 library not installed ok 5 # SKIP MD5 library not installed not ok 6 - Correct summary # TODO Not written yet ok 7 - File closed
  • 15. Document Structure TAP version 13 1..7 ok 1 - Input file opened not ok 2 - First line of the input valid ok 3 - Read the rest of the file # Can't load Digest::MD5. This modules is needed # to run some optional tests ok 4 # SKIP MD5 library not installed ok 5 # SKIP MD5 library not installed not ok 6 - Correct summary # TODO Not written yet ok 7 - File closed
  • 16. Document Structure TAP version 13 1..7 ok 1 - Input file opened not ok 2 - First line of the input valid ok 3 - Read the rest of the file # Can't load Digest::MD5. This modules is needed # to run some optional tests ok 4 # SKIP MD5 library not installed ok 5 # SKIP MD5 library not installed not ok 6 - Correct summary # TODO Not written yet ok 7 - File closed
  • 17. Document Structure TAP version 13 1..7 ok 1 - Input file opened not ok 2 - First line of the input valid ok 3 - Read the rest of the file # Can't load Digest::MD5. This modules is needed # to run some optional tests ok 4 # SKIP MD5 library not installed ok 5 # SKIP MD5 library not installed not ok 6 - Correct summary # TODO Not written yet ok 7 - File closed
  • 18. Document Structure TAP version 13 1..7 ok 1 - Input file opened not ok 2 - First line of the input valid ok 3 - Read the rest of the file # Can't load Digest::MD5. This modules is needed # to run some optional tests ok 4 # SKIP MD5 library not installed ok 5 # SKIP MD5 library not installed not ok 6 - Correct summary # TODO Not written yet ok 7 - File closed
  • 19. Pass vs Fail Tests ● "ok" == pass ● "not ok" == fail ● Yay! binary!
  • 20. Pass vs Fail Tests ● "ok" == pass ● "not ok" == fail ● If only it were that simple ● Directives! Normal TODO SKIP ok pass * pass not ok pass fail ** * a passing TODO might indicate that a test shouldn't be a TODO anymore ** SKIP means the test wasn't run, so it shouldn't be able to fail
  • 21. Pass vs Fail Streams ● Can fail if any of the following are true (1) Any tests in this stream failed (2) Tests run did not agree with the plan (3) Other factors ● process exit codes (non-zero) ● HTTP status code ● Passed only if none of the above are true and (1) There was at least 1 passing test - or - (2) There was a "skip all" ● 1..0 # SKIP some module not installed
  • 22. Pass vs Fail Test Suites ● Fails if there are any streams that failed ● Passes if nothing failed and there's at least 1 stream ● Pass or fail at the suite level is boolean ● Tools can show percentages ● But even a 99.999% pass is still a fail
  • 23. Producing Perl Modules ● Test::More (classic and for good reasons)
  • 24. Producing Perl Modules ● Test::More (classic and for good reasons) ● Test::Builder
  • 25. Producing Perl Modules ● Test::More (classic and for good reasons) ● Test::Builder ● Test::Most
  • 26. Producing Perl Modules ● Test::More (classic and for good reasons) ● Test::Builder ● Test::Most ● Test::Class
  • 27. Producing Perl Modules ● Test::More (classic and for good reasons) ● Test::Builder ● Test::Most ● Test::Class ● Test::LongString, Test::WWW::Mechanize, Test::Exception, Test::File::Contents, Test::HTML::Content, Test::MockObject, Test::Pod, Test::Warn, Test::WWW::Selenium, Test::NoWarnings, Test::Output, Test::Number::Delta, Test::Perl::Critic
  • 28. Producing Other Languages ● Javascript →Test.Simple ● C/C++ →libtap, libtap++ ● PHP → phpt, PHPUnit, SimpleTest or Apache-Test ● Java →JTap ● Ruby →taptap, Bacon ● Python → PyTAP ● Also Haskell, Erlang, Forth, C#, Shell, Postgres
  • 29. Consuming Perl ● Test::Harness ● prove ● TAP::Harness ● TAP::Harness::Archive ● GUI Test Runner ● Smolder
  • 30. Comming Soon to a terminal near you Nested TAP ● Group related blocks of TAP together in the same stream ● Mimic xUnit style ● Aggregate TAP streams
  • 31. Comming Soon to a terminal near you Nested TAP 1..3 1..3 ok 1 - guests arrived on time ok 2 - table was available ok 3 - order correct ok 1 - guests served 1..2 ok 1 - chicken is fried not ok - steak is medium well not ok 1 - food prepared properly 1..2 ok 1 # SKIP guests did not come back ok 2 # SKIP guests did not come back ok 1 # SKIP guests did not come back
  • 32. Comming Soon to a terminal near you Metadata ● Everything is crammed into the descriptions or comments not ok - fooey, Bug #123 # Failed test 'fooey, Bug #123' # at barry.pl line 20. # got: foo bar # expected: bar foo ● If you want to do anything useful with the information in that message you need to parse it. Parsing error messages is evil
  • 33. Comming Soon to a terminal near you Metadata ●Data should be structured (YAML-ish) not ok - fooey --- file : barry.pl line : 20 want : foo bar have : bar foo display : > Failed test 'fooey' at barry.pl line 20. want: "foo bar" have: "bar foo" Bug-ID : 123 ...
  • 34. Comming Soon to a terminal near you Metadata ● Opens up a whole world of possibilities ● Visual diffs on want/have ● Tagging ● Linking between systems (source code, specs, issue tracking) ● Consumers can show or hide what ever they want or understand. ● Unknown uses (standardization vs growth)
  • 36. Usage Scenarios Automated Javascript Testing * example from Michael Schwern - http://use.perl.org/~schwern/journal/39092
  • 39. TAP in Depth Michael Peters Plus Three, LP Thanks! Questions?