What's in store for software development trends in 2020?
Artificial intelligence is quickly gaining popularity as a functional add-on to testing tools. Machine learning, a type of AI, is the real star of the show, as it uses recorded patterns and data to automatically learn and improve with experience.
Machine learning is a software testing trend -- but it's no gimmick. In 2020, we'll see more teams begin to incorporate tools with AI into software testing strategies.
Machine learning refers to any algorithms that are trained, rather than programmed, to make predictions about behavior. In the case of testing, AI-enhanced tooling uses the information about an application and how it works as the basis to assess behavior or user input. When the testing output does not match the prediction, the system sends an alert. The tool will record deviation from the normal behavior, such as a logo on a company page that suddenly doesn't load, as a failed test. A testing tool can record vast amounts of data about an application, including load times, screen transitions, button sizes and locations -- much more than a manual tester can track. This capability shows the benefit of AI and machine learning in software testing.
One of the biggest complaints about contemporary testing tools is that they can produce brittle or flaky tests. Strict, but unreliable locators, such as static XPath navigation, are often to blame, as any UI change renders these locators unusable. Machine learning-based tools don't use locators in the same rigid way; they visually record elements, as well as keep track of multiple front-end locators for a single element. When a locator doesn't work, or when backup locators can't find an element, a tool with AI capabilities can visually search for similar elements and rerun the test, updating its own code when it finds the element. Self-correcting tests save countless hours otherwise spent in manual test maintenance after UI refactoring.
Without the use of AI in software testing, teams create a large suite of automated tests by hand, from requirements, to fully vet an application. AI algorithms can navigate through an application to test all buttons and inputs, record how the application responds and create tests based on the recorded activity. After a code change, the program can rerun tests to compare previous and latest results. Through this process, machine learning detects when a button no longer leads to an expected page transition, or when load times spike beyond normal.
AI-based tools enable testers to do what they do best: act as a proxy for the end user, and ensure features satisfy user needs.
Matthew Grasberger is a software consultant at Coveros.