Skip to content

Course: Self-healing — 2. Lab setup

Prepare the lab once, before the exercises. You work in three places:

Where What it is Used for
Terminal PowerShell in the AutoTestX folder Starting the Maximo drift proxy (once)
AutoTestX The AutoTestX web app, e.g. http://localhost:4100 Building and running the practice test, rules, reviewing fixes
Maximo Maximo opened through the proxy, e.g. http://localhost:4411/maximo Checking each “release” works and that work orders were saved

Use a practice project, not one with real tests: the exercises create and delete rules, and rules apply to the whole project.

Self-healing only starts when a locator breaks, which normally happens after an upgrade. You cannot upgrade Maximo on demand, so the drift proxy serves your Maximo as seven “releases”. For each, it renames some element ids in the browser only, the way an upgrade would. Maximo’s server is not changed and Maximo keeps working; only the test’s recorded locators stop matching.

Release Address Renamed in the browser Used to show
v1 http://localhost:4411/maximo Nothing The baseline every exercise starts from
v2 http://localhost:4412/maximo Ids of the New Work Order, Save and Change Status toolbar icons Fixes found by a backup locator (Tier 0)
v3 http://localhost:4413/maximo Save again (id, link, position); every icon’s style class A new Save fix after a revert
v4 http://localhost:4414/maximo v2 plus the login page’s User name field and Sign In button Five broken steps in one run
v5 http://localhost:4415/maximo The login page’s Password field A high-risk step
v6 http://localhost:4416/maximo Every toolbar icon and the link around it Backup locators that match several icons
v7 http://localhost:4417/maximo v3 plus Save’s tooltip A fix that stops working (circuit breaker)
  1. Open PowerShell and go to the AutoTestX folder, e.g.
    Terminal window
    cd "D:\AI Agents\Claude\agents\auto-test"
  2. Start the proxy, giving your Maximo server’s address:
    Terminal window
    $env:MAXIMO_URL = "http://192.168.206.135"; npm run maximo:drift
    In bash: MAXIMO_URL=http://192.168.206.135 npm run maximo:drift.
  3. Expected: one line per release, v1 http://localhost:4411/maximo as installed to v7 http://localhost:4417/maximo …, then Proxying http://192.168.206.135.
  4. Leave the window open during the course. Closing it (or Ctrl+C) stops Maximo for the tests.
Problem Fix
EADDRINUSE Another program uses the ports. Add $env:DRIFT_BASE_PORT = "4511"; before npm run … and use ports 4511-4517 everywhere below
Pages say Maximo drift proxy: … is not reachable Maximo is down or the address is wrong. Check you can open Maximo directly
No Maximo available npm run maximo:drift -- --stub serves a small stand-in with the same ids

Do this for v1 and for v2:

  1. Open http://localhost:4411/maximo/webclient/login/login.jsp. Expected: the Maximo login page.
  2. Sign in with your Maximo user.
  3. Open http://localhost:4411/maximo/ui/?event=loadapp&value=wotrack. Expected: Work Order Tracking.
  4. Click New Work Order, type proxy check in Description, click Save. Expected: the message bar shows BMXAA4205I (record saved).
  5. Repeat with port 4412. Expected: the same.
  6. (Optional, to see the drift) On 4412 right-click the Save icon → Inspect. Its id is tbar_SAVE_btn; on 4411 it is toolactions_SAVE-tbb_image.

Each port is a separate site for the browser, so you sign in to Maximo on each one.

  1. Sign in to AutoTestX as an Admin and select the practice project.
  2. Repeat for v1 … v7:
    1. Sidebar → Configurations → Environments → New environment.
    2. Name: Maximo v1 (then Maximo v2, …).
    3. Variables (JSON): { "maximoUrl": "http://localhost:4411/maximo" }, with the release’s port (4411 for v1 … 4417 for v7).
    4. Save environment.
    5. Under Add a secret: NAME MAXIMO_USER, your Maximo user → Add secret.
    6. NAME MAXIMO_PASSWORD, the password → Add secret.
    7. Expected: both secrets listed as set.

See Environments and secrets.

4. Build the practice test MX WO toolbar (AutoTestX)

Section titled “4. Build the practice test MX WO toolbar (AutoTestX)”
  1. Sidebar → Testing → Test Cases → New test. Name MX WO toolbar, Who can see it Shared → Create.
  2. Test (right-hand rail) → Default timeout: 15 seconds or more. Maximo is slow to redraw.
  3. Add the steps below. For each: Add → search the action → pick it → click the step → in Step properties fill Step name, the parameters and Target strategies (kind and value). Do not add fallbacks: the exercises depend on these exact locators.
