SlideShare a Scribd company logo
1 of 12
Download to read offline
The Modern Development Workflow
         Automate, Automate, Automate!




    Net Perspective, LLC.
    http://www.net-perspective.com/
Before We Get Started…
• I Am…
  o Daniel Cousineau
      • Lead Developer at Net Perspective, LLC
      • dcousineau@net-perspective.com
• We Are…
  o Full service web agency (development) firm based out of
    College Station, TX
• About This Topic…
  o The utilities presented are biased towards PHP and OSS
      • All are interchangeable with other languages and utilities
  o We are always improving and getting better
  o Constructive feedback always welcome


     Net Perspective, LLC.
     http://www.net-perspective.com/
Source Control
• More than 0 people on a project?
  o Extremely beneficial when with 2+ member teams
• SVN most popular
  o Integration with EVERYTHING
  o Showing its age
      • No native branching/tagging

• GIT: the up-and-coming superstar
  o Not as well integrated
  o Still new

     Net Perspective, LLC.
     http://www.net-perspective.com/
Unit Testing
• Old and Busted: GDB, New Hotness: TDD
  o Test Driven Development
  o Write tests first, code until all tests pass
• PHPUnit very popular
  o Based on the NUnit standard (JUnit sound familiar?)
• Our Goal? 100% Code Coverage
  o Means every line of source code should have been
    executed at least once when all tests completed
• Alternatives
  o SimpleTest, PHPT
     Net Perspective, LLC.
     http://www.net-perspective.com/
PHPUnit Example
class StringFunctionTest extends PHPUnit_Framework_TestCase
{
            protected $_fixture;

            //Run before each test
            public function setup()
            {
                        $this->_fixture = fopen(quot;./sample.txtquot;,quot;wquot;);
            }

            //Example test
            public function testStrToLower()
            {
                        //Object is constructed/destructed after each test
                        //Data saved to a fixture here is not preserved for the next test

                                $actual = strtolower(quot;SaMpLequot;);
                                $expected = quot;samplequot;;

                                $this->assertEquals($expected, $actual, 'comment here'); //
            }

            //Run after each test
            public function tearDown()
            {
                        fclose($this->_fixture);
            }
}




                Net Perspective, LLC.
                http://www.net-perspective.com/
Build Management
• Generating AutoDoc, running UnitTests, and
 packaging is BORING
  o “Laziness is the mark of a great developer” – Me
• Automate with Phing
  o Native PHP build system based on the popular Ant build
    system for Java
  o $ phing TARGET_NAME
      • Looks for build.xml which contains commands for the target
  o Tasks for running PHPDoc, PHPUnit, and…

     Net Perspective, LLC.
     http://www.net-perspective.com/
Phing Example
<?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?>
<project name=quot;Latitudequot; default=quot;distquot; basedir=quot;.quot;>
      <target name=quot;testquot;>
                  <phpunit2 haltonfailure=“truequot; haltonerror=“truequot; printsummary=quot;truequot;>
                              <batchtest classpath=quot;${project.basedir}/libquot;>
                                           <fileset dir=quot;${project.basedir}/testsquot;>
                                                       <include name=quot;RouteTest.phpquot; />
                                                       <include name=quot;DispatcherTest.phpquot; />
                                           </fileset>
                              </batchtest>
                  </phpunit2>
      </target>

      <target name=quot;docquot; depends=quot;testquot;>
                  <phpdoc title=quot;Latitude API Documentation“ destdir=quot;${project.basedir}/docs/“ >
                               <fileset dir=quot;${project.basedir}/libquot; >
                                           <include name=quot;**/*.phpquot; />
                               </fileset>
                  </phpdoc>
      </target>

      <target name=quot;distquot; depends=quot;testquot;>
                  <tar destfile=quot;${project.basedir}/builds/latitude.tar.gzquot; compression=quot;gzipquot;>
                              <fileset dir=quot;${project.basedir}quot;>
                                          <exclude name=quot;**/.svnquot; />
                              </fileset>
                  </tar>
      </target>
</project>



           Net Perspective, LLC.
           http://www.net-perspective.com/
Database Versioning
• DBDeploy
  o Every change to the database structure is in its own .sql file
      • Each file contains the SQL to perform changes and SQL to roll back
        those changes
  o Revision information is stored in a table
  o Written in Java, Phing has a native port built in
  o Only version structure changes and default values
      • Don’t version test and sample data!




     Net Perspective, LLC.
     http://www.net-perspective.com/
