Pragmatic Introduction to Python Unit Testing (PyDays 2018)Peter Kofler
We will start with a few best practises for unit testing followed by an interactive, hands-on tour through the main features of Python unit testing framework(s). You will learn while writing tests.
The document discusses Test-Driven Development (TDD) with Ruby. It notes that the primary goal of TDD is specification and design, not just validation, by thinking through requirements and design before writing code. The TDD cycle involves adding a test, running all tests to see the new one fail, writing code to pass the test, refactoring code, and repeating. There are two levels of TDD: acceptance TDD which writes a single acceptance test and just enough code to pass it; and developer TDD which writes a single unit test and code to pass that test.
Performance profiling and testing of symfony application 2Andrew Yatsenko
This document discusses performance profiling and testing of a Symfony application. It recommends using tools like the Symfony profiler toolbar, Blackfire, and logging to measure metrics like SQL query times, external API calls, memory usage, and more. Capturing these metrics during testing and in production helps identify bottlenecks in the code related to performance. The goal is to measure code quality from a performance perspective and ensure the application meets requirements for speed and responsiveness.
Quality assurance in the early stages of the productMaksym Vovk
This document discusses quality assurance practices that can be applied in the early stages of product development. It addresses problems that arise from high bug costs and unclear roles of developers and testers. Potential solutions proposed include applying testing practices at the concept, requirements, and design stages. Specific techniques discussed are testing concepts using persona data, A/B testing, requirements analysis, test-driven development, behavior-driven development, and pairing testers and developers. Benefits include reducing bugs and manual tests while increasing knowledge across roles. Challenges include ensuring tests are appropriately scoped and requiring changes to team mindsets.
This document discusses software testing techniques, including characteristics of testable software and different types of testing. It describes white box testing which tests internal coding and structure, including unit and integration testing. Unit testing checks individual units of source code, while integration testing checks how modules work together. Black box testing checks functionality without seeing internal code, and includes functional, non-functional, and regression testing. The document provides examples of unit testing in Visual Studio and NUnit and describes top-down and bottom-up approaches to integration testing.
White box testing involves testing internal coding and infrastructure by executing different lines of code. It is done by developers who have knowledge of the internal structure. Black box testing treats the system as a "black box" and tests it without knowledge of internal structures by validating inputs and outputs. Unit testing validates individual units of source code and is done by developers to ensure each part is correct before integration. Both white box and unit testing can be done earlier and be more thorough than black box testing, but require more skilled testers and knowledge of internal structures. Black box testing can be done by non-technical testers and from an end user perspective.
JUnit is a framework for Java, so the very first requirement is to have JDK installed in your machine.
An open source framework which is used for writing & running tests
Shows test progress in a bar that is green if test is going fine and it turns red when a test fails
This document discusses black box and white box testing approaches. Black box testing is done by users based on requirements and functionality, while white box testing is done by developers based on internal code structure. Both testing types are needed to fully validate software. Black box tests the system from the outside based on specifications, while white box tests internally based on implementation. To produce high quality software, both testing approaches should be used along with user involvement and rapid prototyping.
This document discusses going beyond unit testing for web applications. It introduces several tools for testing different aspects of web applications, including Selenium IDE for browser-based testing, soapUI for web service testing, and JMeter for performance and load testing. These tools can be run from the command line as part of continuous integration with Jenkins. The document cites research that unit testing only detects an average of 25% of defects, while integration testing detects 45%, and code reviews have even higher effectiveness rates.
Test Driven Development (TDD) is an approach where test cases are written before functional code to think about how components should work. It follows the principles of Red-Green-Refactor, writing a test (Red), then the functional code to pass the test (Green), then refactoring the code. TDD leads to well-designed, loosely coupled code with full test coverage that is easy to maintain and refactor with confidence in changes. While it may initially take longer, TDD finds bugs earlier and reduces bugs by 45-90%, saving significant time versus fixing issues late in development.
Pair programming and introduction to TDDArati Joshi
These are slides used in a workshop on TDD. Slides explain more about different types of pair programming techniques when to use each, what is TDD and how to start thinking about TDD as mindset change.
Testing, black ,white and gray box testingAamir Shakir
Black box, white box, and gray box testing techniques differ based on the level of internal knowledge of the system being tested. Black box testing assesses functionality without viewing internal structures. White box testing uses programming knowledge and examines internal logic and structures. Gray box testing combines aspects of black and white box testing by having some but not full internal knowledge. The techniques vary in their advantages like scalability, code coverage, and disadvantages such as redundancy.
Hands-on Experience Model based testing with spec explorer Rachid Kherrazi
This document discusses model based testing using Spec Explorer. It begins with an introduction to model based testing and its benefits over traditional testing. It then demonstrates modeling a simple "Say Hello" application in Spec Explorer, including generating test cases from the model and executing them. Key benefits of model based testing include avoiding integration issues and post-release defects by more thoroughly testing interactions between units.
White box testing involves testing internal program structure and code. It includes static testing like code reviews and structural testing like unit testing. Static testing checks code against requirements without executing. Structural testing executes code to test paths and conditions. Code coverage metrics like statement coverage measure what code is executed by tests. Code complexity metrics like cyclomatic complexity quantify complexity to determine necessary test cases. White box testing finds defects from incorrect code but may miss realistic errors and developers can overlook own code issues.
Unit testing involves testing individual units or components of code to ensure they work as intended. It focuses on testing functional correctness, error handling, and input/output values. The main benefits are faster debugging, easier integration testing, and living documentation. Guidelines for effective unit testing include writing automated, independent, focused tests that cover boundaries and are easy to run and maintain.
Test Driven Development specifies that you write a failing unit test before you write any code. Some people say this is impossible. I'll demonstrate that it's not only possible, but will change how you write code for the better.
This document provides an overview of software testing. It defines software testing as validating and verifying that a program meets its requirements, works as expected, and can be implemented consistently. Testing is classified into verification and validation. Verification includes walkthroughs, inspections, and reviews, while validation includes black box and white box testing. Black box testing, where the internal structure is unknown, is further broken down into functional testing techniques like boundary value analysis and equivalence partitioning, and non-functional testing of the GUI, usability, navigation, compatibility, and various testing stages.
Sharing session with topic : Software Testing
Workshop Black Box Testing with Jmeter, Automated Testing with JBehave & Serenity and also Unit Testing with Spring Boot
Thanks to Blibli.com for giving me this topic
Unit testing involves individually testing small units or modules of code, such as functions, classes, or programs, to determine if they are fit for use. The goal is to isolate each part of a program and verify that it works as intended, helps reduce defects early in the development process, and improves code design. Unit testing is typically done by developers to test their code meets its design before integration testing.
Gray box testing is a combination of white-box and black-box testing techniques. It involves partial knowledge of the internal structure of an application. Gray box testers generate test cases based on requirements and functional specifications rather than source code. Some advantages are that it benefits from both black-box and white-box testing while remaining non-intrusive. Disadvantages include only partial code coverage due to limited internal access. Gray box testing is suitable for web applications and functional/business domain testing.
Verification ensures that products are built correctly by checking that the development process and documentation are accurate. It involves manually reviewing work products for defects. Validation ensures the right product is built by executing the software and testing that it meets requirements. Key validation techniques include unit testing of individual code modules, integration testing of interfaces between modules, system testing of full functionality, and acceptance testing involving end users.
Documenting Code - Patterns and Anti-patterns - NLPW 2016Søren Lund
How do we document code? A good solution is to create self-explanatory code; this somewhat eliminates the need to document the code. We still need some very basic documentation. Code comments are one form of documentation, that is often misused. This talk is about self-explanatory code, the documentation we need and code comment patterns and anti-patterns.
Block-box testing (or functional testing, or behavior testing) focuses on the functional requirements of the software.
Gray box testing is a combination of white and black box testing
This document discusses using task models in model-based testing. It provides an overview of model-based testing and how task models created during user experience design can be used to generate test models and cases. A case study is presented where a task model of a car reservation system created in CTT notation was translated to a Spec Explorer test model using UXSpec, generating 15 states, 39 transitions, and 13 test cases with complete coverage of the requirements in less time than traditional manual testing. Benefits of the approach include better communication, increased productivity, and easier maintenance through updating the task model rather than all design artifacts.
1. The document discusses techniques for testing legacy production code that was not originally written with testability in mind. This includes unit testing, which allows verifying code works as expected in isolation, and writing tests before making changes to help preserve existing behavior.
2. Testing legacy code can be challenging as the code may have dependencies that are hard to isolate for testing purposes. Techniques to address this include extracting functions to new classes, replacing static dependencies with interfaces, and overriding classes to inject test dependencies.
3. While testing legacy code requires more initial work, it provides long-term benefits like reducing defects, empowering refactoring, and creating a safety net for future changes. The document provides a case study and
White box testing involves testing the internal structure and code of a software program, allowing testers to see inside the "box". It is used to test for internal security holes, code paths, expected outputs, and functionality of conditional statements. It involves understanding the source code and creating test cases to execute each process individually through manual testing and testing tools. Common techniques include statement, branch, condition coverage, and path testing. White box testing can thoroughly test all code paths but is complex, expensive, time-consuming, and requires professional resources with programming expertise.
Deliberate Practice, New Learning Styles (2015)Peter Kofler
Presentation about Deliberate Practice at the Austrian Testing Board "Expertentreff". This covers the Software Crisis, Developing Quality Software Developers and the mechanisms of Code Katas, Coding Dojos and Code Retreats.
Prime Factors Code Kata - Practicing TDD (2014)Peter Kofler
Peter Kofler presented on practicing test-driven development through code katas. Code katas are short programming exercises done daily to improve skills through repetition. The example kata demonstrated factoring prime numbers through unit testing and test-driven development. Doing katas regularly helps focus on testing processes rather than just writing code. Attendees were encouraged to join local coding dojos and code retreat events for further practice opportunities.
This document discusses black box and white box testing approaches. Black box testing is done by users based on requirements and functionality, while white box testing is done by developers based on internal code structure. Both testing types are needed to fully validate software. Black box tests the system from the outside based on specifications, while white box tests internally based on implementation. To produce high quality software, both testing approaches should be used along with user involvement and rapid prototyping.
This document discusses going beyond unit testing for web applications. It introduces several tools for testing different aspects of web applications, including Selenium IDE for browser-based testing, soapUI for web service testing, and JMeter for performance and load testing. These tools can be run from the command line as part of continuous integration with Jenkins. The document cites research that unit testing only detects an average of 25% of defects, while integration testing detects 45%, and code reviews have even higher effectiveness rates.
Test Driven Development (TDD) is an approach where test cases are written before functional code to think about how components should work. It follows the principles of Red-Green-Refactor, writing a test (Red), then the functional code to pass the test (Green), then refactoring the code. TDD leads to well-designed, loosely coupled code with full test coverage that is easy to maintain and refactor with confidence in changes. While it may initially take longer, TDD finds bugs earlier and reduces bugs by 45-90%, saving significant time versus fixing issues late in development.
Pair programming and introduction to TDDArati Joshi
These are slides used in a workshop on TDD. Slides explain more about different types of pair programming techniques when to use each, what is TDD and how to start thinking about TDD as mindset change.
Testing, black ,white and gray box testingAamir Shakir
Black box, white box, and gray box testing techniques differ based on the level of internal knowledge of the system being tested. Black box testing assesses functionality without viewing internal structures. White box testing uses programming knowledge and examines internal logic and structures. Gray box testing combines aspects of black and white box testing by having some but not full internal knowledge. The techniques vary in their advantages like scalability, code coverage, and disadvantages such as redundancy.
Hands-on Experience Model based testing with spec explorer Rachid Kherrazi
This document discusses model based testing using Spec Explorer. It begins with an introduction to model based testing and its benefits over traditional testing. It then demonstrates modeling a simple "Say Hello" application in Spec Explorer, including generating test cases from the model and executing them. Key benefits of model based testing include avoiding integration issues and post-release defects by more thoroughly testing interactions between units.
White box testing involves testing internal program structure and code. It includes static testing like code reviews and structural testing like unit testing. Static testing checks code against requirements without executing. Structural testing executes code to test paths and conditions. Code coverage metrics like statement coverage measure what code is executed by tests. Code complexity metrics like cyclomatic complexity quantify complexity to determine necessary test cases. White box testing finds defects from incorrect code but may miss realistic errors and developers can overlook own code issues.
Unit testing involves testing individual units or components of code to ensure they work as intended. It focuses on testing functional correctness, error handling, and input/output values. The main benefits are faster debugging, easier integration testing, and living documentation. Guidelines for effective unit testing include writing automated, independent, focused tests that cover boundaries and are easy to run and maintain.
Test Driven Development specifies that you write a failing unit test before you write any code. Some people say this is impossible. I'll demonstrate that it's not only possible, but will change how you write code for the better.
This document provides an overview of software testing. It defines software testing as validating and verifying that a program meets its requirements, works as expected, and can be implemented consistently. Testing is classified into verification and validation. Verification includes walkthroughs, inspections, and reviews, while validation includes black box and white box testing. Black box testing, where the internal structure is unknown, is further broken down into functional testing techniques like boundary value analysis and equivalence partitioning, and non-functional testing of the GUI, usability, navigation, compatibility, and various testing stages.
Sharing session with topic : Software Testing
Workshop Black Box Testing with Jmeter, Automated Testing with JBehave & Serenity and also Unit Testing with Spring Boot
Thanks to Blibli.com for giving me this topic
Unit testing involves individually testing small units or modules of code, such as functions, classes, or programs, to determine if they are fit for use. The goal is to isolate each part of a program and verify that it works as intended, helps reduce defects early in the development process, and improves code design. Unit testing is typically done by developers to test their code meets its design before integration testing.
Gray box testing is a combination of white-box and black-box testing techniques. It involves partial knowledge of the internal structure of an application. Gray box testers generate test cases based on requirements and functional specifications rather than source code. Some advantages are that it benefits from both black-box and white-box testing while remaining non-intrusive. Disadvantages include only partial code coverage due to limited internal access. Gray box testing is suitable for web applications and functional/business domain testing.
Verification ensures that products are built correctly by checking that the development process and documentation are accurate. It involves manually reviewing work products for defects. Validation ensures the right product is built by executing the software and testing that it meets requirements. Key validation techniques include unit testing of individual code modules, integration testing of interfaces between modules, system testing of full functionality, and acceptance testing involving end users.
Documenting Code - Patterns and Anti-patterns - NLPW 2016Søren Lund
How do we document code? A good solution is to create self-explanatory code; this somewhat eliminates the need to document the code. We still need some very basic documentation. Code comments are one form of documentation, that is often misused. This talk is about self-explanatory code, the documentation we need and code comment patterns and anti-patterns.
Block-box testing (or functional testing, or behavior testing) focuses on the functional requirements of the software.
Gray box testing is a combination of white and black box testing
This document discusses using task models in model-based testing. It provides an overview of model-based testing and how task models created during user experience design can be used to generate test models and cases. A case study is presented where a task model of a car reservation system created in CTT notation was translated to a Spec Explorer test model using UXSpec, generating 15 states, 39 transitions, and 13 test cases with complete coverage of the requirements in less time than traditional manual testing. Benefits of the approach include better communication, increased productivity, and easier maintenance through updating the task model rather than all design artifacts.
1. The document discusses techniques for testing legacy production code that was not originally written with testability in mind. This includes unit testing, which allows verifying code works as expected in isolation, and writing tests before making changes to help preserve existing behavior.
2. Testing legacy code can be challenging as the code may have dependencies that are hard to isolate for testing purposes. Techniques to address this include extracting functions to new classes, replacing static dependencies with interfaces, and overriding classes to inject test dependencies.
3. While testing legacy code requires more initial work, it provides long-term benefits like reducing defects, empowering refactoring, and creating a safety net for future changes. The document provides a case study and
White box testing involves testing the internal structure and code of a software program, allowing testers to see inside the "box". It is used to test for internal security holes, code paths, expected outputs, and functionality of conditional statements. It involves understanding the source code and creating test cases to execute each process individually through manual testing and testing tools. Common techniques include statement, branch, condition coverage, and path testing. White box testing can thoroughly test all code paths but is complex, expensive, time-consuming, and requires professional resources with programming expertise.
Deliberate Practice, New Learning Styles (2015)Peter Kofler
Presentation about Deliberate Practice at the Austrian Testing Board "Expertentreff". This covers the Software Crisis, Developing Quality Software Developers and the mechanisms of Code Katas, Coding Dojos and Code Retreats.
Prime Factors Code Kata - Practicing TDD (2014)Peter Kofler
Peter Kofler presented on practicing test-driven development through code katas. Code katas are short programming exercises done daily to improve skills through repetition. The example kata demonstrated factoring prime numbers through unit testing and test-driven development. Doing katas regularly helps focus on testing processes rather than just writing code. Attendees were encouraged to join local coding dojos and code retreat events for further practice opportunities.
Deliberate Practice (Agile Slovenia 2015)Peter Kofler
The document discusses deliberate practice as a way for software professionals to continuously improve. It proposes that traditional training methods are not enough and advocates for code katas, coding dojos, and code retreats where developers can practice specific skills in a low-pressure environment. These practices are presented as a way to overcome weaknesses in software engineering education and on-the-job training by providing structured, repetitive practice opportunities to develop expertise.
This document outlines an agenda for a unit testing boot camp with JUnit. The agenda includes introductions, an overview of JUnit, a coding exercise to practice writing unit tests with JUnit assertions, a lunch break, learning about best practices for writing clean unit tests, another coding exercise, and a retrospective. The document provides background on the instructor and describes how attendees can get the most out of the boot camp by slowing down, getting out of their comfort zone, and pairing with others.
Codeception: introduction to php testing (v2 - Aberdeen php)Engineor
This document introduces Codeception, an open source PHP testing framework. It discusses how Codeception provides tools for unit, integration, functional, acceptance and other types of testing. Codeception uses PHPUnit and other tools under the hood. The document demonstrates how to install, configure and run basic acceptance tests with Codeception. It also discusses how Codeception supports testing modern JavaScript-heavy frontends using Selenium or PhantomJS.
This document introduces Codeception, an open source PHP testing framework. It discusses different types of testing like unit, integration, functional, and acceptance testing. Codeception uses PHPUnit, Symfony browserkit, Selenium, and PhantomJS to test PHP applications. The document demonstrates running Codeception tests and provides examples of passing and failing tests. It also discusses how Codeception allows testing JavaScript-heavy applications using Selenium or headless testing with PhantomJS. Continuous integration and Docker/Vagrant are presented as ways to improve testing workflows.
The document summarizes a presentation by Peter Kofler on code quality assurance. It discusses Kofler's background and tools he uses to ensure code quality, including mindset/books, code kata exercises, test-driven development, code coverage, continuous integration, static analysis, and code review. It provides an example of using test-driven development to implement a prime factors kata coding exercise.
Outside-in Test Driven Development - the London School of TDDPeter Kofler
Workshop slides for "Outside-in Test Driven Development - die Londoner Schule des TDD" @ Software Quality Days 2019.
In Outside-In (London school, top-down or "mockist TDD") you build the system from the "outside-in", following the user interaction through all the parts of the system. You start with the interactions and collaborators upfront (especially those at top levels), mocking necessary dependencies (or creating fake implementations). With every finished component, you move to the previously mocked collaborators and start with TDD again there, creating actual implementations (which, even though used, were not needed before thanks to abstractions).
The document discusses unit testing and JUnit. It provides an overview of JUnit basics like test methods, assertions and fixtures. It also covers more advanced testing topics such as mocking, testing private methods, dealing with singletons, timing issues, and testing Java EE applications. The presentation encourages writing high-quality test code and tuning test performance.
The document discusses the benefits of automated testing over manual testing for software development. It notes that manual testing is boring, inefficient, and error-prone, while automated testing makes development more effective and fun by finding errors early, allowing code to be refactored with confidence, and proving that code meets specifications. The document then provides examples of different types of automated tests, such as unit tests, integration tests, and acceptance tests, that can improve the development process.
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.
This document summarizes a presentation on refactoring and code quality given by Peter Kofler. The presentation covers topics such as code smells, refactoring techniques like extract method, using tools like PHPStorm for refactoring, and practicing refactoring through coding dojos and katas. The goal is to help developers improve code quality, design and productivity through iterative refactoring.
Peter Kofler presented at a coding dojo on functional calisthenics. He is a software developer and code mentor who helps teams improve code quality through pair programming, workshops, and coding dojos. The dojo assignment was to implement a social networking application like Twitter using a functional programming language while following constraints like no mutable state, expressions over statements, and maximum abstraction. The goal was to learn through challenges rather than focus on completion.
How to establish ways of working that allows shifting-left of the automation ...Max Barrass
Why Automate?
Your application will grow, you will not have enough hands
You are blocked by development
Hidden factory costs of bug-fix cycle
Why Shift-Left?
More people to negate massive inspections
Define measurable success early, work on good parts.
Reduce occurrence of defects
What is this got to do with Ways of working?
Unlock capacity
Make people smile
Is not
a Department
extra cost
a final oversight or a massive inspection
someone else’s job
Is
Everyone’s responsibility
Build into the ways of working
Everyone’s job
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.
● 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
This document provides an overview of test-driven development (TDD). It defines TDD as a technique for building software by writing tests first before production code. The key aspects of TDD covered include the three laws of TDD, why it is used, the typical TDD process through an LED example, research on its effectiveness, designing code for testability, and best practices. Overall, TDD aims to increase code quality and catch errors early through writing automated tests before code, but requires effort and experience to apply effectively.
The document summarizes Peter Kofler's presentation on Test Driven Development (TDD) at Agile Testing Days 2013. It discusses the mindset of TDD coding dojos, the structure of Kofler's dojo sessions, skills practiced in TDD like designing test cases and refactoring, rules for "TDD as if you meant it," and an assignment to implement tic-tac-toe using TDD. The goal is to focus on doing TDD perfectly rather than just getting the implementation done.
Peter Kofler presented on pair programming. Some key benefits of pair programming include improved code quality, knowledge sharing between partners, and mentoring junior developers. Effective pair programming involves two programmers working together at one workstation, with one acting as the driver writing code while the other navigates, reviewing the work. It is most useful for production code, programming tasks requiring problem solving, and mentoring novices. Managing the human dynamics between partners and practicing techniques like ping-pong pairing are important for success.
A Leaderboard shows score of each team. Commit and push green increments to score points. Repeat: Push as often as possible! Try to perform maximum number of smallest steps and test runs.
Coding Dojo with focus on naming. Rules of the dojo are Pair Programming & TDD. Constraints are challenges during the dojo. Moving to the extreme is a way of learning. We are coding the game of Tic-Tac-Toe and everything - but the names of test methods - is named using random dices. Specifically using these random dices with enterprise-y useless names.
Peter Kofler is a software developer and code mentor who helps development teams improve code quality through mentoring techniques like pair programming and coding dojos. The document summarizes Object-Oriented Programming concepts like abstraction, encapsulation, polymorphism, and inheritance. It also describes "Object Calisthenics" rules for writing high-quality object-oriented code, such as wrapping primitives, short methods, and avoiding getters/setters. The agenda involves a discussion of OOP concepts and a coding exercise on implementing LCD number display following the Object Calisthenics rules.
This document discusses brutal coding constraints that can be used during coding dojos or retreats to improve coding skills. It proposes constraints like removing conditionals, loops, and mutable data to solve problems like implementing tic-tac-toe. Participants are asked to implement a two-player and AI version of tic-tac-toe under these constraints. The goal is to learn through challenges and collaboratively reflect on the experience.
Peter Kofler presented an asynchronous coding dojo on building a clock-in application. The goal was to build a client interface that allows punching in and out with optional GPS data, with asynchronous calls to a backend server. Kofler emphasized focusing on doing the coding challenge correctly rather than just getting it done. Participants were instructed to work in pairs, add testing, and start with a simple asynchronous backend mock to practice asynchronous language features like promises.
This document discusses mob programming, an agile development technique where the entire team works together on the same task using one computer. It describes mob roles like driver, navigator, and facilitator. The driver focuses on typing code while listening to the navigator, who formulates ideas for the team. Roles rotate every few minutes. Guidelines are provided for mitigating emotions and ensuring visibility when mobbing with many developers. Mob programming aims to improve collaboration, knowledge sharing, and code quality.
This document outlines Peter Kofler's philosophy and approach to mentoring development teams and improving code quality. He advocates for practices like pair programming, coding workshops, and coding dojos where developers practice coding katas in teams to improve skills like test-driven development, clean code, and design. The document provides an example agenda for a coderetreat where developers pair up to practice test-driving solutions for Conway's Game of Life using different programming languages and techniques like writing code without using if statements. The goal is for developers to learn through deliberate practice in a safe collaborative environment outside of work.
This document outlines an agenda for a coderetreat event focused on practicing software development skills. The event will involve pairing programmers who will practice test-driven development and object-oriented design principles by implementing Conway's Game of Life using various programming language and problem constraints. Presenters will discuss techniques for improving code quality through deliberate practice and emphasize learning through collaboration.
Designing Test Cases for the Gilded Rose Kata v2 (2015)Peter Kofler
This document discusses designing test cases for the Gilded Rose kata. It introduces Peter Kofler, a software developer and code mentor, and describes a coding dojo where participants practice test-driven development and refactoring skills. The goal is to create unit tests that thoroughly cover the requirements of updating item quality and sell-in values in an inventory system, including edge cases for special items like Brie and backstage passes.
Coding Dojo: Bank OCR Outside-In (2015)Peter Kofler
Peter Kofler led a coding dojo session on outside-in test-driven development (TDD) for a bank optical character recognition (OCR) assignment. The assignment asked participants to write a program to parse account numbers from an OCR file containing entries with account numbers represented using pipes and underscores. Kofler emphasized learning outside one's work environment, focusing on quality over speed, and improving through collaboration and reflection.
Coding Dojo: Fun with Tic-Tac-Toe (2014)Peter Kofler
This document summarizes a coding dojo event focused on tic-tac-toe. The event introduces pair programming and test-driven development techniques. Attendees work in pairs to implement tic-tac-toe under constraints, such as writing the worst code possible initially and then refactoring without talking. The goal is to learn through challenges and reflection on how to write better code.
Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)Peter Kofler
1) Peter Kofler gave a presentation on designing test cases for the Gilded Rose Kata using FitNesse.
2) He discussed the Coding Dojo mindset of collaborative learning and test-driven development.
3) The Gilded Rose Kata models an inventory system where items degrade over time according to various rules, including special rules for items like Brie and backstage passes. The goal is to write tests to cover these rules.
The document describes a coding dojo event where participants will work in pairs using test-driven development and pair programming to solve the problem of programming a Mars rover to navigate a grid based on input commands. The rover must wrap around the grid, detect obstacles, and report its position and any obstacles encountered. Participants will work through introductions, coding exercises, and retrospectives while focusing on best practices like improving existing code rather than deleting it.
Code Refactoring - Live Coding Demo (JavaDay 2014)Peter Kofler
Peter Kofler gives a live coding demonstration of refactoring code to add a new requirement to an inventory management system. He first refactors the existing code to make it more readable and maintainable by removing duplication, splitting methods, and simplifying conditions. He then implements the new requirement that conjured items degrade in quality twice as fast by extracting a strategy pattern. The demonstration shows how refactoring first makes it possible to easily add new features to the code while preserving its behavior.
The document summarizes a coding dojo session led by Peter Kofler on parsing bank account numbers from an optical character recognition (OCR) file. The session followed a structured format including introductions, coding periods with retrospectives, and a closing circle. Participants were assigned to write a program to take an OCR file with account numbers represented as pipes and underscores and parse it into actual numbers, with considerations for readability, matching digits, and flexibility. The goal was to focus on doing the assignment perfectly rather than just getting it done.
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Aqusag Technologies
In late April 2025, a significant portion of Europe, particularly Spain, Portugal, and parts of southern France, experienced widespread, rolling power outages that continue to affect millions of residents, businesses, and infrastructure systems.
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxAnoop Ashok
In today's fast-paced retail environment, efficiency is key. Every minute counts, and every penny matters. One tool that can significantly boost your store's efficiency is a well-executed planogram. These visual merchandising blueprints not only enhance store layouts but also save time and money in the process.
Role of Data Annotation Services in AI-Powered ManufacturingAndrew Leo
From predictive maintenance to robotic automation, AI is driving the future of manufacturing. But without high-quality annotated data, even the smartest models fall short.
Discover how data annotation services are powering accuracy, safety, and efficiency in AI-driven manufacturing systems.
Precision in data labeling = Precision on the production floor.
What is Model Context Protocol(MCP) - The new technology for communication bw...Vishnu Singh Chundawat
The MCP (Model Context Protocol) is a framework designed to manage context and interaction within complex systems. This SlideShare presentation will provide a detailed overview of the MCP Model, its applications, and how it plays a crucial role in improving communication and decision-making in distributed systems. We will explore the key concepts behind the protocol, including the importance of context, data management, and how this model enhances system adaptability and responsiveness. Ideal for software developers, system architects, and IT professionals, this presentation will offer valuable insights into how the MCP Model can streamline workflows, improve efficiency, and create more intuitive systems for a wide range of use cases.
How Can I use the AI Hype in my Business Context?Daniel Lehner
𝙄𝙨 𝘼𝙄 𝙟𝙪𝙨𝙩 𝙝𝙮𝙥𝙚? 𝙊𝙧 𝙞𝙨 𝙞𝙩 𝙩𝙝𝙚 𝙜𝙖𝙢𝙚 𝙘𝙝𝙖𝙣𝙜𝙚𝙧 𝙮𝙤𝙪𝙧 𝙗𝙪𝙨𝙞𝙣𝙚𝙨𝙨 𝙣𝙚𝙚𝙙𝙨?
Everyone’s talking about AI but is anyone really using it to create real value?
Most companies want to leverage AI. Few know 𝗵𝗼𝘄.
✅ What exactly should you ask to find real AI opportunities?
✅ Which AI techniques actually fit your business?
✅ Is your data even ready for AI?
If you’re not sure, you’re not alone. This is a condensed version of the slides I presented at a Linkedin webinar for Tecnovy on 28.04.2025.
Procurement Insights Cost To Value Guide.pptxJon Hansen
Procurement Insights integrated Historic Procurement Industry Archives, serves as a powerful complement — not a competitor — to other procurement industry firms. It fills critical gaps in depth, agility, and contextual insight that most traditional analyst and association models overlook.
Learn more about this value- driven proprietary service offering here.
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxJustin Reock
Building 10x Organizations with Modern Productivity Metrics
10x developers may be a myth, but 10x organizations are very real, as proven by the influential study performed in the 1980s, ‘The Coding War Games.’
Right now, here in early 2025, we seem to be experiencing YAPP (Yet Another Productivity Philosophy), and that philosophy is converging on developer experience. It seems that with every new method we invent for the delivery of products, whether physical or virtual, we reinvent productivity philosophies to go alongside them.
But which of these approaches actually work? DORA? SPACE? DevEx? What should we invest in and create urgency behind today, so that we don’t find ourselves having the same discussion again in a decade?
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfSoftware Company
Explore the benefits and features of advanced logistics management software for businesses in Riyadh. This guide delves into the latest technologies, from real-time tracking and route optimization to warehouse management and inventory control, helping businesses streamline their logistics operations and reduce costs. Learn how implementing the right software solution can enhance efficiency, improve customer satisfaction, and provide a competitive edge in the growing logistics sector of Riyadh.
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc
Most consumers believe they’re making informed decisions about their personal data—adjusting privacy settings, blocking trackers, and opting out where they can. However, our new research reveals that while awareness is high, taking meaningful action is still lacking. On the corporate side, many organizations report strong policies for managing third-party data and consumer consent yet fall short when it comes to consistency, accountability and transparency.
This session will explore the research findings from TrustArc’s Privacy Pulse Survey, examining consumer attitudes toward personal data collection and practical suggestions for corporate practices around purchasing third-party data.
Attendees will learn:
- Consumer awareness around data brokers and what consumers are doing to limit data collection
- How businesses assess third-party vendors and their consent management operations
- Where business preparedness needs improvement
- What these trends mean for the future of privacy governance and public trust
This discussion is essential for privacy, risk, and compliance professionals who want to ground their strategies in current data and prepare for what’s next in the privacy landscape.
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersToradex
Toradex brings robust Linux support to SMARC (Smart Mobility Architecture), ensuring high performance and long-term reliability for embedded applications. Here’s how:
• Optimized Torizon OS & Yocto Support – Toradex provides Torizon OS, a Debian-based easy-to-use platform, and Yocto BSPs for customized Linux images on SMARC modules.
• Seamless Integration with i.MX 8M Plus and i.MX 95 – Toradex SMARC solutions leverage NXP’s i.MX 8 M Plus and i.MX 95 SoCs, delivering power efficiency and AI-ready performance.
• Secure and Reliable – With Secure Boot, over-the-air (OTA) updates, and LTS kernel support, Toradex ensures industrial-grade security and longevity.
• Containerized Workflows for AI & IoT – Support for Docker, ROS, and real-time Linux enables scalable AI, ML, and IoT applications.
• Strong Ecosystem & Developer Support – Toradex offers comprehensive documentation, developer tools, and dedicated support, accelerating time-to-market.
With Toradex’s Linux support for SMARC, developers get a scalable, secure, and high-performance solution for industrial, medical, and AI-driven applications.
Do you have a specific project or application in mind where you're considering SMARC? We can help with Free Compatibility Check and help you with quick time-to-market
For more information: https://www.toradex.com/computer-on-modules/smarc-arm-family
Artificial Intelligence is providing benefits in many areas of work within the heritage sector, from image analysis, to ideas generation, and new research tools. However, it is more critical than ever for people, with analogue intelligence, to ensure the integrity and ethical use of AI. Including real people can improve the use of AI by identifying potential biases, cross-checking results, refining workflows, and providing contextual relevance to AI-driven results.
News about the impact of AI often paints a rosy picture. In practice, there are many potential pitfalls. This presentation discusses these issues and looks at the role of analogue intelligence and analogue interfaces in providing the best results to our audiences. How do we deal with factually incorrect results? How do we get content generated that better reflects the diversity of our communities? What roles are there for physical, in-person experiences in the digital world?
Mobile App Development Company in Saudi ArabiaSteve Jonas
EmizenTech is a globally recognized software development company, proudly serving businesses since 2013. With over 11+ years of industry experience and a team of 200+ skilled professionals, we have successfully delivered 1200+ projects across various sectors. As a leading Mobile App Development Company In Saudi Arabia we offer end-to-end solutions for iOS, Android, and cross-platform applications. Our apps are known for their user-friendly interfaces, scalability, high performance, and strong security features. We tailor each mobile application to meet the unique needs of different industries, ensuring a seamless user experience. EmizenTech is committed to turning your vision into a powerful digital product that drives growth, innovation, and long-term success in the competitive mobile landscape of Saudi Arabia.
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...SOFTTECHHUB
I started my online journey with several hosting services before stumbling upon Ai EngineHost. At first, the idea of paying one fee and getting lifetime access seemed too good to pass up. The platform is built on reliable US-based servers, ensuring your projects run at high speeds and remain safe. Let me take you step by step through its benefits and features as I explain why this hosting solution is a perfect fit for digital entrepreneurs.
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes
Pragmatic Introduction to PHP Unit Testing (2015)
1. A Pragmatic Introduction
to (PHP) Unit Testing
Vienna PHP, March 2015
Peter Kofler, ‘Code Cop’
@codecopkofler
www.code-cop.org
Copyright Peter Kofler, licensed under CC-BY.
2. Peter Kofler
• Ph.D. (Appl. Math.)
• Professional Software
Developer for 15 years
• “fanatic about code quality”
• I help development teams
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
4. PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
Yes, some but...
●
only what is already there
●
Trial & Error not popular in production
●
no practice - only production
●
time pressure
5. I help development teams with
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
●
Professionalism
●
Quality and
Productivity
●
Continuous
Improvement
6. Mentoring
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
●
Pair Programming
●
Programming
Workshops
●
Deliberate
Practice, e.g.
Coding Dojos
9. Quick Poll
●
Who has heard of PHPUnit? (xUnit)
●
Who has never written a unit test?
●
Who has written
a few?
●
Who writes unit
tests every day?
●
Who does TDD?
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
10. We Make Mistakes
●
at least I do...
●
number of bugs proportional LoC
– 7 bugs per 1.000 LoC
– 1 bug per 10.000 LoC in critical software
●
Assume you have lots of bugs.
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
13. Unit Test (Micro Test)
●
code written by a developer
●
tests an individual unit
●
isolate each part
●
shows that the individual part is correct
●
sort of living documentation
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
14. Unit of Work
●
single logical functional use case
●
invoked by some public interface
– a single method,
– a whole class or
– multiple classes
●
with one single logical purpose
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
16. Test Class
●
unit test tests the functionality of a unit
●
for various inputs and outputs
●
usually a single test (class/script)
class FooTest extends
PHPUnit_Framework_TestCase
{ … }
contains all test cases for Foo
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
17. Test Methods
●
a test case tests the response of a single
method to a particular set of inputs
●
multiple test cases for a single method
●
test methods should be short, simple
●
tests without test methods are pointless
(public) function testMethod() {…}
/** @test */ function anyName() {…}
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
18. Only one aspect/feature
●
tests work best with lots of small tests
●
tests only fail because of one reason
●
more than 1 assert in test
split into multiple tests→
●
1 test case – 1 method – 1 assertion
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
testHighAndLowInput()
testHighInput()
testLowInput()
19. Assertions
●
no output from your tests!
●
check expectations programmatically
●
e.g. $this->assertEquals,
$this->assertTrue, …
●
test method without assert is pointless
●
one test method - one assertion
●
test runner reports failure on each test
Regression Testing
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
20. Fixtures
●
sets up data needed to run tests
●
functions setUp(), tearDown()or
/** @before */, /** @after */
●
Test data is more likely to be wrong
than the tested code!
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
22. The Right BICEP
●
Right: Are the results right?
●
B: All the boundary conditions correct?
●
I: Can we check inverse relationships?
●
C: Can we cross-check results
using other means?
●
E: Can we force error conditions?
●
P: Are performance characteristics
within bounds?
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
23. “I write unit tests for one
reason: so my co-workers
don't f*** up my code.”
(David Angry)
25. Focus on Behaviour
e.g. requirements are behaviour
names from (problem) domain
full sentences
(long, descriptive test method names)
expected behaviour should
separation per business module
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
26. Consist of 3 Simple Steps
●
Prepare Input – Arrange
●
Call Method – Act
●
Check Output – Assert
●
Use in form of Given-When-Then
●
No conditional logic ( more test cases)→
●
No loops ( parametrized test)→
/** @dataProvider <static function> */
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
30. Coding Dojo Mindset
●
Safe place outside
work
●
We are here to learn
●
Need to slow down
●
Focus on doing it right
●
Collaborative Game
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
31. Assignment
●
Find a pair.
●
Get https://bitbucket.org/pkofler/phpunit-koans
●
Run phpunit – should see no tests
●
Go through the test code
●
assertions commented/ incomplete
●
uncomment the assertions
●
and complete them making tests pass
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY
33. Closing Circle
●
What did you learn today?
●
What surprised you today?
●
What will you do
differently in the
future?
PETER KOFLER, CODE-COP.ORG FANATIC ABOUT CODE QUALITY