SlideShare a Scribd company logo
Perl Testing 101
Craig Treptow, August, 2013
Unit Tests
Goal
Isolate each part of a program and show that
the individual parts are correct.
Unit Tests
Benefits
● Find problems earlier
● Facilitate code changes
○ Help ensure changes did not affect other behavior

● Makes integration testing easier
● Code becomes “self documenting”
○ Just look at the tests
Unit Tests
Reality
● They do not “prove” software is correct
● They can be
○ wrong
○ hard to set up

● They do
○ increase programmer confidence
○ need to be treated like “real code”
Perl Testing
What is test code?
It’s just Perl code:
#!/usr/bin/perl -w

print "1..1n";

print 1 + 1 == 2 ? "ok 1n" : "not ok 1n";

Since 1 + 1 is 2, it prints:
1..1
ok 1
Perl Testing
1..1
ok 1

This says:
● I’m going to run 1 test
● The test passed
Perl Testing
Writing that kind of code would get tedious.
So, start with Test::Simple:
#!/usr/bin/perl -w

use Test::Simple tests => 1;

ok( 1 + 1 == 2 );

That runs the same test as before.
Perl Testing
Want more tests?
#!/usr/bin/perl -w

use Test::Simple tests => 2;
ok( 1 + 1 == 2 );
ok( 2 + 2 == 5 );

Run the test:
perl simple.t

Produces:
1..2
ok 1
not ok 2
#

Failed test (test.pl at line 5)

# Looks like you failed 1 tests of 2.
Perl Testing
Before we go on:
a few conventions
● Test files are kept in folders called ‘t’
● Test files are named <something>.t
○ 00-<test prerequisites>.t
○ 10-<module name>.t
○ 20-<module name>.t

There aren’t “rules”, it’s Perl!!
Perl Testing
Test::Simple
● Only provides ok()
● Can be awkward
○ Can’t tell what you got for a result
○ Only True/False (ok/not ok)

There is hope...
Perl Testing
Test::More
● ok(), is(), isnt()
● like(), unlike()
● cmp_ok(), can_ok(), isa_ok()
● use_ok(), require_ok()
● is_deeply()
● eq_array(), eq_hash(), eq_set

More Related Content

What's hot

PHPUnit with Magento
PHPUnit with MagentoPHPUnit with Magento
PHPUnit with Magento
Tu Hoang
 
TDD Workshop UTN 2012
TDD Workshop UTN 2012TDD Workshop UTN 2012
TDD Workshop UTN 2012
Facundo Farias
 
Dot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel TettelarDot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel Tettelar
Giel Tettelaar
 
The art of being an agile programmer
The art of being an agile programmerThe art of being an agile programmer
The art of being an agile programmer
Claudia Rosu
 
Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy
Vijay Kumbhar
 
Software engineering
Software engineeringSoftware engineering
Software engineering
bartlowe
 
Test Presentation
Test PresentationTest Presentation
Test Presentation
setitesuk
 
20150128 angular js_headless_testing
20150128 angular js_headless_testing20150128 angular js_headless_testing
20150128 angular js_headless_testing
Benjamin Neu
 
TDD Basics with Angular.js and Jasmine
TDD Basics with Angular.js and JasmineTDD Basics with Angular.js and Jasmine
TDD Basics with Angular.js and Jasmine
Luis Sánchez Castellanos
 
Test Driven Development with PHPUnit
Test Driven Development with PHPUnitTest Driven Development with PHPUnit
Test Driven Development with PHPUnit
Tuan Nguyen
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
dcsunu
 
[FullStack NYC 2019] Effective Unit Tests for JavaScript
[FullStack NYC 2019] Effective Unit Tests for JavaScript[FullStack NYC 2019] Effective Unit Tests for JavaScript
[FullStack NYC 2019] Effective Unit Tests for JavaScript
Hazem Saleh
 
TDD
TDDTDD
Btd presentation-2011
Btd presentation-2011Btd presentation-2011
Btd presentation-2011
kinow
 
DevOps
DevOpsDevOps
DevOps
Sunny Poswal
 
PuppetConf 2017: Test Driving Your Infrastructure with Jesus Alvarez & Jesse ...
PuppetConf 2017: Test Driving Your Infrastructure with Jesus Alvarez & Jesse ...PuppetConf 2017: Test Driving Your Infrastructure with Jesus Alvarez & Jesse ...
PuppetConf 2017: Test Driving Your Infrastructure with Jesus Alvarez & Jesse ...
Puppet
 
Agile testing for large projects
Agile testing for large projectsAgile testing for large projects
Agile testing for large projects
gaoliang641
 
Android tdd
Android tddAndroid tdd
Android tdd
Nhan Cao
 
