SlideShare uma empresa Scribd logo
1 de 62
Warming up to  modular testing ,[object Object],[object Object]
Who is this guy ,[object Object],[object Object],[object Object]
What we'll cover ,[object Object],[object Object],[object Object],[object Object]
The Harness
Harness to run the show ,[object Object],[object Object],[object Object]
./bin/micro_test ,[object Object],[object Object],[object Object]
./bin/micro_test ,[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
TAP::Harness can ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Common test functions
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Arcos::Test
[object Object],[object Object],[object Object],Arcos::Test  Convenience Methods
[object Object],[object Object],[object Object],[object Object],[object Object],Arcos::Test  Affecting the Environment
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Arcos::Test  Checking the Environment
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Arcos::Test  Checking the Environment
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Arcos::Test  Checking the Environment
Test::Class
[object Object],Test::Class  Method Attributes  Test(4)
[object Object],[object Object],Test::Class  Method Attributes  Test(4)
[object Object],[object Object],[object Object],Test::Class  Method Attributes  Test(4)
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Test::Class  Method Attributes  Test(4)
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Test::Class  Method Attributes  Test(no_plan)
[object Object],[object Object],Test::Class  Method Attributes  Test(startup)
[object Object],[object Object],[object Object],[object Object],Test::Class  Method Attributes  Test(startup)
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Test::Class  Method Attributes  Test(startup)
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Test::Class  Method Attributes  Test(startup)
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Test::Class  Method Attributes  Test(startup)
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Test::Class  Method Attributes  Test(startup)
Inheritance in your tests
[object Object],Arcos::Test::Class
[object Object],[object Object],Arcos::Test::Class
[object Object],[object Object],Arcos::Test::Class
[object Object],[object Object],[object Object],[object Object],Arcos::Test::Class
[object Object],[object Object],[object Object],[object Object],[object Object],Arcos::Test::Class
Arcos::Test::Class ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Arcos::Test::Class ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Inherited Forms, with Inherited Tests ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Arcos::Form::Test the parent ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
An example of inherited tests ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Inheritance Example
We still have .t files  t/register_form.t ,[object Object]
We still have .t files  t/contact_official_form.t ,[object Object],[object Object],[object Object],[object Object],[object Object]
We still have .t files  t/contact_official_form.t ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
We still have .t files  t/contact_official_form.t ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
We still have .t files  t/contact_official_form.t ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
return to skip ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
plan to skip ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
TEST_METHOD ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
TEST_METHOD ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
a lot of reuse ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Bonus slides
TODO tests ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
pausing to look around ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
calling plan from Arcos::Test ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Additional Resources
Additional Resources ,[object Object],[object Object],[object Object],[object Object],[object Object]
Thank you for your time!

Mais conteúdo relacionado

Último

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Último (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 

Destaque

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Destaque (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

Warming up to Modular Testing (YAPC::NA::2009)

Notas do Editor

  1. grab a list of .t files then create a TAP::Harness object now have the harness run the tests
  2. the harness object can take arguments in new(). can try with verbose -- ok for every passing test.   The merge option on new merges STDOUT and STDERR -- this is most useful when using TAP::Harness::Archive -- you know, for submitting to a Smolder server.
  3. We do some setup in our harness before we get to running any test code. If ARCOS_ROOT isn't set, calculate it from harness path. We modify the PERL5LIB to add our application lib. Try loading Arcos module and bail if cannot.
  4. We do some setup in our harness before we get to running any test code. If ARCOS_ROOT isn't set, calculate it from harness path. We modify the PERL5LIB to add our application lib. Try loading Arcos module and bail if cannot.
  5. We do some setup in our harness before we get to running any test code. If ARCOS_ROOT isn't set, calculate it from harness path. We modify the PERL5LIB to add our application lib. Try loading Arcos module and bail if cannot.
  6. Go ahead and add more BEGIN blocks Our code also needs pointed to an instance (any instance) within our configuration. Pick the first one if none is already set.
  7. Arcos sets a version string. This Arcos Script will see if we're running as the right system user and become them with calls to setuid() and setgid() We do more here, but that's beyond the scope of this talk.
  8. You've all seen Getopt::Long's GetOptions() We use it to pull in command line parameters to our harness. There are a handful more than are listed here database passwords a test_pollution flag
  9. “ try” -- Colorized results depends on terminal support. if your tests can be run in parallel without interfering with one another, TAP::Harness can handle it.
  10. Spread is only part of what island_mode.t exercises, so skip instead of skip_all
  11. Here is a sample showing the individual test assertions you're used to seeing : ok, like, etc. We capture the stdout and stderr with a backticks execute and check the results. We use some of the data to pull a job from the database, retrieve the associated contribution, and check its contact information.
  12. open_handler.t tests that we properly handle the image requests from end users opening emails. no_plan is still a plan. If apache is not running, none of this test is going to be useful. so we skip_all.
  13. .
  14. .
  15. use base 'Test::Class'; json_success and json_failure are calls to json_contains('success') and json_lacks('success) respectively.
  16. Here we can see the common definition of methods that will be shared by the children.   x_create_form has the Test(startup) attribute, so it will be run before the regular test methods.  The 3 parameter notes how many tests are within that method. The form_db_class() method is used in the x_create_form() call to setup the form before the tests begin.  Here it is empty string, the children must override with a proper value. ContactOfficial forms need some additional elements, but Register forms do not.
  17. Because it is inherited, the tc_startup method can be completely overridden, or merely augmented if the call to SUPER is included.
  18. This script performs a couple checks before calling runtests. These are common across many of our tests and are defined in Arcos::Test. needs_running_apache checks if apache is running and attempts to start it if not. If apache cannot be started, the test would skip with the following code: Test::More::plan(skip_all => 'Could not start Arcos Apache/mod_perl server');
  19. We also stop our Arcos job queue daemon for this test. We want to be able to inspect jobs as they're inserted into the queue, before they're processed.
  20. Now we restart the queue so that it functions normally for other tests.
  21. While developing tests it may be convenient to go ahead and skip particular test methods.     Calls to return() will be interpreted as a skip.     A string can be passed to provide a reason for skipping the rest of that method.
  22. In run scripts it's often best to just skip the whole module worth of tests if some conditions do not exist. ContributionTestMode is imported from Arcos::Conf Do add descriptive instructions to your messages, if you're doing something unusual in part of your tests.
  23. This environment variable can save you time while developing your tests.   Its value restricts which of the subroutines with the Test attribute are run. The startup and shutdown subroutines are still going to be called. In a large file with many tests, this can help you iterate quickly when making and checking modifications to specific subroutines.
  24. You can treat it as a string, but it is a regex and can perform more complicated matching. Here we're running any Test methods that either start with a_ or with b_ in their names. (possibly show how often I use it: “ history | grep TEST_METHOD”)
  25. Many of our report modules have a common ancestor in Arcos::Report::SiteEvents These reports all provide Listing of forms, Downloading CSV data, It was only natural to use inheritance to gain some reuse in the testing code too.  
  26. We don't do much with marking tests as TODO in our suite. Here is how you can.
  27. Lots of our tests are interacting with the web interface of Arcos. Often it is nice to get a failing test to stop for a bit before cleaning up and removing all of the evidence during shutdown. I find myself adding this little fragment all the time. Put the pause code in your shutdown method if you want to be able to use it with any routine you're putting into TEST_METHOD. Examples: * a new column is added to a listing screen. * the test isn't including a timestamp into the form names, and is choking because the database hasn't been cleared between runs.
  28. Our run scripts make use of some reused routines in Arcos::Test.  needs_run_daily is one of those cases. Be nice and put the instructions into the skip messages for running the conditional parts of your unusual tests.   The external vendor had a limitation on the number of requests they could receive before an over-limit error was returned. We didn't want these tests running on each developers laptops even once daily. We wanted these tests to run a maximum of once daily in our automated test environment.
  29. My resource for learning this material was an existing codebase. Hopefully these other resources will be helpful to you.