The document discusses testing in an agile environment. It covers:
- Bringing testing into all aspects of development, not just as a separate phase.
- The problems that can arise from using a "waterfall" testing approach of waiting until late in the process to test, rather than continuous testing.
- How agile practices like test-driven development, behavior-driven development, and continuous integration can help transform testing practices from waterfall to more iterative and collaborative approaches.
• What is Behavior Driven Development?
• What is its value?
• How does BDD differ from Test-Driven Development?
• What is the role of the customer/product owner in BDD?
• What about teams that have traditional manual testers?
• What about teams that have developers but not testers?
• What is a good BDD test?
• What should be tested manually?
Adapting Agility: Getting your Agile Transformation UnstuckCamille Bell
In this presentation, I explore many common Agile transformation issues and what you can do about them. I cover challenges with customers, technical process, organizational hurdles, prioritization, agile requirements, etc. Some of the topics include:
o No single Product Owner in Scrum.
o No on-site customer for Extreme Programming.
o The user stories are too big.
o The user stories are too vague.
o Bug count is going up or not going down.
o Customer/Stakeholders/PO never choose technical stories for next iteration/sprint.
o Customer/Stakeholders/PO won't take the time to prioritize their backlog.
o Even though story points match prior velocity, there seems to be too much work.
o Stand-up or Scrum meetings take forever.
o Stand-up or Scrum meetings are short, but no one talks about real problems.
o Management doesn't value removing impediments quickly.
o Velocity seems to be slowing down.
o So many hoops to jump through that it takes forever to get anything done.
Growing Manual Testers into AutomatorsCamille Bell
Manual testing can't keep up with modern software development. Tests generated by Capture/Playback tools don't work either as these tests become brittle and break. Instead working with business and development testers need to create acceptance criteria that drives product development. To become automators testers need new tools. Testers need new ways of working. Testers need new skills. And the organization needs to support your testers growth. Here is how I and others have made it work.
Promoting Agility with Running Tested Features - Lightening TalkCamille Bell
This short Lighting Talk introduces the Running Tested Feature (RTF) metric, a wonderfully useful metric that's easy to collect and promotes agility. It provides examples of RTF when development has steady progress and when SW breaks. This talk also discusses what happens when people try to game the RTF metric.
The Running Tested Features metric provides developers, managers and customers alike with a clear, unambiguous gauge of real software development progress. Usable on any kind of development project, RTF’s focus on outcome instead of process makes RTF especially fit for Agile projects. Because RTF can be used with both Agile and Waterfall projects, RTF makes an excellent progress metric for teams transitioning to Agile.
Kanban is an Lean practice that focuses on completing work. Used alone Kanban provides an evolutionary approach to agile development and better fits many SW development teams (like maintenance or sysadmin) that don't have an iterative cadence. Used in combination with agile processes like Scrum or Extreme Programming, Kanban practices like WIP limits and Service Level swim lanes solve issues real teams and companies encounter every day. Project managers should pay special attention to Kanban Lead Time metric.
Even with the best agile development practices, bugs sometimes slip in. You don't want to manually wade through hundreds of commits and thousands or tens of thousands of lines of code to find your bug. See how find your bug fast using Git, the best (and free) version control software tool. If you are still using CVS, Subversion, or costly commercial version control, you are missing out.
Improving The Quality of Existing SoftwareSteven Smith
Presented at DevReach 2013.
As developers, most of our time is spent working on existing software. Sure, occasionally we get the chance to fire up a new Solution in Visual Studio, and that can be exciting. But after the first day, we find ourselves once more having to deal with the work we did yesterday. And today, we know more than we did yesterday, so there are things we’d do differently, if we had it to do over.
Over time, software rots. If we’re not diligent, our beautiful code can degrade into a worthless mess. Keeping our code in working condition is no different than changing the oil in our car – it’s preventive maintenance. In this session, Steve will look at some common places to look for signs of degradation in existing applications, and steps to take to improve the code. Examples will use C# and primarily ASP.NET.
Test and Behaviour Driven Development (TDD/BDD)Lars Thorup
In this introduction to Test Driven Development (TDD) or Behaviour Driven Development (BDD) we give a high level description of what it is and why it is useful for developers. Then we go into some details on stubs and mocks, test data, UI testing, SQL testing, JavaScript testing, web services testing and how to start doing TDD/BDD on an existing code base.
• What is Behavior Driven Development?
• What is its value?
• How does BDD differ from Test-Driven Development?
• What is the role of the customer/product owner in BDD?
• What about teams that have traditional manual testers?
• What about teams that have developers but not testers?
• What is a good BDD test?
• What should be tested manually?
Adapting Agility: Getting your Agile Transformation UnstuckCamille Bell
In this presentation, I explore many common Agile transformation issues and what you can do about them. I cover challenges with customers, technical process, organizational hurdles, prioritization, agile requirements, etc. Some of the topics include:
o No single Product Owner in Scrum.
o No on-site customer for Extreme Programming.
o The user stories are too big.
o The user stories are too vague.
o Bug count is going up or not going down.
o Customer/Stakeholders/PO never choose technical stories for next iteration/sprint.
o Customer/Stakeholders/PO won't take the time to prioritize their backlog.
o Even though story points match prior velocity, there seems to be too much work.
o Stand-up or Scrum meetings take forever.
o Stand-up or Scrum meetings are short, but no one talks about real problems.
o Management doesn't value removing impediments quickly.
o Velocity seems to be slowing down.
o So many hoops to jump through that it takes forever to get anything done.
Growing Manual Testers into AutomatorsCamille Bell
Manual testing can't keep up with modern software development. Tests generated by Capture/Playback tools don't work either as these tests become brittle and break. Instead working with business and development testers need to create acceptance criteria that drives product development. To become automators testers need new tools. Testers need new ways of working. Testers need new skills. And the organization needs to support your testers growth. Here is how I and others have made it work.
Promoting Agility with Running Tested Features - Lightening TalkCamille Bell
This short Lighting Talk introduces the Running Tested Feature (RTF) metric, a wonderfully useful metric that's easy to collect and promotes agility. It provides examples of RTF when development has steady progress and when SW breaks. This talk also discusses what happens when people try to game the RTF metric.
The Running Tested Features metric provides developers, managers and customers alike with a clear, unambiguous gauge of real software development progress. Usable on any kind of development project, RTF’s focus on outcome instead of process makes RTF especially fit for Agile projects. Because RTF can be used with both Agile and Waterfall projects, RTF makes an excellent progress metric for teams transitioning to Agile.
Kanban is an Lean practice that focuses on completing work. Used alone Kanban provides an evolutionary approach to agile development and better fits many SW development teams (like maintenance or sysadmin) that don't have an iterative cadence. Used in combination with agile processes like Scrum or Extreme Programming, Kanban practices like WIP limits and Service Level swim lanes solve issues real teams and companies encounter every day. Project managers should pay special attention to Kanban Lead Time metric.
Even with the best agile development practices, bugs sometimes slip in. You don't want to manually wade through hundreds of commits and thousands or tens of thousands of lines of code to find your bug. See how find your bug fast using Git, the best (and free) version control software tool. If you are still using CVS, Subversion, or costly commercial version control, you are missing out.
Improving The Quality of Existing SoftwareSteven Smith
Presented at DevReach 2013.
As developers, most of our time is spent working on existing software. Sure, occasionally we get the chance to fire up a new Solution in Visual Studio, and that can be exciting. But after the first day, we find ourselves once more having to deal with the work we did yesterday. And today, we know more than we did yesterday, so there are things we’d do differently, if we had it to do over.
Over time, software rots. If we’re not diligent, our beautiful code can degrade into a worthless mess. Keeping our code in working condition is no different than changing the oil in our car – it’s preventive maintenance. In this session, Steve will look at some common places to look for signs of degradation in existing applications, and steps to take to improve the code. Examples will use C# and primarily ASP.NET.
Test and Behaviour Driven Development (TDD/BDD)Lars Thorup
In this introduction to Test Driven Development (TDD) or Behaviour Driven Development (BDD) we give a high level description of what it is and why it is useful for developers. Then we go into some details on stubs and mocks, test data, UI testing, SQL testing, JavaScript testing, web services testing and how to start doing TDD/BDD on an existing code base.
Flexing your Agile Muscle - Agile Technical Concepts ExplainedSandy Mamoli
Continuous integration, acceptance test driven development (ATDD), specification by example and continuous deployment: The list of have-to-know concepts is growing and you have this nagging feeling that you should really get started so you won’t miss out on the fun.
Learn what basic Agile technical concepts mean, understand how you can benefit from using them and get ideas for how you might get started. Also, you will be able to explain to your boss or project manager why Agile technical concepts are well worth the investment.
This session will keep things on a strictly conceptual level - so whether you’re a developer or an interested manager please come along.
Improving the Quality of Existing SoftwareSteven Smith
Given at DogFoodCon 2016 in Columbus, Ohio
As developers, most of our time is spent working on existing software – even if it’s just the software we wrote ourselves, yesterday. And over time, software rots. If were not diligent, our beautiful code can degrade into a worthless mess. Keeping our code in working condition is no different than changing the oil in our car “ its preventive maintenance. In this session, Steve will cover some common places to look for signs of degradation in existing applications, and describe the steps we can take to improve our code. Examples will use C# and primarily ASP.NET.
Slides with notes for the talk "Production code without tests" based on the Michael Feathers "Working Effectively with Legacy Code" book.
http://sstude.com/blog/2013/02/05/my-talk-production-code-without-tests
How to succeed in software development. Following agile methodology principles helps to achieve much better results. Know more about eXtreme Programming, one of the famous agile software development methodology.
utomation is becoming more and more important in the world of software testing, especially as more development shops move into agile or agile-like methodologies. However, for testers with no development background the idea of learning how to automate can be intimidating.My goal is simple: to demystify the subject by taking a novice tester with no coding experience through the process of writing a simple automated test using using the Cucumber framework. I will take a volunteer from the audience and transform that person from an ordinary QA professional (or whatever their occupation) into an automation engineer in one short hour.
This will be a live demonstration and we will be working without a net. No animals will be harmed during the show, but be prepared to slay your fear of coding once and for all.
Behavior Driven Testing - A paradigm shiftAspire Systems
This presentation showcases how BDT as an approach evolved and what are the advantages of implementing the same. It includes one of the case studies to exemplify how Aspire's BDT framework helped a F500 company in successfully implementing BDT.
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016Steven Smith
Unit testing software can be difficult, especially when the software wasn't designed to be testable. Dependencies on infrastructure concerns and software we don't control are one of the biggest contributors to testing difficulty. In this session, you'll learn the difference between unit tests and other kinds of tests, how to recognize and invert dependencies, and how to unit test your code's interactions with these dependencies without testing the infrastructure itself.
What CS Class Didn't Teach About TestingCamille Bell
Computer Science classes don't teach testing. Testing is as critical to software engineering as writing code. Here I show what CS programs should have taught, but didn't.
Flexing your Agile Muscle - Agile Technical Concepts ExplainedSandy Mamoli
Continuous integration, acceptance test driven development (ATDD), specification by example and continuous deployment: The list of have-to-know concepts is growing and you have this nagging feeling that you should really get started so you won’t miss out on the fun.
Learn what basic Agile technical concepts mean, understand how you can benefit from using them and get ideas for how you might get started. Also, you will be able to explain to your boss or project manager why Agile technical concepts are well worth the investment.
This session will keep things on a strictly conceptual level - so whether you’re a developer or an interested manager please come along.
Improving the Quality of Existing SoftwareSteven Smith
Given at DogFoodCon 2016 in Columbus, Ohio
As developers, most of our time is spent working on existing software – even if it’s just the software we wrote ourselves, yesterday. And over time, software rots. If were not diligent, our beautiful code can degrade into a worthless mess. Keeping our code in working condition is no different than changing the oil in our car “ its preventive maintenance. In this session, Steve will cover some common places to look for signs of degradation in existing applications, and describe the steps we can take to improve our code. Examples will use C# and primarily ASP.NET.
Slides with notes for the talk "Production code without tests" based on the Michael Feathers "Working Effectively with Legacy Code" book.
http://sstude.com/blog/2013/02/05/my-talk-production-code-without-tests
How to succeed in software development. Following agile methodology principles helps to achieve much better results. Know more about eXtreme Programming, one of the famous agile software development methodology.
utomation is becoming more and more important in the world of software testing, especially as more development shops move into agile or agile-like methodologies. However, for testers with no development background the idea of learning how to automate can be intimidating.My goal is simple: to demystify the subject by taking a novice tester with no coding experience through the process of writing a simple automated test using using the Cucumber framework. I will take a volunteer from the audience and transform that person from an ordinary QA professional (or whatever their occupation) into an automation engineer in one short hour.
This will be a live demonstration and we will be working without a net. No animals will be harmed during the show, but be prepared to slay your fear of coding once and for all.
Behavior Driven Testing - A paradigm shiftAspire Systems
This presentation showcases how BDT as an approach evolved and what are the advantages of implementing the same. It includes one of the case studies to exemplify how Aspire's BDT framework helped a F500 company in successfully implementing BDT.
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016Steven Smith
Unit testing software can be difficult, especially when the software wasn't designed to be testable. Dependencies on infrastructure concerns and software we don't control are one of the biggest contributors to testing difficulty. In this session, you'll learn the difference between unit tests and other kinds of tests, how to recognize and invert dependencies, and how to unit test your code's interactions with these dependencies without testing the infrastructure itself.
What CS Class Didn't Teach About TestingCamille Bell
Computer Science classes don't teach testing. Testing is as critical to software engineering as writing code. Here I show what CS programs should have taught, but didn't.
Code reviews can be done in very different processes. In this talk we discuss our lightweight process for informal reviews with structured results. It's the first talk in our Code Review Culture Series.
Expanding skill sets - Broaden your perspective on designroskakori
The term design can mean different things to people from different backgrounds. This talk from the PyGRAZ and UX Graz meetup from 2023-07-25 acts as basis for an open discussion between these two user groups. It describes the "minimum viable everything" design of an actual application under development. Starting from the problem to solve it explores the evolution of the data models and visualizes a major rework. It also showcases a few approaches to "low effort" UI in the early phase of a project when concepts are still in flux.
In this session we will explore the semantics and theory behind Behavior Driven Development and how it can unify a team with its ubiquitous language. We will then go in a tour of TestBox for applying BDD/TDD into our CFML applications. Our tour will end with setting up a Jenkins Continous Integration Server and building scripts for automated testing and reporting.
Discusses techniques I've used to do Lean Startup style pivots in an agile team and web application. Presented at LAST Conference 2015. We use impact mapping, geckoboard, datahero to show how having a hypothsis backed by data has helped us make decisions to improve bidcontender.com.
Radical Requirements: Tips For Delivering What They WantRob Bogue
Requirements are the bedrock in the software development process. Here are some tips for creating requirements and recording them in a way that people can use them.
This presentation can be now be downloaded by visiting https://www.thorprojects.com/connect/gifts/presentations/radical-requirements-tips-for-delivering-what-they-want.
Rev Up Your Lead Engine With Predictive ScoringMarketo
Check out this LaunchPoint presentation featuring data from Lattice, MuleSoft, and FireEye, to discover how to rev up your marketing engine with the power of predictive lead scoring!
There are many well understood and widely adopted methodologies for building software products. However, the nuances in application often differ widely from company to company.
This deck articulates a framework that I have developed over my career. Some concepts are exclusively my own. Some borrow wholesale from people much smarter than myself: Eric Ries, Anthony Ulwick, Michael Cohn, Clayton Christensen, Alan Klement (I cite sources extensively throughout this deck).
This framework takes an inherently unpredictable, creative process, and makes it repeatable while maintaining flexibility. There is lots of room to adapt and innovate within this framework, both individually and as a team. However, I think it is important that a product organization in a company (developers, designers and PMs) speaks a consistent language and shares the same fundamental methodology. That’s what this framework provides.
How do we balance building the right thing with building it well? In this presentation we will examine this question at multiple levels of focus. We will discuss how a team can define the threshold for acceptable quality for their own context.
The business case for contributing codeZivtech, LLC
In the Drupal community we tend to talk about committing code to our public spaces (drupal.org, but also github) in terms of "contributing" and "contributions", and while much of it can be seen in that light, there are actually very strong business reasons for publishing your code and/or attempting to get your code changes committed to the open source project that you are working on.
We will be looking at several documents from the U.S. Military detailing their recommendations for contracting Open Source Software services, and will use those as a jumping off point to discuss the many benefits of contributing code. Some of the business reasons for public publishing we'll explore will include:
* The power of peer review. With enough eyes, all bugs are shallow, and with only a few eyes the stupidity knows no depths!
* Fork you! The costs associated with "hacking" both Drupal core and contrib modules and base themes.
* Take my code, please! Cost savings from committing patches.
* Professionals publish or perish. Using code commits as marketing towards clients or potential hires.
* It's so easy, even a child(ish person) could do it! How you can easily integrate patching into your development workflow.
This session will also include a walk through of how Zivtech handles code review, patches, and deployment processes and you will hopefully walk away convinced that all of your in-house and out-sourced developers should be publicly committing their work.
You Put *What* in Your Stream?! Patterns and Practices for Event Design with ...HostedbyConfluent
Events are the fundamental component of every streaming architecture, and how you implement them will hugely impact your event-driven architectures. Despite the wide range of materials on event-driven architectures and the importance of event modeling, this critical domain is often left as an exercise for you to implement on your own. Improperly modeling your events can have difficult and costly impacts on not only your event consumers but on the teams and systems that produce them as well.
In this talk, Adam covers the main considerations of modeling and implementing events. Data is often modeled as a Fact or a Delta, though the distinction isn't always clear.
For one, facts are commonly used in the event-carried state transfer pattern, while deltas are commonly used in event sourcing. But when communicating across domain boundaries, which ones should you choose? What are the tradeoffs, the benefits, and the best use-cases for each? Adam digs into these main event types, providing some examples and guidelines for when to use each.
Adam closes out the presentation with an opinionated list of best practices. Do you think naming is tricky? What about versioning? Evolving your data model got you down? Torn between multiple event types per stream and multiple streams per event? Adam's has a host of best practices, well-reasoned examples, and practical tips to help you model and implement your events and streams.
But what is the real-time data analytics stack? Kafka is the de facto standard for getting data-in-motion but what do we add in order to extract insights in real-time?
The modern developer has many options to choose from: there’s stream processing frameworks/engines such as Kafka Streams or Apache Flink, real-time OLAP databases such as Apache Druid or Apache Pinot, streaming databases such as Materialize and ksqlDB, time series databases such as TimescaleDB or InfluxDB and even your regular OLTP database such as PostgreSQL or MySQL.
What should you choose and why?
This talk will explore the real-time analytics technology space from the perspective of the software developer that wants real-time insights in their software. We’ll cover the main categories, how these technologies work and their strengths and weaknesses.
I want developers to come away from this talk empowered to add real-time insights to their software, using the right tool for their needs.
Agile Requirements are lightweight by design, so what can you do as the BA to convey requirements in a concise yet comprehensive way? How can you include real examples in your requirements to increase clarity and reduce ambiguity when working with your team?
In this presentation, Rebecca Halstead shares how to incorporate examples in your requirements as a way to encourage collaboration and build a shared understanding about the acceptance criteria. Rebecca delivered this presentation on Agile Requirements at the International Institute of Business Analysis, DC Chapter meeting on March 20, 2014.
6 Things to Think About Before Building Your WebsiteFloown
Building a website can be a daunting task. Without preparation even more so. Thinking about the following 6 actionable and practical topics will however make the task much easier to digest. In this Floown Slideshare we will be handling goals, design, technical solutions, styleguides, coding and debugging. 6 topics that are truly worth thinking about before building.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...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.
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.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
Testing for Agility: Bringing Testing into Everything
1. cbell@CamilleBellConsulting.com 1
Testing for Agility:
Bringing Testing into Everything
Camille Bell
Agile Coach & Trainer
cbell@CamilleBellConsulting.com
Twitter @agilecamille
TDD
User Story: Vetting Sighting
In order to show
confirmation of a sighting,
As a US-CERT analyst,
I want to mark a sighting a
vetted
• XYZ sighting is viewed by
Charley US-CERT analyst
• Charley marks sighting as vetted
• Tracy from Treasury searches for
sightings vetted today
• Tracy sees XYZ as a confirmed
sighting
2. cbell@CamilleBellConsulting.com 2
About Me
• Agile Coach, Trainer and Developer
• Over 4 decades of IT. All sorts of companies,
domains, technologies & IT roles.
• Email: cbell@CamilleBellConsulting.com
• Twitter: @agilecamille
• Slideshare: camille_bell
3. cbell@CamilleBellConsulting.com 3
• Waiting to test
• Transforming Waterfall into Agility using Feedback
• Agile testing and requirements
• Agile testing and development
• Agile testing and integration and deployment
• Agile testing and acceptance
• Agile testing ratios
• Agile testing, bug fixes and maintenance work
• Agile testing and management
• Code Coverage
Agenda
5. cbell@CamilleBellConsulting.com 5
Agility puts more focus on
testing to improve quality
and time to market
Which is great assuming 21st
Century Agile testing and
complementary practices
6. cbell@CamilleBellConsulting.com 6
But many shops bolt on Waterfall
phased testing to Agile development
While still better than no Agility,
it is costly in time and money
9. cbell@CamilleBellConsulting.com 9
• It doesn’t guarantee customer acceptance !
• It’s extremely labor intensive !
• It’s error prone !
• It’s often ambiguous !
• It doesn’t stop fixed bugs from reappearing in the code !
• Regression testing is a nightmare !
• It doesn’t prevent “but it works on my machine” thinking !
• It’s sooner, but still after the fact ! (code exists)
• It kills your test team !
Some other Waterfall phased testing
(there are many more)
25. cbell@CamilleBellConsulting.com 25
But what if our initial vision was flawed?
Code
Design
Requirements
Analysis
Deployed
High Level
Requirements
Business
Vision
Product Concept
wrong !!!
Entire effort fails at
great expense !!!
29. cbell@CamilleBellConsulting.com 29
Customer Collaborates with Dev Team on
Confirmation of Stories
User Story: Vetting Sighting
In order to show confirmation of a sighting,
As a US-CERT analyst,
I want to mark a sighting a vetted
• XYZ sighting is viewed by Charley US-CERT analyst
• Charley marks sighting as vetted
• Tracy from Treasury searches for sightings vetted today
• Tracy sees XYZ as a confirmed sighting
Ref: Ron Jeffries 3 Cs of User Stories
Card
Confirmation
Collaboration
30. cbell@CamilleBellConsulting.com 30
User Stories Confirmed Through
Automated Tests During Iteration
• XYZ sighting is viewed by Charley US-CERT analyst
• Charley marks sighting as vetted
• Tracy from Treasury searches for sighting vetted today
• Tracy sees XYZ as a confirmed sighting
User Story: Vetting Sighting
In order to show confirmation of a sighting,
As a US-CERT analyst,
I want to mark a sighting a vetted
describe ”Imports TEWI sightings" do
context "a simple line item should know its name, quanity and price" do
let(:purchase) { LineItem.new("1 book at 12.49") }
it "should have a name of 'book'" do
purchase.name.should == 'book'
end
it "should have a quanity of 1" do
purchase.quantity.should == 1
end
it "should have a price of 12.49" do
purchase.price.should == 12.49
end
end
describe ”CERT analyst finds a recent TEWI sighting" do
context "a simple line item should know its name, quanity and price" do
let(:purchase) { LineItem.new("1 book at 12.49") }
it "should have a name of 'book'" do
purchase.name.should == 'book'
end
it "should have a quanity of 1" do
purchase.quantity.should == 1
end
it "should have a price of 12.49" do
purchase.price.should == 12.49
end
end
describe ”Vets a sighting" do
context "a simple line item should know its name, quanity and price" do
let(:purchase) { LineItem.new("1 book at 12.49") }
it "should have a name of 'book'" do
purchase.name.should == 'book'
end
it "should have a quanity of 1" do
purchase.quantity.should == 1
end
it "should have a price of 12.49" do
purchase.price.should == 12.49
end
end
describe ” Trusted partner finds un-vetted sighting" do
context "a simple line item should know its name, quanity and price" do
let(:purchase) { LineItem.new("1 book at 12.49") }
it "should have a name of 'book'" do
purchase.name.should == 'book'
end
it "should have a quanity of 1" do
purchase.quantity.should == 1
end
it "should have a price of 12.49" do
purchase.price.should == 12.49
end
end
describe "Trusted partner finds vetted sighting" do
context ”a vetted sighting should be clearly vetted" do
before(:each) do
new_sighting.build_from_TEWI()
cert_user.new(‘default_cert’)
new_sighting.vet(cert_user)
new_partner.new(‘default_partner’)
end
it "should have a tag of ’vetted'" do
new_sighting.tag.should_include == ’vetted'
end
it "should be viewable by partner" do
new_sighting.accesable_by(new_partner).should == true
end
end
32. cbell@CamilleBellConsulting.com 32
In order to conduct banking
when the bank is closed
As a bank customer
I want to use an ATM
Why?
Who?
What?
Why does your
user want this?
Your idea probably needs to be broken down into smaller stories.
Who is this user?
How is he/she
different from
other users.
What exactly does
your user want?
Start with an idea for an App (like ATM banking)
These ideas are called User Stories.
33. cbell@CamilleBellConsulting.com 33
Break Down Big Stories into
Smaller User Stories
In order to get money
when the bank is closed
As a bank customer
I want to withdraw cash at the ATM
In order to deposit my checks
when the bank is closed
As a bank customer
I want to deposit checks at the ATM
In order to earn interest even
when the bank is closed
As a bank customer
I want to transfer money from
checking to saving at the ATM
In order to not overdraw my
account when the bank is closed
As a bank customer
I want to transfer money from
savings to checking at the ATM
34. cbell@CamilleBellConsulting.com 34
Choose a Story
(to become an automated test)
In order to get money
when the bank is closed
As a bank customer
I want to withdraw cash at the ATM
Feature: Cash Withdrawal
In order to get money when the
bank is closed
As a bank customer
I want to withdraw cash at the ATM
35. cbell@CamilleBellConsulting.com 35
Define Some High Level Scenarios
for that Story
Feature: Cash Withdrawal
In order to get money when the
bank is closed
As a bank customer
I want to withdraw cash at the ATM
• Successful Withdrawal
• Withdrawal Failed Because
Cash Machine Doesn’t Have
Dollar Bills
• Withdrawal Failed Due to
Insufficient Funds
• Withdrawal Failed Because
Account Closed
37. cbell@CamilleBellConsulting.com 37
• Successful Withdrawal
Given my account has been
credited with $100
When I withdraw $20
Then $20 should be dispensed
And the balance of my account
should be $80
Use Given, When, Then format.
OK to add And and
But for readability
Test steps must be unambiguous.
Quantities are especially testable.
38. cbell@CamilleBellConsulting.com 38
With Minor Changes it can become an
Automated Test (Cucumber example)
• Successful Withdrawal
Given my account has been
credited with $100
When I withdraw $20
Then $20 should be dispensed
And the balance of my account
should be $80
Scenario: Successful Withdrawal
Given my account has been
credited with $100
When I withdraw $20
Then $20 should be dispensed
And the balance of my account
should be $80
40. cbell@CamilleBellConsulting.com 40
Behavior Driven Development
(aka Specification by Example)
• Builds upon and formalizes the best practices of Test
Driven Development
• Works outside-in
• Starts with a failing customer acceptance test
• Test describes needed behavior from a customer
viewpoint
• Tests must be readable by anyone on team
42. cbell@CamilleBellConsulting.com 42
3 Rules of Test Driven Development
1. You are not allowed to write any production code
unless it is to make a failing unit test pass.
2. You are not allowed to write any more of a unit test
than is sufficient to fail; and compilation failures are
failures.
3. You are not allowed to write any more production
code than is sufficient to pass the one failing unit
test.
With tests you are in control; without tests you aren’t!
Bob Martin - The Three Rules of TDD
43. cbell@CamilleBellConsulting.com 43
The Test Driven Development Cycle
Write a failing test
for new functionality
Write just enough
code to pass test
Refactored code
must also pass tests,
no new functionality
CamillesCareer@gmail.com 43
44. cbell@CamilleBellConsulting.com 44
JUnit 4 Tests for Movie List Story
Starting Test An empty list should have a size of zero.
import static org.junit.Assert.*;
import org.junit.Test;
public class MovieListTest {
@Test
public void testEmptyListSize() {
MovieList emptyMovieList = new MovieList();
assertEquals("Size of movie list should be 0.", 0,
emptyMovieList.size());
}
}
Ref: Java code examples from
“Test-Driven Development: A Practical Guide” by David Astels
46. cbell@CamilleBellConsulting.com 46
Class Code for Movie List Story
Test An empty list should have a size of zero.
public class MovieList {
public int size() {
return 0;
}
}
Couldn't be simpler, but that is the point!
48. cbell@CamilleBellConsulting.com 48
Old Test An empty list should have a size of zero.
New Test Adding a movie to an empty list should result in a list with the size of one.
public class MovieListTest {
@Test
public void testEmptyListSize() {
MovieList emptyMovieList = new MovieList();
assertEquals("Size of movie list should be 0.", 0,
emptyMovieList.size());
}
@Test
public void testSizeAfterAddingOne () {
Movie starWars = new Movie();
MovieList oneItemList = new MovieList();
oneItemList.add(starWars);
assertEquals("Size of movie list should be 1.", 1,
oneItemList.size());
}
}
JUnit 4 Tests for Movie List Story
50. cbell@CamilleBellConsulting.com 50
Class Code for Movie List Story
public class Movie {
}
public class MovieList {
private int numberOfMovies = 0;
public int size() {
return numberOfMovies;
}
public void add(Movie movieToAdd) {
numberOfMovies = 1;
}
}
Baby Steps: Change as little as possible to get to GREEN
New Test Adding a movie to an empty list should result in a list with the size of one.
52. cbell@CamilleBellConsulting.com 52
• Programmers restructure system by improving the design of existing
code without changing its behavior
– to remove duplication, improve communication, simplify, or add flexibility
• Refactoring is not random change, instead it’s driven by learning
from our tests and from identifying and fixing code smells
• DRY (Don’t Repeat Yourself)
• Refactoring can occur just prior or just after writing new code
• Test, code, refactor, re-test
– Kent Beck suggests short cycle (10 minutes)
Refactoring
When fixing bugs, write a Red test, BEFORE fixing the bug. Test will run Green when bug fixed.
When working with legacy code make sure to write automated tests BEFORE refactoring code,
If tests didn’t exist.
53. cbell@CamilleBellConsulting.com 53
Refactored Class Code after 4th Test
import java.util.ArrayList;
public class Movie {
}
public class MovieList {
private int numberOfMovies = 0;
private ArrayList<Movie> movies = new ArrayList<Movie>();
public int size() {
return movies.size();
}
public void add(Movie movieToAdd) {
numberOfMovies++;
movies.add(movieToAdd);
}
public boolean contains(Movie movieToCheckFor) {
return movies.contains(movieToCheckFor);
}
}
New Test If we add a movie to a list, we should be able to ask if it’s there and receive
a positive response.
Delete
Delete
Change
56. cbell@CamilleBellConsulting.com 56
Parts of a Cucumber Feature File
Feature: Cash Withdrawal
As a bank customer
I want to withdraw cash at the ATM
So that I can get money when the bank is closed
Scenario: Successful Withdrawal
Given my account has been credited with $100
When I withdraw $20
Then $20 should be dispensed
And the balance of my account should be $80
Scenario Title
Scenario
Feature Title
Feature
Steps
cash_withdrawal.feature
Ref: Cucumber code examples from
“The Cucumber Book” by Matt Wynne and Aslak Hellesøy
58. cbell@CamilleBellConsulting.com 58
The Structure of
Cucumber Features
Feature: [ feature title ]
As a user [ role ]
I want [ feature ]
So that [ business value ]
Scenario: [ scenario title ]
Given [ a pre-condition ]
And [another pre-condition ]
When [ event ]
Then [ post-condition outcome ]
And [ another post-condition outcome ]
Plain
TextKey
Words
From
User
Story
Ref: Cucumber code examples from
“The Cucumber Book” by Matt Wynne and Aslak Hellesøy
73. cbell@CamilleBellConsulting.com 73
Repeat Cycle Until All Test Steps Pass
Write
Scenario
Create Step
Definitions
from Snippet
Turn Pending
Step into Test
Watch it Fail
Make it Pass
by Evolving
Code
Pending
Steps?
YesNoDone
with
Scenario
Start
with
User
Story
77. cbell@CamilleBellConsulting.com 77
Browser Testing with Selenium
Example Selenium Testing with
jUnit and Java in Eclipse
Selenium IDE (Firefox only)
Record/Playback
Recorded tests don’t scale,
Only run test individually or
single test suite – good for first
cut tests
Selenium Remote Control
cross browser tests
with Java, Ruby, Python,
Perl, PHP or .Net
81. cbell@CamilleBellConsulting.com 81
Healthy Test Ratio
• Very, very, very Slow
• Usability testing
• Exploratory testing
• Labor intensive
• Automate exploration
• Very slow
• Validate UI functionality
• Brittle, if using capture playback
• Very, very fast
• Uses mocks
• Validate class and
function/method code
• Some fast, some slow
• Data and other integrity
• Validate at higher level
than unit tests, but not
directly user facing
84. cbell@CamilleBellConsulting.com 84
3. Update
Build
Workspace
Continuous Integration Cycle
with Performance Testing
Developer
Deploy
Server
Version Control
Repository
1. Check-in
CI Server2. Monitor changes
4. Build
5. Run Tests
6. Send Build
& Test Report
7b. Deploy App
at Release
Performance
Test Server
Frequently
7a. Performance
Test App
90. cbell@CamilleBellConsulting.com 90
Examples of Testing of Ideas with Lean Startup
• Split A/B Testing
– controlled experiments
– two versions of product released simultaneously
– test metric comparison ($ earned, # of signups, etc.)
– Netflix huge user of A/B testing
• Crowd Testing: Validating the existence of a customer base
– bypassing investors with Kickstarter, etc. (e.g. Torment)
– creating dummy site to sign up and buy (e.g. Zappos)
92. cbell@CamilleBellConsulting.com 92
Bug Growth on
Non-Agile Projects
T i m e
B
u
g
s
code fix code codecode codecodecode fixfixfixfix fix
release 1
release 2
release 3
release 4
release 5
release 6
release 7
93. cbell@CamilleBellConsulting.com 93
TDD and BDD prevents a Great Many Bugs, but …
a few will probably still occur
Write a failing test
for new functionality
Write just enough
code to pass test
Refactored code
must also pass tests,
no new functionality
cbell@CamilleBellConsulting.com 93
94. cbell@CamilleBellConsulting.com 94
Create a RED test BEFORE fixing the bug,
… so you are sure you really fixed it,
and the bug never sneaks through the tests again.
cbell@CamilleBellConsulting.com 94
Write a failing test
that exposes the bug
Write just enough
code to fix the bug
Refactor if needed,
must also pass tests,
no new functionality
96. cbell@CamilleBellConsulting.com 96
• By acting as a servant leader and removing obstacles
• By providing whole team training in agile processes
• By providing technical training in automated test tools to
current employees
• By requiring automated test experience for new hires
• By making testability a must have for languages & tools
(many of the best are open source)
• By providing the automated test tools themselves
• By providing continuous integration and deployment servers
• By tracking progress differently
Management Needs to Support Agility
97. cbell@CamilleBellConsulting.com 97
• Agile processes like Scrum, Lean, Kanban and XP:
• often make short near term predictions
• track actual progress
• determine if the predictions, if made, were correct
• use actual progress metrics to project future outcomes
• adapt and adjust based on real outcomes
• Managers must ensure that agile practices:
• help the team improve projections
• never become a stick
Agility Organizational Processes
Have Built-in Feedback Loops and Validation
98. cbell@CamilleBellConsulting.com 98
Running Tested Features Definition
1. The
desired
so,ware
is
broken
down
into
named
features
(requirements,
stories),
which
are
part
of
what
it
means
to
deliver
the
desired
system.
2. For
each
named
feature,
there
are
one
or
more
automated
acceptance
tests
which,
when
they
work,
will
show
that
the
feature
in
quesAon
is
implemented.
3. The
RTF
metric
shows,
at
every
moment
in
the
project,
how
many
features
are
passing
all
their
acceptance
tests.
Ron Jeffries, A Metric Leading to Agility
99. cbell@CamilleBellConsulting.com 99
Calculating RTF is Simple
• No weighting - No partials credit: A Feature is
either all running & passing all tests or it isn’t.
• So a feature either counts as 0 or 1.
• Add up the 1s.
• Run all tests for each measurement.
• Track over time.
100. cbell@CamilleBellConsulting.com 100
RTF Works on any Project, even Waterfall
RTF on Agile software
development projects
should steadily increase
over time
RTF on Waterfall
development only
increases at project end
101. cbell@CamilleBellConsulting.com 101
Example 1: Buggy New Feature Breaks Old
Monday 6 running tested
features. Tuesday no
new features added, but
existing features still
pass tests.
On Wednesday, new
feature added which fails
test and causes side
effect that causes pre-
existing feature to also
fail tests.
On Thursday, new tests
added to old feature and
new feature fixed. All
tests pass.
102. cbell@CamilleBellConsulting.com 102
Example 2: New Feature Breaks Everything
Monday 6 running tested
features. Tuesday no
new features added, but
existing features still
pass tests.
On Wednesday, new
feature added which
breaks the build, crashes
system, corrupts DB or
something similarly
catastrophic.
On Thursday, new tests
added and new feature
fixed. All tests pass.
103. cbell@CamilleBellConsulting.com 103
CUMULATIVE BURNUP
StoryPointsorFeaturesComplete(RTF)
Time
Burnup of Story Points or Running Tested Features metrics can be more informative than burndowns.
New Stories when added
caused existing stories to
fail automated tests
Stories fixed,
tests added, all
tests now pass
Stories Removed to
meet Release DateStories
Added
New Baseline
New Baseline
Baseline
ReleaseDate
Complex
Code
needed
refactoring
Ref: Alistair Cockburn http://alistair.cockburn.us/Earned-value+and+burn+charts
Ron Jeffries http://xprogramming.com/articles/jatrtsmetric/
106. cbell@CamilleBellConsulting.com 106
Code Coverage
C0, C1 and C2 Coverage
C0 – Line coverage analysis measures which lines of code have been
executed. C0 coverage is typically used it to find the areas of your
program that have not been sufficiently tested, i.e. those that were not
run by any your test cases.
C1 – Branch coverage analysis measures which of the different possible
branches of conditional statements have been tested. It is easy to have
100% C0 line coverage and only partial C1 branch coverage, because
if, then and if, then, else statements may be contained all
on one line in many languages.
C2 - Path coverage measures which of the different possible execution
paths through your code were tested. Paths are a combination of linear
code execution with alternate branches. Since each new conditional that
is encountered gives rise to new path choices, the permutations of
possible unique paths gets huge.
107. cbell@CamilleBellConsulting.com 107
Code Coverage
C0, C1 and C2 Tools
C0- Every automated code coverage tool measures at least Line
Coverage. Open source tools rcov for Ruby and Cobertura for Java
provide C0 coverage.
C1 - Many automated code coverage tools (both open source and
commercial) measure Branch coverage. For instance open source tool
Emma for Java measures both Line and Branch coverage as does
Clover, a commercial Java test tool.
C2 – Complete path coverage throughout an entire large application is
almost unheard of because of its complexity and cost. I know of only two
large software applications (both in Ada) that had 100% path coverage.
Path coverage through multiple limited sections of code is much more
feasible. All path coverage tools also include line and branch coverage.
All are commercial and very expensive.
108. cbell@CamilleBellConsulting.com 108
public class CoverageExample {
// This code is logically equivalent to the next example, but because of the
// code structure, untested branches are detected by line coverage.
public int echo (int x, boolean state1, boolean state2, boolean state3) {
if (state1) {
x++;
}
if (state2) {
x--;
}
if (state3) {
x = x;
}
return x;
}
}
// This test provides 100% Line coverage, but it doesn’t provide any branch coverage.
public class CoverageTestLineOnly {
CoverageExample lineBranchPath;
@Before
public void runBeforeEveryTest() {
lineBranchPath = new CoverageExample();
}
@Test
public void testReturnInput0FalseFalseFalse() {
assertEquals(0, lineBranchPath.echo(0, false, false, false);
}
}
Code Coverage
C0 – Line Coverage
109. cbell@CamilleBellConsulting.com 109
Code Coverage
C0 – Line Coverage Limitations
public class CoverageExample
// This code is logically equivalent to the prior example, but because of the
// code structure, untested branches are not detected by line coverage.
public int echo (int x, boolean state1, boolean state2, boolean state3) {
if (state1) { x++; }
if (state2) { x--; }
if (state3) { x = x; }
return x;
}
}
// This test provides 100% Line coverage, but it doesn’t provide any branch coverage.
public class CoverageTestLineOnly {
CoverageExample lineBranchPath;
@Before
public void runBeforeEveryTest() {
lineBranchPath = new CoverageExample();
}
@Test
public void allFalse() {
assertEquals(0, lineBranchPath.echo(0, false, false, false);
}
}
110. cbell@CamilleBellConsulting.com 110
Code Coverage
C1 – Branch Coverage
public class CoverageExample
// This code is identical to the prior example.
public int echo (int x, boolean state1, boolean state2, boolean state3) {
if (state1) { x++; }
if (state2) { x--; }
if (state3) { x = x; }
return x;
}
}
// Adding the new test provide 100% branch coverage, but doesn’t detect the bug.
public class CoverageTestLineAndBranch {
CoverageExample lineBranchPath;
@Before
public void runBeforeEveryTest() {
lineBranchPath = new CoverageExample();
}
@Test
public void allFalse() {
assertEquals(0, lineBranchPath.echo(0, false, false, false);
}
@Test
public void allTrue() {
assertEquals(0, lineBranchPath.echo(0, true, true, true);
}
}
111. cbell@CamilleBellConsulting.com 111
Code Coverage
C2 – Path Coverage Explosion
false false false
false false true
false true false
false true true
true false false
true false true
true true false
true true true
To test all possible paths of N
Boolean conditionals is 2 ^ N.
So for our example of 3 Booleans
that’s 2x2x2 or 8. As shown in the
example on the left, it’s not too
bad.
However, the set of all possible
paths grows exponentially, so a
combination of 10 Booleans,
becomes 2x2x2x2x2x2x2x2x2x2
or 1024 possible paths, an
unmanageable number of tests.
112. cbell@CamilleBellConsulting.com 112
Code Coverage
C2 – Basis Path Simplification
false false false
true false false
false true false
false false true
Basis path testing is a simplification of
path testing, that significantly lowers the
number of needed tests
A complete set of basis path sets are the
number of boolean decisions +1. It grows
linearly instead of exponentially. that’s
3+1 or 4 instead of 8 for our example
and 10+1 or 11 instead of 1024.
Path 1: Any path will do for the baseline,
so pick all trues or all falses for
simplification. We are picking false. This
is the first path in our basis set.
Path 2: To find the next basis path, we
flip the first decision (only) in our
baseline.
Path 3: Next we flip the second decision
(only) in our baseline path, the first
baseline decision remains fixed with the
false outcome.
Path 4: Finally, you flip the third decision
in your baseline path. Again, the first
baseline decision remains fixed with the
false outcome.
113. cbell@CamilleBellConsulting.com 113
Code Coverage
Line, Branch & Basis Path
// JUnit 4 tests with 100% line, 100% branch coverage, and 100% basis path.
public class CoverageTestPath {
CoverageExample lineBranchPath;
@Before
public void runBeforeEveryTest() {
lineBranchPath = new CoverageExample();
}
@After
public void runBeforeEveryTest() {
lineBranchPath = null ;
}
@Test
// First basis path.
public void allFalse() {
assertEquals ("All false inputs ", 0, lineBranchPath.echo(0, false, false, false);
}
@Test
// Second basis path.
public void trueFalseFalse() {
assertEquals ("True-False-False inputs ", 0, lineBranchPath.echo(0, true, false, false);
}
@Test
// Third basis path.
public void falseTrueFalse() {
assertEquals ("False-True-False inputs ", 0, lineBranchPath.echo(0, false, true, false);
}
@Test
// Fourth basis path.
public void falseFalseTrue() {
assertEquals ("False-False-True inputs ", 0, lineBranchPath.echo, false, false, true);
}
}