BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Exploring AI's Role in Automating Software Testing

Exploring AI's Role in Automating Software Testing

According to Victor Ionascu, QA professionals are increasingly turning to AI to address the growing complexities of software testing. AI-driven automation can improve test coverage, reduce test cycle times, and enhance the accuracy of results, leading to faster software releases with higher quality.

Victor Ionascu talked about AI’s role in software testing at QA Challenge Accepted.

One of the main challenges today is to ensure comprehensive test coverage, Ionascu said. When dealing with complex systems, especially in sectors like banking or logistics, where we handle secure, multi-step data transactions, it’s nearly impossible to cover all edge cases manually. The risk of missing corners of impactful workflows increases with complexity. The struggle lies in ensuring coverage without compromising timelines, as Ionascu explained:

As applications grow more complex, identifying and converting corner cases into viable test cases becomes increasingly difficult. This results in potential gaps in test coverage that can lead to overlooked issues.

Automation testing, while valuable, often struggles with the time needed to develop robust tests and the limited ability to adapt to real-world, dynamic scenarios, Ionascu said. The challenge of automated testing is not just about setting up automation frameworks or creating scripts, but also about maintaining and evolving them as the system grows.

Ionascu mentioned that the time required to develop robust tests that can handle real-world dynamic scenarios poses major issues for them. Many automated tests are brittle, they work well in stable environments but break when faced with unexpected changes or edge cases, he added.

In his daily work, Ionascu uses artificial intelligence to enhance both manual and automated testing. He gave an example:

I use AI-driven test generation tools like Amazon CodeWhisperer and ChatGPT to assist in the creation of automated test cases, reducing the time it takes to write complex scripts. These tools help me generate dynamic data, create edge case scenarios, and even suggest security vulnerabilities that I might have missed.

AI tools can enhance both manual and automated testing workflows, Ionascu said. These tools help automate repetitive tasks, such as test case generation and bug triaging, allowing QA teams to focus on higher-value activities like exploratory testing and quality strategy, he added.

While automation speeds up repetitive tasks, it often requires significant manual oversight and maintenance to handle complex workflows, Ionascu said, especially when they involve variable conditions that are hard to predict during the initial development of test scripts:

Despite its value, test automation is not a silver bullet for dynamic and complex systems.

InfoQ interviewed Victor Ionascu about automating testing and using AI in software testing.

InfoQ: What challenges have you faced in automated software testing?

Victor Ionascu: In one of our projects, we had to test an application that handles secure file transfers between multiple entities, including banks and government institutions. The flow involved multi-layer encryption (AES and RSA), and we needed to validate the entire encryption/decryption process. Initially, the automation test case we developed worked fine for standard scenarios. We scripted the flow to:

  1. Encrypt files using specific algorithms
  2. Transfer them to a central system
  3. Verify decryption on the receiving end

However, when real-world scenarios emerged, such as unexpected network delays or different file formats, the automation failed. The tests weren’t able to adapt to these dynamic changes, requiring us to manually intervene, rewrite, or adjust the scripts frequently. Even small system changes, like the introduction of a new encryption algorithm or an unexpected spike in data volume, broke the automated tests. This demonstrated the limitations of current automation tools in adapting to more complex, evolving environments.

InfoQ: How do you use AI in your daily work as a software tester?

Ionascu: In a performance test case, we had to simulate a load test for a secure file transfer system handling up to 10,000 concurrent users. Initially, we used a manual process involving writing static test scripts with hardcoded data for user requests, which became inefficient as the system scaled.

By using AI tools like CodeWhisperer, I was able to dynamically generate user loads. AI also recommended implementing a scaling mechanism instead of testing with a fixed user load. This allowed the system to adjust user loads dynamically based on the server’s performance, ensuring we captured both peak load handling and response times more effectively.

About the Author

Rate this Article

Adoption
Style

BT