Soumettre la recherche
Mettre en ligne
Test::Base
•
Télécharger en tant que PPT, PDF
•
1 j'aime
•
1,507 vues
Tatsuhiko Miyagawa
Suivre
Shibuya.pm tech talk #6
Lire moins
Lire la suite
Technologie
Signaler
Partager
Signaler
Partager
1 sur 43
Télécharger maintenant
Recommandé
Short Introduction To "perl -d"
Short Introduction To "perl -d"
Workhorse Computing
Memory Manglement in Raku
Memory Manglement in Raku
Workhorse Computing
BSDM with BASH: Command Interpolation
BSDM with BASH: Command Interpolation
Workhorse Computing
Keeping objects healthy with Object::Exercise.
Keeping objects healthy with Object::Exercise.
Workhorse Computing
The $path to knowledge: What little it take to unit-test Perl.
The $path to knowledge: What little it take to unit-test Perl.
Workhorse Computing
Metadata-driven Testing
Metadata-driven Testing
Workhorse Computing
Smoking docker
Smoking docker
Workhorse Computing
Pytest: escreva menos, teste mais
Pytest: escreva menos, teste mais
Erick Wilder
Recommandé
Short Introduction To "perl -d"
Short Introduction To "perl -d"
Workhorse Computing
Memory Manglement in Raku
Memory Manglement in Raku
Workhorse Computing
BSDM with BASH: Command Interpolation
BSDM with BASH: Command Interpolation
Workhorse Computing
Keeping objects healthy with Object::Exercise.
Keeping objects healthy with Object::Exercise.
Workhorse Computing
The $path to knowledge: What little it take to unit-test Perl.
The $path to knowledge: What little it take to unit-test Perl.
Workhorse Computing
Metadata-driven Testing
Metadata-driven Testing
Workhorse Computing
Smoking docker
Smoking docker
Workhorse Computing
Pytest: escreva menos, teste mais
Pytest: escreva menos, teste mais
Erick Wilder
Get your teeth into Plack
Get your teeth into Plack
Workhorse Computing
Findbin libs
Findbin libs
Workhorse Computing
BASH Variables Part 1: Basic Interpolation
BASH Variables Part 1: Basic Interpolation
Workhorse Computing
Object Trampoline: Why having not the object you want is what you need.
Object Trampoline: Why having not the object you want is what you need.
Workhorse Computing
Getting Testy With Perl6
Getting Testy With Perl6
Workhorse Computing
Unit Testing Lots of Perl
Unit Testing Lots of Perl
Workhorse Computing
Javascript Primer
Javascript Primer
Adam Hepton
Getting testy with Perl
Getting testy with Perl
Workhorse Computing
What's new in PHP 8.0?
What's new in PHP 8.0?
Nikita Popov
Effective Benchmarks
Effective Benchmarks
Workhorse Computing
PHP 5.3 And PHP 6 A Look Ahead
PHP 5.3 And PHP 6 A Look Ahead
thinkphp
PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021
Ayesh Karunaratne
Webrtc mojo
Webrtc mojo
bpmedley
Just-In-Time Compiler in PHP 8
Just-In-Time Compiler in PHP 8
Nikita Popov
Hidden Gems of Ruby 1.9
Hidden Gems of Ruby 1.9
Aaron Patterson
Perl web frameworks
Perl web frameworks
diego_k
Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)
James Titcumb
Nikita Popov "What’s new in PHP 8.0?"
Nikita Popov "What’s new in PHP 8.0?"
Fwdays
vfsStream - effective filesystem mocking
vfsStream - effective filesystem mocking
Sebastian Marek
vfsStream - a better approach for file system dependent tests
vfsStream - a better approach for file system dependent tests
Frank Kleine
Exploiting Php With Php
Exploiting Php With Php
Jeremy Coates
Python - Getting to the Essence - Points.com - Dave Park
Python - Getting to the Essence - Points.com - Dave Park
pointstechgeeks
Contenu connexe
Tendances
Get your teeth into Plack
Get your teeth into Plack
Workhorse Computing
Findbin libs
Findbin libs
Workhorse Computing
BASH Variables Part 1: Basic Interpolation
BASH Variables Part 1: Basic Interpolation
Workhorse Computing
Object Trampoline: Why having not the object you want is what you need.
Object Trampoline: Why having not the object you want is what you need.
Workhorse Computing
Getting Testy With Perl6
Getting Testy With Perl6
Workhorse Computing
Unit Testing Lots of Perl
Unit Testing Lots of Perl
Workhorse Computing
Javascript Primer
Javascript Primer
Adam Hepton
Getting testy with Perl
Getting testy with Perl
Workhorse Computing
What's new in PHP 8.0?
What's new in PHP 8.0?
Nikita Popov
Effective Benchmarks
Effective Benchmarks
Workhorse Computing
PHP 5.3 And PHP 6 A Look Ahead
PHP 5.3 And PHP 6 A Look Ahead
thinkphp
PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021
Ayesh Karunaratne
Webrtc mojo
Webrtc mojo
bpmedley
Just-In-Time Compiler in PHP 8
Just-In-Time Compiler in PHP 8
Nikita Popov
Hidden Gems of Ruby 1.9
Hidden Gems of Ruby 1.9
Aaron Patterson
Perl web frameworks
Perl web frameworks
diego_k
Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)
James Titcumb
Nikita Popov "What’s new in PHP 8.0?"
Nikita Popov "What’s new in PHP 8.0?"
Fwdays
vfsStream - effective filesystem mocking
vfsStream - effective filesystem mocking
Sebastian Marek
vfsStream - a better approach for file system dependent tests
vfsStream - a better approach for file system dependent tests
Frank Kleine
Tendances
(20)
Get your teeth into Plack
Get your teeth into Plack
Findbin libs
Findbin libs
BASH Variables Part 1: Basic Interpolation
BASH Variables Part 1: Basic Interpolation
Object Trampoline: Why having not the object you want is what you need.
Object Trampoline: Why having not the object you want is what you need.
Getting Testy With Perl6
Getting Testy With Perl6
Unit Testing Lots of Perl
Unit Testing Lots of Perl
Javascript Primer
Javascript Primer
Getting testy with Perl
Getting testy with Perl
What's new in PHP 8.0?
What's new in PHP 8.0?
Effective Benchmarks
Effective Benchmarks
PHP 5.3 And PHP 6 A Look Ahead
PHP 5.3 And PHP 6 A Look Ahead
PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021
Webrtc mojo
Webrtc mojo
Just-In-Time Compiler in PHP 8
Just-In-Time Compiler in PHP 8
Hidden Gems of Ruby 1.9
Hidden Gems of Ruby 1.9
Perl web frameworks
Perl web frameworks
Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)
Nikita Popov "What’s new in PHP 8.0?"
Nikita Popov "What’s new in PHP 8.0?"
vfsStream - effective filesystem mocking
vfsStream - effective filesystem mocking
vfsStream - a better approach for file system dependent tests
vfsStream - a better approach for file system dependent tests
Similaire à Test::Base
Exploiting Php With Php
Exploiting Php With Php
Jeremy Coates
Python - Getting to the Essence - Points.com - Dave Park
Python - Getting to the Essence - Points.com - Dave Park
pointstechgeeks
Modern Perl
Modern Perl
Marcos Rebelo
RingoJS
RingoJS
Oleg Podsechin
Perl Dancer, FPW 2010
Perl Dancer, FPW 2010
Alexis Sukrieh
Zend framework 05 - ajax, json and j query
Zend framework 05 - ajax, json and j query
Tricode (part of Dept)
Php Loop
Php Loop
lotlot
Introduction To Moco
Introduction To Moco
Naoya Ito
Advanced Perl Techniques
Advanced Perl Techniques
Dave Cross
JSON and the APInauts
JSON and the APInauts
Wynn Netherland
Testing Javascript with Jasmine
Testing Javascript with Jasmine
Tim Tyrrell
PHP Presentation
PHP Presentation
Ankush Jain
Bash Scripting Gabrovo
Bash Scripting Gabrovo
Marian Marinov
Advanced Perl Techniques
Advanced Perl Techniques
Dave Cross
Groovy every day
Groovy every day
Paul Woods
Rack Middleware
Rack Middleware
LittleBIGRuby
using python module: doctest
using python module: doctest
mitnk
Abuse Perl
Abuse Perl
Casey West
Testing RESTful Webservices using the REST-assured framework
Testing RESTful Webservices using the REST-assured framework
Micha Kops
Groovier testing with Spock
Groovier testing with Spock
Robert Fletcher
Similaire à Test::Base
(20)
Exploiting Php With Php
Exploiting Php With Php
Python - Getting to the Essence - Points.com - Dave Park
Python - Getting to the Essence - Points.com - Dave Park
Modern Perl
Modern Perl
RingoJS
RingoJS
Perl Dancer, FPW 2010
Perl Dancer, FPW 2010
Zend framework 05 - ajax, json and j query
Zend framework 05 - ajax, json and j query
Php Loop
Php Loop
Introduction To Moco
Introduction To Moco
Advanced Perl Techniques
Advanced Perl Techniques
JSON and the APInauts
JSON and the APInauts
Testing Javascript with Jasmine
Testing Javascript with Jasmine
PHP Presentation
PHP Presentation
Bash Scripting Gabrovo
Bash Scripting Gabrovo
Advanced Perl Techniques
Advanced Perl Techniques
Groovy every day
Groovy every day
Rack Middleware
Rack Middleware
using python module: doctest
using python module: doctest
Abuse Perl
Abuse Perl
Testing RESTful Webservices using the REST-assured framework
Testing RESTful Webservices using the REST-assured framework
Groovier testing with Spock
Groovier testing with Spock
Plus de Tatsuhiko Miyagawa
Carton CPAN dependency manager
Carton CPAN dependency manager
Tatsuhiko Miyagawa
Deploying Plack Web Applications: OSCON 2011
Deploying Plack Web Applications: OSCON 2011
Tatsuhiko Miyagawa
Plack at OSCON 2010
Plack at OSCON 2010
Tatsuhiko Miyagawa
cpanminus at YAPC::NA 2010
cpanminus at YAPC::NA 2010
Tatsuhiko Miyagawa
Plack at YAPC::NA 2010
Plack at YAPC::NA 2010
Tatsuhiko Miyagawa
PSGI/Plack OSDC.TW
PSGI/Plack OSDC.TW
Tatsuhiko Miyagawa
Plack perl superglue for web frameworks and servers
Plack perl superglue for web frameworks and servers
Tatsuhiko Miyagawa
Plack - LPW 2009
Plack - LPW 2009
Tatsuhiko Miyagawa
Tatsumaki
Tatsumaki
Tatsuhiko Miyagawa
Intro to PSGI and Plack
Intro to PSGI and Plack
Tatsuhiko Miyagawa
CPAN Realtime feed
CPAN Realtime feed
Tatsuhiko Miyagawa
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Tatsuhiko Miyagawa
Asynchronous programming with AnyEvent
Asynchronous programming with AnyEvent
Tatsuhiko Miyagawa
Building a desktop app with HTTP::Engine, SQLite and jQuery
Building a desktop app with HTTP::Engine, SQLite and jQuery
Tatsuhiko Miyagawa
Remedie OSDC.TW
Remedie OSDC.TW
Tatsuhiko Miyagawa
Why Open Matters It Pro Challenge 2008
Why Open Matters It Pro Challenge 2008
Tatsuhiko Miyagawa
20 modules i haven't yet talked about
20 modules i haven't yet talked about
Tatsuhiko Miyagawa
Web::Scraper for SF.pm LT
Web::Scraper for SF.pm LT
Tatsuhiko Miyagawa
Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8
Tatsuhiko Miyagawa
Web::Scraper
Web::Scraper
Tatsuhiko Miyagawa
Plus de Tatsuhiko Miyagawa
(20)
Carton CPAN dependency manager
Carton CPAN dependency manager
Deploying Plack Web Applications: OSCON 2011
Deploying Plack Web Applications: OSCON 2011
Plack at OSCON 2010
Plack at OSCON 2010
cpanminus at YAPC::NA 2010
cpanminus at YAPC::NA 2010
Plack at YAPC::NA 2010
Plack at YAPC::NA 2010
PSGI/Plack OSDC.TW
PSGI/Plack OSDC.TW
Plack perl superglue for web frameworks and servers
Plack perl superglue for web frameworks and servers
Plack - LPW 2009
Plack - LPW 2009
Tatsumaki
Tatsumaki
Intro to PSGI and Plack
Intro to PSGI and Plack
CPAN Realtime feed
CPAN Realtime feed
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Asynchronous programming with AnyEvent
Asynchronous programming with AnyEvent
Building a desktop app with HTTP::Engine, SQLite and jQuery
Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie OSDC.TW
Remedie OSDC.TW
Why Open Matters It Pro Challenge 2008
Why Open Matters It Pro Challenge 2008
20 modules i haven't yet talked about
20 modules i haven't yet talked about
Web::Scraper for SF.pm LT
Web::Scraper for SF.pm LT
Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8
Web::Scraper
Web::Scraper
Dernier
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Rizwan Syed
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
hariprasad279825
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Miki Katsuragi
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
SeasiaInfotech2
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
Alex Barbosa Coqueiro
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Wonjun Hwang
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
2toLead Limited
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
Hervé Boutemy
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
null - The Open Security Community
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
Lorenzo Miniero
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
charlottematthew16
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
charlottematthew16
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
Fwdays
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Scott Keck-Warren
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
Manik S Magar
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Mark Billinghurst
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
Enterprise Knowledge
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Zilliz
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
The Digital Insurer
Dernier
(20)
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
Test::Base
1.
use Test::Base; Tatsuhiko
Miyagawa [email_address] Six Apart, Ltd. / Shibuya Perl Mongers Shibuya.pm Tech Talks #7
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
Filter arguments ===
filter args --- input lines array tail=2 Join foo Bar baz --- expected chomp regexp=xis bar.*baz
18.
filters __DATA__ ===
test 1 --- input foo bar baz xxx --- expected quox yyy === test 2 --- input foo bar baz xxx --- expected quox yyy === test 3 --- input foo bar baz xxx --- expected quox yyy
19.
filters filters {
input => [ 'foo', 'bar', 'baz' ], expected => 'quox' }; __DATA__ === test 1 --- input xxx --- expected yyy === test 2 --- input xxx --- expected yyy === test 3 --- input xxx --- expected yyy
20.
21.
Auto-diff 01-json....NOK 1
# Failed test ' # @@ -1,2 +1,2 @@ # -{"foo":"bar"} # +{ foo => "bar" } # xxx # ' Requires Algorithm::Diff Turn off with no_diff()
22.
23.
24.
25.
26.
run_compare is default!
# 01-json.t use Test::Base; use JSON::Syck; sub json { JSON::Syck::Dump($_[0]) } __END__ === --- input eval json { foo => "bar" } --- expected chomp {"foo":"bar"} === --- input eval json { foo => [ "bar", "baz" ] } --- expected regexp bar.*baz
27.
run # 01-json.t
use Test::Base; use JSON::Syck; plan tests => 1 * blocks; run { my $block = shift; is JSON::Syck::Dump($block->input), $block->expected, $block->name; }; __END__ === --- input eval { foo => "bar" } --- expected chomp {"foo":"bar"}
28.
blocks() # 01-json.t
use Test::Base; use JSON::Syck; plan tests => 1 * blocks; for my $block (blocks) { is JSON::Syck::Dump($block->input), $block->expected, $block->name; } __END__ === --- input eval { foo => "bar" } --- expected chomp {"foo":"bar"}
29.
Block specific use
Test::Base; run_compare; __END__ === --- ONLY --- input eval json { foo => "bar" } --- expected chomp {"foo":"bar"} === --- input eval json { foo => [ "bar", "baz" ] } --- expected regexp bar.*baz
30.
Block specific use
Test::Base; run_compare; __END__ === --- SKIP --- input eval json { foo => "bar" } --- expected chomp {"foo":"bar"} === --- input eval json { foo => [ "bar", "baz" ] } --- expected regexp bar.*baz
31.
Subclassing Test::Base #
t/TestJSON.pm package t::TestJSON; use Test::Base -Base; use JSON::Syck; package t::TestJSON::Filter; use Test::Base::Filter –base; sub json { JSON::Syck::Dump($_[0]) } # t/01-json.t use t::TestJSON; __END__ === --- input eval json { foo => "bar" } --- expected …
32.
In your CPAN
modules use inc::Module::Install; name 'Foo-Bar'; all_from 'lib/Foo/Bar.pm'; use_test_base; WriteAll;
33.
34.
Spiffy XXX XXX
$foo = $bar; WWW $bar; YYY $baz; ZZZ $quox;
35.
no chomp filters
use Test::Base; filters { input => 'chomp', expected => 'chomp' } __END__ === --- input foo --- expected bar === --- input fooaba --- expected bzaahiepa
36.
no chomp filters
use Test::Base; __END__ === --- input: foo --- expected: bar === --- input: fooaba --- expected: bzaahiepa
37.
success tests vs.
error tests # t/01-success.t run_is 'input' => 'expected'; # t/02-failure.t run { my $block = shift; eval { … }; run_like $@, $block->expected; } ;
38.
39.
40.
41.
42.
43.
Télécharger maintenant