Top 25 Selenium Interview Questions and Answers 2018
Top 25 Selenium Interview Questions and Answers 2018Top 25 Selenium Interview Questions and Answers 2018
Top 25 Selenium Interview Questions and Answers 2018
Testbytes
 
javabasics_ programming development chapter01
javabasics_ programming development chapter01javabasics_ programming development chapter01
javabasics_ programming development chapter01
Udeshg90
 

What's hot (20)

PHPUnit with Magento
PHPUnit with MagentoPHPUnit with Magento
PHPUnit with Magento
 
TDD Workshop UTN 2012
TDD Workshop UTN 2012TDD Workshop UTN 2012
TDD Workshop UTN 2012
 
Dot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel TettelarDot all 2019 | Testing with Craft | Giel Tettelar
Dot all 2019 | Testing with Craft | Giel Tettelar
 
The art of being an agile programmer
The art of being an agile programmerThe art of being an agile programmer
The art of being an agile programmer
 
Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
Test Presentation
Test PresentationTest Presentation
Test Presentation
 
20150128 angular js_headless_testing
20150128 angular js_headless_testing20150128 angular js_headless_testing
20150128 angular js_headless_testing
 
TDD Basics with Angular.js and Jasmine
TDD Basics with Angular.js and JasmineTDD Basics with Angular.js and Jasmine
TDD Basics with Angular.js and Jasmine
 
Test Driven Development with PHPUnit
Test Driven Development with PHPUnitTest Driven Development with PHPUnit
Test Driven Development with PHPUnit
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
[FullStack NYC 2019] Effective Unit Tests for JavaScript
[FullStack NYC 2019] Effective Unit Tests for JavaScript[FullStack NYC 2019] Effective Unit Tests for JavaScript
[FullStack NYC 2019] Effective Unit Tests for JavaScript
 
TDD
TDDTDD
TDD
 
Btd presentation-2011
Btd presentation-2011Btd presentation-2011
Btd presentation-2011
 
DevOps
DevOpsDevOps
DevOps
 
PuppetConf 2017: Test Driving Your Infrastructure with Jesus Alvarez & Jesse ...
PuppetConf 2017: Test Driving Your Infrastructure with Jesus Alvarez & Jesse ...PuppetConf 2017: Test Driving Your Infrastructure with Jesus Alvarez & Jesse ...
PuppetConf 2017: Test Driving Your Infrastructure with Jesus Alvarez & Jesse ...
 
Agile testing for large projects
Agile testing for large projectsAgile testing for large projects
Agile testing for large projects
 
Android tdd
Android tddAndroid tdd
Android tdd
 
Top 25 Selenium Interview Questions and Answers 2018
Top 25 Selenium Interview Questions and Answers 2018Top 25 Selenium Interview Questions and Answers 2018
Top 25 Selenium Interview Questions and Answers 2018
 
javabasics_ programming development chapter01
javabasics_ programming development chapter01javabasics_ programming development chapter01
javabasics_ programming development chapter01
 

Similar to Perl testing 101

Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
priya_trivedi
 
Why unit testingl
Why unit testinglWhy unit testingl
Why unit testingl
Priya Sharma
 
Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
priya_trivedi
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
Anuj Arora
 
utplsql.pdf
utplsql.pdfutplsql.pdf
utplsql.pdf
vijayv991893
 
Tdd - introduction
Tdd - introductionTdd - introduction
Tdd - introduction
Samad Koushan
 
Getting started with unit and functional testing
Getting started with unit and functional testingGetting started with unit and functional testing
Getting started with unit and functional testing
Adewale Andrade
 
What is Unit Testing
What is Unit TestingWhat is Unit Testing
What is Unit Testing
Sadaaki Emura
 
Project Onion unit test environment
Project Onion unit test environmentProject Onion unit test environment
Project Onion unit test environment
Abhinav Jha
 
Unit testing
Unit testingUnit testing
Unit testing
PiXeL16
 
Unit testing in PHP
Unit testing in PHPUnit testing in PHP
Unit testing in PHP
Lee Boynton
 
Software Testing Basic Concepts
Software Testing Basic ConceptsSoftware Testing Basic Concepts
Software Testing Basic Concepts
wesovi
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
ZendCon
 
Unit Testing and TDD 2017
Unit Testing and TDD 2017Unit Testing and TDD 2017
Unit Testing and TDD 2017
Xavi Hidalgo
 
Unit testing in PHP
Unit testing in PHPUnit testing in PHP
Unit testing in PHP
Chonlasith Jucksriporn
 
iOS Test-Driven Development
iOS Test-Driven DevelopmentiOS Test-Driven Development
iOS Test-Driven Development
Pablo Villar
 
