AI for QA / Scenario

Audit the Generated Checkout Models

Review a browser abstraction and request model against the UI and service contracts before adopting them.

Difficulty
Hard
Format
Scenario
Points
200
Estimate
18 min

// MISSION BRIEF

Your Mission

A coding assistant generated two Java classes for a checkout test framework. Compare the classes with the supplied contracts, assess the maintenance and execution risks, and choose a repair that can survive UI and API evolution.

// FIRST CONTACT

Battle teaser

First artifact

Generated CheckoutPage.java

Which defects are demonstrated by the artifacts? (Select all that apply.)

  1. APublic mutable driver, element, and request fields weaken encapsulation
  2. BConstructor injection of WebDriver makes the absolute XPath stable when the layout changes
  3. CThe POJO uses total and an invented internalApprovalCode instead of the documented amountMinor-only contract
  4. DReceiving WebDriver in the constructor is itself forbidden in every Page Object
Answers, scoring, hints, and the full battle stay sealed.

// SKILL TAGS

ai-framework-crossoverspage-objectpojocode-reviewai-for-qa