Automated Testing: A Machine Learning Approach

Tuesday 25 February 2025


Software developers are always on the lookout for ways to make their code more reliable and efficient. One way they do this is by testing it thoroughly before releasing it into the wild. But what happens when these tests become too complex, or too numerous, to manage? That’s where a new approach comes in – one that uses machine learning to automatically generate test cases.


The idea behind this approach is simple: instead of writing tests manually, you let a computer program do it for you. The program learns by analyzing the code and identifying patterns and relationships between different parts of it. It then uses this knowledge to create new test cases that are likely to uncover bugs or other issues.


One team of researchers has been working on developing just such an approach. They’ve created a system called EvoMaster, which uses evolutionary algorithms (think of them like digital Darwinism) to generate test cases. The algorithm starts with a simple set of tests and then iteratively adds new ones based on the results of the previous round.


The team tested EvoMaster on six real-world microservice applications – tiny pieces of software that work together to make up larger systems. They found that EvoMaster was able to find bugs and issues in these apps that human testers had missed, often with fewer test cases than would have been needed otherwise.


But how does it work? Well, EvoMaster uses a technique called model inference search heuristic (MISH) to learn about the code. MISH is like a digital detective, searching for patterns and connections between different parts of the program. It’s able to do this by analyzing log files – records of what the software has been doing – and identifying sequences of events that might indicate problems.


The team thinks that EvoMaster could be particularly useful in industries where reliability is crucial, such as finance or healthcare. By automating the testing process, developers can focus on writing better code rather than spending hours and hours writing tests.


Of course, there are still limitations to this approach. For one thing, it’s not perfect – sometimes EvoMaster will generate test cases that don’t actually work. And for another, it’s only as good as the data it’s given – if the log files aren’t accurate or complete, then MISH won’t be able to learn much.


Still, the potential benefits of EvoMaster are huge. By automating testing, developers can save time and reduce errors.


Cite this article: “Automated Testing: A Machine Learning Approach”, The Science Archive, 2025.


Machine Learning, Software Development, Testing, Reliability, Efficiency, Automation, Evolutionary Algorithms, Digital Darwinism, Model Inference Search Heuristic, Log Files, Finance, Healthcare


Reference: Clinton Cao, Annibale Panichella, Sicco Verwer, “Automated Test-Case Generation for REST APIs Using Model Inference Search Heuristic” (2024).


Leave a Reply