AI Test Automation

How do you maintain AI-generated automated tests when the application changes?

Maintaining AI-generated automated tests requires identifying why a test failed, determining whether the application or the test needs to change, and updating the automation accordingly. AI-assisted maintenance can help diagnose broken locators and outdated steps, but changes to expected business behavior require careful validation. Photon supports AI-assisted repair of broken tests while allowing engineers to retain control over test logic.

UI changes versus business logic changes

A renamed button or moved field is a maintenance issue: the test is out of date, the product is fine. A changed discount rule or a new validation message may be intended behavior or a defect – only someone who knows the requirement can decide.

Updating locators, test data, and assertions

  • Locators – update when elements are renamed or restructured.
  • Test data – update when accounts, products, or environments change.
  • Assertions – change only when expected behavior has officially changed.

Review proposed repairs, then rerun

Review each proposed repair before accepting it, rerun the updated test several times, and run the surrounding suite to confirm nothing else broke.

Example: a renamed button

Illustrative example.

The “Checkout” button is renamed “Continue to payment” and its id changes. The test fails at the click step. The repair points the locator at the new button, the expected cart total stays the same, and three reruns pass. If the total had changed too, that question would go to the product owner, not into the test.

How Photon supports maintenance

Photon’s agents can detect broken tests, fix them, rerun them, and validate the change, and help analyze failures using results, logs, screenshots, and history. In the test repository, suggested updates to steps or expected results require user confirmation.

See Photon agentic automation.

Related Photon feature:Agentic automation

Your test cases. Real automation.

Send us 10 of your hardest test cases. See how Photon turns them into automation in a live demo.

See Photon in action