From Gatekeeper to Partner by Kelsey Shannahan
From Gatekeeper to Partner by Kelsey ShannahanFrom Gatekeeper to Partner by Kelsey Shannahan
From Gatekeeper to Partner by Kelsey Shannahan
QA or the Highway
 
Unit testing (eng)
Unit testing (eng)Unit testing (eng)
Unit testing (eng)
Anatoliy Okhotnikov
 
Effective TDD - Less is more
Effective TDD - Less is moreEffective TDD - Less is more
Effective TDD - Less is more
Ben Lau
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development
CodeOps Technologies LLP
 

Similar to Perl testing 101 (20)

Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
 
Why unit testingl
Why unit testinglWhy unit testingl
Why unit testingl
 
Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
utplsql.pdf
utplsql.pdfutplsql.pdf
utplsql.pdf
 
Tdd - introduction
Tdd - introductionTdd - introduction
Tdd - introduction
 
Getting started with unit and functional testing
Getting started with unit and functional testingGetting started with unit and functional testing
Getting started with unit and functional testing
 
What is Unit Testing
What is Unit TestingWhat is Unit Testing
What is Unit Testing
 
Project Onion unit test environment
Project Onion unit test environmentProject Onion unit test environment
Project Onion unit test environment
 
Unit testing
Unit testingUnit testing
Unit testing
 
Unit testing in PHP
Unit testing in PHPUnit testing in PHP
Unit testing in PHP
 
Software Testing Basic Concepts
Software Testing Basic ConceptsSoftware Testing Basic Concepts
Software Testing Basic Concepts
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Unit Testing and TDD 2017
Unit Testing and TDD 2017Unit Testing and TDD 2017
Unit Testing and TDD 2017
 
Unit testing in PHP
Unit testing in PHPUnit testing in PHP
Unit testing in PHP
 
iOS Test-Driven Development
iOS Test-Driven DevelopmentiOS Test-Driven Development
iOS Test-Driven Development
 
From Gatekeeper to Partner by Kelsey Shannahan
From Gatekeeper to Partner by Kelsey ShannahanFrom Gatekeeper to Partner by Kelsey Shannahan
From Gatekeeper to Partner by Kelsey Shannahan
 
Unit testing (eng)
Unit testing (eng)Unit testing (eng)
Unit testing (eng)
 
Effective TDD - Less is more
Effective TDD - Less is moreEffective TDD - Less is more
Effective TDD - Less is more
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development
 

Recently uploaded

GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
FODUU
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
Claudio Di Ciccio
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 

Recently uploaded (20)

GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 

Perl testing 101

  • 1. Perl Testing 101 Craig Treptow, August, 2013
  • 2. Unit Tests Goal Isolate each part of a program and show that the individual parts are correct.
  • 3. Unit Tests Benefits ● Find problems earlier ● Facilitate code changes ○ Help ensure changes did not affect other behavior ● Makes integration testing easier ● Code becomes “self documenting” ○ Just look at the tests
  • 4. Unit Tests Reality ● They do not “prove” software is correct ● They can be ○ wrong ○ hard to set up ● They do ○ increase programmer confidence ○ need to be treated like “real code”
  • 5. Perl Testing What is test code? It’s just Perl code: #!/usr/bin/perl -w print "1..1n"; print 1 + 1 == 2 ? "ok 1n" : "not ok 1n"; Since 1 + 1 is 2, it prints: 1..1 ok 1
  • 6. Perl Testing 1..1 ok 1 This says: ● I’m going to run 1 test ● The test passed
  • 7. Perl Testing Writing that kind of code would get tedious. So, start with Test::Simple: #!/usr/bin/perl -w use Test::Simple tests => 1; ok( 1 + 1 == 2 ); That runs the same test as before.
  • 8. Perl Testing Want more tests? #!/usr/bin/perl -w use Test::Simple tests => 2; ok( 1 + 1 == 2 ); ok( 2 + 2 == 5 ); Run the test: perl simple.t Produces: 1..2 ok 1 not ok 2 # Failed test (test.pl at line 5) # Looks like you failed 1 tests of 2.
  • 9. Perl Testing Before we go on: a few conventions ● Test files are kept in folders called ‘t’ ● Test files are named <something>.t ○ 00-<test prerequisites>.t ○ 10-<module name>.t ○ 20-<module name>.t There aren’t “rules”, it’s Perl!!
  • 10. Perl Testing Test::Simple ● Only provides ok() ● Can be awkward ○ Can’t tell what you got for a result ○ Only True/False (ok/not ok) There is hope...
  • 11. Perl Testing Test::More ● ok(), is(), isnt() ● like(), unlike() ● cmp_ok(), can_ok(), isa_ok() ● use_ok(), require_ok() ● is_deeply() ● eq_array(), eq_hash(), eq_set