# Step name Action Target Parameters
1 Open Maximo Open n/a url {{maximoUrl}}/webclient/login/login.jsp
2 Enter user name Type css #username value {{secret.MAXIMO_USER}}, clear first
3 Enter password Type css #password value {{secret.MAXIMO_PASSWORD}}, sensitive, clear first
4 Sign in to Maximo Click css #loginbutton n/a
5 Open Work Order Tracking Open n/a url {{maximoUrl}}/ui/?event=loadapp&value=wotrack
6 Click New Work Order Click css #toolactions_INSERT-tbb_image n/a
7 Enter Description Type label Description value AutoTestX self-heal check, clear first
8 Point at Change Status Hover css #toolactions_STATUS-tbb_image n/a
9 Click Save Click css #toolactions_SAVE-tbb_image n/a
10 Verify record saved Text (validation) css #titlebar_error expected BMXAA4205I, match contains
  1. Save. Run it on Maximo v1 (procedure P1 below). Expected: PASS 10/10. If a step fails, your Maximo’s ids may differ: correct that step before going on.

This test is the template: every exercise works on a copy of it.


The exercises refer to these by number.

  1. Open the test. In the environment selector above the steps choose e.g. Maximo v2.
  2. Run test (if asked, Run saved version). Turn on Watch first to see the browser.
  3. The Run result panel shows each step as PASS, WARN, FAIL or SKIP, and RESULT n/10.
  4. Wait about 5 seconds before looking at Self-healing: rules act just after a run finishes.

See Running tests and reading reports.

  1. Test Cases → Duplicate on MX WO toolbar. Rename the copy, e.g. MX TC-04, Save.
  2. Run it on Maximo v1 (P1). Expected: PASS 10/10. This baseline run records how each element looks; healing compares against it.

A fresh copy per exercise keeps results clean and gives a fresh allowance of 3 automatic fixes per 24 hours.

  1. Open the test. If fixes wait, a banner says N self-healing suggestion(s) … waiting for review. Click Review. Or: Self-healing → Suggestions and click the test’s name on a card.
  2. Tabs: Pending, Approved, Rejected, No longer applies, Replaced, Reverted. The chip Decided by a rule keeps only what a rule decided.
  3. Always click the tab you need: the page keeps the last tab, even for another test.
  4. After a run, press F5 to reload.
  1. Self-healing → Rules → New rule.
  2. Set what the exercise says; leave the rest:
Field How
Name Type it
Action Apply automatically / Always require review / Reject automatically
Mode Dry run - only record what it would do (default) or Active
Priority Lower runs first
Applies to All tests, or untick it and tick tests; Suites and Components are tick-lists
Healing tier Keep Fallbacks and element matches (tier ≤ 1)
Minimum confidence (%) e.g. 80
Risk Tick low / medium
Seen in at least (runs) e.g. 1
Step types e.g. click; empty means any
A fix to a Ready test Only for Apply automatically
  1. Save. Expected: toast Saved “<name>” as v1 and a card for the rule.

The standard click rule, used by most exercises: Apply automatically, Active, untick All tests and tick the exercise’s test, confidence 80, tick medium (low stays ticked), seen in 1, step types click. In words: for this test only, when a Click step’s locator breaks and AutoTestX is at least 80% sure, and the step is not high-risk, write the fix into the test at once.

  1. Test Runs → click the run.
  2. The first step is open; click another step’s row (e.g. 9. Click Save) to open it.
  3. It shows Primary / Fallback / Healed locator, a note picked #… of N matches when the run had to choose, and the self-healing panel (Tier, Confidence, Risk, Was / Proposed, Review suggestion →).

Self-healing → Audit trail, or from a test History → Self-healing audit trail for this test. Views: Changes, Fixes and reverts, Held back, Rule changes, Everything. Click Evidence on an entry for tier, confidence, risk and the reasons.

Open the release’s Maximo, sign in, open …/ui/?event=loadapp&value=wotrack → List → filter Description = AutoTestX self-heal check. Each successful Save of a run is one work order.

Do this at the start of an exercise, before P4. It removes what earlier exercises left; never the rule you are about to test.

  1. Self-healing → Rules: Delete every TC-… rule (confirm OK).
  2. Under Paused for a test (if shown): Let it fix again on each entry.
  3. Rules not made by this course: Disable any enabled rule that covers All tests while you train; it would act on your copies too.

Order in every exercise: P8 → P2 → P4 → run and check.

Next: Exercises.