SlideShare uma empresa Scribd logo
1 de 6
Baixar para ler offline
Intro to Server Side Programming 
Week Seven
Review - Functions 
• Functions must start with the function keyword, must contain a valid 
function identifier (with variables), provide an optional list of arguments 
surrounded by parentheses, even if there are none, and a block of code: 
function do_something( $an_argument, $another ) { 
// Code goes here 
} 
• Nothing from outside is visible to code in the block 
• Nothing inside the block is visible outside the function 
• Pass values into a function as arguments at invocation: 
do_something( 'some value', "$another_value );
Assertion Testing 
• An assertion is a predicate (true-false statement) placed in a 
program to indicate that the developer thinks that the 
predicate is always true at that place. 
• Programmers can use assertions to help specify programs 
and to reason about program correctness 
• A precondition- an assertion placed at the beginning of a 
section of code, determines the set of states under which the 
programmer expects the code to execute 
• A postcondition - placed at the end - describes the expected 
state at the end of execution
Software Testing 
• Software testing is the process of validating and verifying that 
the software: 
• meets requirements that guided its design and development 
• works as expected (produces the desired outputs/behavior) 
• satisfies the needs of stakeholders 
• Automated testing is the process of writing software that 
performs automated, repeatable isolated tests on a completely 
separate software system called the System Under Test (SUT)
Types of Testing 
• Assertion testing - is this statement correct? Can it be incorrect? 
• Unit testing - does this function produce the expected output? 
• Functional testing - does this module provide the expected functionality? 
• Integration testing - do these modules work together? 
• System testing - can we run this software where we need it? 
• Validation testing - does it do what we said that it was supposed to do? 
• Acceptance testing - is it actually useful to the intended users? 
• Regression testing - now that we fixed something what else did we break?
Test-Driven Development 
• Test-driven development is a software development process that 
relies on the repetition of a very short development cycle. The 
developer writes an automated test case that defines a desired 
improvement or function, then produces the minimum amount of 
code to pass that test and finally refactors the new code to 
acceptable standards 
1. Write code that describes a function that would be desirable to 
have but does not yet exist 
2. Run the tests to generate feedback and observe 
3. Write some code that attempts to provide the function 
4. Run the tests to generate feedback. Note failures and continue 
to write code to produce a success 
5. Repeat as necessary

Mais conteúdo relacionado

Mais procurados

Automated cceptance testing using Fitnesse & Selenium
Automated cceptance testing using Fitnesse & SeleniumAutomated cceptance testing using Fitnesse & Selenium
Automated cceptance testing using Fitnesse & Seleniummayurairon
 
ABAP Code Retreat Frankfurt 2016: TDD - Test Driven Development
ABAP Code Retreat Frankfurt 2016: TDD - Test Driven DevelopmentABAP Code Retreat Frankfurt 2016: TDD - Test Driven Development
ABAP Code Retreat Frankfurt 2016: TDD - Test Driven DevelopmentHendrik Neumann
 
Agile Acceptance testing with Fitnesse
Agile Acceptance testing with FitnesseAgile Acceptance testing with Fitnesse
Agile Acceptance testing with FitnesseClareMcLennan
 
Functional & Performance Test Automation with CI
Functional & Performance Test Automation with CI Functional & Performance Test Automation with CI
Functional & Performance Test Automation with CI Leonard Fingerman
 
Test automation
Test automationTest automation
Test automationXavier Yin
 
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile wayContinuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile wayLeonard Fingerman
 
Code Review Tool Evaluation
Code Review Tool EvaluationCode Review Tool Evaluation
Code Review Tool EvaluationKate Semizhon
 
Verification and Validation in Manual Testing
Verification and Validation in Manual TestingVerification and Validation in Manual Testing
Verification and Validation in Manual TestingBollapalli Vasundhara
 
MythBusters: Functional Testing Edition
MythBusters: Functional Testing EditionMythBusters: Functional Testing Edition
MythBusters: Functional Testing EditionSmartBear
 
Manual testing
Manual testingManual testing
Manual testingVivek V
 
Software testing
Software testingSoftware testing
Software testingK Lingaraju
 
Automation test scripting techniques
Automation test scripting techniquesAutomation test scripting techniques
Automation test scripting techniquesZhu Zhong
 
Python: Object-Oriented Testing (Unit Testing)
Python: Object-Oriented Testing (Unit Testing)Python: Object-Oriented Testing (Unit Testing)
Python: Object-Oriented Testing (Unit Testing)Damian T. Gordon
 

Mais procurados (20)

Automated cceptance testing using Fitnesse & Selenium
Automated cceptance testing using Fitnesse & SeleniumAutomated cceptance testing using Fitnesse & Selenium
Automated cceptance testing using Fitnesse & Selenium
 
Automation and Technical Debt
Automation and Technical DebtAutomation and Technical Debt
Automation and Technical Debt
 
Unit tests benefits
Unit tests benefitsUnit tests benefits
Unit tests benefits
 
ABAP Code Retreat Frankfurt 2016: TDD - Test Driven Development
ABAP Code Retreat Frankfurt 2016: TDD - Test Driven DevelopmentABAP Code Retreat Frankfurt 2016: TDD - Test Driven Development
ABAP Code Retreat Frankfurt 2016: TDD - Test Driven Development
 
Agile Acceptance testing with Fitnesse
Agile Acceptance testing with FitnesseAgile Acceptance testing with Fitnesse
Agile Acceptance testing with Fitnesse
 
Functional & Performance Test Automation with CI
Functional & Performance Test Automation with CI Functional & Performance Test Automation with CI
Functional & Performance Test Automation with CI
 
Unit testing
Unit testing Unit testing
Unit testing
 
Test automation
Test automationTest automation
Test automation
 
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile wayContinuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
 
Code Review Tool Evaluation
Code Review Tool EvaluationCode Review Tool Evaluation
Code Review Tool Evaluation
 
Automation testing
Automation testingAutomation testing
Automation testing
 
Automation With A Tool Demo
Automation With A Tool DemoAutomation With A Tool Demo
Automation With A Tool Demo
 
Verification and Validation in Manual Testing
Verification and Validation in Manual TestingVerification and Validation in Manual Testing
Verification and Validation in Manual Testing
 
MythBusters: Functional Testing Edition
MythBusters: Functional Testing EditionMythBusters: Functional Testing Edition
MythBusters: Functional Testing Edition
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Manual testing
Manual testingManual testing
Manual testing
 
Software testing
Software testingSoftware testing
Software testing
 
2 fitnesse
2 fitnesse2 fitnesse
2 fitnesse
 
Automation test scripting techniques
Automation test scripting techniquesAutomation test scripting techniques
Automation test scripting techniques
 
Python: Object-Oriented Testing (Unit Testing)
Python: Object-Oriented Testing (Unit Testing)Python: Object-Oriented Testing (Unit Testing)
Python: Object-Oriented Testing (Unit Testing)
 

Semelhante a DIG1108C Lesson 7 Fall 2014

An Introduction to Unit Test Using NUnit
An Introduction to Unit Test Using NUnitAn Introduction to Unit Test Using NUnit
An Introduction to Unit Test Using NUnitweili_at_slideshare
 
Automated testing overview
Automated testing overviewAutomated testing overview
Automated testing overviewAlex Pop
 
Structured system analysis and design
Structured system analysis and design Structured system analysis and design
Structured system analysis and design Jayant Dalvi
 
Software testing
Software testingSoftware testing
Software testingEng Ibrahem
 
Unit tests & TDD
Unit tests & TDDUnit tests & TDD
Unit tests & TDDDror Helper
 
Testing in Software Engineering.docx
Testing in Software Engineering.docxTesting in Software Engineering.docx
Testing in Software Engineering.docx8759000398
 
ST Unit-3.pptx
ST Unit-3.pptxST Unit-3.pptx
ST Unit-3.pptxJhonLiver
 
Software testing
Software testingSoftware testing
Software testingMohdVais1
 
Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality AssuranceSaqib Raza
 
SOFTWARE TESTING.pptx
SOFTWARE TESTING.pptxSOFTWARE TESTING.pptx
SOFTWARE TESTING.pptxssrpr
 
Software testing software engineering.pdf
Software testing software engineering.pdfSoftware testing software engineering.pdf
Software testing software engineering.pdfvaibhavshukla3003
 
Learn software testing with tech partnerz 1
Learn software testing with tech partnerz 1Learn software testing with tech partnerz 1
Learn software testing with tech partnerz 1Techpartnerz
 

Semelhante a DIG1108C Lesson 7 Fall 2014 (20)

Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
An Introduction to Unit Test Using NUnit
An Introduction to Unit Test Using NUnitAn Introduction to Unit Test Using NUnit
An Introduction to Unit Test Using NUnit
 
Automated testing overview
Automated testing overviewAutomated testing overview
Automated testing overview
 
Structured system analysis and design
Structured system analysis and design Structured system analysis and design
Structured system analysis and design
 
Testing Angular
Testing AngularTesting Angular
Testing Angular
 
Types of testing
Types of testingTypes of testing
Types of testing
 
Software testing
Software testingSoftware testing
Software testing
 
Unit tests & TDD
Unit tests & TDDUnit tests & TDD
Unit tests & TDD
 
Unit Tesing in iOS
Unit Tesing in iOSUnit Tesing in iOS
Unit Tesing in iOS
 
Testing in Software Engineering.docx
Testing in Software Engineering.docxTesting in Software Engineering.docx
Testing in Software Engineering.docx
 
ST Unit-3.pptx
ST Unit-3.pptxST Unit-3.pptx
ST Unit-3.pptx
 
Software testing
Software testingSoftware testing
Software testing
 
Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality Assurance
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
SOFTWARE TESTING.pptx
SOFTWARE TESTING.pptxSOFTWARE TESTING.pptx
SOFTWARE TESTING.pptx
 
Software testing
Software testingSoftware testing
Software testing
 
Software testing software engineering.pdf
Software testing software engineering.pdfSoftware testing software engineering.pdf
Software testing software engineering.pdf
 
Learn software testing with tech partnerz 1
Learn software testing with tech partnerz 1Learn software testing with tech partnerz 1
Learn software testing with tech partnerz 1
 
Software test proposal
Software test proposalSoftware test proposal
Software test proposal
 
Software testing2
Software testing2Software testing2
Software testing2
 

Mais de David Wolfpaw

Running Your Service Business on WordPress
Running Your Service Business on WordPressRunning Your Service Business on WordPress
Running Your Service Business on WordPressDavid Wolfpaw
 
Stop the Green Light Panic - Lisa Melegari
Stop the Green Light Panic - Lisa MelegariStop the Green Light Panic - Lisa Melegari
Stop the Green Light Panic - Lisa MelegariDavid Wolfpaw
 
php[world] Hooks, Actions and Filters Oh My!
php[world] Hooks, Actions and Filters Oh My!php[world] Hooks, Actions and Filters Oh My!
php[world] Hooks, Actions and Filters Oh My!David Wolfpaw
 
Hooks, Actions, and Filters Oh My!
Hooks, Actions, and Filters Oh My!Hooks, Actions, and Filters Oh My!
Hooks, Actions, and Filters Oh My!David Wolfpaw
 
DIG1108C Lesson 6 - Fall 2014
DIG1108C Lesson 6 - Fall 2014DIG1108C Lesson 6 - Fall 2014
DIG1108C Lesson 6 - Fall 2014David Wolfpaw
 
WordPress as a Minimum Viable Product - WordCamp Tampa 2014
WordPress as a Minimum Viable Product - WordCamp Tampa 2014WordPress as a Minimum Viable Product - WordCamp Tampa 2014
WordPress as a Minimum Viable Product - WordCamp Tampa 2014David Wolfpaw
 
DIG1108C Lesson 5 Fall 2014
DIG1108C Lesson 5 Fall 2014DIG1108C Lesson 5 Fall 2014
DIG1108C Lesson 5 Fall 2014David Wolfpaw
 
DIG1108C Lesson 4 Fall 2014
DIG1108C Lesson 4 Fall 2014DIG1108C Lesson 4 Fall 2014
DIG1108C Lesson 4 Fall 2014David Wolfpaw
 
DIG1108C Lesson3 Fall 2014
DIG1108C Lesson3 Fall 2014DIG1108C Lesson3 Fall 2014
DIG1108C Lesson3 Fall 2014David Wolfpaw
 
DIG1108C Lesson 2 Fall 2014
DIG1108C Lesson 2 Fall 2014DIG1108C Lesson 2 Fall 2014
DIG1108C Lesson 2 Fall 2014David Wolfpaw
 
Dig1108C Lesson 1 Fall 2014
Dig1108C Lesson 1 Fall 2014Dig1108C Lesson 1 Fall 2014
Dig1108C Lesson 1 Fall 2014David Wolfpaw
 
Spring Cleaning on Your Site
Spring Cleaning on Your SiteSpring Cleaning on Your Site
Spring Cleaning on Your SiteDavid Wolfpaw
 
Becoming a Respected WordPress Developer
Becoming a Respected WordPress DeveloperBecoming a Respected WordPress Developer
Becoming a Respected WordPress DeveloperDavid Wolfpaw
 
Beginner Workshop WCMIA
Beginner Workshop WCMIABeginner Workshop WCMIA
Beginner Workshop WCMIADavid Wolfpaw
 
Basic word press development
Basic word press developmentBasic word press development
Basic word press developmentDavid Wolfpaw
 
Geekaboo presentation 2013 - Brett Napoli
Geekaboo presentation 2013 - Brett NapoliGeekaboo presentation 2013 - Brett Napoli
Geekaboo presentation 2013 - Brett NapoliDavid Wolfpaw
 
Organization methods in word press
Organization methods in word pressOrganization methods in word press
Organization methods in word pressDavid Wolfpaw
 
WordPress tools and plugins
WordPress tools and pluginsWordPress tools and plugins
WordPress tools and pluginsDavid Wolfpaw
 

Mais de David Wolfpaw (18)

Running Your Service Business on WordPress
Running Your Service Business on WordPressRunning Your Service Business on WordPress
Running Your Service Business on WordPress
 
Stop the Green Light Panic - Lisa Melegari
Stop the Green Light Panic - Lisa MelegariStop the Green Light Panic - Lisa Melegari
Stop the Green Light Panic - Lisa Melegari
 
php[world] Hooks, Actions and Filters Oh My!
php[world] Hooks, Actions and Filters Oh My!php[world] Hooks, Actions and Filters Oh My!
php[world] Hooks, Actions and Filters Oh My!
 
Hooks, Actions, and Filters Oh My!
Hooks, Actions, and Filters Oh My!Hooks, Actions, and Filters Oh My!
Hooks, Actions, and Filters Oh My!
 
DIG1108C Lesson 6 - Fall 2014
DIG1108C Lesson 6 - Fall 2014DIG1108C Lesson 6 - Fall 2014
DIG1108C Lesson 6 - Fall 2014
 
WordPress as a Minimum Viable Product - WordCamp Tampa 2014
WordPress as a Minimum Viable Product - WordCamp Tampa 2014WordPress as a Minimum Viable Product - WordCamp Tampa 2014
WordPress as a Minimum Viable Product - WordCamp Tampa 2014
 
DIG1108C Lesson 5 Fall 2014
DIG1108C Lesson 5 Fall 2014DIG1108C Lesson 5 Fall 2014
DIG1108C Lesson 5 Fall 2014
 
DIG1108C Lesson 4 Fall 2014
DIG1108C Lesson 4 Fall 2014DIG1108C Lesson 4 Fall 2014
DIG1108C Lesson 4 Fall 2014
 
DIG1108C Lesson3 Fall 2014
DIG1108C Lesson3 Fall 2014DIG1108C Lesson3 Fall 2014
DIG1108C Lesson3 Fall 2014
 
DIG1108C Lesson 2 Fall 2014
DIG1108C Lesson 2 Fall 2014DIG1108C Lesson 2 Fall 2014
DIG1108C Lesson 2 Fall 2014
 
Dig1108C Lesson 1 Fall 2014
Dig1108C Lesson 1 Fall 2014Dig1108C Lesson 1 Fall 2014
Dig1108C Lesson 1 Fall 2014
 
Spring Cleaning on Your Site
Spring Cleaning on Your SiteSpring Cleaning on Your Site
Spring Cleaning on Your Site
 
Becoming a Respected WordPress Developer
Becoming a Respected WordPress DeveloperBecoming a Respected WordPress Developer
Becoming a Respected WordPress Developer
 
Beginner Workshop WCMIA
Beginner Workshop WCMIABeginner Workshop WCMIA
Beginner Workshop WCMIA
 
Basic word press development
Basic word press developmentBasic word press development
Basic word press development
 
Geekaboo presentation 2013 - Brett Napoli
Geekaboo presentation 2013 - Brett NapoliGeekaboo presentation 2013 - Brett Napoli
Geekaboo presentation 2013 - Brett Napoli
 
Organization methods in word press
Organization methods in word pressOrganization methods in word press
Organization methods in word press
 
WordPress tools and plugins
WordPress tools and pluginsWordPress tools and plugins
WordPress tools and plugins
 

Último

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 

Último (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

DIG1108C Lesson 7 Fall 2014

  • 1. Intro to Server Side Programming Week Seven
  • 2. Review - Functions • Functions must start with the function keyword, must contain a valid function identifier (with variables), provide an optional list of arguments surrounded by parentheses, even if there are none, and a block of code: function do_something( $an_argument, $another ) { // Code goes here } • Nothing from outside is visible to code in the block • Nothing inside the block is visible outside the function • Pass values into a function as arguments at invocation: do_something( 'some value', "$another_value );
  • 3. Assertion Testing • An assertion is a predicate (true-false statement) placed in a program to indicate that the developer thinks that the predicate is always true at that place. • Programmers can use assertions to help specify programs and to reason about program correctness • A precondition- an assertion placed at the beginning of a section of code, determines the set of states under which the programmer expects the code to execute • A postcondition - placed at the end - describes the expected state at the end of execution
  • 4. Software Testing • Software testing is the process of validating and verifying that the software: • meets requirements that guided its design and development • works as expected (produces the desired outputs/behavior) • satisfies the needs of stakeholders • Automated testing is the process of writing software that performs automated, repeatable isolated tests on a completely separate software system called the System Under Test (SUT)
  • 5. Types of Testing • Assertion testing - is this statement correct? Can it be incorrect? • Unit testing - does this function produce the expected output? • Functional testing - does this module provide the expected functionality? • Integration testing - do these modules work together? • System testing - can we run this software where we need it? • Validation testing - does it do what we said that it was supposed to do? • Acceptance testing - is it actually useful to the intended users? • Regression testing - now that we fixed something what else did we break?
  • 6. Test-Driven Development • Test-driven development is a software development process that relies on the repetition of a very short development cycle. The developer writes an automated test case that defines a desired improvement or function, then produces the minimum amount of code to pass that test and finally refactors the new code to acceptable standards 1. Write code that describes a function that would be desirable to have but does not yet exist 2. Run the tests to generate feedback and observe 3. Write some code that attempts to provide the function 4. Run the tests to generate feedback. Note failures and continue to write code to produce a success 5. Repeat as necessary