DBDeploy Example
db/deltas/1-REVISION_COMMENT.sql
--//
CREATE TABLE `sample` (
  `id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
  PRIMARY KEY (`id`) )
ENGINE = InnoDB;
--//@UNDO
DROP TABLE `sample`;
--//




              Net Perspective, LLC.
              http://www.net-perspective.com/
Continuous Integration
• Wraps everything up…
  o Ties in Versioning, Build Management, Unit Testing, [Auto
    generated Documentation, ] and Database Versioning
  o Xinc (http://xinc.eu) (a pure PHP solution)
      • CruiseControl would be the “original”
• What happens?
  o CI monitors SVN working copy
  o On update, run specified build script (Phing)
      • Phing generates UnitTest reports, API documentation, and archive files
      • Deployment code (upload to live server?)
      • UnitTest fails? Build fails
  o Store “artifacts” (generated reports, etc.) for each build

     Net Perspective, LLC.
     http://www.net-perspective.com/
Xinc Interface
Notice the Deliverable and Documentation artifacts




                 Net Perspective, LLC.
                 http://www.net-perspective.com/
In Conclusion
                                    Charts Are Useless




                                                         Pac Man
                                                         Blinky




Net Perspective, LLC.
http://www.net-perspective.com/

More Related Content

Recently uploaded

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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Recently uploaded (20)

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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Featured

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
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
 

Featured (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
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...
 

Modern Development Workflow

  • 1. The Modern Development Workflow Automate, Automate, Automate! Net Perspective, LLC. http://www.net-perspective.com/
  • 2. Before We Get Started… • I Am… o Daniel Cousineau • Lead Developer at Net Perspective, LLC • dcousineau@net-perspective.com • We Are… o Full service web agency (development) firm based out of College Station, TX • About This Topic… o The utilities presented are biased towards PHP and OSS • All are interchangeable with other languages and utilities o We are always improving and getting better o Constructive feedback always welcome Net Perspective, LLC. http://www.net-perspective.com/
  • 3. Source Control • More than 0 people on a project? o Extremely beneficial when with 2+ member teams • SVN most popular o Integration with EVERYTHING o Showing its age • No native branching/tagging • GIT: the up-and-coming superstar o Not as well integrated o Still new Net Perspective, LLC. http://www.net-perspective.com/
  • 4. Unit Testing • Old and Busted: GDB, New Hotness: TDD o Test Driven Development o Write tests first, code until all tests pass • PHPUnit very popular o Based on the NUnit standard (JUnit sound familiar?) • Our Goal? 100% Code Coverage o Means every line of source code should have been executed at least once when all tests completed • Alternatives o SimpleTest, PHPT Net Perspective, LLC. http://www.net-perspective.com/
  • 5. PHPUnit Example class StringFunctionTest extends PHPUnit_Framework_TestCase { protected $_fixture; //Run before each test public function setup() { $this->_fixture = fopen(quot;./sample.txtquot;,quot;wquot;); } //Example test public function testStrToLower() { //Object is constructed/destructed after each test //Data saved to a fixture here is not preserved for the next test $actual = strtolower(quot;SaMpLequot;); $expected = quot;samplequot;; $this->assertEquals($expected, $actual, 'comment here'); // } //Run after each test public function tearDown() { fclose($this->_fixture); } } Net Perspective, LLC. http://www.net-perspective.com/
  • 6. Build Management • Generating AutoDoc, running UnitTests, and packaging is BORING o “Laziness is the mark of a great developer” – Me • Automate with Phing o Native PHP build system based on the popular Ant build system for Java o $ phing TARGET_NAME • Looks for build.xml which contains commands for the target o Tasks for running PHPDoc, PHPUnit, and… Net Perspective, LLC. http://www.net-perspective.com/
  • 7. Phing Example <?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?> <project name=quot;Latitudequot; default=quot;distquot; basedir=quot;.quot;> <target name=quot;testquot;> <phpunit2 haltonfailure=“truequot; haltonerror=“truequot; printsummary=quot;truequot;> <batchtest classpath=quot;${project.basedir}/libquot;> <fileset dir=quot;${project.basedir}/testsquot;> <include name=quot;RouteTest.phpquot; /> <include name=quot;DispatcherTest.phpquot; /> </fileset> </batchtest> </phpunit2> </target> <target name=quot;docquot; depends=quot;testquot;> <phpdoc title=quot;Latitude API Documentation“ destdir=quot;${project.basedir}/docs/“ > <fileset dir=quot;${project.basedir}/libquot; > <include name=quot;**/*.phpquot; /> </fileset> </phpdoc> </target> <target name=quot;distquot; depends=quot;testquot;> <tar destfile=quot;${project.basedir}/builds/latitude.tar.gzquot; compression=quot;gzipquot;> <fileset dir=quot;${project.basedir}quot;> <exclude name=quot;**/.svnquot; /> </fileset> </tar> </target> </project> Net Perspective, LLC. http://www.net-perspective.com/
  • 8. Database Versioning • DBDeploy o Every change to the database structure is in its own .sql file • Each file contains the SQL to perform changes and SQL to roll back those changes o Revision information is stored in a table o Written in Java, Phing has a native port built in o Only version structure changes and default values • Don’t version test and sample data! Net Perspective, LLC. http://www.net-perspective.com/
  • 9. DBDeploy Example db/deltas/1-REVISION_COMMENT.sql --// CREATE TABLE `sample` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , PRIMARY KEY (`id`) ) ENGINE = InnoDB; --//@UNDO DROP TABLE `sample`; --// Net Perspective, LLC. http://www.net-perspective.com/
  • 10. Continuous Integration • Wraps everything up… o Ties in Versioning, Build Management, Unit Testing, [Auto generated Documentation, ] and Database Versioning o Xinc (http://xinc.eu) (a pure PHP solution) • CruiseControl would be the “original” • What happens? o CI monitors SVN working copy o On update, run specified build script (Phing) • Phing generates UnitTest reports, API documentation, and archive files • Deployment code (upload to live server?) • UnitTest fails? Build fails o Store “artifacts” (generated reports, etc.) for each build Net Perspective, LLC. http://www.net-perspective.com/
  • 11. Xinc Interface Notice the Deliverable and Documentation artifacts Net Perspective, LLC. http://www.net-perspective.com/
  • 12. In Conclusion Charts Are Useless Pac Man Blinky Net Perspective, LLC. http://www.net-perspective.com/