Skip to main content

SD Times March 2023

Page 10

10

SD Times

March 2023

www.sdtimes.com

AI in API and UI software test automation BY IGOR KIRILENKO rtificial intelligence is one of the digital marketplace’s most overused buzzwords. The term “AI” conjures up images of Alexa or Siri, computer chess opponents, and selfdriving cars. AI can help humans in a variety of ways, including reducing errors and automating repetitive tasks. Software test automation tools are maturing and have incorporated AI and machine learning (ML) technology. The key point that separates the hype of AI from reality is that AI is not magic, nor the silver bullet promised with every new generation of tools. However, AI and ML do offer impressive enhancements to software testing tools.

A

More software, more releases Software test automation is increasing in demand just as the worldwide demand for software continues to surge and the demand for developers increases. A recent report by Statista corroborates this expectation with a projection that suggests that the global developer population is expected to increase from 24.5 million in 2020 to 28.7 million by 2024. Since testing and development resources are finite, there’s a need to

make testing more efficient while increasing coverage to do more with the same. Focusing testing on exactly what needs to be validated after each code change is critical to accelerating testing, enabling continuous testing, and meeting delivery goals. AI and ML play a key role in providing the data needed by test automation tools to focus testing while removing many of the tedious, error-prone, and mundane tasks. API and UI automated software testing augmented by AI benefit teams in the following ways: l Improve static analysis adoption. l Improve unit test creation. l Reduce test maintenance. l Reduce test execution. l Increase API test automation. l Improve UI test automation.

Real examples Let’s look at some real-life examples of what happens when you apply AI and ML technology to software testing. Improve unit testing coverage and efficiency. Creating unit tests is a difficult task since it can be time-consuming to create unique tests that fully test a unit. One way to alleviate this is by making it easier to create stubs and

Igor Kirilenko, Parasoft’s VP of Development, brings more than 20 years of experience in leading engineering teams, with a specialization in establishing and promoting the best agile practices in software development environments.

mocks with assisted test creation for better isolation of the code under test. AI can assist in analyzing the unit under test to determine its dependencies on other classes. Then it suggests mocking them to create more isolated tests. The capabilities of AI in producing tests from code are impressive. However, it’s up to the developers to continuously invest in and build their own tests. Again, by using AI test creation assistance, developers can: l Extend code coverage through clones and mutations. l Create the mocks. l Auto-generate assertions Improve API testing. The struggle to improve API testing has traditionally relied on the expertise and motivation of the development team because APIs are often outside the realm of QA. Moreover, APIs are sometimes poorly documented. Creating tests for them is difficult and time-consuming. When it comes to API testing, AI and ML aim to accomplish the following: l Increase functional coverage with API and service layer testing. l Make it easier to automate and quicker to execute. l Reuse the results for load and performance testing.


Turn static files into dynamic content formats.

Create a flipbook
SD Times March 2023 by d2emerge - Issuu