This document discusses test-driven development (TDD) and unit testing. It begins with an introduction to TDD and examples using PHPUnit. It then explores the TDD cycle, common excuses for not using TDD, and pros and cons of TDD. Next, it distinguishes unit testing from TDD and discusses unit testing frameworks like PHPUnit and SimpleTest. Finally, it provides examples of code for a simple game that could be used to learn TDD and unit testing techniques.
Effectively Reuse the Code Between PHP ProjectsAndrew Yatsenko
The new project has come, and you need to reuse several libraries from the old one? Or maybe you have added a new microservice and need to reuse a couple of packages from other microservices?
In this report, I'm reviewing methods for reusing code between applications that we have experienced on our projects for several years. I show how to avoid copying the packages, while not spending additional resources on the publication of individual packages.
The talk is about practical usage of git submodules, composer public, private, VCS and "path" repositories, and git subtree splitter; benefits, and cons of each method, and how we used them in practice for multiple projects.
Effectively Reuse the Code Between PHP ProjectsAndrew Yatsenko
The new project has come, and you need to reuse several libraries from the old one? Or maybe you have added a new microservice and need to reuse a couple of packages from other microservices?
In this report, I'm reviewing methods for reusing code between applications that we have experienced on our projects for several years. I show how to avoid copying the packages, while not spending additional resources on the publication of individual packages.
The talk is about practical usage of git submodules, composer public, private, VCS and "path" repositories, and git subtree splitter; benefits, and cons of each method, and how we used them in practice for multiple projects.
Talk apresentada no 21o RubyFloripa contando como foi a experiência em assumir uma app legada Rails e introduzir Elixir. Utilizando tecnologias como GenStage, AWS SQS e SNS.
Talk at FI MUNI about C++ and important skills that should developer know. Talking about soft skills and communication with architects and product owners.
Leaning on the two Ts is a talk on improving code quality, personal practise and developing good habits using tools and techniques.
Attendees of this talk will learn about my experience when learning to use static analysis tools (i.e. SonarQube) and some of its features. In addition also find out how it can be used to improve your code quality and personal practice. A number of tools will also be mentioned and how to include them in your practise.
Powerpoint-like presentation sharing information from a perspective higher than just the use of tools, although no runtime implementation or live coding will be performed. Live examples might be shown depending on time constraints.
The presentation is definitely for intermediate and experienced Java developers, but also beginner developers who would like to know more about code quality and tools that can be of help. Also for those already using static analysis or other tools in anger or just casually. Especially those who would like to know how to use tools as a medium to learn from.
Introduction to Spock: A Unit Testing FrameworkKnoldus Inc.
When it comes to true unit tests, having a mocking framework such as Spock for Java is essential. Using a mocking framework ensures that your unit tests are fast, self-contained, and deterministic. A mocking framework can help you fake external systems, pre-program your classes with expected responses, and test hard-to-replicate error conditions.
In this, we will cover the Spock testing framework, an emerging framework that can be used to test both Java and Groovy code. Unlike Mockito, Spock is a complete testing framework that can function on its own (Mockito works in addition to JUnit).
You’ll understand:
~ How Spock tests leverage existing JUnit infrastructure
~ Spock annotations and where they apply
~ Spock mocks and stubs and how to take advantage of them
And you’ll be able to:
~ Set up test fixtures
~ Run testing methods before and after tests and test classes
~ Mock classes and interfaces set expectations, and validate them
Test-Driven Development with TypeScript+Jasmine+AngularJSSmartOrg
A session held for students at San Jose State University. A live pair-programming session and these slides were used before that session. For the code in the live exercise, follow instructions in the slides.
Talk apresentada no 21o RubyFloripa contando como foi a experiência em assumir uma app legada Rails e introduzir Elixir. Utilizando tecnologias como GenStage, AWS SQS e SNS.
Talk at FI MUNI about C++ and important skills that should developer know. Talking about soft skills and communication with architects and product owners.
Leaning on the two Ts is a talk on improving code quality, personal practise and developing good habits using tools and techniques.
Attendees of this talk will learn about my experience when learning to use static analysis tools (i.e. SonarQube) and some of its features. In addition also find out how it can be used to improve your code quality and personal practice. A number of tools will also be mentioned and how to include them in your practise.
Powerpoint-like presentation sharing information from a perspective higher than just the use of tools, although no runtime implementation or live coding will be performed. Live examples might be shown depending on time constraints.
The presentation is definitely for intermediate and experienced Java developers, but also beginner developers who would like to know more about code quality and tools that can be of help. Also for those already using static analysis or other tools in anger or just casually. Especially those who would like to know how to use tools as a medium to learn from.
Introduction to Spock: A Unit Testing FrameworkKnoldus Inc.
When it comes to true unit tests, having a mocking framework such as Spock for Java is essential. Using a mocking framework ensures that your unit tests are fast, self-contained, and deterministic. A mocking framework can help you fake external systems, pre-program your classes with expected responses, and test hard-to-replicate error conditions.
In this, we will cover the Spock testing framework, an emerging framework that can be used to test both Java and Groovy code. Unlike Mockito, Spock is a complete testing framework that can function on its own (Mockito works in addition to JUnit).
You’ll understand:
~ How Spock tests leverage existing JUnit infrastructure
~ Spock annotations and where they apply
~ Spock mocks and stubs and how to take advantage of them
And you’ll be able to:
~ Set up test fixtures
~ Run testing methods before and after tests and test classes
~ Mock classes and interfaces set expectations, and validate them
Test-Driven Development with TypeScript+Jasmine+AngularJSSmartOrg
A session held for students at San Jose State University. A live pair-programming session and these slides were used before that session. For the code in the live exercise, follow instructions in the slides.
With Extbase - a new framework for extension development introduced in TYPO3 4.3 - you are able to develop with the paradigms of FLOW3 today. During this talk, you get in touch with the features of the framework to understand how it supports your development process to develop clean code cost efficient in less time. Extbase is one cornerstone for a smooth transition to TYPO3 v5, another is reusable business domain knowledge in form of Generic Domain Models available in 4.x and 5.x. The Generic Domain Models will enable you to add a Semantic Web topping.
Introduction to Test-Driven Development and why using Dependency Injection as provided by FLOW3 makes it an even better development approach. Presented at the 4th International TYPO3 Conference 2008 in Berlin.
● What is Unit Testing?
● Benefits
● What is Test Driven Development?
● What is Behavior Driven Development?
● Categories of (Unit) Tests / Software Testing
Pyramid, Frameworks
● C++, Java, .NET, Perl, PHP frameworks
● Unit-testing Zend Framework application
A brief introduction to test automation covering different automation approaches, when to automate and by whom, commercial vs. open source tools, testability, and so on.
Code Quality Control in a PHP project. GeekTalks, Cherkassy 2020Andrew Yatsenko
When one experienced and 5 junior developers are working on the project, the team leader can monitor the quality of the code manually, using the help of simple static analyzers like phpmd and phpcs.
In this report, we will consider what to do next, with the growth of the team, when there are too many people for manual control, the teams already consist of strong developers. Approaches, methods of automation tools that we use on the open-source B2B eCommerce platform to control the quality of the code.
Best Practices in PHP Application DeploymentShahar Evron
An overview of the challenges in managing the web application development lifecycle and how a correct deployment system can help. A few common deployment techniques are reviewed. In addition, some info on an upcoming Zend Server deployment feature.
Test Driven Development Methodology and Philosophy Vijay Kumbhar
A technique for building software that guides software development by writing tests. This is the philosophy and state of mind that a developer should change and start following TDD
Passing the Joel Test in the PHP World (phpbnl10)Lorna Mitchell
Talk given at the PHP Benelux conference in Antwerp, examining the points in the Joel Test and looking at how these suggested best practices apply to web development today
Demonstrating of how Codeception can help us, PHP developers, with the issues that affect testing of projects with dynamic frontend (angular, ember, etc.).
One of the main hindrances to teams being able to respond rapidly to new features are technical problems resulting from bad coding practices, also known as technical debt. Melissa and Brett will cover Agile tools and practices that help development teams write better code and increase maintainability. Topics that will be covered include:
Pair programming
Automated Unit Testing
Refactoring
Test-Driven Development
Agile Architecture
No matter what level of development we are at in our careers we all face a daily battle to write good code for ourselves and others, deliver finished applications fast to satisfy business, and ensure everything is tested to prevent end-user fails. In this talk we will discuss what “clean application development” is, and how it can help us win those battles. The talk will provide practical and usable examples to take with you, integrate into your workflow, and continue to grow into good habits.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Test Driven Development with PHP
1. DRI Code Sessions
● TDD - Test Driven Development
Introduction to TDD, Unit Testing and some
short examples in PHP with PHPUnit.
Content by Rogério Vicente under the Creative Commons License
2. TDD – What is it?
● Software Development technique
● Short development cycle
● Write tests before any production code
● Write only the minimum amount of code
required to pass the tests
● It's great for code documentation
4. Common excuses
● “We have no time to write tests”
● “Testing is boring”
● “My code is good enough”
● “That's not my job, tests are for QA
Department”
● “This is just something simple. It's not
worth it”
5. TDD - Pros
● Some studies conclude that TDD raises
productivity – less time spent debugging
● Makes programmers focus on interface
before implementation
● Provides greater level of confidence in the
code
● Can lead to more modularized, flexible and
extensible code
● Tests are a source of documentation
6. TDD - Cons
● Difficult to use with GUI's and code that
works with databases
● Badly written tests become a burden to
maintain
● Specs misinterpretation leads to wrong
tests and wrong code
● Management support is crucial
7. Unit Testing
● Not TDD
● Part of TDD
● Unit = The smallest testable part of an
application
8. Unit Testing
“Whenever you are tempted to type
something into a print statement or a
debugger expression, write it as a test
instead.”
Martin Fowler
10. PHPUnit
● http://www.phpunit.de
● PEAR Package
● Created by Sebastian Bergmann
● Port of Junit (Java)
● Regression test framework to implement
unit tests in PHP
11. SimpleTest
● http://www.lastcraft.com/simple_test.php
● Created by Marcus Baker
● Can test web interfaces
● Cute web interface for displaying test
results
13. Some Cool Game
● Contract:
– Player life points
● Is initially 100
● Cannot become negative
● Cannot be more than 150
● Interface:
– getLife()
– setLife($value)
– gainLife($value)
– loseLife($value)
14. Code Samples
Download available at:
http://whit.me/dricodesessionstdd
Or fork and improve it:
git clone http://github.com/rogeriopvl/dri_codesessions_tdd