cinderella 'tap - tapper.github.io · 32cinderella 'tap: the lazy evaluation sisters of...
TRANSCRIPT
Cinderella TAPThe lazy evaluation sisters of TAPParser
Steffen Schwigon AMD | August 04 2009YAPCEU 2009
Cinderella TAPThe lazy evaluation sisters of TAPParser
Steffen Schwigon AMD | Aug 04 2009YAPCEU 2009
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20093
Agenda
Context Test automation Participation model Producing and consuming
Problem The no-problem The Query Gap
Solution SYNOPSIS Query Interface Query language Modules Glue
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20094
Context
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20095
Our Mission
AMD Operating System Research Center (OSRC) QA team rarr Testing OS x Virtualization x AMD hardware x OSRC patches
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20096
Target audience
ldquoClassicalrdquo end users Web user-interface
Developers Command line advocates But too busy to fiddle with complicated toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20097
Test Infrastructure ndash Key ideas
KVMXen Test Automationrarr httpxrlusxentestautomation
German Perl Workshop 2009
TAP (ldquoTest Anything Protocolrdquo) Trivial reporting Reports archive and query framework
ldquonon-aristocraticrdquo participation model
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20098
Non-aristocratic
Make the toolchain trivially accessible Shell script level ldquono XMLrdquo netcat
Non-interactive protocols (fire amp forget reporting) Easy interactive protocols
Scalable complexity ndash start easy then escalate Test protocol Query language
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20099
TAP example
13
ArtemisshySuiteshyName oprofile
ArtemisshySuiteshyVersion 2013
ok 1 shy Looks like oprofile kernel
ok 2 shy other stuff
not ok 3 shy last line TODO just specced
shyshyshy
message Failed test last line at tltpt line 317
data
got foo
expected bar
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200910
Easy with shell
binsh echo 12 echo ArtemisshySuiteshyName oprofile echo ArtemisshyMachineshyName `hostname` if uname | grep shyvq oprofile then echo shyn not fi echo ok shy Looks like oprofile kernel echo ok shy other stuff
Same with C Python Perl hellip with or without toolchain
test_scriptsh
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200911
test_scriptsh | netcat bancroft 7357
Produce TAP Just drop into port ldquofire amp forgetrdquo
Report interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200912
Hide internal complexity TAPParser TAPFormatterHTML TAPDOM Meta information Sections Aggregated results
How to trivially access results
Report interface (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200913
Problem
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200914
First the ldquono-problemrdquo
WebApp for ldquoend usersrdquo Catalyst DBIxClass (SchemaVersioned) TAP (Parser FormatterHTML)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200915
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200916
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200917
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200918
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200919
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAPThe lazy evaluation sisters of TAPParser
Steffen Schwigon AMD | Aug 04 2009YAPCEU 2009
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20093
Agenda
Context Test automation Participation model Producing and consuming
Problem The no-problem The Query Gap
Solution SYNOPSIS Query Interface Query language Modules Glue
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20094
Context
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20095
Our Mission
AMD Operating System Research Center (OSRC) QA team rarr Testing OS x Virtualization x AMD hardware x OSRC patches
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20096
Target audience
ldquoClassicalrdquo end users Web user-interface
Developers Command line advocates But too busy to fiddle with complicated toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20097
Test Infrastructure ndash Key ideas
KVMXen Test Automationrarr httpxrlusxentestautomation
German Perl Workshop 2009
TAP (ldquoTest Anything Protocolrdquo) Trivial reporting Reports archive and query framework
ldquonon-aristocraticrdquo participation model
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20098
Non-aristocratic
Make the toolchain trivially accessible Shell script level ldquono XMLrdquo netcat
Non-interactive protocols (fire amp forget reporting) Easy interactive protocols
Scalable complexity ndash start easy then escalate Test protocol Query language
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20099
TAP example
13
ArtemisshySuiteshyName oprofile
ArtemisshySuiteshyVersion 2013
ok 1 shy Looks like oprofile kernel
ok 2 shy other stuff
not ok 3 shy last line TODO just specced
shyshyshy
message Failed test last line at tltpt line 317
data
got foo
expected bar
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200910
Easy with shell
binsh echo 12 echo ArtemisshySuiteshyName oprofile echo ArtemisshyMachineshyName `hostname` if uname | grep shyvq oprofile then echo shyn not fi echo ok shy Looks like oprofile kernel echo ok shy other stuff
Same with C Python Perl hellip with or without toolchain
test_scriptsh
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200911
test_scriptsh | netcat bancroft 7357
Produce TAP Just drop into port ldquofire amp forgetrdquo
Report interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200912
Hide internal complexity TAPParser TAPFormatterHTML TAPDOM Meta information Sections Aggregated results
How to trivially access results
Report interface (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200913
Problem
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200914
First the ldquono-problemrdquo
WebApp for ldquoend usersrdquo Catalyst DBIxClass (SchemaVersioned) TAP (Parser FormatterHTML)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200915
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200916
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200917
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200918
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200919
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20093
Agenda
Context Test automation Participation model Producing and consuming
Problem The no-problem The Query Gap
Solution SYNOPSIS Query Interface Query language Modules Glue
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20094
Context
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20095
Our Mission
AMD Operating System Research Center (OSRC) QA team rarr Testing OS x Virtualization x AMD hardware x OSRC patches
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20096
Target audience
ldquoClassicalrdquo end users Web user-interface
Developers Command line advocates But too busy to fiddle with complicated toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20097
Test Infrastructure ndash Key ideas
KVMXen Test Automationrarr httpxrlusxentestautomation
German Perl Workshop 2009
TAP (ldquoTest Anything Protocolrdquo) Trivial reporting Reports archive and query framework
ldquonon-aristocraticrdquo participation model
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20098
Non-aristocratic
Make the toolchain trivially accessible Shell script level ldquono XMLrdquo netcat
Non-interactive protocols (fire amp forget reporting) Easy interactive protocols
Scalable complexity ndash start easy then escalate Test protocol Query language
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20099
TAP example
13
ArtemisshySuiteshyName oprofile
ArtemisshySuiteshyVersion 2013
ok 1 shy Looks like oprofile kernel
ok 2 shy other stuff
not ok 3 shy last line TODO just specced
shyshyshy
message Failed test last line at tltpt line 317
data
got foo
expected bar
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200910
Easy with shell
binsh echo 12 echo ArtemisshySuiteshyName oprofile echo ArtemisshyMachineshyName `hostname` if uname | grep shyvq oprofile then echo shyn not fi echo ok shy Looks like oprofile kernel echo ok shy other stuff
Same with C Python Perl hellip with or without toolchain
test_scriptsh
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200911
test_scriptsh | netcat bancroft 7357
Produce TAP Just drop into port ldquofire amp forgetrdquo
Report interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200912
Hide internal complexity TAPParser TAPFormatterHTML TAPDOM Meta information Sections Aggregated results
How to trivially access results
Report interface (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200913
Problem
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200914
First the ldquono-problemrdquo
WebApp for ldquoend usersrdquo Catalyst DBIxClass (SchemaVersioned) TAP (Parser FormatterHTML)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200915
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200916
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200917
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200918
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200919
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20094
Context
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20095
Our Mission
AMD Operating System Research Center (OSRC) QA team rarr Testing OS x Virtualization x AMD hardware x OSRC patches
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20096
Target audience
ldquoClassicalrdquo end users Web user-interface
Developers Command line advocates But too busy to fiddle with complicated toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20097
Test Infrastructure ndash Key ideas
KVMXen Test Automationrarr httpxrlusxentestautomation
German Perl Workshop 2009
TAP (ldquoTest Anything Protocolrdquo) Trivial reporting Reports archive and query framework
ldquonon-aristocraticrdquo participation model
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20098
Non-aristocratic
Make the toolchain trivially accessible Shell script level ldquono XMLrdquo netcat
Non-interactive protocols (fire amp forget reporting) Easy interactive protocols
Scalable complexity ndash start easy then escalate Test protocol Query language
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20099
TAP example
13
ArtemisshySuiteshyName oprofile
ArtemisshySuiteshyVersion 2013
ok 1 shy Looks like oprofile kernel
ok 2 shy other stuff
not ok 3 shy last line TODO just specced
shyshyshy
message Failed test last line at tltpt line 317
data
got foo
expected bar
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200910
Easy with shell
binsh echo 12 echo ArtemisshySuiteshyName oprofile echo ArtemisshyMachineshyName `hostname` if uname | grep shyvq oprofile then echo shyn not fi echo ok shy Looks like oprofile kernel echo ok shy other stuff
Same with C Python Perl hellip with or without toolchain
test_scriptsh
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200911
test_scriptsh | netcat bancroft 7357
Produce TAP Just drop into port ldquofire amp forgetrdquo
Report interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200912
Hide internal complexity TAPParser TAPFormatterHTML TAPDOM Meta information Sections Aggregated results
How to trivially access results
Report interface (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200913
Problem
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200914
First the ldquono-problemrdquo
WebApp for ldquoend usersrdquo Catalyst DBIxClass (SchemaVersioned) TAP (Parser FormatterHTML)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200915
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200916
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200917
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200918
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200919
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20095
Our Mission
AMD Operating System Research Center (OSRC) QA team rarr Testing OS x Virtualization x AMD hardware x OSRC patches
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20096
Target audience
ldquoClassicalrdquo end users Web user-interface
Developers Command line advocates But too busy to fiddle with complicated toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20097
Test Infrastructure ndash Key ideas
KVMXen Test Automationrarr httpxrlusxentestautomation
German Perl Workshop 2009
TAP (ldquoTest Anything Protocolrdquo) Trivial reporting Reports archive and query framework
ldquonon-aristocraticrdquo participation model
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20098
Non-aristocratic
Make the toolchain trivially accessible Shell script level ldquono XMLrdquo netcat
Non-interactive protocols (fire amp forget reporting) Easy interactive protocols
Scalable complexity ndash start easy then escalate Test protocol Query language
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20099
TAP example
13
ArtemisshySuiteshyName oprofile
ArtemisshySuiteshyVersion 2013
ok 1 shy Looks like oprofile kernel
ok 2 shy other stuff
not ok 3 shy last line TODO just specced
shyshyshy
message Failed test last line at tltpt line 317
data
got foo
expected bar
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200910
Easy with shell
binsh echo 12 echo ArtemisshySuiteshyName oprofile echo ArtemisshyMachineshyName `hostname` if uname | grep shyvq oprofile then echo shyn not fi echo ok shy Looks like oprofile kernel echo ok shy other stuff
Same with C Python Perl hellip with or without toolchain
test_scriptsh
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200911
test_scriptsh | netcat bancroft 7357
Produce TAP Just drop into port ldquofire amp forgetrdquo
Report interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200912
Hide internal complexity TAPParser TAPFormatterHTML TAPDOM Meta information Sections Aggregated results
How to trivially access results
Report interface (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200913
Problem
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200914
First the ldquono-problemrdquo
WebApp for ldquoend usersrdquo Catalyst DBIxClass (SchemaVersioned) TAP (Parser FormatterHTML)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200915
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200916
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200917
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200918
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200919
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20096
Target audience
ldquoClassicalrdquo end users Web user-interface
Developers Command line advocates But too busy to fiddle with complicated toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20097
Test Infrastructure ndash Key ideas
KVMXen Test Automationrarr httpxrlusxentestautomation
German Perl Workshop 2009
TAP (ldquoTest Anything Protocolrdquo) Trivial reporting Reports archive and query framework
ldquonon-aristocraticrdquo participation model
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20098
Non-aristocratic
Make the toolchain trivially accessible Shell script level ldquono XMLrdquo netcat
Non-interactive protocols (fire amp forget reporting) Easy interactive protocols
Scalable complexity ndash start easy then escalate Test protocol Query language
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20099
TAP example
13
ArtemisshySuiteshyName oprofile
ArtemisshySuiteshyVersion 2013
ok 1 shy Looks like oprofile kernel
ok 2 shy other stuff
not ok 3 shy last line TODO just specced
shyshyshy
message Failed test last line at tltpt line 317
data
got foo
expected bar
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200910
Easy with shell
binsh echo 12 echo ArtemisshySuiteshyName oprofile echo ArtemisshyMachineshyName `hostname` if uname | grep shyvq oprofile then echo shyn not fi echo ok shy Looks like oprofile kernel echo ok shy other stuff
Same with C Python Perl hellip with or without toolchain
test_scriptsh
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200911
test_scriptsh | netcat bancroft 7357
Produce TAP Just drop into port ldquofire amp forgetrdquo
Report interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200912
Hide internal complexity TAPParser TAPFormatterHTML TAPDOM Meta information Sections Aggregated results
How to trivially access results
Report interface (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200913
Problem
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200914
First the ldquono-problemrdquo
WebApp for ldquoend usersrdquo Catalyst DBIxClass (SchemaVersioned) TAP (Parser FormatterHTML)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200915
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200916
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200917
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200918
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200919
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20097
Test Infrastructure ndash Key ideas
KVMXen Test Automationrarr httpxrlusxentestautomation
German Perl Workshop 2009
TAP (ldquoTest Anything Protocolrdquo) Trivial reporting Reports archive and query framework
ldquonon-aristocraticrdquo participation model
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20098
Non-aristocratic
Make the toolchain trivially accessible Shell script level ldquono XMLrdquo netcat
Non-interactive protocols (fire amp forget reporting) Easy interactive protocols
Scalable complexity ndash start easy then escalate Test protocol Query language
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20099
TAP example
13
ArtemisshySuiteshyName oprofile
ArtemisshySuiteshyVersion 2013
ok 1 shy Looks like oprofile kernel
ok 2 shy other stuff
not ok 3 shy last line TODO just specced
shyshyshy
message Failed test last line at tltpt line 317
data
got foo
expected bar
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200910
Easy with shell
binsh echo 12 echo ArtemisshySuiteshyName oprofile echo ArtemisshyMachineshyName `hostname` if uname | grep shyvq oprofile then echo shyn not fi echo ok shy Looks like oprofile kernel echo ok shy other stuff
Same with C Python Perl hellip with or without toolchain
test_scriptsh
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200911
test_scriptsh | netcat bancroft 7357
Produce TAP Just drop into port ldquofire amp forgetrdquo
Report interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200912
Hide internal complexity TAPParser TAPFormatterHTML TAPDOM Meta information Sections Aggregated results
How to trivially access results
Report interface (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200913
Problem
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200914
First the ldquono-problemrdquo
WebApp for ldquoend usersrdquo Catalyst DBIxClass (SchemaVersioned) TAP (Parser FormatterHTML)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200915
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200916
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200917
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200918
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200919
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20098
Non-aristocratic
Make the toolchain trivially accessible Shell script level ldquono XMLrdquo netcat
Non-interactive protocols (fire amp forget reporting) Easy interactive protocols
Scalable complexity ndash start easy then escalate Test protocol Query language
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20099
TAP example
13
ArtemisshySuiteshyName oprofile
ArtemisshySuiteshyVersion 2013
ok 1 shy Looks like oprofile kernel
ok 2 shy other stuff
not ok 3 shy last line TODO just specced
shyshyshy
message Failed test last line at tltpt line 317
data
got foo
expected bar
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200910
Easy with shell
binsh echo 12 echo ArtemisshySuiteshyName oprofile echo ArtemisshyMachineshyName `hostname` if uname | grep shyvq oprofile then echo shyn not fi echo ok shy Looks like oprofile kernel echo ok shy other stuff
Same with C Python Perl hellip with or without toolchain
test_scriptsh
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200911
test_scriptsh | netcat bancroft 7357
Produce TAP Just drop into port ldquofire amp forgetrdquo
Report interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200912
Hide internal complexity TAPParser TAPFormatterHTML TAPDOM Meta information Sections Aggregated results
How to trivially access results
Report interface (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200913
Problem
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200914
First the ldquono-problemrdquo
WebApp for ldquoend usersrdquo Catalyst DBIxClass (SchemaVersioned) TAP (Parser FormatterHTML)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200915
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200916
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200917
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200918
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200919
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 20099
TAP example
13
ArtemisshySuiteshyName oprofile
ArtemisshySuiteshyVersion 2013
ok 1 shy Looks like oprofile kernel
ok 2 shy other stuff
not ok 3 shy last line TODO just specced
shyshyshy
message Failed test last line at tltpt line 317
data
got foo
expected bar
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200910
Easy with shell
binsh echo 12 echo ArtemisshySuiteshyName oprofile echo ArtemisshyMachineshyName `hostname` if uname | grep shyvq oprofile then echo shyn not fi echo ok shy Looks like oprofile kernel echo ok shy other stuff
Same with C Python Perl hellip with or without toolchain
test_scriptsh
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200911
test_scriptsh | netcat bancroft 7357
Produce TAP Just drop into port ldquofire amp forgetrdquo
Report interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200912
Hide internal complexity TAPParser TAPFormatterHTML TAPDOM Meta information Sections Aggregated results
How to trivially access results
Report interface (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200913
Problem
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200914
First the ldquono-problemrdquo
WebApp for ldquoend usersrdquo Catalyst DBIxClass (SchemaVersioned) TAP (Parser FormatterHTML)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200915
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200916
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200917
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200918
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200919
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200910
Easy with shell
binsh echo 12 echo ArtemisshySuiteshyName oprofile echo ArtemisshyMachineshyName `hostname` if uname | grep shyvq oprofile then echo shyn not fi echo ok shy Looks like oprofile kernel echo ok shy other stuff
Same with C Python Perl hellip with or without toolchain
test_scriptsh
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200911
test_scriptsh | netcat bancroft 7357
Produce TAP Just drop into port ldquofire amp forgetrdquo
Report interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200912
Hide internal complexity TAPParser TAPFormatterHTML TAPDOM Meta information Sections Aggregated results
How to trivially access results
Report interface (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200913
Problem
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200914
First the ldquono-problemrdquo
WebApp for ldquoend usersrdquo Catalyst DBIxClass (SchemaVersioned) TAP (Parser FormatterHTML)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200915
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200916
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200917
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200918
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200919
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200911
test_scriptsh | netcat bancroft 7357
Produce TAP Just drop into port ldquofire amp forgetrdquo
Report interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200912
Hide internal complexity TAPParser TAPFormatterHTML TAPDOM Meta information Sections Aggregated results
How to trivially access results
Report interface (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200913
Problem
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200914
First the ldquono-problemrdquo
WebApp for ldquoend usersrdquo Catalyst DBIxClass (SchemaVersioned) TAP (Parser FormatterHTML)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200915
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200916
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200917
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200918
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200919
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200912
Hide internal complexity TAPParser TAPFormatterHTML TAPDOM Meta information Sections Aggregated results
How to trivially access results
Report interface (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200913
Problem
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200914
First the ldquono-problemrdquo
WebApp for ldquoend usersrdquo Catalyst DBIxClass (SchemaVersioned) TAP (Parser FormatterHTML)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200915
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200916
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200917
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200918
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200919
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200913
Problem
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200914
First the ldquono-problemrdquo
WebApp for ldquoend usersrdquo Catalyst DBIxClass (SchemaVersioned) TAP (Parser FormatterHTML)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200915
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200916
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200917
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200918
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200919
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200914
First the ldquono-problemrdquo
WebApp for ldquoend usersrdquo Catalyst DBIxClass (SchemaVersioned) TAP (Parser FormatterHTML)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200915
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200916
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200917
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200918
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200919
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200915
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200916
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200917
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200918
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200919
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200916
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200917
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200918
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200919
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200917
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200918
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200919
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200918
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200919
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200919
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200920
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200921
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200922
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200923
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200924
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200925
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200926
Web Application for ldquoend usersrdquo
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200927
The Query Gap
Scriptable querying The same ease as reporting Again shell level netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200928
The Query Gap (2)
Use Cases generally access our own reports track single test over time track benchmark results (YAML in TAP) custom visualize the data
Challenges test suites change over time rarr fuzzy find hide the toolchain
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200929
Solution
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200930
Provide template mechanism With embedded query language ldquoDPathrdquo Dialog-oriented protocol
send with netcat HERE-doc style receive answer
Query interface (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200931
Query interface (2) ndash Synopsis Command
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Template
mason ltltEOF
Planned oprofile tests
foreach $plan (reportdata suite_name =gt oprofile taptests_planned)
lt $plan gt
EOF
Result
Planned oprofile tests
3
4
17
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200932
Query interface (3) ndash Synopsis mason debug=1 ltltEOTEMPLATE
TITLE = success ratio CTCS
set title TITLE offset char 0 char shy1
set style data linespoints
set term png size 1200 800
set output CTCS_ratiopng
set yrange [80110]
plot shy using 02 with linespoints lt 3 lw 1 title ratio
my time = reportdata suite_name =gt CTCS reportcreated_at_ymd
my ratio = reportdata suite_name =gt CTCS success_ratio
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
EOTEMPLATE
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200933
Query interface (4) ndash Synopsis$ cat CTCS_ratiognuplot | netcat bancroft 7358 | gnuplot
(generated CTCS_ratiopng)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200934
Modules TAPDOM ndash TAP as data structure DataDPath ndash XPath like language
MyAppDOM ndash Project add-ons (report meta) MyAppDPath ndash Project add-ons (db layer)
How does it work
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200935
suite_name =gt CTCS tests_planned[value gt 10]summarypassed
Virtual DOM 2 orthogonal concepts
database axis provide but hide relational access DBIxClass SQLAbstract project-specific add-ons the ldquohistory of reportsrdquo
report axis inside single reports data structure TAPDOM DataDPath ldquoat one point in historyrdquo
Anatomy of a MyAppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200936
XPath like language Optimized for Perl
data structures filter sub language more ldquoWhy not XPathrdquo in DataDPath docs
rarr httpxrlusdpathvsxpath
DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200937
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200938
use DataDPath dpathmy $data = AAA =gt BBB =gt CCC =gt [ qw XXX YYY ZZZ ] RRR =gt CCC =gt [ qw RR1 RR2 RR3 ] DDD =gt EEE =gt [ qw uuu vvv www ]
$resultlist = $data ~~ dpath AAACCC
rarr [ [ XXX YYY ZZZ ] [ RR1 RR2 RR3 ] ]
DataDPath ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200939
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200940
$data ~~ dpath AAACCC$data ~~ dpath AAABBBCCC$data ~~ dpath AAA$data ~~ dpath AAA$data ~~ dpath AAASOMEWHEREBELOW$data ~~ dpath EEECCC$data ~~ dpath AAABBBCCC[1]$data ~~ dpath AAABBB[key eq CCC]$data ~~ dpath CCC[value eq RR2]
What is our $data
DataDPath ndash Synopsis (3)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200941
TAP as data structure TAP rarr TAPParser rarr TAPDOM rarr DOM
TAPDOM
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200942
use TAPDOM
same options as TAPParsermy $tapdata = new TAPDOM ( tap =gt $tap )print Dumper( $tapdata )
TAPDOM ndash Synopsis (1)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200943
bless ( tests_planned =gt 6 tests_run =gt 8 [hellip] summary =gt status =gt FAIL total =gt 8 passed =gt 6 failed =gt 2 skipped =gt 1 todo =gt 4 todo_passed =gt 2 [hellip] lines =gt [ number =gt 1 is_ok =gt 1 description =gt shy use DataDPath _children =gt [ subsequent commentsyaml is_yaml =gt 1 data =gt [ name =gt Hash one value =gt 1 name =gt Hash two value =gt 2 ] ] [hellip lines hellip] ] TAPDOM)
TAPDOM ndash Synopsis (2)
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200944
Look at complete DOM once use dpath Find interesting keys Use dpath key
dpath summarypasseddpath descriptionfoo
Complex TAPDOM is easy with DataDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200945
One function for everything hide iterating $data rarr reportdata($path)
Prelude in template engine
Daemon answers after HERE-documents
mason ltltEOTEMPLATE Planned oprofile tests foreach $plan (reportdata search path) lt $plan gt EOTEMPLATE
$ cat reportmas | netcat bancroft 7358 gt resulttxt
Daemon + Template + DPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200946
New-school dependencies
use MooseXDeclare use 5010
class DataDPath is dirty clean method match (Any $data Str $path) given ($stepshygtkind) when (ANYWHERE) hellip
DataDPath ndash Modern Perl
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200947
DataDPath rarr speed TAPDOM rarr size
Challenges
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200948
3 levels TAPDOM
in DB
DataDPath queries path + report_id CacheFileCache
MyAppDPath queries path + count of matching reports CacheFileCache
Cache
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200949
Single monster TAPs still in RAM 70MB TAP rarr xGB TAPDOM how to compress data structure open issue
Superlarge TAPDOMs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200950
AppDPath Emacs tap-mode
Project spin-offs
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200951
AppDPath cmdline tool ldquodpathrdquo around DataDPath input filters YAML JSON DataDumper INI TAP output filters YAML JSON DataDumper useful for developingdebugging DPaths
AppDPath
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200952
Find passing TODO tests
perl foot | dpath shyi tap has_todo[value==1]is_actual_ok[value==1]
shyshyshy shy as_string ok 149 shy ANYWHERE + NOSTEP TODO deferred description shy ANYWHERE + NOSTEP directive TODO explanation deferred has_todo 1 is_actual_ok 1 is_ok 1 is_test 1 number 149 type test
AppDPath ndash Example
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200953
Emacs tap-mode
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200954
Summary (1)
Test automation amp participation infrastructure
Test scripts emitting TAPecho 12echo okecho not ok
Trivially report$ testscript | netcat
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200955
Summary (2)
Review results via WebApp
Query interface DataDPath TAPDOM Templates
my ratio = reportdata search dpath
foreach my $i (0ratio)
lt $time[$i] gt lt $ratio[$i] gt
$ cat template | netcat gt result
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-
Cinderella TAP The lazy evaluation sisters of TAPParser | Aug 4 200956
Trademark Attribution
AMD the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices Inc in the United States andor other jurisdictions Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners
copy2009 Advanced Micro Devices Inc All rights reserved
- Folie 1
- Folie 2
- Folie 4
- Slide 4
- Slide 5
- Slide 6
- Slide 7
- Slide 8
- Slide 9
- Slide 10
- Slide 11
- Slide 12
- Slide 13
- Slide 14
- Slide 15
- Slide 16
- Slide 17
- Slide 18
- Slide 19
- Slide 20
- Slide 21
- Slide 22
- Slide 23
- Slide 24
- Slide 25
- Slide 26
- Slide 27
- Slide 28
- Slide 29
- Slide 30
- Slide 31
- Slide 32
- Slide 33
- Slide 34
- Slide 35
- Slide 36
- Slide 37
- Slide 38
- Slide 39
- Slide 40
- Slide 41
- Slide 42
- Slide 43
- Slide 44
- Slide 45
- Slide 46
- Slide 47
- Slide 48
- Slide 49
- Slide 50
- Slide 51
- Slide 52
- Slide 53
- Folie 52
- Slide 55
- Folie 54
-