Testing software sounds simple enough. But what exactly should you test, where should those tests happen, and how do you decide which parts of a complex system need the most attention? Jack talks with Mooly Beeri about software testing from a developer's perspective: identifying the right test points, understanding how different parts of a system interact, and building testing into the development process rather than treating it as something that happens at the end. A practical look at what it actually means to test software properly. You can read more from Mooly at https://www.bettersoftware.dev/ Want even more info? Read our show notes and related blog post related to this episode: https://blog.ithorrorstories.eu/episode-21-testing-software-properly/ 00:00 Introduction 01:05 Mooly's Background 01:43 Automotive Software 04:01 Software Challenges 06:21 Bug Management 12:11 Improving Processes 15:42 Communication Importance 28:07 Summary
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
Hey everyone, welcome again to it Horror Stories with Jack Smith. I am Jack Smith and across the table today I have Muli berry. Sir, good evening, how are you doing? Yeah, good evening. Thanks for hosting me. All right, more than happy to have you. Mooly, for the people that do not know you, in a nutshell, how would you describe yourself to get going? Well, I'm a software guy with almost 30 years of experience from multiple startups and from Microsoft
and Philips. I had luck and I was fortunate to build the first software center of excellence for Philips. And then I enjoyed the space of software excellence. I created my own company around it called Beta Software and I'm doing large scale software transformations with large automotive clients for automotive and healthcare clients for
many years. So that's who I am. Okay, Samuli, so you mentioned the automotive sector and knowing that cars are slowly transforming into driving data centers, there has to be something going on there. So how about we talk about the automotive sector? Yeah, good, good, yeah. The automotive sector is becoming more and more dependent on software. With software, software defined vehicles and more and more powerful microcontrollers
and computers in the cars and updates over the air and so on. And the software becomes very complex and it's also provided by many different players in the space. So if you look at a single car, the software running in that car comes from a large variety of suppliers. One supplier is delivering the software that controls the braking, another one the steering, another one, the infotainment
system, another one, the dashboard and steering and autonomous driving and so on. And it becomes a really big challenge integrating all of this software and coming up with a piece of software that is reliable and can safely run a car or millions of cars without bugs. Yeah. If you then put it all together, this magically has
to integrate and cooperate. There have to be challenges there. Yeah, for sure. These integration projects are usually very long and require multiple participants to play along. And it usually involves hundreds, if not thousands of bugs that have to be resolved even on a monthly basis. And the way this is being resolved today for most OEMs
is taking huge buffers in terms of years for developing, stabilizing and getting all the bugs beaten out of the system very slowly. So it's very. It's not uncommon for automotive players to work now on software releases that are scheduled to be released in three to five years, which is very counterintuitive when you think about the rapid pace of software releases today.
When you get a new AI model twice a week or a new new updates delivered to your phone twice A day. So the challenge is quite significant. It's actually one of the reasons we're talking today, because I've personally worked in multiple projects where the teams had to cope with, even at some extreme cases, two or three thousand defects
every month. Imagine that working on a project where you have to process and fix, or even not fix, but make a decision about 2,000 defects or bugs every month. I would imagine that's a lot of assumptions that, oh, it will be okay, it will be fixed. And then in the end, I'm just imagining all the tests that you have to throw against it to make sure that all your aggression is there. And. Yeah, so the, yeah, the,
the. Maybe. Maybe I can choose one specific example. Sure, go ahead. So a really large automotive player, let's say one of the most famous cars in the world, working on a project where There are approximately 2,000 bugs every month. Of course, there's. The bugs are just a side effect. The, the main thing is that features are getting delivered on a daily and
weekly basis. But as features get delivered, also bugs get generated. And if you, if you look at, if you think about the world of electronics, there is this concept of signal to noise that we, that we know well, or basically the value versus the overhead. And you always want to work in an engineering environment where the overhead or the noise is under control and it's small and you provide a lot of
value. And okay, you maybe sometimes while you provide value, there is some side effect. It needs to be handled, but that side effect needs to be be managed. And whatever it is, you're hoping to get it smaller and smaller over time. So whatever the side effect is, you want to get your processes improved such that the waste in your engineering process gets smaller over time. So if I go back to that example of the team that I
mentioned, they were working in an environment where about 60% of their time was spent on processing bugs. So essentially a large team, probably close to a thousand engineers, and about 600 of them are working full time just on fixing bugs. They don't deliver any value to the project except for fixing the mess that's created by the. The other 400 engineers.
And so you can imagine that this project is quite wasteful. And the problem is that most of the teams working in large enterprises today, they work under a specific process and it's divided into iterations, whether they're using Agile or Safe or Scrum or whatever. But they usually invest quite little in
improving their processes. So they go through iteration over iteration using the exact same process. And if the process is such that it generates 60% noise and only 40% value. And you repeat the same process again and again, you will again and again generate 60% noise. And that's exactly what those teams were facing. So basically every iteration, they were getting a little bit
closer to the target because they delivered more features, but they were also drowning more and more in technical debt. They were creating thousands of defects every month. And the software systems today are so complex that when you implement whatever change you implement, you always create some regression in the system. So many
years ago, the systems were a bit more simple and you could theoretically keep the system in your head and so making one change and somehow controlling what impact is done to the system and being able to predict where things would go wrong. But in today's system systems, they are so complex that there's no way you can keep the different scenarios and complexities in your mind. And so when, when you make a change, it's not a question of did you create some regression
in some, some other functionality? It's usually almost guaranteed that there is a regression. And the only way to catch that is by having a solid test automation framework that can run continuously and give you these alerts saying, okay, you implemented this functionality or a certain functionality, but you accidentally also created this type of problem which has to be fixed. And so there
is actually research that shows that the probability of creating a regression in a complex product when touching a single line of code is greater than 60%. So it's almost probable when you make significant changes that some regressions happened. So going back to that example, the team I was trying to help, they were fighting with about 2,000 defects per
month. And when we started, and of course some of them, most of them are discovered internally, but quite a significant portion of those are discovered by customers. And every time a defect is found by a customer, that includes customer escalation, escalation calls, reputation, costs, and working over weekends, and so on and so forth. And so we started looking at this pool of 2000 defects and trying to analyze what
are the root causes, where are they coming from, and basically map these defects into their process areas. Are those coming from problems caused by static analysis? Are those problems that are isolated to specific components and could be found using unit test? Are those integration problems that could be found by testing the relations between the different components or coming from the
need to integrate third party products or third party code? Don't miss an episode. Subscribe now on Spotify, Apple Podcasts, YouTube and more. Support us by leaving a Like or a Review. You can always find more at IT Horror Stories EU and we're just an email away at HelloThorrorStories EU.
For each of these process areas, we defined the specific test cases, test suites, and started running those continuously as part of their CI CD continuous integration environment. And basically when these failed, we blocked the ability to integrate. In essence, what we started to implement was some hard gating of failures.
And the team was mostly in the mindset of we are going to deliver first and fix later. So we'll first deliver the new content and later when or if we find a regression, we'll we're going to fix it if it becomes a priority. Okay? Yeah. And the mindset shift was if you need to fix something, the cheapest option is to fix it as early as
possible. So if you know a failure is there, there's no point in postponing the decision to fix. You have to fix it immediately. And so what we started doing is with every two week iteration is to plug into their process a small process enhancement, for instance. I'll just give you a very simple example. The team was
very determined on fixing all the static analysis violations. But the way they did it was first integrate all the changes, then once in a couple of weeks run the static analysis scan and whatever is a critical finding. They would file bugs which would add up to the 2000 bugs in a month and these bugs would get triaged and processed and assigned and so on.
The first thing that happens is that when these problems are introduced into the code, if they are serious problems, they're not stopped getting into the code first. Second thing that happens, these require effort for triaging. Someone needs to look at every one of these issues and decide whether it's worth fixing or not. And third thing that happens is this gets assigned not to the same person who created the code. And so you also miss the opportunity of helping the developer create code
relearn. And if I can jump in, because you mentioned some nice topics that I wanted to quickly jump onto because you said for the triage and for the priority, who decides how much can be fixed? An example from my career and a few customers is that you get full blown into crunch time and you have a hard deadline in one week and you find out that you have 15, 20, 25 showstoppers. And I've noticed multiple times that say the delivery manager and some project
managers, they go into a room and magically you go from 25 showstoppers to five showstoppers that they focus on and then those 20 they magically disappear, those will without a doubt somewhere pop up. Is this something that still happens or that you have seen happening? How does that go? Yeah, for sure. The, the, the, if you find let's say 1000 bugs in your test cycle, internal test cycle, it's almost
certain that about 10% of those will be found by your customer. So if you, if you found a thousand, you know there are a hundred customer escalations way that will show up. Now in some industries they prefer speed. So I spoke earlier about different versions of AI engines. They don't really care if they make mistakes because if the you
ask ChatGPT what's the date? And it says the wrong date and you say hey it's the wrong day, they say oh you're right, I got the wrong date. It's not going to be custom escalation. Yeah but if you, if you look at your gas meter in the car and it says it's full and then you get stuck because the gas is actually empty, you, it will be a customer escalation or I just had another client of mine, they had customer escalations with the wrong notification.
The notification said they have to change their steering system where actually the problem was low battery in the car. So each industry has a different sensitivity to customer escalations. But going back to your question, if you know how many bugs you found in your internal test cycle, it's almost mathematically proven that about 10% of those will become customer escalations. And whether you are willing to
sustain that or not really depends on your condition in life, your customers willingness to accept instable software. But in automotive this is really a big problem. And that's exactly the reason that accumulating this technical debt is becoming a bigger and bigger problem. And then you see projects that require two
years to stabilize before they are willing to actually deliver something to the market because they can't sustain a customer escalation. I speak from experience with my vehicle that had exactly that where the entire software stack had to be rewritten and that took a few years before the update. And then you mentioned the over the air updates. It took them four years in the life cycle of my vehicle to get it fixed. Actually I had to go to the dealer multiple times for a module
that needed an update before the entire over the air was indeed done. So the entire discovery to fix to implementation time is as you mentioned, humongous. It's very, very long. Yeah, yeah, exactly. And of course the teams are under pressure to deliver and it's kind of a vicious cycle because Project management and delivery. They know that they're going to get poor software, they require longer and longer stabilization periods. And so they
put more and more pressure on the software teams to deliver faster so. So that they can go through a longer stabilization period. And so they deliver less and less stable software, which takes longer and longer to stabilize. And in most of the cases, they're doing the stabilization at the end, which is usually the least cost effective way of doing the stabilization. So in the example I gave,
one of the very small changes we made was that every static analysis finding, if it had to be fixed, it was flagged to the developer at the point where it was generated and fixed at the injection point. And so just by doing that, we achieve a couple of goals. The developers produce better and better code over time. And a big chunk of bugs don't even get filed because when you run the static analysis scan, it's clean.
And so you go through the software development life cycle step by step and find out how many problems arise from wrong unit testing, wrong integration testing, wrong qualification, and so on. And you go and optimize each of those and basically force the teams to do everything upstream and look at the injection points and try to. The cost of a bug is
exponential to the time that it spends in the system. So for every bug, there is the injection point and there is the detection point. Okay, is the time it was created and the time it was safe. So jump in. Is it safe to say that because if you have a bug and you leave it in because you do your bug fixing at the end, that all the other features that this bug will break also become bugs, which you then also have to register and handle. And these don't come
in. And that's where I would see a tremendous gain in resources and just technical debt that is not even created. Am I getting this right? Yeah, yeah, yeah, I think, I think you're absolutely right. The reason the cost of a bug is exponential is because. Because when the bug gets introduced and enters the system, it starts impacting multiple developers in the group. And the same bug is basically investigated by multiple people and perhaps
even filed multiple times. And then someone needs to realize it's the same bug and start closing it. And the. So if you look at injection point, the time the bug was created and detection point, when was it found? You're trying to minimize that gap as much as possible. Now, the bugs can only be created in three places. In requirements, in design,
and in implementation. These are the only places where bugs get created. And so usually in many Teams, the detection only happens when they are preparing for a release. Okay, okay. And so the bugs, they live in the system for a long, long time. And you have to move the detection points as early as possible and start measuring the problems way before they get integrated. Way before your mainline gets contaminated
by these bugs. You have your methodology. Which one then leads better to apply this system? Is it more waterfall, is it more agile? Or can both be adapted? Because I can imagine that if you're agile before you do an entire test, it can take quite a while. With waterfall, you have more fixed point point in times, although you can do it with epics and agile as well, of course. But is. Is there a difference between those?
There isn't any. There is no significant or conceptual difference between those methodologies. The injection points are the same and the detection points are known for each one. And then whatever process you're following, it's really about trying to minimize or get the detection point to become as close as possible to the injection point. So in. In the framework that we apply,
we talk about fixing problems at the injection point. This podcast features Jack Smith and guests. We say thank you to our demoscene friends who helped making this podcast possible. Commander Homer for editing, Danko for music and audio advice, Netflix Poet for additional voiceovers.
So we're trying to fix it at injection, and so it doesn't really matter which methodology you use, as long as you can find the problems very close to the injection point. And with that specific example, after working with that team for about a year, we had some quite nice results. We were able to reduce the number of overall
bugs in the system by a little bit more than 40%. So that team was actually performing at very close to a thousand defects per month, which is still quite high, but almost half of what they were doing before. And you can imagine that translates to quite a big capacity that is suddenly free people that can actually deliver features, or all
the same team that can deliver the same content with less people. And so we usually. We usually see 20 to 30% reductions in a year, depending on how successful we are. In the best, best case ever, we had some luck, and we're able to fix a specific system and reduce the number of bugs
by 90%. But that was. That was really a special case. But this was a team that owned a critical component in the car. Every time this component had a bug, the car would stop because it was. Well, I don't want to. Don't want to go into the specifics, but it was a component that would basically the Car had to be towed every time they had an issue. And they had quite a lot of
customer issues and they didn't really know how to resolve them. We did our analysis. Again, the same thing, the injection point, detection point. How do you find all the problems earlier? And in this case, the team had all the right building blocks. They were just not using them in the right order. And by sorting out their process a little bit, we were able to get 90%
reduction in the defects. It doesn't mean that developers became significantly better. It's just that most of the problems are now found so much earlier that are fixed before they're even submitted into the main line. And so that made a huge difference for that team. I can imagine, yes. So, and then with your methodology, because our listeners
are mostly the admins and the architects and the security people, if there would be a message from you, from the development side to them to say, hey, we hear you, we are working together with you, would you have a message for them to say it's going to be okay? Is there something up your sleeve? Because the average audience thinks that developers are annoying, which I know they're not. Well,
working with many development teams over the years, it's interesting that the developers think the problem is with the product guys that are defining the product and requirements are the problem. The guys who are writing the requirements think developers are the problem. The testers think developers are the problems. The developers think the testers are the problem. But I would say the real challenge is that the teams are working in their own
silos and trying to optimize their own silos. And very few people look at the entire system and try to optimize it. And if you go back to the learnings of Deming and early industrialization, the impact on the overall result is usually the way the system is designed. And so if you design the system in a way that the developers and testers
don't speak, they speak through releases, then you will always find the bugs too late. And if you design the system in a way that every time a feature is written, the test person has to be there and sign off on the implementation, you will have very few bugs. So from my experience, there is no single discipline who is to blame. But many teams are not optimizing the system so
that it works for their benefit. They repeat the same process and therefore they get the same results. Last thing I want to jump on because you mentioned it and it's actually important what you mentioned. The architects, the designers, the developers, the testers, what's in the framework that you described, what's a good communication method? Is it standups?
Is it weekly meetings? Is it a bunch of emails? Because people have to communicate and then say, hey, I found a bug in a test scenario, it's fixed. Can you retest? How does communication ideally work between those teams? Yeah, I think the best communication, I don't have a specific method of communication, but the best communication is really understanding that you're working in a complex environment with multiple stakeholders.
And every time you discuss a specific work item, make sure you have other disciplines involved in the same. When you implement, I'll give you a very simple example. When you implement a new story, a new feature, you as a developer, you know already, if you think about it, that when you develop this feature, some test, existing test is going to fail because you're
changing the behavior. And so when you do that, reach out to your test counterpart and let them know this is coming. And when you're a product manager and you're writing a feature, you know it needs to be tested. So get your test counterpart to look at this feature and tell you whether it's testable or not. So the, the method of communication is not so important. But realizing
you're working in a complex environment is the important thing. And understanding there is a system and understanding there is. The problems are too big for a single person to solve. So you have to communicate with your peers. You have to understand what you're doing has impact on other teams and communicate that impact to the other teams. There are many methods, but the most important thing I think is the awareness. And if you. From all the discussion, there is three
points to get into the technical debt removal and prevention. If we tell our listeners three points to think about, three points to take with you, three points to remember. What would those be for you, sir? Yeah, so I think the first one is try to look at the stream of incoming bugs and understand why they're coming. We usually look at the stream of bugs and try to understand what the bugs are to fix them. But we rarely look at the root causes
of why they are coming. Why were they caused, why were they not found by the developers when the code was created? So first thing is understand what the root causes of your. You think about incoming bugs as a opportunity for improvement, each one of those, and, and, and get into the habit of learning from those bugs. So first thing is really, you get enough feedback
every day about what's wrong with looking at the stream of bugs. That's the first thing. Second is experiment with your process. If you're working with a certain process and it's generating a certain amount of bugs, you have to change your process from iteration to iteration and it doesn't really matter how you change it, just experiment with it. You're trying something out, you know bugs are coming, try something different in the next iteration, have two more people do the
code review, have some tests run earlier, have a different checklist, have a different merge gate in your CI cd, it doesn't matter. Experiment with your, with your process and try to find a good balance for your company. And maybe the third is really try to look at the whole system. Try to optimize the system so that
you understand what is the weakest point in your entire software development life cycle. I see a lot of improvements that are focused on the wrong thing. Imagine a team buying a very expensive license for a Claude code or with many tokens and whatever improving the pace at which they generate code. But if you look at the entire system, their problem is requirement stability.
So they are developing faster and faster the wrong requirements and so getting more tokens for the cloud code will cost them 100k every month, but will get them nowhere closer into getting the right product in front of you. Very, very true. Absolutely. Yeah. So understand what is the weakest point in your software development life cycle and focus all of your energy on optimizing. That sounds fascinating if people want to hear more from you, Emily, because we only have touched the surface
of your knowledge and what you can do. If people say I want to hear more about Muley, where can they find you? Because I think you have gathered some interest here. Well, you can go to our company's website. This is bettersoftware.dev so that's one, one place and also you can look me up or the company on LinkedIn. So Muliberry on LinkedIn, I'm usually quite responsive there. If you leave me a message I'll get back to you quite quickly.
Or the company's webpage on LinkedIn. So all of these are good ways of getting in touch. Mooly, thank you for your insight. I think this was for our listeners a very different but extremely insightful episode. Looking from the other side of the fence because developers is usually not something that we have in our portfolio and I'm really happy that I could have your views, opinions and knowledge on it. So thank you very much for that. I really appreciate it.
Go ahead. No, I just wanted to thank you for hosting me. It's always fun and these are, these are topics I'm passionate about. I always enjoy when I have an opportunity to have a good discussion around those topics. Thank you Mooly for joining us. This was It Horror Stories with Jack Smith. As always, you can find us on Spotify, Apple Music, YouTube, Deezer and wherever you find your panic attacks. We have multiple episodes a month. Our website IThorrorStories, EU merchandising shop, ITAHorrorStories, EU and
our socials on Instagram, TikTok, Facebook, LinkedIn, BlueSky and Mastodon. Yes, the more professional IT minded networks are there as well. You can find those on links.it horrorstories EU. Thank you for tuning in and we will hear each other in the next one. The content of this podcast is intended for entertainment purposes only and is meant to humorously explore various tech related situations.
Any resemblance to actual events or real persons, living or dead, is purely coincidental. We ridicule situations, never individuals or groups. Listener discretion is advised and we encourage everyone to approach technology with a sense of humor and an open mind.
Why does Windows still dominate the corporate desktop after all these years? One answer is surprisingly old: Group Policy. Microsoft has spent decades building centralised management directly into Windows, allowing...
From the classic backhoe cutting through a cable to redundant network paths, data protection, user connectivity, and the cost of building infrastructure that can survive failures, we explore where redundancy helps and...
What happens when a company rushes into AI adoption without understanding what it actually costs? Ankit Mishra joins Jack Smith to share a firsthand incident involving an AI-powered sales lead generation platform,...
Call Center Down: If Only AI Could Diagnose Network Traffic Problems What happens when hundreds of call center employees suddenly find their systems grinding to a halt, only for everything to return to normal at 5 pm?...
Two critical PHP vulnerabilities. Emergency patches. Government websites going offline. And IT teams around the world suddenly discovering just how much forgotten infrastructure they're responsible for. But the real...