The document discusses PHPUnit, a testing framework for PHP. It provides an overview of PHPUnit, including that it was created by Sebastian Bergmann in 2004 as a port of xUnit to PHP. PHPUnit uses assertions for testing and supports unit, integration, and acceptance testing. The document reviews available assertions, annotations like @group and @dataProvider, and how to set up and run tests with PHPUnit.
How to Build and Maintain Quality Drupal Sites with Automated TestingAcquia
Automated testing has greatly improved the Drupal core development process. With automated testing over 24,500 unique core patches have been reviewed, and almost 19,000 test assertions are now run against every core patch. The result has been faster development cycle, more stable releases, and the ability to add features more quickly to Drupal core.
Have you ever wondered what the best way would be to test emails? Or how you would go about testing a messaging queue?
Making sure your components are correctly interacting with each other is both a tester and developer’s concern. Join us to get a better understanding of what you should test and how, both manually and automated.
This session is the first ever in which we will have two units working together to give you a nuanced insight on all aspects of integration testing. We’ll start off exploring the world of integration testing, defining the terminology, and creating a general understanding of what phases and kinds of testing exist. Later on we’ll delve into integration test automation, ranging from database integration testing to selenium UI testing and even as far as LDAP integration testing.
We have a wide variety of demos prepared where we will show you how easy it is to test various components of your infrastructure. Some examples:
- Database testing (JPA)
- Arquillian, exploring container testing, EJB testing and more
- Email testing
- SOAP testing using SoapUI
- LDAP testing
- JMS testing
How to Build and Maintain Quality Drupal Sites with Automated TestingAcquia
Automated testing has greatly improved the Drupal core development process. With automated testing over 24,500 unique core patches have been reviewed, and almost 19,000 test assertions are now run against every core patch. The result has been faster development cycle, more stable releases, and the ability to add features more quickly to Drupal core.
Have you ever wondered what the best way would be to test emails? Or how you would go about testing a messaging queue?
Making sure your components are correctly interacting with each other is both a tester and developer’s concern. Join us to get a better understanding of what you should test and how, both manually and automated.
This session is the first ever in which we will have two units working together to give you a nuanced insight on all aspects of integration testing. We’ll start off exploring the world of integration testing, defining the terminology, and creating a general understanding of what phases and kinds of testing exist. Later on we’ll delve into integration test automation, ranging from database integration testing to selenium UI testing and even as far as LDAP integration testing.
We have a wide variety of demos prepared where we will show you how easy it is to test various components of your infrastructure. Some examples:
- Database testing (JPA)
- Arquillian, exploring container testing, EJB testing and more
- Email testing
- SOAP testing using SoapUI
- LDAP testing
- JMS testing
Slides from the Selenium Clinic Tutorial from Eurostar 2012 hosted by Simon Stewart and Alan Richardson. The tutorial was awarded "Best Tutorial" at the conference.
The reference slides were excerpted from Alan Richardson's online WebDriver course hosted at Udemy.
http://www.udemy.com/selenium-2-webdriver-basics-with-java/
Introductory overview of testing techniques for web application development. Explains where different testing methods fit in to the software development cycle.
The Five Easy Ways to QA Your Site has been presented at DrupalCamp South Florida as well as DrupalCamp Florida. The talk addresses the issue of using simple methods to add polish to your site through established Quality Assurance methods. During this presentation you'll learn quick and easy tasks as well as what tools to use to provide a high level of quality.
Continuous Integration Testing in DjangoKevin Harvey
Continuous Integration is like having a robot that cleans up after you: it installs your dependencies, builds your project, run your tests, and reports back to you. This presentation outlines two methods for CI: Travis and Jenkins.
This workshop is about testing the right way. Get a clear view on how to test your code in an efficient and useful way!
This first testing-related workshop is about all aspects of unit testing. Integration testing and TDD will have their own dedicated workshops.
Confused by testing terms and jargon? This talk walks through testing web applications, explaining the difference between unit testing and end to end testing. Several tools and concepts are also explored through a demo section.
Sample projects can be found at https://github.com/sethmcl/testing_web_applications.
One commit, one release. Continuously delivering a Symfony project.Javier López
For the last few months we've been implementing a Continuous Delivery pipeline for the redesign of Time Out. In this talk I will demonstrate a real life example of what our pipeline looks like, the different tools we've used to get it done (phing, github, jenkins, ansible, AWS S3, ...), and peculiarities for PHP and Symfony2 projects. Most importantly, I'll be looking at things we've struggled with along the way and the lessons we've learnt.
Continous Delivering a PHP applicationJavier López
For the last few months we've been implementing a Continuous Delivery pipeline for the redesign of Time Out. In this talk I will demonstrate a real life example of what our pipeline looks like, the different tools we've used to get it done (phing, github, jenkins, ansible, AWS S3, ...), and peculiarities for PHP and Symfony2 projects. Most importantly, I'll be looking at things we've struggled with along the way and the lessons we've learnt.
In this advanced session, we will investigate all the ways that you can automate your testing processes with TestBox and many CI and automation tools. From Jenkins integration, Travis CI, Node runners, Grunt watchers and much more. This session will show you the value of continuous integration and how to apply it with modern tools and technologies.
В ходе доклада мы обсудим такие виды тестирования как:
- юнит тестирование,
- тестирование верстки,
- e2e-тестирование,
- тестирование производительности для FE
Также мы коснемся таких фундаментальных вещей, как:
- Что такое F.I.R.S.T
- Где заканчивается ответственность разработчика и начинает - ответственность QA инженера
- Как договариваться с бэкенд разработчиками
- И конечно, почему тесты нужны.
Slides done for the talk on CodeCeption given during the April London Yii Meetup.
The full screencast of the talk can be viewed here: https://www.youtube.com/watch?v=FclV9ML7bH4
This presentation addresses web app integration testing (a.k.a. browser testing) in Python. It focuses on currently-available tools, including one that I wrote, and looks at some specific integration testing concerns for the Django web framework.
Talk given at PHP World 2015 about the Hack language released by Facebook. A short history and look at it's key features as well as how Hack and PHP are evolving together.
Slides from the Selenium Clinic Tutorial from Eurostar 2012 hosted by Simon Stewart and Alan Richardson. The tutorial was awarded "Best Tutorial" at the conference.
The reference slides were excerpted from Alan Richardson's online WebDriver course hosted at Udemy.
http://www.udemy.com/selenium-2-webdriver-basics-with-java/
Introductory overview of testing techniques for web application development. Explains where different testing methods fit in to the software development cycle.
The Five Easy Ways to QA Your Site has been presented at DrupalCamp South Florida as well as DrupalCamp Florida. The talk addresses the issue of using simple methods to add polish to your site through established Quality Assurance methods. During this presentation you'll learn quick and easy tasks as well as what tools to use to provide a high level of quality.
Continuous Integration Testing in DjangoKevin Harvey
Continuous Integration is like having a robot that cleans up after you: it installs your dependencies, builds your project, run your tests, and reports back to you. This presentation outlines two methods for CI: Travis and Jenkins.
This workshop is about testing the right way. Get a clear view on how to test your code in an efficient and useful way!
This first testing-related workshop is about all aspects of unit testing. Integration testing and TDD will have their own dedicated workshops.
Confused by testing terms and jargon? This talk walks through testing web applications, explaining the difference between unit testing and end to end testing. Several tools and concepts are also explored through a demo section.
Sample projects can be found at https://github.com/sethmcl/testing_web_applications.
One commit, one release. Continuously delivering a Symfony project.Javier López
For the last few months we've been implementing a Continuous Delivery pipeline for the redesign of Time Out. In this talk I will demonstrate a real life example of what our pipeline looks like, the different tools we've used to get it done (phing, github, jenkins, ansible, AWS S3, ...), and peculiarities for PHP and Symfony2 projects. Most importantly, I'll be looking at things we've struggled with along the way and the lessons we've learnt.
Continous Delivering a PHP applicationJavier López
For the last few months we've been implementing a Continuous Delivery pipeline for the redesign of Time Out. In this talk I will demonstrate a real life example of what our pipeline looks like, the different tools we've used to get it done (phing, github, jenkins, ansible, AWS S3, ...), and peculiarities for PHP and Symfony2 projects. Most importantly, I'll be looking at things we've struggled with along the way and the lessons we've learnt.
In this advanced session, we will investigate all the ways that you can automate your testing processes with TestBox and many CI and automation tools. From Jenkins integration, Travis CI, Node runners, Grunt watchers and much more. This session will show you the value of continuous integration and how to apply it with modern tools and technologies.
В ходе доклада мы обсудим такие виды тестирования как:
- юнит тестирование,
- тестирование верстки,
- e2e-тестирование,
- тестирование производительности для FE
Также мы коснемся таких фундаментальных вещей, как:
- Что такое F.I.R.S.T
- Где заканчивается ответственность разработчика и начинает - ответственность QA инженера
- Как договариваться с бэкенд разработчиками
- И конечно, почему тесты нужны.
Slides done for the talk on CodeCeption given during the April London Yii Meetup.
The full screencast of the talk can be viewed here: https://www.youtube.com/watch?v=FclV9ML7bH4
This presentation addresses web app integration testing (a.k.a. browser testing) in Python. It focuses on currently-available tools, including one that I wrote, and looks at some specific integration testing concerns for the Django web framework.
Talk given at PHP World 2015 about the Hack language released by Facebook. A short history and look at it's key features as well as how Hack and PHP are evolving together.
php[world] 2015 Training - Laravel from the Ground UpJoe Ferguson
Most of this training was code samples which are not included here.
Ready to jump into Laravel and start building applications and more? Ready to explore more than just Adventures in Laravel 5? Come learn the best practices for local development, building real world applications, and deploying your applications to production. Join us and learn how to leverage modern development practices so build powerful and robust applications. We will also cover how to test your application's functionality so you can be more confident in deployments and upgrades. Laravel 5.1 will be the framework's first "LTS" (Long term support) version so you can be certain there will be community and support for the life of your application.
With the evolution of software, starts an evolution of the software developer and how things are approached. A different and more responsible mindset is now required and with that comes the use of the Engineering Cycle that will provide not only the basic skill set but also the core base for a Software Engineer to handle any type of project.
Have you been working with other frameworks and feel ready to try something new? Why not try Zend Framework? Not only can you use it for the full stack of your application, but you can pull out the individual components into your existing application. Get ready for a course on how to build an ZF2 application from the ground up — from the basics of an MVC app to the more advanced components. When you leave this tutorial, you will have a great grasp on how the framework is structured
Adding 1.21 Gigawatts to Applications with RabbitMQ (Bulgaria PHP 2016 - Tuto...James Titcumb
As your application grows, you soon realise you need to break up your application into smaller chunks that talk to each other. You could just use web services to interact, or you could take a more robust approach and use the message broker RabbitMQ. In this tutorial, I will introduce RabbitMQ as a solution to scalable, interoperable and flexible applications.
This tutorial is perfect for those who would like a deep dive into RabbitMQ with little or no pre-existing knowledge about message queuing systems. Once you’ve finished the tutorial, you will have learnt how to set up basic publish/subscribe message queues, control the flow of messages using various exchanges, and understand various features of RabbitMQ such as RPC, TTL, and DLX.
Security is an enormous topic, and it’s really, really complicated. If you’re not careful, you’ll find yourself vulnerable to any number of attacks which you definitely don’t want to be on the receiving end of. This talk will give you just a taster of the vast array of things there is to know about security in modern web applications, such as writing secure PHP web applications and securing a Linux server. Whether you are writing anything beyond a basic brochure website, or even developing a complicated business web application, this talk will give you insights to some of the things you need to be aware of.
Laravel is a great framework to use for web applications but what if you need to do more? Come learn how to harness the power of the console in your Laravel applications to do various tasks such as caching data from 3rd party APIs, Expire old content from S3 or other data store, and batch process huge data sets without users having to wait for results. You can even automate tasks such as backing up your remote databases before you run migrations with artisan commands.
Code Coverage for Total Security in Application MigrationsDana Luther
So the time has come to take the leap and upgrade your application to a new major version of the underlying framework, or, perhaps, to an entirely different framework... how do you ensure that none of your functionality or usability is impacted by a potentially drastic rewrite of the underlying systems? How can you move forward with 100% confidence in your migrated codebase? Testing, testing and more testing. Using a combination of unit, functional and acceptance tests can give you the certainty you need. In this talk, we will go over key strategies for ensuring that you begin with full code coverage and move forward with confidence.
Sure, you could improve yourself or promote your project the normal way, with hard work and years of slow, incremental progress. Or you could use some of the brain’s built-in cheat codes to level up on your way to success.
Along with learning, our brains are plagued by a raft of bugs and unwanted features that we have been unable to remove. Use these “features” to your advantage to teach, learn and persuade. Join us in a tour of some of the most amusing bugs and exploits that allow you to play with the interface between our brains and the world.
By using a comprehensive feature-filled framework we can build software fast. On the other hand, by decoupling our applications we can build sofware that is independent of our framework and infrastructure choices, and therefore longer lasting.
We can't do both, is one approach always right?
In this talk we'll look at different decoupling techniques, what problems they solve, and when they make sense. We will learn some concrete techniques to discover where we should be investing in decoupling, and when we should let the framework maintainers do the work for us.
The new JSON fields are some of the most talking about new features in MySQL 5.7. But they are by no means the only awesome things this version has to offer. MySQL 5.7 is a year old, so this talk won't be an introduction to this version. We will be digging into 5.7 to see how to make the most of the tools available in it. Want to tackle important practical problem solving for your data, make your query performance analysis more efficient or look at how virtual columns can help you index data? This talk is for you!
We all have focussed on best practices and code quality over the past years, but we seemed to forgot the most important aspect of the web: security. This talk gives a good overview on your first-line of defence in your code, how to ensure that new exploits and hacking techniques are covered with tests and how you build solid web applications that secured enough to keep script kiddies and wanna-be hackers away. I will also give some tips what to do when you're company becomes victim of cyber crime.
For beginners who want to go to the next level of OOP in PHP, we talk about magic methods, iterators, filters, some parts of the SPL, the subject/observer pattern and how you can build classes that have a lot of power and responsibility by implementing interfaces and then type-hinting and using just methods that are defined in the interface. Prefer composition over inheritance.
PHP World DC 2015 - What Can Go Wrong with Agile Development and How to Fix ItMatt Toigo
A talk I gave at the 2015 PHPWorld Conference. PDF Version of the slides at www.matt-toigo.com/files/phpworld_2015_presentation.pdf
Agile and Scrum are often pitched together as the definitive silver bullet for eliminating pain from software development, but they include their own sets of problems that commonly drag down development teams. Whether an agile team is executing an internal project or doing work for a client, a very similar set of problems begins to afflict all the members of such teams, regardless of their roles. The common root causes of these problems can be quickly identified, and complementary solutions can be easily implemented to ensure a happy team that continues to deliver high-quality work.
Enough suffering, fix your architecture!Luís Cobucci
You aim for a simple change to deliver a feature, but the outcome is chaotic: coupled code, unrelated things breaking, one tiny change results on a humongous changeset. Aren't you tired of this and think that software development should be simple and make people happy? Do not despair we're here to help you!
In this talk, we take a look at software anatomy, laugh at some mistakes we constantly make, and see a proof of concept using modern PHP tools. Then you will finally be able to break this cycle and find your way out of this madness.
Website Accessibility: It’s the Right Thing to doDesignHammer
Website Accessibility refers to the idea that people of all abilities and disabilities be able to access online content. These disabilities can impair vision, hearing, and movement. Since the early days of the web, accessibility focus in the US has been on government run, and government funded websites. This may soon change. Even if the new regulations don’t apply to your business, learn what is involved in making your website accessible to better serve your customers. It’s the right thing to do.
Fighting Fear-Driven-Development With PHPUnitJames Fuller
This talk was designed for PHP developers with limited or no experience in unit testing. I focus on describing the problem of fear-driven-development, and how test-driven-development can be used to improve the quality of your code.
Leveling Up With Unit Testing - php[tek] 2023Mark Niebergall
Writing unit testing on a project can seem like a daunting task, and earning team and leadership buy-in can be challenging. Level up your skillset as we cover PHPUnit and Prophecy setup with composer, writing meaningful tests, restructuring existing classes with dependency injection to allow for unit testing, using mock objects, and releasing code confidently with test coverage. We will also discuss overcoming common biases, unit testing challenges, and shortcomings of unit testing.
Automatic testing and quality assurance for WordPress plugins and themesOtto Kekäläinen
Talk given at WP Helsinki Meetup 7.11.2018
See also:
* https://developer.wordpress.org/themes
* https://developer.wordpress.org/plugins
* https://travis-ci.org/Seravo
* https://seravo.com/blog/coding-wordpress-in-style-with-phpcs/
Vagrant + Rouster at salesforce.com - PuppetConf 2013Puppet
"Vagrant + Rouster at salesforce.com" by Conor Horan-Kates
Senior Member of the Technical Staff, Quality Engineering, salesforce.com.
Speaker Presentation: Rouster is an abstraction layer between you and Vagrant. At salesforce.com, we're using it to assist in running functional tests of the Puppet code we've written. While RSpec is significantly faster, it really only tells you whether the catalog contains what you expect it to - not whether those things can/will be applied successfully - and that's where Rouster comes in.
Currently the library contains many hooks for system level testing and information gathering (is_file?(), is_user_in_group?(), is_service?()) and puppet related functionality (get_catalog(), parse_catalog(), run_puppet()), but we're looking to expand.
Speaker Bio: Conor Horan-Kates is a Senior Member of the Technical Staff in the Quality Engineering organization supporting Data Center Automation. In this role, Conor has planned and implemented test environments, created testing and development best practices and developed applications, automated tests, and test frameworks. Most recently, Rouster, an abstraction layer for Vagrant. At salesforce.com, Conor has been involved in many aspects of building the infrastructure, from initial contributions to a CMDB, testing of switch/load balancer/ACL creation automation and now, bringing the build and maintenance lifecycle into Puppet. Additionally, he has written a testing framework that interfaces with salesforce.com records, Test::More::Salesforce, and a learn-by-testing project called Perl::Koans. Prior to salesforce.com, Conor worked in QA at the antimalware company Webroot.
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Fabrice Bernhard
This is the presentation given at the Symfony Live 2011 conference. It is an introduction to the new agile movement spreading in the technical operations community called DevOps and how to adopt it on web development projects, in particular Symfony projects.
Plan of the slides :
- Configuration Management
- Development VM
- Scripted deployment
- Continuous deployment
Tools presented in the slides:
- Puppet
- Vagrant
- Fabric
- Jenkins / Hudson
This workshop is a hands-on training where a real Zend Framework application is used as an example to start improving QA using tools to test, document and perform software metric calculations to indicate where the software can be improved. I also explain the reports produced by a CI system.
Leveling Up With Unit Testing - LonghornPHP 2022Mark Niebergall
Writing unit testing on a project can seem like a daunting task, and earning team and leadership buy-in can be challenging. Level up your skillset as we cover PHPUnit and Prophecy setup with composer, writing meaningful tests, restructuring existing classes with dependency injection to allow for unit testing, using mock objects, and releasing code confidently with test coverage. We'll also discuss overcoming common biases, unit testing challenges, and shortcomings of unit testing.
How to test infrastructure code: automated testing for Terraform, Kubernetes,...Yevgeniy Brikman
This talk is a step-by-step, live-coding class on how to write automated tests for infrastructure code, including the code you write for use with tools such as Terraform, Kubernetes, Docker, and Packer. Topics covered include unit tests, integration tests, end-to-end tests, test parallelism, retries, error handling, static analysis, and more.
Start safeguarding personal information of your users at the earliest beginning in a project and make it default.
In this talk I will go over the concepts of privacy by design and default where I will go deeper into the why and how of safeguarding your user's personal information.
When we first started out with Azure, we created VM’s to run our web applications and backend services. Afterwards we moved our web application logic into App Services while using native Azure Services for our backend requirements. With containers we could isolate our individual web application components even further and allowed us to go full DevOps. Now Azure Functions allows us to remove a complete application stack allowing us to focus purely on functionality.
In this talk I go over the several phases we went through getting our application from bare metal into the cloud and how we now leverage Azure Functions to achieve higher throughput and faster delivery times while reducing the complexity of the web application and costs.
We now have to obey the law and comply with GDPR, ensuring people's data are securely stored, we track who has access to it and if the client requests to review, update or remove their data, we should do so in an automated fashion. But, are you there yet? Chances are, there's still a long way to go.
In this talk I will address some of the challenges we solved in greenfield projects as well in old, legacy applications. We introduced "privacy by design" as just another "by design" mantra we already had build in our workflow and as we worked on the project, we applied it everywhere when we saw user data (personal or not) was processed. This ensured that all data was handled and treated the same way and allowed the business to reorient themselves again to be creative in approaching their customers.
In 2009 Patrick Dubois coined the term "DevOps" when he organised the first "DevOpsDays" In Ghent, Belgium. Since then the term has become a term to explain the collaboration between all organisational stakeholders in IT projects (developers, operations, QA, marketing, security, legal, …) to deliver high quality, reliable solutions where issues are tackled early on in the value stream.
But reality shows that many businesses that implement "DevOps" are actually talking about a collaboration between development, QA and operations (DQO). Solutions are being provided but lack the security and/or legal regulations causing hard-to-fix problems in production environments.
In this talk I will explain how the original idea of Patrick to include all stakeholders got reduced to development, QA and operations and why it's so difficult to apply security or compliance improvements in this model. I will also talk about ways to make the DQO model welcoming for security experts and legal teams and why "DevSecOps" is now the term to be used to ensure security is no longer omitted from the value process.
Finally we'll have a vote if we keep the term "DevOps" as an all-inclusive representation for all stakeholders or if we need to start using "DevSecOps" to ensure the business understands can no longer ignore the importance of security.
In this presentation I'm providing reasons why you should consider privacy by design and protect the personal information of your customers using proven technology solutions and best practices.
Continuous Deployment, TDD and Continuous Integration is nothing new anymore and many of you are already veterans deploying multiple times each day code into production. But you’re still suffering from cutting corners and doing something quick on production when time is pressing, violating the processes you all worked hard on to get approved.
In this talk we take this very concept to the next level and show you how we used unconventional ways to deploy faster with less issues and regained control over a 10+ year old legacy application.
Test-driven Development (TDD) is still a subject all developers agree is a great thing, but never get around to actually doing it for many reasons. In this workshop, I use real-world business requirements on legacy code for which we need to fix bugs and add features, but we’re doing it in a TDD way.
On May 25, 2018 all companies collecting and processing data of people from within the European Union must comply to the General Data Protection Regulation or GDPR. In this talk we'll cover what the GDPR is and how it will impact businesses within the EU and abroad, what can be done to comply to this regulation and how to proceed further.
This talk will not provide you legal answers, but will give you technology solutions that will make your applications compliant to these regulations. Even if you're not processing data from the EU, these solutions will offer you better protection to the data you currently keep and will ensure that in the case of a breach, the impact will be minimum.
The days of a "simple" LAMP stack are behind us. We now rely on different types of technologies, applications and services to run our web based applications. With "the cloud" we have learned how to distribute our operations, but are we resilient when these cloud services are not available?
We have all heard about the major outages of Amazon and Azure in the past and many online services were impacted by those outages. So how can you protect yourself against being "offline" for hours or days and what are the tools you can use to protect yourself against it?
Learn how we protect our customers with distributed systems (cloud and on-prem) to mitigate outages and stay online even when the lights go out.
In December 2015, PHP 7.0 was released marking a new milestone for PHP and web application developers. We thought all was going to be easy to migrate to PHP 7.0. Unfortunately, many extensions and tools we use weren’t ready yet. In December 2016 PHP 7.1 was released, and the urgency to update became real as PHP 5.6 was nearing end-of-life. In this talk, I describe the analysis and the challenges we faced migrating towards PHP 7.1 so you can learn how to defeat those challenges if you plan to migrate too.
Frameworks give you a rich toolset to do complex tasks very easy and developers all love it. But then you need to update your framework from one version to another and things are falling apart because of the tight coupling with your business logic.
In this talk I show a couple of actual scenarios that went wrong when we moved from one framework to another and the solutions we applied to abstract business logic from framework logic. Even if you're not planning on migrating frameworks yet, decoupling is a good practice that will give you less headaches in the future.
Frameworks give you a rich toolset to do complex tasks very easy and developers all love it. But then you need to update your framework from one version to another and things are falling apart because of the tight coupling with your business logic.
In this talk I show a couple of actual scenarios that went wrong when we moved from one framework to another and the solutions we applied to abstract business logic from framework logic. Even if you're not planning on migrating frameworks yet, decoupling is a good practice that will give you less headaches in the future.
If you want to get things done and have your project up-and-running in no time, then you might want to take a look at Microsoft Azure. For PHP apps it's easy to set up and get going.
If you're an open source developer, Azure is a great platform to deploy your applications on. For personal or professional use, Azure comes with a full range of services that allow you to develop, scale and grow your application when you need it, how you need it.
On December 3, 2015 PHP 7.0.0 was released, starting a new milestone for PHP web application development and also announcing the final years for PHP 5, the version developers have loved for over a decade. A decent knowledge of PHP 5 syntax and behavior is required to understand changes that were made in PHP7.
You've got your tests, your metrics, your database migrations and your system provisioning automated, but how can you deploy everything with a push of a button and not be scared something goes wrong? Welcome to the continuous PHP Pipeline. In this talk I take the code, the tests, the metrics and the provisioners and show you how you can have a continuous delivery pipeline setup based on certain criteria you define upfront, your code gets automatically deployed to staging or to production with all the arbitrary tasks along with it. Never get stressed again about deployments. Make deployments as easy as committing to your repository and get home on time to enjoy your well deserved weekend.
A long time ago in code base not so far away...
It's a time of prosperity and happiness. Development Teams have improved their coding skills and are now very familiar with writing code with proper DocBlock comments and unit tests, safeguarding their code bases against unwanted behaviour. But the evil Internet is building their new weapon against the Development Teams and sneaks through the gaps still uncovered by tests.
Will the Development Teams be in time to safeguard their code base again and bring peace and balance in the universe?
So you have spent the last few years building PHP applications but now the business requirements have changed and you need to provide a full featured REST API. You could invest time, money and energy building it yourself, but have a look at Apigility. This is a full REST management application build on ZF2 allows you to tap into your existing PHP application and provide 100% REST endpoints to the outside world.
In this talk I go over the challenges we had to deal with creating our own REST implementation, throwing it all away because we only had 20% of the features of Apigility and setting up and managing Apigiltiy using an existing PHP application.
After this talk you will get a good understanding how to use Apigility to manage your REST API’s, while using your non-ZF2 application (Zend Framework, Symfony, Aura, ...). So you can invest time in building more features instead of trying to make your application REST compliant.
After years of promoting PHPUnit I still hear it's hard to get started with unit testing. So instead of showing nice step-by-step examples on how to use PHPUnit, we're going to take an example straight from github. So I've taken the challenge to start writing tests for PHP projects that don't have unit tests in place and explain how I decide where to begin, how I approach my test strategy and how I ensure I’m covering each possible use-case (and covering the CRAP index). The goal of this presentation is to show everyone that even legacy code, spaghetti code and complex code bases can be tested. After this talk you can immediately apply my examples on your own codebase (even if it's a clean code base) and get started with testing. To follow along a basic knowledge unit testing with PHPUnit is required.
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
CFD analysis is incredibly effective at solving mysteries and improving the performance of complex systems!
Here's a great example: At a large natural gas-fired power plant, where they use waste heat to generate steam and energy, they were puzzled that their boiler wasn't producing as much steam as expected.
R&R and Tetra Engineering Group Inc. were asked to solve the issue with reduced steam production.
An inspection had shown that a significant amount of hot flue gas was bypassing the boiler tubes, where the heat was supposed to be transferred.
R&R Consult conducted a CFD analysis, which revealed that 6.3% of the flue gas was bypassing the boiler tubes without transferring heat. The analysis also showed that the flue gas was instead being directed along the sides of the boiler and between the modules that were supposed to capture the heat. This was the cause of the reduced performance.
Based on our results, Tetra Engineering installed covering plates to reduce the bypass flow. This improved the boiler's performance and increased electricity production.
It is always satisfying when we can help solve complex challenges like this. Do your systems also need a check-up or optimization? Give us a call!
Work done in cooperation with James Malloy and David Moelling from Tetra Engineering.
More examples of our work https://www.r-r-consult.dk/en/cases-en/
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
Forklift Classes Overview by Intella PartsIntella Parts
Discover the different forklift classes and their specific applications. Learn how to choose the right forklift for your needs to ensure safety, efficiency, and compliance in your operations.
For more technical information, visit our website https://intellaparts.com
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Dr.Costas Sachpazis
Terzaghi's soil bearing capacity theory, developed by Karl Terzaghi, is a fundamental principle in geotechnical engineering used to determine the bearing capacity of shallow foundations. This theory provides a method to calculate the ultimate bearing capacity of soil, which is the maximum load per unit area that the soil can support without undergoing shear failure. The Calculation HTML Code included.
Quality defects in TMT Bars, Possible causes and Potential Solutions.PrashantGoswami42
Maintaining high-quality standards in the production of TMT bars is crucial for ensuring structural integrity in construction. Addressing common defects through careful monitoring, standardized processes, and advanced technology can significantly improve the quality of TMT bars. Continuous training and adherence to quality control measures will also play a pivotal role in minimizing these defects.
Automobile Management System Project Report.pdfKamal Acharya
The proposed project is developed to manage the automobile in the automobile dealer company. The main module in this project is login, automobile management, customer management, sales, complaints and reports. The first module is the login. The automobile showroom owner should login to the project for usage. The username and password are verified and if it is correct, next form opens. If the username and password are not correct, it shows the error message.
When a customer search for a automobile, if the automobile is available, they will be taken to a page that shows the details of the automobile including automobile name, automobile ID, quantity, price etc. “Automobile Management System” is useful for maintaining automobiles, customers effectively and hence helps for establishing good relation between customer and automobile organization. It contains various customized modules for effectively maintaining automobiles and stock information accurately and safely.
When the automobile is sold to the customer, stock will be reduced automatically. When a new purchase is made, stock will be increased automatically. While selecting automobiles for sale, the proposed software will automatically check for total number of available stock of that particular item, if the total stock of that particular item is less than 5, software will notify the user to purchase the particular item.
Also when the user tries to sale items which are not in stock, the system will prompt the user that the stock is not enough. Customers of this system can search for a automobile; can purchase a automobile easily by selecting fast. On the other hand the stock of automobiles can be maintained perfectly by the automobile shop manager overcoming the drawbacks of existing system.
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
Water scarcity is the lack of fresh water resources to meet the standard water demand. There are two type of water scarcity. One is physical. The other is economic water scarcity.
Overview of the fundamental roles in Hydropower generation and the components involved in wider Electrical Engineering.
This paper presents the design and construction of hydroelectric dams from the hydrologist’s survey of the valley before construction, all aspects and involved disciplines, fluid dynamics, structural engineering, generation and mains frequency regulation to the very transmission of power through the network in the United Kingdom.
Author: Robbie Edward Sayers
Collaborators and co editors: Charlie Sims and Connor Healey.
(C) 2024 Robbie E. Sayers
Event Management System Vb Net Project Report.pdfKamal Acharya
In present era, the scopes of information technology growing with a very fast .We do not see any are untouched from this industry. The scope of information technology has become wider includes: Business and industry. Household Business, Communication, Education, Entertainment, Science, Medicine, Engineering, Distance Learning, Weather Forecasting. Carrier Searching and so on.
My project named “Event Management System” is software that store and maintained all events coordinated in college. It also helpful to print related reports. My project will help to record the events coordinated by faculties with their Name, Event subject, date & details in an efficient & effective ways.
In my system we have to make a system by which a user can record all events coordinated by a particular faculty. In our proposed system some more featured are added which differs it from the existing system such as security.
3. Michelangelo van Dam
PHP Consultant, Community Leader & Trainer
https://www.flickr.com/photos/akrabat/8784318813
4. Create, Test, Secure, Repeat
Workshop
Get prepared
https://github.com/in2it/ctsr-workshop
Requirements
5.4+
Requirements
- a computer with PHP 5.4 or higher
- the latest composer
- git
Exercises tested on
- Microsoft Windows 7 & 8
- Linux
- Mac OS X 10.10.2 or higher
Learn unit testing like a pro
6. Introduction
Mise en place (preparation)
Running Tests
Starting a new project with TDD
Testing & Improving legacy code
Other tools
Recap & Closing remarks
https://www.flickr.com/photos/ryantylersmith/14010104872
7. Introduction
Mise en place (preparation)
Running Tests
Starting a new project with TDD
Testing & Improving legacy code
Other tools
Recap & Closing remarks
https://www.flickr.com/photos/ryantylersmith/14010104872
8. PHPUnit
• Created by Sebastian
Bergmann in 2004
• Port of xUnit to PHP
• Uses assertions for testing
• Supports
• Unit testing
• Integration testing w/ DBUnit
• Acceptance testing w/
Selenium
15. Who created PHPUnit and is
now project lead?
A. Chris Hartjes
B. Sebastian Bergmann
C. Stefan Priepsch
16. With PHPUnit you can…?
A. Test the smallest functional piece of code (unit)
B. Test integrations with a database (integration)
C. Test automated acceptance testing with Selenium
D. All of the above
E. None of the above
17. An assertion is…?
A. Verifying that an expected value matches the
result of a process?
B. Verifying that a process produces results
C. A transformation of a value
18. Assertion
• is a true/false statement
• to match an expectation
• with the result of functionality under test
25. How to use @group
# Run phpunit only against tests for the Order module
./vendor/bin/phpunit --group Order
# Run phpunit for all tests except for the Order module
./vendor/bin/phpunit --exclude-group Order
31. Introduction
Mise en place (preparation)
Running Tests
Starting a new project with TDD
Testing & Improving legacy code
Other tools
Recap & Closing remarks
https://www.flickr.com/photos/ryantylersmith/14010104872
35. For this training
Installation of source code
Clone the repository into your workspace before attending the workshop.
git clone https://github.com/in2it/ctsr-workshop.git
cd ctsr-workshop/
Once you have cloned the training package, make sure you install composer.
curl -sS https://getcomposer.org/installer | php
When the download is done, install required components using composer
php composer.phar install
36. For this training
Installation of source code
Clone the repository into your workspace before attending the workshop.
git clone https://github.com/in2it/ctsr-workshop.git
cd ctsr-workshop/
Once you have cloned the training package, make sure you install composer.
curl -sS https://getcomposer.org/installer | php
When the download is done, install required components using composer
php composer.phar install
https://www.flickr.com/photos/intelfreepress/13983474320
37. During the workshop you're asked to solve several exercises. All example codes
are based on a UNIX-like OS, so if you plan to participate this workshop with
another OS, you need to know what changes are required to have the exercises
run on your operating system.
The exercises, the source code and the examples are tested on the following
platforms:
• Windows 7
• Mac OS X
• Ubuntu Linux
When you need to switch to a specific exercise branch (e.g. ex-0.0), you can do
this with the following command.
git checkout -b ex-0.0 origin/ex-0.0
41. Introduction
Mise en place (preparation)
Running Tests
Starting a new project with TDD
Testing & Improving legacy code
Other tools
Recap & Closing remarks
https://www.flickr.com/photos/ryantylersmith/14010104872
45. Exercise 0.0
• What will happen when you run PHPUnit now?
• Checkout branch ex-0.0
git checkout -b ex-0.0 origin/ex-0.0
php composer.phar dump-autoload
• Run PHPUnit
46.
47. Let’s write our first test
<?php
namespace In2itTestWorkshopCtsr;
use In2itWorkshopCtsrSampleClass;
class SampleClassTest extends PHPUnit_Framework_TestCase
{
public function testSomethingReturnsGreeting()
{
$sampleClass = new SampleClass();
$this->assertSame(
'Hello World!', $sampleClass->doSomething()
);
}
}
48. Exercise 0.1
• What will happen when you run PHPUnit now?
• Checkout branch ex-0.1
git checkout -b ex-0.1 origin/ex-0.1
php composer.phar dump-autoload
• Run PHPUnit
49. Error?
Got Error?
error: Your local changes to the following files would be overwritten by checkout:
composer.lock
Please, commit your changes or stash them before you can switch branches.
Aborting
Solution
git checkout -- composer.lock
git checkout -b ex-0.1 origin/ex-0.1
52. Exercise 0.2
• What will happen when you run PHPUnit now?
• Checkout branch ex-0.2
git checkout -b ex-0.2 origin/ex-0.2
php composer.phar dump-autoload
• Run PHPUnit
53.
54. Exercise 0.3
• Test that you can provide an argument and the
argument will be returned as “Hello <arg>!”
• Write the test
• Modify the class
55. Modifying the test class
public function testSomethingReturnsArgument()
{
$sampleClass = new SampleClass();
$argument = 'Class';
$this->assertSame(
sprintf('Hello %s!', $argument),
$sampleClass->doSomething($argument)
);
}
61. Chapter 0
What have you learned
• How to install phpunit
• How to configure phpunit
• How to write your test first
• How to modify requirements through testing
• How to debug failures and fix them easily with tests
63. Introduction
Mise en place (preparation)
Running Tests
Starting a new project with TDD
Testing & Improving legacy code
Other tools
Recap & Closing remarks
https://www.flickr.com/photos/ryantylersmith/14010104872
66. Functional requirements
• Application needs to manage cron entries, where
all scheduled tasks are stored in a database and
written to the crontab when saved.
67. What is crontab?
• A tool on UNIX-like systems to execute tasks at a certain interval
• Each line contains the following items:
• Minutes and/or interval
• Hours and/or interval
• Days of the month (DOM) and/or interval
• Months and/or interval
• Days of the week (DOW) and/or interval
• Executable command
68. Example crontab
# Minutes Hours DOM Months DOW Command
# Warm up caches with new products
# Every 5 minutes each day
*/5 * * * * /bin/sh /path/to/productCollector.sh 2>&1
# Send marketing mail to active customers
# Every Monday at 9:30am
30 9 * * 1 /usr/bin/php /path/to/marketingMailSender.php 2>&1
# Clean up waste
# Every day at 6am, 1pm and 5pm from Monday to Friday
0 6,13,17 * * 1-5 /bin/sh /path/to/wasteCleaner.sh 2>&1
69. Analysis
• crontab = collection of entries
• Each entry contains 5 assets and a command
• Each asset can contain a
• Wildcard (full range)
• Range n-m (subset of full range)
• List n,m,o
• A single value n
• With similar intervals (without the wildcard)
71. • cronmanager
• collection of crontab entries
• each entry contains
• minutes (collection) and interval (collection)
• hours (collection) and interval (collection)
• days of the month (collection) and interval (collection)
• months (collection) and interval (collection)
• days of the week (collection) and interval (collection)
• command string
• each entry collection (minutes, hours, dom, months, dow) requires a range
• minutes (0 - 59)
• hours (0 - 23)
• days of the month (1 - 31)
• month (1 - 12)
• days of the week (0 - 7) (0 & 7 are Sunday)
• crontab is write-only, so we need to update the full crontab completely
79. Something like this… (2)
public function testEntryContainsAllFields()
{
$entry = new Entry();
$this->assertCount(0, $entry->getMinutes());
$this->assertCount(0, $entry->getHours());
$this->assertCount(0, $entry->getDom());
$this->assertCount(0, $entry->getMonths());
$this->assertCount(0, $entry->getDow());
$this->assertSame('', $entry->getCommand());
}
80. Something like this… (3)
public function testEntryCanSetEntryElements()
{
$assetCollection = $this->getMock(
'In2itWorkshopCtsrCronManagerAssetCollection'
);
$entry = new Entry();
$entry->setMinutes($assetCollection);
$this->assertInstanceOf(
'In2itWorkshopCtsrCronManagerAssetCollection',
$entry->getMinutes()
);
/*
* Similar routines for Hours, Days of the Month, Months and Days of the week
*/
$command = $this->getMock('In2itWorkshopCtsrCronManagerCommand');
$entry->setCommand($command);
$this->assertInstanceOf(
'In2itWorkshopCtsrCronManagerCommand',
$entry->getCommand()
);
}
89. Create some bad data
public function badDataProvider()
{
return array (
array ('foo'),
array (new stdClass()),
array (array ()),
array (1.50),
);
}
90. And let’s test it!
/**
* @dataProvider badDataProvider
* @covers In2itWorkshopCtsrCronManagerAsset::__construct
* @covers In2itWorkshopCtsrCronManagerAsset::setValue
* @covers In2itWorkshopCtsrCronManagerAsset::getValue
* @expectedException InvalidArgumentException
*/
public function testRejectBadData($badData)
{
$asset = new Asset($badData);
$this->fail('Expected InvalidArgumentException to be thrown');
}
95. Introduction
Mise en place (preparation)
Running Tests
Starting a new project with TDD
Testing & Improving legacy code
Other tools
Recap & Closing remarks
https://www.flickr.com/photos/ryantylersmith/14010104872
97. Legacy code
• Code that was already written
• Not (always) adhering to best
practices
• Not (always) testable
• What developers hate working
on
https://www.flickr.com/photos/archer10/7845300746
150. Let’s use the static
$params = array (
'moduleName' => 'Foo_Bar',
'minVersion' => 0,
'maxVersion' => 1,
'maxOk' => true,
);
// We use a static method for this test
$dependency = Dependency::requires_range(
$params['moduleName'],
$params['minVersion'],
$params['maxVersion'],
$params['maxOk']
);
// We use reflection to see if properties are set correctly
$reflectionClass = new ReflectionClass('Dependency');
151. Use the reflection to assert
// Let's retrieve the private properties
$moduleName = $reflectionClass->getProperty('module_name');
$moduleName->setAccessible(true);
$minVersion = $reflectionClass->getProperty('version_min');
$minVersion->setAccessible(true);
$maxVersion = $reflectionClass->getProperty('version_max');
$maxVersion->setAccessible(true);
$maxOk = $reflectionClass->getProperty('compare_max');
$maxOk->setAccessible(true);
// Let's assert
$this->assertEquals($params['moduleName'], $moduleName->getValue($dependency),
'Expected value does not match the value set’);
$this->assertEquals($params['minVersion'], $minVersion->getValue($dependency),
'Expected value does not match the value set’);
$this->assertEquals($params['maxVersion'], $maxVersion->getValue($dependency),
'Expected value does not match the value set’);
$this->assertEquals('<=', $maxOk->getValue($dependency),
'Expected value does not match the value set');
154. Introduction
Mise en place (preparation)
Running Tests
Starting a new project with TDD
Testing & Improving legacy code
Other tools
Recap & Closing remarks
https://www.flickr.com/photos/ryantylersmith/14010104872
168. Some other test tools
https://www.gnu.org/graphics/heckert_gnu.small.png
169. Introduction
Mise en place (preparation)
Running Tests
Starting a new project with TDD
Testing & Improving legacy code
Other tools
Recap & Closing remarks
https://www.flickr.com/photos/ryantylersmith/14010104872
176. in it2PROFESSIONAL PHP SERVICES
Michelangelo van Dam
Zend Certified Engineer
training@in2it.be - www.in2it.be - T in2itvof - F in2itvof
PHPUnit
Getting Started
Advanced Testing
Zend Framework 2
Fundamentals
Advanced
Azure PHP
Quick time to market
Scale up and out
jQuery
Professional jQuery
PHP
PHP for beginners
Professional PHP
HTML & CSS
The Basics
Our training courses