Changelog
All notable changes to TestFly are documented here.
[Unreleased]
Security
- API request URLs are masked in logs and reports.
ApiClientmasked headers but not the URL, so a key sent withApiAuth.apiKeyQuery(...)(or userinfo,access_token, a signature) appeared in the[API]step log, theExchangestep, the cURL line (api.logCurl),ApiException/ApiAssertionErrormessages,testfly-report-data.jsonandtestfly-report.html. Userinfo is now***@hostand the value ofapi_key,apikey,api-key,key,token,access_token,refresh_token,id_token,client_secret,secret,password,passwd,pwd,sig,signature,auth,authorization,session,sessionid,code, every name in the newapi.maskedQueryParamslist and the parameter name passed toapiKeyQueryis***. The request still carries the real value. Behaviour change:ApiException.getUrl()andApiAssertionError.getUrl()now return the masked URL (signatures unchanged), so code that read the secret from them no longer gets it;ApiResponse.requestUrl()still returns the real one. A URL that cannot be parsed is rejected withInvalid request URL: <masked URL>and no cause. - Custom API-key and HMAC header names are masked. Only
Authorization,Cookie,X-Api-Keyandapi.maskedHeaderswere masked, so a key sent asX-Auth-Token,Ocp-Apim-Subscription-KeyorX-RapidAPI-Keyappeared in theHeaders:step line and the cURL line. A header is now masked when a word of its name (split on-,_,., camelCase and digits) iskey,token,auth,secret,signature,session,cookie,passwordorcredential, or a compound such asapikey,csrforxsrf(soX-Auth-Tokenandapi_keyare masked,authorandkeywordare not), and the header names given toApiAuth.apiKey(...)and the HMACkeyHeader/signatureHeaderare always masked. - Failing-assertion messages no longer embed secrets from the response body.
ApiException/ApiAssertionErrormessages (which reach JUnit XML, Allure, the HTML report and AI analysis) carried up to 500 characters of the raw body, so a login response leaked itsaccess_tokenandrefresh_token. The message now shows the body masked and capped at 300 characters: values of sensitive JSON keys become"***"recursively, and in other text sensitivekey=valuepairs and JWT-like or long base64 runs are masked. Actual values read from a sensitive path or header are masked too. Behaviour change: theBody:part of these messages is shorter and masked;getBody()is unchanged. - OAuth2 token errors no longer include the response body (
ApiAuth.oauth2*). The message is the masked token URL, the HTTP status and, only when it matches the RFC 6749 charset, theerrorcode, as ADR 0008 already requires for load tests. - Credentials are not forwarded on a cross-origin redirect. The JDK client forwarded custom credential headers (for example
X-Auth-Token) to the redirect target;AuthorizationandCookiewere already dropped by the JDK.ApiTransportnow follows 301/302/303/307/308 itself (same rules and limit of five requests as before) and, when the origin changes, dropsAuthorization,Cookie, every header with a sensitive name and sensitive query parameters of the target (Proxy-Authorizationis kept, as the JDK does, because it is meant for the proxy). Checked againstRedirect.NORMALon a local server for GET, HEAD, POST, PUT and DELETE with 301, 302, 303, 307 and 308, the five-request limit (the last redirect is returned) and aLocationwith a fragment: identical. Deliberate differences: a cross-origin 307/308 is sent as a body-less GET instead of replaying the body, and the request timeout is a deadline for the whole chain instead of per hop. Cookies of the final response are stored under the URI that set them, not the original one. Same-origin redirects are unchanged. The JDK load engine (JdkLoadEngine) had the same custom-header leak and now uses the same code. - Stored XSS in the HTML report. The Build Metadata block wrote CI values (branch, commit, repository, actor, job, agent, base URL, grid URL, browser, profile) into the page unescaped, and
GITHUB_HEAD_REFand the other branch variables are controlled by a fork pull request. All values are now HTML-escaped, and the build URL becomes a link only forhttp(s)://(otherwise it is shown as text). - CI repository and build URLs are redacted.
GIT_URL,CIRCLE_REPOSITORY_URL,CI_REPOSITORY_URL(GitLab:https://gitlab-ci-token:<token>@host/...) and the build URL are passed through the URL redactor, sotestfly-metrics.json,testfly-report-data.json,testfly-report.htmland the JUnit XML properties holdhttps://***@host/.... - The HTML report loads Chart.js
4.6.1with Subresource Integrity (integrity="sha384-...",crossorigin="anonymous") instead of the unpinned latest build. - Notification webhooks and Xray tokens are not printed. A malformed Slack/Teams webhook URL is parsed through the URL redactor and the failure line prints only the exception class; an Xray Cloud token that cannot be parsed prints the HTTP status and body length instead of the body. A malformed webhook URL is reported as
IllegalArgumentException: invalid webhook URLwithout the URL, because the secret of a Slack or Teams webhook is in its path, which the URL redactor does not mask. - More complete body masking.
Authorization: Bearer <token>,Basic <base64>,DigestandTokencredentials are masked in text, string values inside JSON bodies get the same text masking (api_key=..., JWTs in free text), and an actual value shown in an assertion message is masked for JWT-like and long base64 runs. A non-JSON200OAuth2 token response is reported asresponse is not JSONwith no cause (Jackson quotes its input). The Base URL and Grid URL in the HTML report and its data JSON have their userinfo masked. act()NAVIGATEsteps can no longer be steered to another site (prompt injection). ANAVIGATEtarget came from the model, which reads untrusted page text, andhttp(s)andfile://URLs were opened as given; a cached plan was replayed without the model. Now onlyhttpandhttpsare allowed (file:,javascript:,data:,chrome:,about:and others are rejected, as are control characters, spaces, backslashes, userinfo and a missing host), a relative path resolves againstexecution.baseUrl, and an absolute or//target must have the scheme, host and effective port ofexecution.baseUrlor a host of the newai.allowedNavigationHostslist (hostfor any port,host:portfor one; default empty). The whole plan is checked before its first step runs, a cached or Auto-POM plan is checked again on every replay (an unsafe one is invalidated and the model is asked again), and an unsafe plan is never cached (ActionCache.putrefuses it too). Hosts are read as written, soweb_app:8080(a compose service name) works. Scope: onlyNAVIGATEsteps are checked; a click or form submission that leaves the site, and a server-side or open redirect after a step, are not, and the origin after an action is not enforced. Behaviour change:act("Navigate to https://other-site/...")now fails withIllegalArgumentExceptionunless the host is on the origin ofexecution.baseUrlor inai.allowedNavigationHosts;ActionExecutor.resolveTargetUrlthrows for such targets. NewTestFlyConfig.Ai.getAllowedNavigationHosts()/setAllowedNavigationHosts(...)(@TestFlyApi(since = "1.2.0"); an allowlist entry with a scheme, wildcard, path or unbracketed IPv6 never matches and is logged once as a WARNING).- Less data goes to third-party AI providers. The failure-analysis and patch prompts sent the raw page URL, error message, stack trace and step names, and the healing and
act()prompts sent the raw URL;DomPrunerkept everyvalueattribute. URLs now lose userinfo, query and fragment; error messages, stack lines and step names have URLs reduced the same way andBearer/Basiccredentials,key=valuepairs with a sensitive name, JWTs and long hex or base64 runs masked;DomPrunerdropsvalueon<input>elements of typepasswordorhiddenand on inputs whosename,idorautocompletecontainstoken,secret,key,otp,code,pass,pwd,csrforxsrf(and on a<button>or<option>whose own name or id looks like that), removes<textarea>contents and<meta>contentnamed csrf, xsrf or token, and strips the query and fragment ofhref,srcandactionvalues; it works in one linear pass and returns an empty DOM instead of the raw page on a pathological input. TheaiAssert/assertWithAiprompts get the same URL and title treatment. Theact()goal is still sent as written, because the model plans from it. The newdocs-sitesection "Data sent to AI providers" lists what is sent. - The action cache keeps secrets off disk, and goals are masked in logs. A plan with a
TYPEstep into a secret-looking field (password, secret, token, OTP, PIN, CSRF, key) or with a JWT-shaped value (LocalIntentResolvercopies quoted goal values, including passwords, intoTYPEsteps) stays in the in-memory cache and is not written to.testfly/action-cache.json; so does a plan whose goal contains a secret (it changes under the redactor) or whoseNAVIGATEvalue has a query or fragment, and entries that older versions wrote to the file are dropped on the next save. The file is written owner-only (0600) on POSIX through a private temporary file and a move, so an older world-readable file is replaced; elsewhere a plain file is written. The format and reading are unchanged.ActionCompilerandActionExecutorlog the goal masked, on one line and cut at 80 characters. - Failure messages no longer print mail bodies, secret column values or grid credentials.
Email.assertBodyContainsshows the subject, the expected text and an excerpt of at most 120 characters with URLs as<url>, digit runs of four or more and letter-digit runs of six or more as***(the subject gets the same treatment), instead of the whole body.DbClient.assertRowExists/assertNoRowandDbQuery.assertValueprint***for columns with a credential word (password,token,secret,key, ...) orhash,salt,ssn,cardin the name.RemoteDriverProviderreports a malformedexecution.gridUrlwith userinfo masked (also without a scheme, as inuser:KEY@host:4444/wd/hub) and without the JDK cause that echoes it; the exception types are unchanged. NewDbClient.assertRowCount(String, Map<String,Object>, int)(@TestFlyApi(since = "1.2.0")) binds its values and validates identifiers; the raw-SQLassertRowCount(table, where, n)now documents thatwheremust never contain untrusted input Behaviour change (source compatibility): a literalnullas the second argument ofassertRowCount(...)no longer compiles, because it is ambiguous between the two overloads; cast it. Binary compatibility is unchanged. DownloadManager.clearDownloads()refuses to delete outsidetarget/orbuild/. Abrowser.downloadDirsuch as~or/would have been emptied. It now logs a WARNING and deletes nothing unless the directory is strictly inside the working directory'starget/orbuild/(symbolic links are resolved, and atargetthat links outside the project does not count; a refused directory is not created); the default./target/downloadsworks as before. Behaviour change for projects that keep downloads elsewhere: clean that directory yourself.- Test data and quarantine YAML use the safe constructor.
TestDataLoaderandQuarantineLoaderread YAML withSafeConstructor, so a global tag such as!!java.lang.ProcessBuilderin a data file is rejected instead of instantiating a class. - OpenTelemetry 1.67.0 (GHSA-ccrj-gw8r-854m).
selenium-javabrings OpenTelemetry 1.66.0; the build now importsopentelemetry-bom:1.67.0, so the SDK's own tests run on the fixed version. A consumer's version comes from its own dependency management, not from this pom: add the same BOM import to pick up the fix. The Mobile Inspector VS Code extension's dev tooling (tools/vscode-mobile-inspector) overridesglobandminimatchto patched versions (three moderate npm advisories); the packaged extension has no runtime dependencies.
[1.1.0] — 2026-11-04
Added
- Mobile Inspector (
tools/, outside the Maven artifact): a VS Code extension (0.5.0) and an IntelliJ IDEA plugin (0.4.0) for mobilecli devices. They show the screen, the view tree and TestFly selectors ranked by match count, and generate@MobileFindfields. Record mode turns taps, typing, swipes and buttons into aMobilePageclass. - Browser Inspector (VS Code extension 0.5.0,
tools/): opens a page in Chrome, Edge or Chromium and shows it with its DOM tree; the selected element gets ranked TestFly locators (getByTestId,getByRole,getByLabel,getByPlaceholder,findById,getByText,find) with match counts computed by TestFly's own rules, and aLocatorfield for aBasePage. The tree has a Chrome-like find box (string, CSS selector or XPath); the browser runs without a window unless asked and closes from the toolbar. The Mobile Inspector's tree gets an Appium-style finder (strategy + selector, matched with TestFly'sSelectorParserrules), and its role table now equalsMobileRole, so it no longer suggestsrole=selectors that TestFly does not resolve. The extension's activity-bar view switches between Mobile and Browser. - Inspector 0.4.0 (
tools/): while an inspector is open, Java files show above each@MobileFindfield and each TestFly locator how many elements it matches on the inspected screen or page; clicking the line shows the matches. The Mobile Inspector gets Live (the screen is read again every few seconds, off by default) and hold-to-long-press and drag-to-swipe on the screenshot, recorded too. The Browser Inspector gets Record mode (aBasePagewithLocatorfields andopen/click/fillsteps), Console and Network tabs, and shadow roots and same-origin iframes in the tree, withShadowDom.pierceandwithinFramesuggestions. The IntelliJ plugin (0.3.0) gets the finder, Live, the gestures and the Server button. - Inspector device list (VS Code 0.5.0, IntelliJ 0.4.0,
tools/): the VS Code sidebar and the IntelliJ tool window list every emulator, simulator and device, online or not, with Inspect, Boot and Shut down (mobileclidevice.boot/device.shutdown); Android phones waiting for USB debugging approval show as unauthorized, and Android phones connect over Wi‑Fi (adb pair/adb connect). The IntelliJ plugin shows the@MobileFindmatch counts as code vision. - Mobile launcher activity:
mobile.app.activity(Android) picks the launcher activity for apps that have several, such as debug builds with LeakCanary. Themobile.iosandmobile.androidblocks can override it. - Android login example: the JUnit 5 example also checks the account summary and the popup confirmation after sign-in (
AndroidLoginJUnit5ExampleTest). - Native mobile (incubating,
io.testfly.mobile): drives Android and iOS apps through a user-installed mobilecli server, without Appium (ADR 0002).screen().getByRole/Text/Label/TestId/Placeholder/Typelocators with auto-waiting actions (tap,fill,swipe, …), strict mode andexpect(...)assertions;device()for apps, deep links and screenshots. Mobile tests run on TestNG (BaseMobileTest,@MobileTest), JUnit 5 (BaseJUnit5MobileTest) and Cucumber (@mobile); the browser is skipped and the device is opened per test. Configured with the newmobile:block. Not@TestFlyApiyet; may change in a minor release. - Mobile platform per test:
@MobileTest(platform = MobilePlatform.IOS)(next to@Test) runs a test on that platform, overridingmobile.platform; newmobile.ios:/mobile.android:blocks hold each platform's device and app, so one config serves both. NewMobile.connect(MobilePlatform)andTestFlyConfig.Mobile.forPlatform(...). - Mobile Appium parity:
mobile.alertsalso answers Android runtime permission dialogs (likeautoGrantPermissions).MobileLocator.pinchIn(),pinchOut()anddragTo(target);MobileDeviceclipboard (clipboard,setClipboard,clearClipboard), files (pushFile,pullFile, up to 1 MB), crash reports (crashReports,crashReport; new crashes are saved totarget/reports/crashes/when a test fails), apps (isAppInstalled,foregroundApp,uninstallApp,backgroundApp), keyboard (isKeyboardShown,hideKeyboard), settings (setAnimations,setAppearance, andmobile.animations/mobile.appearance) and webviews (webViews(),webView(), newMobileWebView). New optionalMobileDriverdefault methods andMobileCrashReport. - Mobile Mobilewright parity:
MobileLocator.check()/uncheck()/setChecked(),waitForEnabled()/waitForDisabled(),all(),bounds()andscreenshot()(just the element);screen().tap(x, y),doubleTap(x, y),longPress(x, y);MobileDevice.installedApps(),setFoldState(...),launchApp(id, locales)andviewTreeText(). AssertionstoBeEmpty(),toHaveText(text, ignoreCase),MobileAssertions.expectPoll(supplier)and soft assertions (MobileAssertions.softly(), newMobileSoftAssertions).mobile.viewTreeOnFailure(defaulttrue) saves the screen's view tree as text next to the failure screenshot. Webview DOM locators:MobileWebView.locator(css),getByTestId,getByText,getByRole(newMobileWebViewLocatorwithclick,fill,getText,getValue,getAttribute,count,isVisible,waitFor) andevaluate(body, args...). New optionalMobileDriverdefault methodsscreenshot(clip, …),setFoldState,launchApp(…, locales, …)andviewTreeText. - Mobile system alerts:
mobile.alerts: none | accept | dismissaccepts or dismisses iOS system alerts (tracking, permissions) that cover the app before each read of the screen, like Appium'sautoAcceptAlerts/autoDismissAlerts.mobile.app.reset: clearDatano longer fails on an iOS simulator app that was never launched. - Mobile XPath, iOS class chain and predicate selectors:
xpath=,chain=,predicate=,id=andaccessibility=selector strings, evaluated by TestFly on mobilecli's view tree (common subsets; full-path Appium XPaths may not match mobilecli's pruned tree). Typed@MobileFindattributesiosAccessibility,iosId,iosXpath,iosClassChain,iosPredicate,iosClassName,androidAccessibility,androidId,androidXpath,androidClassName.MobileLocatorstatic factories (id,accessibilityId,xpath,iosClassChain,iosPredicate,className,byText, …,of) bind to the current test's device when used, so they can bestatic final. New readsisPresent,isHidden,isEnabled,isDisabled,isSelected,isChecked,isFocused,allTexts,getAttribute, andscrollIntoView(). - Mobile page objects:
MobilePagebase class with@MobileFind(ios = …, android = …, value = …)fields (one element, both platforms),@WaitFor(the constructor waits for these elements),onLoad()andtapIfShown(...), so tests read asnew HomePage().openLogin().signIn(u, p). Selector strings (testid=,text=,label=,placeholder=,type=,role=button;name=…) also work withscreen().locate(...); plain classes usepage(Type.class)orMobilePages.init(...). - Mobile-only profiles: a config with a
mobile:block no longer needsbrowser,executionortimeouts; missing web values get inert defaults. - Mobile preconditions:
@PreConditionworks on TestNG and JUnit 5 mobile tests. Providers extend the newMobileConditions(page objects,@ConditionProvider) and are registered throughMETA-INF/services/io.testfly.mobile.MobileConditionsorMobileConditions.register. A condition runs once per device whenmobile.app.reset: nonekeeps the app state, otherwise before every test; a retry reruns it. NewMobileDevice.keepsAppState(). - Mobile device settings and screen recording:
MobileDevice.setOrientation(MobileOrientation)/orientation(),setLocation(lat, lon)/clearLocation()(both undone when the device closes), andstartRecording(path)/stopRecording().mobile.recordVideo: off | failures | alwaysrecords every mobile test and keeps the video of failed tests (or all) intarget/reports/videos/. New optionalMobileDriverdefault methods; other drivers report them as unsupported. - Mobile YAML locator files:
MobileLocators.load("mobile-locators/login.yml").get("login.username")reads iOS/Android selectors from YAML (ios:,android:,mobile:blocks or a plain value for both platforms, nested groups with dot keys), checks every selector at load time and returns the running platform's locator. - Mobile device pool:
mobile.devices: [ids]ormobile.pool: truehand each parallel test its own device; tests wait up tomobile.timeouts.reserveMsfor a free one. - mobilecli server auto-start:
mobile.autoStartServer(defaulttrue) runs<mobile.mobilecliPath> server startwhen a loopbackmobile.serverUrldoes not answer, once per JVM, logs totarget/mobilecli-autostart.logand stops the server at JVM exit. - Mobile Emulator Smoke workflow: runs the mobile examples on Android emulators (API 30, 34) and an iOS simulator on GitHub Actions; examples for the iOS and Android Settings apps and an iOS login flow with page objects (TestNG and Cucumber).
- Test-writer subagents and skills:
mobile-locator-finder, iOS/Android, Cucumber, TestNG, JUnit 5, TDD, API and k6 writers under.claude/agents/, with thetestfly-mobile-writeandtestfly-k6-writeskills. browser.bidi(defaultfalse): starts a locally launched Chrome, Edge or Firefox with a WebDriver BiDi connection. Withbrowser.captureConsoleErrorson, console errors are then read from BiDi log events (console.errorcalls and uncaught exceptions) from the moment a test gets its browser, so errors raised while a page loads and on pages reached by a link are caught on Firefox, where the JS shim could not see them. No shim is needed, and errors from earlier tests are forgotten when a test starts, including on a reused browser.ConsoleErrorCollector.isBiDiActive()shows which capture is in use. Safari and remote drivers have no BiDi connection in TestFly: one warning is logged and the usual capture is used. Checked against real Chrome; Firefox is covered by the experimental CI job.- Browser support page and one-time degradation warnings: a new Browser Support guide lists which features work on which browsers, and states that the DevTools-based features (network mocking, device emulation, geolocation, the screencast, mock clock persistence) are limited to a locally started Chrome or Edge, not remote drivers. New
BrowserFeatures(supports,warnOnce) makes each degraded feature log one warning per browser session naming the fallback, including the video recording fallback, which used to be silent. - Browser integration CI job: runs the real-browser integration tests on Chrome and, as an experimental job, on Firefox.
- Per-step snapshots in the trace (
tracing.snapshots, defaultariawhentracing.enabledis on): every step records the accessibility tree (or, withdom/both, the pruned page HTML) as it was when the step started, and a failed test also records the page after its last step. The trace HTML shows them per step with a before/after diff. New keystracing.snapshots,tracing.snapshotMaxKb(default 256) andtracing.snapshotOnFailureAfter; newStepRecordconstructor and getters; newTraceRecorder.saveIfEnabled. Cucumber scenarios now save traces, and the HTML report links to the trace from each test. Nothing is captured when tracing is off or no browser is running, and a snapshot never fails a test. See the new Step Traces guide. - Deterministic accessibility assertions:
LocatorAssert.hasRole(Role | String),hasAccessibleName(String | Pattern),hasAccessibleDescription(String | Pattern)andmatchesAriaSnapshot(yaml). As in Playwright, aStringmust match exactly (whitespace collapsed); use aPatternsuch as(?i)savefor a partial or case-insensitive match. Failures report the role, name or description that was found. They use one bundled probe script, with the same accessible-name order asLocator.withName(...), and no LLM or axe injection.matchesAriaSnapshotcompares the accessibility tree under an element with a Playwright-style YAML template (partial, ordered, regex names,[level=2]/[checked]attributes); a malformed template fails immediately. NewAriaSnapshot(capture,toYaml,parseTemplate,match),Locator.ariaSnapshot()andBasePage.ariaSnapshot()print the current tree so templates can be pasted in. Only the 36Rolevalues andtextare reported; hidden content and decorative images are skipped; Shadow DOM is not entered. - Actionability (
actionability.*, enabled by default):click,hover,type,clearandappendnow wait until the element is visible, enabled where relevant, stable (bounding box unchanged between two polls) and not covered by another element, scrolling it into view when needed. A failure throwsNotActionableExceptionnaming the element and the blocker. The locator chain is resolved again when the element goes stale or a click is intercepted. NewWaitEngine.waitForActionable(...)overloads,ActionKind, andLocator.force()to skip the stable and not-covered checks. Setactionability.enabled: falseto restore the previous waits.BasePage.doubleClick,rightClick,selectBy*andBaseConditions.click/typeuse the same checks. The checks fail open when JavaScript is unavailable. Each action waits about one extra polling interval (100 ms by default). Locator.withinEach(By): evaluates the locator chain once inside every matched container and returns the combined matches, sonth(),first(),last(),filter()andwithText()apply per container.getByRole(Role.CELL).nth(2).withinEach(getByRole(Role.ROW))selects a whole table column withouttd:nth-child(3)or a loop over the rows. Containers with too few matches, such as a header row, are skipped. The result usually holds several elements, so underlocators.strictan action on it is a strict mode violation.within(By)is unchanged and still searches only the first container.- Strict mode (
locators.strict, defaultfalse): when enabled, an action on a locator that matches more than one visible element and is not narrowed withfirst(),nth()orlast()fails with a strict mode violation that lists the candidates, instead of silently using the first match.isVisible()andisEnabled()surface the violation too.count(),elements()andassertThat(...)are unaffected. - Verified fill and clear
assertThat(...).fill(text)/assertThat(...).clear(): resolve the element likeLocator.fill(), wait until it is editable, type, and assert that the value then equals the text and stays that way. Password values are never logged, only their length. - Verified click
assertThat(...).click(): resolves the element likeLocator.click()(including self-healing), waits until it is visible and enabled, scrolls it to the centre and hovers it, waits until nothing covers it, clicks, and asserts that theclickevent reached the element. Logs a passedClicked: ...step; supportsas(...),within(...)and soft mode.Locator.click()is unchanged. - Form and input assertions on
LocatorAssert:hasValue()(any non-empty value),hasEmptyValue(),containsValue,valueMatches,isPasswordHidden()/isPasswordVisible(),hasType,hasPlaceholder,hasMaxLength,isEditable,isReadOnly,isRequired, and HTML5 validation throughisValid(),isInvalid()andhasValidationMessage. - Playwright-style
not()onLocatorAssert:assertThat(x).not().hasText("Error")negates the next assertion. As in Playwright, most negated assertions also pass when no element matches. A negated failure ends with(condition still met, timeout: ...). Cannot be combined withclick(),fill()orclear(). - Playwright for Java parity on
LocatorAssert:isAttached,isEmpty,isIndeterminate,isInViewport(ratio),hasCount,hasText(Pattern | String[] | Pattern[]),containsText(Pattern | String[]),hasValue(Pattern),hasValues,hasAttribute(name, Pattern),hasClass(Pattern),containsClass,hasCSS,hasId(Pattern),hasJSProperty,hasAccessibleErrorMessage.Patternarguments match anywhere in the value, as in Playwright. - More
LocatorAssertmatchers:hasTextMatching,hasTextIgnoringCase,hasTexts,containsTexts,isSelected,hasSelectedOption,hasOptions,countAtLeast,countAtMost,exists,isInViewport,hasId. Locatoractions and getters:getValue()(reads an input's value;getText()is empty for inputs),fill,check/uncheck/setChecked,selectByText/selectByValue/selectByIndex,getSelectedOption,doubleClick,rightClick,press,dragTo,upload(works with hidden file inputs),focus,blur,waitFor(Locator.State),getCssValue,innerHTML,outerHTML,allTexts, and the non-waiting checksisChecked,isSelected,isDisabled,isEditable,isFocused,isPresent.PageAssertmatchers:hasAlert,hasAlertText,hasNoAlert,hasCookie,doesNotHaveCookie,hasLocalStorageItem,hasWindowCount, andnot()to negate the next page assertion (assertThatPage().not().urlContains("/login")).- API binary bodies and response accessors: responses are read as bytes and decoded lazily with the
Content-Typecharset. NewApiResponse.asBytes(),saveTo(Path),headers(),headerValues(name),contentType(),charset(),isSuccessful(),prettyBody(); request sideApiClient.body(byte[])andApiResponse.Builder.body(byte[]). - JSONPath wildcards and quoted keys:
$.items[*].id,$.map.*and$['key.with.dots']without a new dependency. Filter expressions, slices and..are rejected with a clearIllegalArgumentException. - API assertions:
assertStatusIn(int...),assertStatusRange(from, to),assertSuccessful(), semanticassertJsonEquals(json)/assertJsonEquals(path, json)(key order and1vs1.0ignored, optional array-order-insensitive mode, first-difference message) andassertJsonArrayContains(path, value). - API requests:
ApiClient.head(..)/options(..)(plusapiHead/apiOptionsinApiSupport), repeated query keys withaddQueryParam/addQueryParams, per-request retryretry(n),retry(n, backoff),retryOn(statuses...),retryOnException(boolean),noRetry(), and request bodies in the step log whenapi.logBodyis on (binary bodies as a size summary). - API proxy:
api.proxy.host,api.proxy.port,api.proxy.nonProxyHostsand per-requestApiClient.proxy(host, port)/noProxy(). - Test-scoped request spec:
ApiClient.setTestSpec(spec)/clearTestSpec()apply a spec to the current test thread only and are cleared after each test. - Polling options
ApiPolling:ApiClient.pollUntil(condition, ApiPolling.within(timeout).interval(..).failFastOn(..).maxAttempts(..).rethrowPredicateErrors(..)). The timeout error now carries the last error as its cause. - Partial batch results:
ApiBatchRunner.executeAll()returnsApiBatchResultwith a response or an error for every request in submission order;execute()is unchanged. - Real Digest authentication (RFC 7616: MD5, SHA-256, SHA-512-256,
-sess,qop=auth/auth-int) throughApiAuth.digest(username, password), with per-test challenge caching and stale-nonce handling. - HMAC request signing
ApiAuth.hmacSigner()/ApiHmacSigner: signs method, path with query, timestamp and body hash; configurable headers, algorithm, encoding and canonical string. ApiAuth.Intercepting: auth strategies that need the final request or the response run as the innermost interceptor.- OAuth2 refresh tokens:
ApiAuth.oauth2Refresh(...), automatic refresh-token grant for expired client-credentials and password tokens, andApiAuth.clearTokenCache(). - New
@UseAuthtypes:digest,hmac-signed,oauth2-refresh, with the YAML fieldsrefreshToken,keyHeader,signatureHeader,timestampHeader,encoding. ApiFailureandApiAssertionError: one interface for status, URL, method and body on every API failure. Schema and OpenAPI failures now report the request.- WireMock helpers:
ApiMockServer.stubFor(MappingBuilder),stubJson(method, urlPattern, status, json)andresetOwnStubs()for parallel tests. - Load-test workload models (Gatling only):
LoadScenario.workload(Workload.open(...))with the open stepsatOnce,ramp,constantRate,rampRate,stressPeakandnothingFor, orWorkload.closed(...)withconstantConcurrentandrampConcurrent; a ramp-down isrampConcurrent(n, 0, d). Each virtual user runs the steps once. A workload cannot be combined withusers/rampUp/hold/cooldown, and on the JDK enginerun()fails withIllegalArgumentExceptionbefore any request.loadtest.maxUserscaps a closed workload's peak concurrency and an open workload's peak arrival rate and user-count steps (ADR 0003, ADR 0004). - Load-test simulations (Gatling only):
loadSimulation(name).scenario(..).scenario(..).run()runs several scenarios, each with its own workload, as one Gatling run and returnsLoadSimulationResult(global(),scenario(name),scenarioNames(),globalMetrics(),scenarioMetrics(name),slaResults()). With more than one scenario, request names are"<scenario> :: <step>"; a scenario's throughput uses the whole run's duration;maxUserscaps the combined peaks. Scenario names must be unique, must not contain" :: "and must not end with" ::". - Load-test SLAs:
sla().p95Below(..).errorRateBelow(..).step("x").p99Below(..)attached to a scenario or a simulation (LoadSla,StepSla,SlaRule,SlaResult). TestFly evaluates the rules on both engines with strict comparisons; a rule fails as "metrics are partial", "step not found" or "not measured" when it cannot be checked.run()records the run first, then throws oneAssertionErrorlisting every failed rule. On Gatling the rules also appear as native assertions in Gatling's HTML report. In a simulation, a step is named"<scenario> :: <step>"or by a unique bare name; an ambiguous name fails validation. NewLoadTestAssert.slaResults()andassertSlaPassed(). - Load-test baselines:
LoadBaseline.of(metrics).save(path)andLoadBaseline.load(path)(versioned JSON,schemaVersion1),LoadTestAssert.assertNoRegression(baseline, Tolerance.percent(p).errorRateDelta(d))andregressionResults(..)compare p95, p99, mean, error rate and throughput against exact limits with strict comparisons. A metric that is not measured is "not compared", never a pass, and the assertion fails if nothing could be compared. Partial metrics never become a baseline. - Load-test run result file: every run writes
testfly-loadtest-result.json(the baseline format) into its run directory; a simulation with several scenarios also writestestfly-loadtest-result-<scenario>.jsonper scenario. JDK runs now get a run directory underloadtest.resultsDirtoo. By default TestFly does not delete run directories, so each run adds one small directory; seeloadtest.retentionbelow. - Load-test HEAD and OPTIONS steps and
headerPresent:LoadStep.head(path)/options(path)and the single-step shortcutsLoadScenario.head(path)/options(path), on both engines. New checkLoadStep.headerPresent(name): the response has the header (name matched in any case), on every method and both engines. A HEAD step may only have status checks, header checks (headerPresent(..)andresponseHeader(..)) andresponseHeader(..)extractions: a body check (jsonPath(..),regex(..),xpath(..),jmesPath(..)or a bodymatches(..)), any otherextract(..), abody(..)or form parameters on a HEAD step fail withIllegalArgumentExceptionbefore any request is sent, with a message that names the source. OPTIONS steps accept every check. - Load-test regression and previous run in reports: after
regressionResults(..)orassertNoRegression(..), the comparison is recorded for that run (the latest one wins). The HTML report card shows a Regression table (Metric, Baseline, Actual, Limit, Result REGRESSED / OK / NOT COMPARED, Reason) under a baseline line; a regressed metric makes the card FAILED afterassertNoRegressionand WARN afterregressionResults, and FAILED and WARN badges list their reasons (for exampleWARN (1 regressed)). The Allure and ReportPortal summaries get aRegressionsection, and the suitetestfly-metrics.jsonentry gets aregressionblock withasserted. Every exported load-test entry now carries arunId(one per JVM). Without a baseline, each HTML scenario card also shows a "vs previous run" line comparing p95, throughput and error rate (+increase,−decrease) with the most recent earlier run of the same scenario inmetrics-history/; entries of the same run are skipped, so several exports in one build or merge mode never compare a run with itself. The line does not change the card status. - Load-test flow control:
LoadScenario.repeat(times, body)andrepeat(times, counter, body)(0-based${counter}, removed after the loop; anullcounter means none),doIf(condition, then),doIfOrElse(condition, then, orElse),randomSwitch(LoadBranch.percent(p, body), ...)(the remainder up to 100 runs no branch),group(name, body),tryMax(times, body)andpace(interval)/pace(min, max), on both engines with the same semantics and metrics. NewLoadCondition(exists,missing,equalTo,notEqualTo; a missing ornullvariable is missing, and values are compared as text),LoadBranch, andLoadScenario.flow(), the read-only execution tree ofLoadFlownodes. A block body receives a block builder: scenario settings on it, adding to the enclosing scenario while the body runs, and adding to it after the body returned throwIllegalStateException. A step inside a group is reported under the key"Group / Step"("<scenario> :: Group / Step"in the global metrics of a simulation with several scenarios). EverytryMaxtry sends real requests and counts them; a failed request ends the try, and when the tries run out the next node runs. Apacefollows Gatling's semantics on both engines: its state is the next start time per virtual user; on the first pass, or when that time has passed, it does not wait and sets the next start to now + interval (a late user re-anchors and never catches up), otherwise it waits and sets the next start to the wake-up time + interval; with a workload it must be inside arepeat. EachtryMaxblock starts with a clean status. A step that never ran (an untaken branch, a step skipped in atryMax) is reported with 0 requests andNaNp95/p99 (n/ain the reports). Checked before any request:repeat1 to 100 000,tryMax1 to 100 and not nested in anothertryMax, at most 8 levels of blocks, at most 100 000 requests per iteration in the worst case, a step in every body,randomSwitchpercentages in (0, 100] adding up to at most 100,pacebounds (max 1 ms toInteger.MAX_VALUEms, a non-zero min at least 1 ms;pacedoes not count towards the request bound), group, counter and variable names (a counter may not reuse an enclosingrepeat's counter), and a unique name for every step inside a block. Gatling'smaxDurationfor a scenario with blocks uses the worst-case duration of one iteration. See Fluent API, Flow control. - Load-test feeder strategies:
LoadTestFeeder.queue()(each record once per scenario run, in file order),circular()(the default round-robin),shuffle()(shuffled once per run, then each record once) andrandomOrder()(uniform, with replacement) oncsv,jsonandrecordsfeeders, withstrategy()and theLoadTestFeeder.Strategyenum. Each method returns a new feeder; on generated or custom feeders they throwIllegalStateException. Both engines use TestFly's own per-run cursor, not Gatling'sfeed(..). - Several load-test feeders:
LoadScenario.addFeeder(feeder)appends a feeder andfeeders()lists them. Every feeder is polled once at the start of each iteration (once per user with a workload), in declaration order. A variable supplied by two built-in feeders is rejected before any request.feed(..),feedCsvandfeedJsonstill replace every feeder. - Load-test feeder sources:
LoadTestFeeder.records(list)(in-memory records, copied; an empty list is rejected before any request, like an empty CSV or JSON file) andLoadTestFeeder.csv(path, separator). Records ofcsv,jsonandrecordsfeeders are read-only and shared between cursors. On Gatling, acsvorjsonfeeder above 100,000 records is re-read by the child JVM, which fails fast when the file's size or modification time changed; a custom feeder that overridesdescribe()keeps its descriptor, and one sampled to 5000 records now logs a WARN when it has more. - Load-test feeder exhaustion: when a
queueorshufflefeeder runs out, users stop starting iterations; the run completes, is not partial and is not failed.LoadTestMetrics.feederExhausted()is set (the OR of its scenarios in a simulation's global metrics) and one WARN is logged per scenario.LoadTestAssert.assertFeederNotExhausted()fails the test on it. Gatling's native queue would crash the run instead. The flag is exported asfeederExhaustedin the suitetestfly-metrics.json; the HTML card shows a FEEDER EXHAUSTED badge (a PASSED card becomesWARN (feeder exhausted), a WARN card lists it among its reasons, a FAILED card is unchanged); the Allure and ReportPortal summaries get aFeeder exhausted: yes|noline next toPartial.LoadBaseline.of(..)accepts an exhausted run with a WARN that it stopped early; the per-runtestfly-loadtest-result.jsonis still written, in the same format. Known behaviour: with a closed workload (constantConcurrent,rampConcurrent) on Gatling, Gatling keeps replacing users after the queue runs out until that injection step ends (Gatling 3.16 cannot stop one population alone); each replacement waits 100 ms and exits without a request, so the run lasts its full injection time. Use an open workload, enough records or acircularfeeder when the run time matters. - Load-test correlation: new check and extraction sources on
LoadStep:responseHeader(name)(the first value, name in any case),regex(pattern)(group 1 of the first match, or the whole match without a group; a group that did not take part is not found),xpath(expression)/xpath(expression, namespaces)(XPath 1.0, the string value of the first node or an attribute's value; prefixes only from the map) andjmesPath(expression)(JSONnullis not found, unlikejsonPath). They build checks withexists(),is(String)/is(int)and, for headers,matches(regex); the newCheckCondition.Builder.is(String)also works onjsonPath(..), and a terminal that does not apply to its source throwsIllegalStateException.LoadStep.extract(variable, source)andextract(variable, source, defaultValue)store the first match as${variable}: a missing value makes the request KO, or with a default stores the default and keeps the request OK; extracting a variable again replaces the earlier extraction. A body that is not JSON is not found forjsonPathandjmesPath, so a default applies on both engines (except ajsonPathoutside the JDK subset on Gatling, which keeps Gatling'swithDefaultand is KO). A JSONnullat ajsonPathis found: the request is OK, the default does not apply and the variable stays unresolved; usejmesPathordoIf(exists(var))for a fallback. JMESPath numbers render the same on both engines (1.10gives1.1), and quoted JMESPath keys are decoded as JSON strings. XML parse errors are never printed. NewLoadExtractionandLoadStep.extractors()list every extraction (theextractions()map entries first, then the others in declaration order);extractions()is unchanged. NewCheckCondition.namespaces(). The same semantics on both engines: on Gatling, headers and JMESPath use Gatling's own checks, while regex and XPath run TestFly's extractors in the child JVM. XML is parsed with secure processing and DOCTYPE declarations rejected (XXE), so a body with a DOCTYPE is not found. The JDK engine supports the JMESPath subseta.b,a[0].b,"key"and a root[n]; anything else fails before any request, while Gatling runs full JMESPath. Checked before any request on both engines: header names are RFC 7230 tokens (forheaderPresent(name)too), regexes compile, an XPath compiles as XPath 1.0 with only the declared prefixes and selects nodes (count(..),string(..)andboolean(..)are rejected), namespace prefixes are NCNames other thanxml/xmlnswith non-blank URIs, and a JMESPath is valid for the engine. A HEAD step acceptsresponseHeader(..)checks and extractions and rejects regex, XPath and JMESPath checks and every other extraction. See Fluent API, Correlation. - Load-test run retention (
loadtest.retention.runs,loadtest.retention.maxAgeDays, both default0= keep everything): after every run, on both engines (every JDK run, including cancelled, timed-out and validation-failed ones; every Gatling run that got a run directory, so not a run cancelled while queued or rejected by the JVM option check), TestFly deletes the run directories inresultsDirbeyond the newestrunsof the scenario (or simulation) that just ran and every TestFly run directory older thanmaxAgeDaysby the millis in its name; the newestrunsof that scenario are exempt from the age rule. Only a direct child named<slug>-<13-digit millis>that is a real directory and contains the.testfly-runmarker (or, for a run directory written before 1.1.0,testfly-metrics.json,testfly-loadtest-result*.jsonorgatling-subprocess.log) can be deleted. Never deleted: other folders and files, symbolic links and their targets, the current run, a run in progress (its marker is locked), and a directory less than 60 s old. A cleanup failure only logs a WARN. When the file system cannot create or lock the marker (NFS without a lock daemon, some VM shared folders, any other I/O error), the run is not failed: one WARN per JVM, and the run goes on protected only within its own JVM and by the 60 s guard. The run lock is advisory and unreliable on NFS: with aresultsDirshared by several hosts or JVMs, use one per host orruns: 0(ADR 0007). Where files cannot be locked at all, retention never deletes a run directory with a marker; marker-less (pre-1.1.0) directories can still be deleted through the legacy-file rule, so use a per-hostresultsDirand clean up old runs yourself there. NewTestFlyConfig.LoadTest.Retention,LoadTest.getRetention()/setRetention(..), andLoadTestConfig.getRetentionRuns()/getRetentionMaxAgeDays(). - Gatling child JVM heap and options (
loadtest.gatling.maxHeap,loadtest.gatling.jvmArgs):maxHeap<n>k|m|g(at least64m) gives-Xmx,<n>%gives-XX:MaxRAMPercentage; unset adds no flag (the JVM default, 25% of RAM, as before).jvmArgstakes one option per element, checked against an allowlist (-Xms/-Xmx/-Xss/-Xmn,-XX:,-Dwith a non-reserved key, assertions,-verbose:gc,-Xlog:,--add-opens=,--add-exports=,--enable-native-access=,--enable-preview); agents, class and module paths, argument files,-XX:OnError/OnOutOfMemoryError/Flags/VMOptionsFile,testfly.*and TestFly's pinnedgatling.*properties are rejected, and so are zero sizes (-Xmx0,-Xss0k, …) and, whilemaxHeapis set, a heap option injvmArgs(-Xmx,-XX:MaxHeapSize,MaxRAM,MaxRAMPercentage,MaxRAMFraction,MinRAMPercentage,InitialRAMPercentage).${VAR}placeholders work in both keys. The values are checked when a Gatling run starts, before any request; a bad one fails the run withIllegalArgumentException, never configuration loading.JAVA_TOOL_OPTIONSandJDK_JAVA_OPTIONSare still inherited unchecked and applied first, so these settings win on conflicts. The child writes[TestFly] Gatling child JVM: maxMemory=<bytes> availableProcessors=<n>togatling-subprocess.log. The child still gets the full parent class path (a minimal class path is a non-goal for 1.1.0, ADR 0007). NewTestFlyConfig.LoadTest.Gatling,LoadTest.getGatling()/setGatling(..),LoadTestConfig.getGatlingMaxHeap()/getGatlingJvmArgs(). - Parallel Gatling runs (
loadtest.gatling.maxParallelRuns, default1, range 1 to 16, clamped with a WARN): up to that many Gatling runs execute at once in one JVM, each in its own child JVM and run directory; further runs wait for a slot and are cancelled by an interrupt without creating a run directory or a child. The limit does not coordinate separate JVMs. Parallel runs share the host's CPU, so they shorten a suite but skew latency; setmaxHeapwhen more than one run executes at once. When the limit is above 2 withoutmaxHeap, a WARN once per JVM gives the total (N parallel runs x the JVM default of 25% of RAM = X% of RAM) and suggests about75/Npercent, rounded down, at least 5%. NewLoadTestConfig.getGatlingMaxParallelRuns(). Theretentionandgatlingkeys are YAML only, with no@LoadTestorLoadScenariosetting. - Load-test authentication (
LoadAuth, both engines):LoadScenario.auth(..)sets the default of every step andLoadStep.auth(..)overrides it; shortcutsLoadScenario.basicAuth(..),LoadScenario.oauth2ClientCredentials(tokenUrl, clientId, clientSecret, scope),LoadStep.basicAuth(..)andLoadStep.noAuth(). Kinds:basic,bearer,oauth2ClientCredentials(with.scope(..)and.clientSecretBasic()),fromConfig(name)(reuses theapi.auth.<name>entry; typesbasic,bearer,oauth2) andnone(). A step'sauth(..)ornoAuth()overrides the scenario's; a stepAuthorizationheader also replaces the scenario's auth, and a step with both its own auth and that header is rejected. TestFly builds the Basic header itself in UTF-8 on both engines.${var}in a Basic or Bearer credential is resolved per request (per-user credentials from a feeder); one that is still unresolved makes the request KO with status-1without sending it. OAuth2 client credentials gets one token per run, shared by every virtual user, fetched before the load starts (a failure fails the run before any load request, with the HTTP status and OAuth2errorcode only) and refreshed in the background; the run aborts if no valid token is left after a failed refresh. The token is not exposed as a variable and token requests are not counted in the metrics (one INFO line gives their count). Credentials are never sent to another origin on a redirect; on Gatling a same-origin redirect hop is also sent without them, while the JDK engine keeps them there. See Authentication, Proxy and TLS in the load-testing docs anddocs/adr/0008-load-test-auth-proxy-tls.md. - Load-test proxy and TLS (
loadtest.proxy,loadtest.tls, YAML only, both engines;LoadTestConfig.getProxy()/getTls()):proxy.host,port,username,passwordandnonProxyHosts(*wildcards) for load and OAuth2 token requests. A configured proxy ignores the JVM proxy properties, and proxy credentials are sent only to the proxy; unset, the JDK engine still uses the JVM proxy properties and Gatling gets no proxy. Proxy credentials are sent preemptively, also on theCONNECTfor HTTPS; on the JDK engine Basic proxy auth for HTTPS needsjdk.http.auth.tunneling.disabledSchemes(TestFly logs a WARN and does not change it).tls.trustStoreandtls.keyStore(PKCS12by default, orJKS) give a trust store that replaces the default trust and an mTLS client certificate; with either set, both engines verify the chain and the hostname. AkeyStorewithout atrustStoreuses the JVM default trust; the key password must equal the store password, because Gatling takes one password.tls.insecureTrustAlltrusts any server certificate but still checks the hostname, logs a WARN and conflicts withtrustStore. Stores, ports and credentials are checked before any request, and messages never contain a value. There is no fallback toapi.proxyorapi.ssl. Security note: withoutloadtest.tls, Gatling 3.16 keeps its own default of trusting every certificate with no hostname check (TestFly logs an INFO per run for anhttpstarget); setloadtest.tls.trustStoreto verify. Changing that default is deferred to 2.0. Also deferred: digest, HMAC and apiKey fromapi.auth, the OAuth2 password and refresh grants, per-user tokens and client certificates, SOCKS proxies, per-scenario proxy or TLS, TLS protocol and cipher settings, a Windows ACL on the temporary file, and token requests in the metrics.
Changed
- ReportPortal JUnit 5 agent is upgraded from 5.3.1 to 5.5.8.
execution.baseUrlis now required: configuration loading fails at startup withexecution.baseUrl must be specifiedwhen the key is missing or blank, matching the documented minimumtestfly.yml. Previously a missing value only failed later, inopen()or when an agent action used a relative URL. Configs withoutexecution.baseUrlmust add it.- Assertion failure diagnostics:
LocatorAssertfailures now end with(actual: [...], timeout: ...)showing the last observed text, value, attribute, CSS value, class list, element count or element state. This covers the matchers added in this release too; those that only test a condition report the element checked, for examplecondition not met on <input#email>. Awithin(By)container that never appears now fails as anAssertionErrorinstead of leaking aLocatorException. Tools that match the exact old message suffix(timeout: Ns)should be updated; the prefix is unchanged. - Schema and OpenAPI failures throw
ApiAssertionError, a subclass ofAssertionError, so existingcatch (AssertionError)code keeps working. ApiAuth.digest(...)now performs RFC 7616 challenge/response. It previously sentDigest base64(user:password), which no server accepted.- Cookie jar (
withCookies()): cookies are sent only to their host orDomain, honourPath,Secure,Max-AgeandExpires, and foreignDomaincookies are rejected. A cookie withoutPathstill applies to/. Previously every cookie went to every host. - OAuth2 token cache is cleared at suite end, so tokens are no longer reused across suites in the same JVM.
ApiAuth.basicAuthalways encodes credentials as UTF-8.- A
byte[]passed tobody(Object)is sent raw instead of as a Base64 JSON string. - Default
@UseAuthresolution is shared by the TestNG listener and the JUnit 5 extension (no behaviour change for existing types). - Load tests: default status check (behaviour change). A step without
status().is(..)/status().in(..)now fails a response that is not 2xx or 304, on both engines. The JDK engine used to count 4xx/5xx responses as successful, so error rates can rise after upgrading. Addcheck(status().in(...))to accept other codes. - Load tests: JSONPath, JSON
nulland cancellation parity. A JSONPath without a leading$is read as$.pathon both engines (it used to work only on the JDK engine). A JSONnullvalue now counts as present on the JDK engine, as it does on Gatling (exists()passes,extract(...)storesnull). A JDK run that is interrupted or passes its safety timeout now fails withIllegalStateExceptioninstead of returning partial metrics. Gatling runs disable the HTTP warm-up request and usage analytics, so a run only connects to the system under test. - Load tests: checks and fail-fast validation (behaviour change).
jsonPath(p).is(n)/in(n...)now compare the JSON value atp(they used to build status checks).matches(regex)is a whole-body regex search on both engines.status().exists()throwsIllegalStateException. Anextract(...)path that is not found fails the request on the JDK engine as it already did on Gatling. Before any request is sent, the scenario is validated for the resolved engine: a step with bothbody(...)andformParam(...), a blank JSONPath, an invalid regex or (JDK engine) a JSONPath outside$.a.b,$.a[0].b,$[0]fails withIllegalArgumentException. A programming error inside a JDK run (for example a malformed URI) aborts the run withIllegalStateExceptioninstead of being counted as a failed request. - Load tests: engine and workload logging. The step name shows the resolved engine (for example
engine=jdk (auto: Gatling not on classpath)), and anautofallback to the JDK engine logs one WARN per JVM.cooldownis accepted but not applied by either engine; a value above zero logs one WARN per JVM.usersis documented as the number of virtual users started overrampUp, each looping forhold, not as concurrent users (ADR 0003,docs/adr/0003-load-test-workload-model.md). The load shape itself is unchanged. - Load tests: Gatling runs are bounded. Each request has the
requestTimeoutSecondstimeout, the simulation has amaxDurationof the injection time (rampUp + hold, or the workload's duration) plus, per step,requestTimeoutSecondsand the longest think time, plus 30s, and the child JVM (with its descendants) is terminated when the wait budget runs out, the test thread is interrupted or the parent JVM exits. A non-zero Gatling exit code fails the run (except exit code 2 for registered SLA assertions and a run that could send no request) with the root error lines and the last 20 lines ofgatling-subprocess.log, credentials masked; raw log lines are no longer printed toSystem.err. - Load tests: TestFly owns the Gatling metrics. The forked simulation records attempts, OK/KO counts, status codes and a millisecond latency histogram per request name, and writes them to the sidecar
testfly-metrics.jsonin the run directory;LoadTestMetricsis built from it only, and Gatling'sjs/stats.jsis no longer read. Percentiles are exact (linear interpolation over the histogram, as on the JDK engine) and can differ from Gatling's HTML report, which estimates them. Requests that fail to build count as KO with status-1, so totals can exceed Gatling's report. A run is flaggedpartial(newLoadTestMetrics.partial()) when outcomes were lost ormaxDurationstopped it; latency, status and error assertions then fail. Theusers/rampUp/holdloop now finishes the iteration in progress, so a run can last up to one iteration longer thanrampUp + hold(ADR 0004). - Load tests: Gatling runs are no longer serialised by a hard lock. The JVM-wide lock is replaced by run slots sized by
loadtest.gatling.maxParallelRuns. The default is still1, so runs still execute one at a time unless the key is raised, but a run waiting for a slot can now be cancelled by interrupting its thread. The JVM options are checked before the wait, and a queued run creates no run directory. - Load tests: one shutdown hook for all Gatling children. The per-child shutdown hooks are replaced by one JVM-wide hook that terminates every live Gatling child JVM, and its descendants, in parallel, within 20 s in total.
- Load tests: run directories get a
.testfly-runmarker. Every run directory created from 1.1.0 contains this empty file, which run retention uses to recognise TestFly's directories; a run in progress holds a file lock on it, or, where the file system cannot lock it, goes on without one after a WARN. - Load tests: Gatling console lines are prefixed with the run directory.
Starting Gatling engine,Gatling execution completeandGatling native assertions failednow read[LoadTest] [<run-dir>] …(logger lines are unchanged), so the output of parallel runs can be told apart. Tools that match these lines should allow the prefix. - Gatling upgraded from 3.13.5 to 3.16.0. It is still an optional dependency.
LoadTestMetricsandLoadTestMetrics.StepMetricsgained trailing record components:partial,slaResultsandfeederExhaustedonLoadTestMetrics,p99LatencyMsonStepMetrics. The earlier constructors are kept, so existing callers compile and link. Record deconstruction patterns over these records (case LoadTestMetrics(var a, ...)) list every component and must be updated.- Load tests: missing or empty CSV/JSON feeders fail fast (behaviour change). A
csvorjsonfeeder whose file is not found, or which has no data rows (for example a header only or an empty JSON array), is rejected before any request is sent, on both engines and in simulations, with anIllegalArgumentExceptionthat names the scenario and the path. Such a scenario used to run with every${var}unresolved.LoadTestFeeder.csv(..)andjson(..)still do not throw; they log a WARN. Files are looked up on the classpath, then as a filesystem path, then undersrc/test/resources/. - Load tests: a Gatling run that sends no request returns metrics. When every step is unbuildable (for example an unresolved
${var}), the run no longer fails with "exit code 1". It returns metrics in which every request is KO with status-1, and logs a WARN that Gatling wrote no HTML report. - Load tests: SLA and partial results in reports. The HTML report (and
loadtest-report.html) shows a PARTIAL badge (card status WARN), an "Aggregate" label on a simulation's(global)entry, an SLA table per card (scope, metric, comparison, threshold, actual orn/a, PASS/FAIL, reason) and a P99 column in the step table; a card with a failed SLA rule is FAILED, and the summary counts scenarios with a failed SLA, excluding aggregate entries. The Allure and ReportPortal Markdown summaries add a "Partial" line and an SLA table. Baseline regression results are shown too (see Added). - Load tests: the Allure and ReportPortal "Concurrent Users" label is renamed to "Virtual Users", matching what
usersmeans (ADR 0003). Tools that match the old label should be updated. - Load tests: request Content-Type is inferred from the body (behaviour change). When a step has a
body(..)and noContent-Typeheader (matched in any case), both engines judge the body as declared, before any${var}or#{var}is resolved: a non-Stringbody, aStringwhose first non-whitespace character is{or[, aStringthat starts with a template (${or#{, whose resolved value is unknown) and an empty or blankStringare sent asapplication/json; aStringstarting with<asapplication/xml; any other literal text, including JSON scalars such as"42",$5,# headingand text such asid=${id}, astext/plain; charset=UTF-8. Every body used to be sent asapplication/json; set the header on the step to keep that.formParamsteps still sendapplication/x-www-form-urlencoded, and a step without a body or form parameters sends noContent-Type. - Load tests:
rampUp/hold/cooldowndurations round up to whole seconds on every path.LoadScenario.rampUp/hold/cooldown(Duration),@LoadTeststrings andloadtest.*in YAML: a positive fraction rounds up (800ms→ 1s,1500ms→ 2s,1.5s→ 2s,0.5m→ 30s,2.5→ 3s); whole values and zero are unchanged. Strings accept decimals withms,s,m,h(any case) or a plain number of seconds. A missing or blank value uses the default (10s / 30s / 5s); an invalid or negative value such asfastor-5slogs a WARN naming the key and the value, then uses the default. A negativeDurationpassed toLoadScenario.rampUp/hold/cooldownnow throwsIllegalArgumentException(it was silently accepted). NewTestFlyConfig.LoadTest.parseDurationSeconds(key, value, defaultSeconds). - Load tests:
LoadScenario.steps()lists the steps inside flow-control blocks (behaviour change). It returns every leaf step in declaration (pre-order) order, including the steps insiderepeat,doIf,randomSwitch,groupandtryMaxblocks, and no longer describes the execution: iterating it does not give the order, repetitions or branches of a run. Useflow()for the execution. For a scenario without blocks the result is unchanged. - Load tests: on the JDK engine a step with no sample reports
NaNpercentiles (behaviour change). A step with 0 requests (for example an untakendoIfbranch) now has p95 and p99NaNinstead of 0, as on Gatling.assertStepP95Belowand stepp95Below/p99BelowSLA rules on it fail as "not measured", and the reports shown/a. Steps with requests are unchanged. - Load tests: the
testfly.variable prefix is reserved (behaviour change).extract(..)target names and the variables of built-in feeders (CSV/JSON columns and generated variables) that start withtestfly.are rejected withIllegalArgumentExceptionbefore any request, in every scenario, with or without flow-control blocks. The prefix is also reserved forrepeatcounters. Rename such variables. - Load tests: the JDK safety timeout includes the iteration budget. It is now the larger of
rampUp + hold + cooldown + 60s(the previous limit) andrampUp + holdplus the worst-case duration of one iteration plus 60s, where each step costs the request timeout plus the longest think time andrepeat,tryMaxandpaceadd their worst case. It never gets shorter. - Load tests: CSV feeders follow RFC 4180 (behaviour change).
csv(..)files are parsed as UTF-8 by one parser on both engines: quoted fields may contain the separator,""and line breaks and are no longer trimmed or cut at commas; spaces and tabs around a quoted field are ignored (1, "Alice"givesAlice); a leading BOM is removed from the first header; CRLF, LF and a lone CR end a record; decoding is lenient: invalid UTF-8 bytes become U+FFFD with one WARN naming the file, and the file still loads. An unterminated quote, a duplicate header or a blank header now makes the file malformed (a WARN with the line, then the run is rejected before any request, as for a missing file); a duplicate header used to overwrite the earlier column silently. Rows with too few or too many fields behave as before and now log one WARN each. - Load tests: JDK feeders are polled at the start of each iteration, with a fresh cursor per run (behaviour change). The JDK engine used to take the next record at the end of an iteration, consuming one more when the hold had ended, and kept a feeder's position from one run to the next. Each run now starts at the first record, as on Gatling. Custom feeders are still polled live and are not reset.
CheckCondition.Typegained appended constants:HEADER_EQUALS,HEADER_MATCHES,REGEX_EXISTS,REGEX_EQUALS,XPATH_EXISTS,XPATH_EQUALS,JMESPATH_EXISTSandJMESPATH_EQUALS, after the existing ones, so ordinals do not move. AswitchoverCheckCondition.Typeneeds adefaultbranch: aswitchstatement without one silently skips the new types, and aswitchexpression that listed every earlier constant no longer compiles.LoadExtraction.Sourcemay gain constants in the same way.- Load tests: a
sequence(..)feeder restarts on every run on the JDK engine (behaviour change). It now starts atstartin every run, as on Gatling; it used to continue across runs in the same JVM. If you relied on unique values across two runs, use a different start value oruuid(..). - Load tests: the Gatling child JVM starts through
io.testfly.loadtest.internal.GatlingChildMain. It reads the run's0600temporary configuration file, deletes it at start-up, sets theloadtest.tlssystem properties in-process and then runsio.gatling.app.Gatling, so secrets reach the child only through that file, never the command line or the environment. Tools that look forio.gatling.app.Gatlingon the child's command line should match the new class too.-Dgatling.ssl.*and-Dgatling.http.enableHostnameVerificationare now reserved inloadtest.gatling.jvmArgs. - Load tests:
gatling-subprocess.logis redacted. The child's output is written line by line through the credential filter, which now also masks bareBasic <base64>values and every password, client secret and token TestFly knows for the run. It used to be written raw, so a logging configuration that dumped HTTP headers could write credentials into the run directory.
Deprecated
ApiAuth.hmac(apiKey, secret, algorithm): signs only the API key. UseApiAuth.hmacSigner(). Its headers are unchanged.
Fixed
@TestFlyApi(since)values: 105 declarations named versions that were never released (1.2.0to3.0.0). Each now names the release that first contained the API (1.0.0to1.0.7), taken from the git history; the matching Javadoc@sincetags and two doc pages were corrected too.BaseApiTestwithout WireMock:MockSupport.resetMocks()(an@AfterMethodof everyBaseApiTest) no longer loads WireMock unless a mock server was started, so API tests no longer fail withNoClassDefFoundError: com/github/tomakehurst/wiremock/core/Optionswhen the optionalorg.wiremock:wiremock-standaloneis not on the classpath.mockServer()andstubGet()without WireMock now throw anIllegalStateExceptionthat names the dependency.- Load-test status codes on Gatling were fabricated: every OK request was reported as 200 and every KO as 500, taken from Gatling's OK/KO totals or
simulation.log. Real per-response codes are now counted while the run executes and written to TestFly's metrics sidecartestfly-metrics.jsonin the run directory; requests with no response are reported under-1, as on the JDK engine.simulation.logis no longer parsed. When an engine records no status codes,statusCodes()is empty, the newLoadTestMetrics.statusCodesMeasured()returnsfalse, andassertStatus,assertStatusCodeCount,assertNoStatusandLoadScenario.assertStatusfail with "HTTP status codes were not measured" instead of passing. - Load-test percentiles on Gatling:
p90LatencyMs()used to be interpolated from p50 and p95. It is now measured, like p50, p75, p95 and p99, from TestFly's own latency histogram (see Changed), and values that were not measured areNaNinstead of 0. NewLoadTestMetrics.p75LatencyMs()(JDK and Gatling),LoadTestMetrics.isMeasured(double)andLoadTestAssert.assertP75Below(ms); the pre-1.1.0LoadTestMetricsconstructor is kept. A latency assertion on an unmeasured value fails with "latency was not measured". JSON results write unmeasured values asnull; the HTML report and the Allure summary shown/a. - Load-test
formParamwas ignored by both engines. It is now sent asapplication/x-www-form-urlencoded. Query-parameter values are URL-encoded on the JDK engine, and a body gets a defaultContent-Typeon Gatling only when noContent-Typeheader is set (see the Content-Type inference entry). - Load-test sub-second hold sent no request:
hold(Duration.ofMillis(800))orhold: 800mswas truncated to a 0 s hold, so the virtual users stopped before their first request. It now holds for 1 s (see Changed). - Load-test decimal durations fell back silently: a value such as
1.5sintestfly.ymlor@LoadTestwas not understood and silently replaced by the default. It is now parsed (2s), and an invalid value logs a WARN. - Metrics history files written in the same second overwrote each other:
metrics-history/copies are now namedtestfly-metrics-yyyyMMdd-HHmmss-SSS.json, with a-Nsuffix when the name is taken. Older seconds-only names are still read. Rotation, the flakiness analysis and the report's previous-run lookup all order the files by the timestamp in the name instead of the file modification time. - Mobile iOS first view-tree read: on a freshly started simulator the first read could time out while DeviceKit was still starting. The driver now calls
device.apps.foregroundfirst, so DeviceKit is ready before the app launches. - Mobile server auto-start wait: under load, a
server.infoprobe started with only a few milliseconds left could time out and end the wait with a timeout error instead of the documented "did not answer within N ms". While waiting for an auto-started mobilecli server, a probe that times out now counts as "not answering yet", no probe starts with less than 50 ms left, and whenmobile.timeouts.serverStartMsruns out the error is "did not answer within N ms". - JUnit 5 ReportPortal test items: the test item was not started through the agent's lifecycle before the test ran, so results were not reported correctly.
TestFlyExtensionnow callsReportPortalJUnit5Bridge.startTestItem, which invokes the agent'sinterceptTestMethod, before the test body runs. DeviceEmulatoron Chrome and Edge: it closed the driver's shared DevTools connection after every call. The emulated viewport and user agent were dropped, and the next network mock or recording on the same driver failed with "Session with given id not found". It now keeps the connection open. The user-agent override used on other browsers also readundefinedbecause the getter used its ownarguments; it now returns the profile's user agent.- Network mock listeners with a reused driver: with
browser.lifecycle: per-suite, every test added anotherFetch.requestPausedlistener, so every network event ran through all earlier tests' listeners. One listener per browser connection now forwards to the current test. - JUnit 5 recording: the JUnit 5 extension ignored
recording.mode: offandrecording.cdp; it now follows the same rules as the TestNG listener. GeoLocationauto-reset: the Javadoc promised an automatic reset after each test but nothing did it, so a mocked location could leak into the next test on a reused browser. The framework now resets it after every test.- Trace HTML escaping: step names and page content embedded in the trace are now escaped for an inline script block, so a page containing a closing script tag or an HTML comment can no longer break the trace or run code in it.
ApiResponseSpeccontent-type failures named the request asnull null; they now include the method and URL.- JSON paths with keys containing
/or~resolved incorrectly through JSON Pointer; they now work with bracket notation. - A lower-case
content-typeheader could be duplicated by a request spec's content type. - Docs: README suggested
ApiClient.setGlobalAuthin@BeforeSuite, which cannot work because global auth is per test thread and cleared after each test.docs/public-api.mddescribed a non-existentapi()client. The configuration page mentioned a non-existentapiClient().withAuth(name).
Security
- Static-analysis findings (SonarCloud quality gate and CodeQL): an OAuth2 scope of any length is validated without a regular expression, the HTML report's local-path check no longer backtracks exponentially, report links to the Gatling report are resolved through
URLand limited tohttp,httpsandfile, an interrupted JDK-engine run re-interrupts its thread in thecatch, and the child-process start no longer dereferences a nullable variable.StoreSpec(internal) masks passwords intoString. - Patched transitive dependencies: Guava
33.7.2-jre(including GHSA-xxph-c9ww-hj94), Log4j API2.25.5and Rhino1.7.15.1are pinned independencyManagement, and Logback1.5.34is used for tests. They only reach optional features (Guice, POI, JSON-schema validation) and tests, and are not propagated to consumers. No direct dependency has a known advisory. - Documentation tooling: the npm dependencies of
docs-siteand of the VS Code inspector were updated withnpm audit fix. This removes every critical advisory (docs-site: 43 to 30 advisories, 4 high; inspector: 5 to 3, none high). The rest are dev-server and build-time packages that need a Docusaurus upgrade; its current release introduces a criticaltinypooladvisory, so it is deferred. None of this is part of the Maven artifact.
Documentation
network.interceptEnabledis documented as reserved: nothing reads it, and interception starts with the first route, stub ornetwork.blockUrlsentry. The setup guide no longer implies every listed browser supports every feature.
[1.0.7] — 2026-10-09
Added
- Canonical
Locator.cssSelector(String): IntroducedLocator.cssSelector(String)as the primary, memorable factory method matching Selenium'sBy.cssSelectornaming conventions. - Assertion Boundary Architecture: Formalized the separation between TestFly's auto-retrying, DOM-polling Web UI assertions (
LocatorAssert,PageAssert) and general-purpose primitive assertions (delegated to AssertJ / TestNG). execution.sessionWaitSeconds(default300,0= do not wait, validated>= 0): controls how long a test waits for a free browser slot whenexecution.maxActiveSessionsis exhausted. It replaces the previously hard-coded 30-second wait.ExecutionValidator.crossCheckWarnings: prints a warning when parallel execution usesexecution.threadCountgreater thanexecution.maxActiveSessions, because the surplus threads queue for a browser slot.LoadTestDetector(internal): single place that decides whether a test is a load test (see Changed).testfly-test-authoringagent skill with per-area references (WebUI, API, TestNG, JUnit 5, Cucumber, load testing).
Changed
- Load-test detection is explicit (behavior change). The four name-based
contains("loadtest")heuristics (DriverManager,TestExecutionListener,TestFlyExtension,CucumberHooks) were replaced by a singleLoadTestDetector. A test is now treated as a load test (no WebDriver) only when it extendsBaseLoadTest, implementsLoadTestSupport, is annotated with@LoadTest/@NoBrowser, or carries the exact Cucumber tag@loadtest. Classes such asFileUploadTest,DownloadTestor anything in a package likecom.acme.uploadtestsare no longer silently denied a WebDriver. A one-time WARN is logged for classes/tags that matched the old name heuristic but not the new rules. Locatoractions (click,fill,text, ...) now auto-wait up totimeouts.explicit, re-resolving the element on each poll (also recovers from stale references) and self-healing after the timeout.isVisible(),isEnabled()andcount()stay non-waiting.DriverManager.getDriver()now explains why no driver exists (outside@Test/@PreCondition/@ConditionProvider, e.g. in@BeforeMethod) and where to move the setup.- The session-slot timeout error now names both
execution.maxActiveSessionsandexecution.sessionWaitSeconds. - Jackson modules are pinned through
jackson-bom2.21.7 (previously onlyjackson-databindwas pinned, at 2.21.6), so transitive and optional Jackson modules stay on one version. - The JaCoCo agent is now attached to the Surefire JVM (
argLineis@{argLine} ...), sotarget/jacoco.execand the coverage report are produced bymvn verify. - GPG signing moved from the default build into the
releaseMaven profile:mvn verify/mvn installneed no key; releases use-Prelease.
Deprecated
Locator.css(String): Deprecated in favor ofLocator.cssSelector(String). It continues to delegate seamlessly to prevent breaking existing code.
Fixed
getByText()returned the outermost ancestor (html/body/wrapperdiv) instead of the element holding the text; it now returns only the innermost match.exact()uses the same logic.- Load tests: HTTP status codes are now recorded in
statusCodes(transport failures use the synthetic code-1),LoadScenario.assertStatus(n)now fails when any other status occurs (it previously asserted againstassertNoStatusof a different code), andextract()works for scenarios without a feeder. - HTML report: the report data embedded in the page is escaped for a
<script>context (<, U+2028, U+2029), so failure messages and test data can no longer inject markup or close the script block; template placeholders are now substituted in a single pass, so substituted values are never re-scanned. DriverManagersession permits: a permit is now returned exactly once per driver, including whendriver.quit()throws and on every failure path of driver creation (a permit leak that could exhaustmaxActiveSessions).DriverManager.recreateDriver()now also replaces a deadper-suitedriver (it was kept in the suite registry), andquitAllSuiteDrivers()releases only the permits that were actually held.OpenApiValidatorpasses the URI path (not the full URL) and the responseContent-Typeheader to the validator, which fixes "No API path found" failures and response body validation.
Security
.github/workflows/release.ymlhardened: the release version is validated as a whole string (no newline or script injection) and read only through the environment, never interpolated into scripts; the release commit must be reachable frommain; publishing is gated on thereleaseGitHub environment; the pom version must equal the release version (tag pushes are no longer rewritten); tests run once, GPG signing is enabled only through-Prelease, and the tag/GitHub Release is created at the verified commit.
Documentation & Specifications
- Engineering Specs Modernization: Modernized root
docs/specifications (internals.md,public-api.md,architecture.md,testng-listeners.md) to reflect the Java 21 LTS baseline,SmartTriageEngine,FuzzyHealingEngine, and assertion boundaries. - Documentation Site Sync: Updated guides for semantic locators, assertions, and self-healing across both English and Turkish documentation locales.
- Agent Knowledge Graph Sync: Registered
[[wiki/assertion-system]], updated architecture and WebUI wikis, and synchronizedMAP.md. - Documentation audit (EN + TR): corrected the Maven coordinate to
io.github.hakanngulthroughout, rewrote examples that did not compile against the real API, aligned the load-testing docs with the real DSL (load(path).users().rampUp().hold(),LoadTestFeeder,@LoadTestattributes), and corrected claims aboutWaitEngine, Kubernetes/distributed load tests, Allure and CI setup. Install guides now state which version is on Maven Central and which version this checkout is. - Agent guidance consolidated:
AGENTS.mdis the single entry point (GEMINI.md,PRODUCT.mdandfeatures/features-report.mdremoved),ROADMAP.mdandCONTRIBUTING.mdupdated, and obsolete planning documents underdocs/retired.
Tests
- Unit suite grew from 1362 to 1444 tests, adding regression coverage for HTML report escaping,
DriverManager(permit accounting, per-suite recreate, slot wait),LoadTestDetector,JdkLoadEngine,OpenApiValidator,ExecutionValidator,Locatorauto-wait and test-id configuration isolation.
[1.0.6] — 2026-09-29
Added
- Smart Flakiness Triage (
SmartTriageEngine): Local heuristic analyzer integrated intoTestExecutionListenerthat inspects exception hierarchies to categorize failures (SYSTEM_FLAKY,APPLICATION_BUG,NEEDS_INVESTIGATION) without LLM token cost. - Fuzzy Self-Healing (
FuzzyHealingEngine): Local, zero-token heuristic fallback healing using Levenshtein distance against DOM candidates and attribute tokens before escalating to external LLMs; no fixed latency is guaranteed. - Auto-POM Page Knowledge System: Autonomous page element discovery and local semantic intent resolution with continuous learning cache (
PageKnowledge). - Sequenced Collections on Locators: Added
first()andlast()navigation methods toLocatorleveraging Java 21 sequenced collections. BaseJUnit5ApiTest: Native REST API testing base class with fullapi()client support for JUnit 5 Jupiter suites.NavigationSupportHelpers: Added comprehensive window management, multi-tab switching, and browser navigation helpers.- HTML Report Log Filters: Interactive INFO and DEBUG log level visibility toggles in the report timeline.
Changed
- Java 21 LTS Modernization: Framework baseline and compiler upgraded to Java 21 LTS (
--release 21), adopting Pattern Matching forinstanceof, exhaustive switch expressions, and stream.toList()across the repository. - Native Selenium By Interoperability (
Locator extends By):Locatornow directly extends Selenium'sorg.openqa.selenium.By, enabling 100% transparent interoperability with native Selenium APIs (driver.findElement(locator)). - Clean API Refactor: Refactored
Locatorto remove redundant prefix methods (ofCss,inputValue,getValue) to embrace a unified, zero-boilerplate API. - Support Interface Completeness: Ensured 100% method delegation parity for all
Supportinterfaces (ApiSupport,BrowserSupport,LocatorSupport), fully wrapping the internal engines. - Null-Safe Actions:
Locator.type()andLocator.append()are completely null-safe; passingnullor""gracefully clears the element without throwing exceptions.
Performance
- Virtual Threads in Load Testing: Leveraged Project Loom
Executors.newVirtualThreadPerTaskExecutor()inJdkLoadEnginefor ultra-scalable, lightweight load testing. - Video Recording Memory Optimization: Video recorder stores raw byte frames and performs lazy decoding upon test failure, significantly reducing heap overhead during long runs.
Fixed & Hardened
- Guaranteed Driver Cleanup: Added JVM shutdown hooks and
@AfterAlllistener execution to guarantee browser process termination even on abnormal exits. - Thread-Safe Bootstrap: Hardened framework bootstrap initialization against race conditions during concurrent suite startup.
[1.0.5] — 2026-09-12
Added — Interactive Web Recorder & Web Studio (testfly record)
- Chrome Companion & Injected Extension-less Recording:
- Launch isolated Google Chrome with automated Chrome DevTools Protocol (CDP) script injection (
testfly record <url>). - Real-time Server-Sent Events (SSE) streaming of clicks, coalesced keystrokes, and assertions directly to local web studio (
:8765). - Interactive toolbar for one-click visual assertions (
isVisible,isEnabled,hasTextwith exact and contains matching).
- Launch isolated Google Chrome with automated Chrome DevTools Protocol (CDP) script injection (
- 4-in-1 Multi-Framework Java Codegen:
- Live code compilation for Page Object Model (
BasePage), standalone TestNG (BaseTest), JUnit 5 (BaseJUnit5Test), and Cucumber BDD (.feature). - Compiler safeguards preventing syntax errors from Java reserved keywords (e.g.
continueElement). - 1-click "Save to Project" writes production-ready classes directly into
src/test/java/.
- Live code compilation for Page Object Model (
- Architectural Decision Record (ADR-001):
- Documented design decisions, protocol boundaries, and security model for the companion studio and MCP integration.
Added — Model Context Protocol Server (testfly mcp)
- Protocol-Native AI Browser Automation:
- Built-in MCP server exposing 88 live browser automation tools to AI coding assistants (Claude Code, Cursor, GitHub Copilot, JetBrains AI).
- Enables LLMs to inspect live DOM trees, query the accessibility tree, verify layouts, and author robust TestFly tests without hallucinated selectors.
Added — Smart Test Sharder (SmartTestSharder)
- LPT Bin-Packing Test Distribution:
- Implements the Longest Processing Time (LPT) bin-packing algorithm to balance test suite execution across distributed CI worker nodes.
- Minimizes pipeline idle time and achieves optimal parallelization based on historical test duration metrics.
Added — Load & Performance Testing Module
- Dual-Engine Load Testing Architecture:
- Gatling Engine: High-concurrency subprocess execution, automatic simulation generation, stdout/log parsing, and full interactive Gatling HTML report generation linked directly in TestFly reports.
- Lightweight Virtual Thread Engine: Zero-dependency JDK virtual thread engine for developer machines and fast CI/CD feedback loops.
- Fluent Load Testing DSL:
- Declarative scenario builder via
load(path).users(n).rampUp(duration).hold(duration).run()orloadScenario("name").step(...).run(). - Available in
BaseLoadTest(the load-test base class; it starts no browser).
- Declarative scenario builder via
- Annotation-Driven Execution (
@LoadTest):- Configure load test parameters (
users,rampUp,hold,cooldown,engine,baseUrl) directly at test class or method level.
- Configure load test parameters (
- Data Feeders (
LoadTestFeeder):LoadTestFeederfactoriescsv,json,random,uuid,sequence, andconstant, plusfeedCsv/feedJsonshortcuts on the scenario.
- SLA & Latency Assertions (
LoadTestAssert):- Fluent assertions for percentiles (P50, P90, P95, P99), max response time, min throughput (RPS), error rate thresholds, and HTTP status distributions.
- Unified Multi-Channel Reporting:
- TestFly HTML Report: Dedicated "Load Testing" tab with interactive KPI cards (Users, RPS, Total Requests, P95, Error Rate), response time percentiles breakdown, status code distribution, and clickable link to Gatling interactive HTML reports.
- Allure Report Adapter: Adds load test parameters (Users, Engine, RPS, P95, Error Rate), interactive link to Gatling report, summary markdown attachment, and full subprocess execution log attachment.
- ReportPortal Adapter: Sends load test Markdown summary log entries and attaches subprocess execution logs to the test step.
Added — Feature Switchboard
features:master on/off panel — master switchboard intestfly.ymlto effortlessly enable/disable optional subsystems (ai,recording,tracing,network,healing,visual,performance,flakiness,quarantine,testManagement,notifications,consoleErrors).FeatureGate(io.testfly.config.FeatureGate) — unified programmatic gate for feature status.ai.enabledmaster AI switch (defaulttrue) — single switch to gate all AI capabilities.
Changed — HTML Report & Security Hardening
- HTML Report Cupertino Lab Redesign — Modernized report layout with Cupertino Lab aesthetic, improved table density, responsive failure triage cards, and dark mode optimization.
- Flakiness Radar — Visual stability scoring across consecutive test runs.
- Security Sanitization — Added safe DOM rendering and XSS prevention helpers (
escapeHtml,sanitizeUrl,safeText) in HTML report generation. - Repository Security Attributes — Added
.gitattributesto mark vendored libraries and generated files, preventing false positive scanner alerts. - Tolerant
testfly.ymlparsing — Unrecognized configuration keys are logged as warnings rather than crashing startup. - Fail-fast on disabled features — Direct programmatic invocations of disabled features fail clearly rather than silently skipping.
- Homepage Modularization — Separated static data and snippets into
homeData.jsto ensure low code entropy and clean React architecture.
[1.0.4] — 2026-09-07
Added — Agentic Testing & Autonomous AI
- AI-Driven Advanced Self-Healing —
DomPrunercompresses complex web DOM trees to under 8K tokens by stripping non-semantic and decorative nodes.AiHealingEnginesynthesizes replacement locators with LLM reasoning when static fallbacks are exhausted and caches healed locators in.testfly/healed-locators.json; cache hits avoid another AI request but do not guarantee zero execution time. - AI-Powered Self-Remediation & Auto-PR Patches —
SourceCodeLocatormaps runtime failures back to consumer test and page object sources.RemediationPatchGeneratorgenerates clean, unified git diff.patchfiles intotarget/remediations/for single-commandgit applyresolution. - Semantic Natural Language Assertions —
satisfiesAi(condition)andviolatesAi(condition)onPageAssertandLocatorAssert, plusassertWithAi(condition)convenience method inAssertionSupport. Features single-evaluation anti-throttle guard and soft-assertion compatibility. - Goal-Oriented Dynamic Steps (
act) & Compile & Freeze Caching — High-level natural language goal execution viaact(String goal)inActionSupport(BaseTest,BasePage,BaseJUnit5Test,BaseCucumberSteps) andbyIntent(String intent)inLocatorSupport. Compiles user intents into deterministic Selenium action plans and freezes them into.testfly/action-cache.jsonfor instant replay. - Dropdown & Navigation Action Primitives —
ActionType.SELECTpicks a<select>option by visible text through Selenium'sSelect;ActionType.NAVIGATEcallsdriver.get(), passing absolute URLs through and resolving relative paths againstexecution.baseUrl.NAVIGATEbypasses locator parsing, so agent plans can move between pages without a target element. Both are advertised to the LLM byActionCompiler.buildPrompt.
Added — Video Recording
- Playwright-style retain-on-failure recording — Web UI tests are recorded to MP4 and kept only when a test fails; passing tests discard the video automatically
- Real MP4 encoding — videos encoded as H.264 MP4 and embedded as HTML5
<video>players in both TestFly HTML report and Allure report - Headless viewport auto-config — 1920×1080 viewport automatically applied for headless Chrome/Edge when
startMaximizedis set
Added — Network Mocking Framework
- Comprehensive network mocking and assertions — CDP-based request interception with pattern matching, response stubbing, and assertion API for verifying captured requests
Changed
- SessionCache rename —
browser.SessionCache→BrowserSessionCache,precondition.SessionCache→PreconditionSessionCacheto eliminate naming ambiguity .envresolution priority —DotEnvLoadernow resolves${VAR}placeholders with explicit priority:.envfile > shell environment > system property (-D). AddedDotEnvLoader.fromDotEnv(key)to query.envvalues directly. Removeddotenv-javadependency;.envparsing is handled internally.
Added — API Testing Improvements
- HTTP-level retry (
api.retry.*) — config-driven retry for transient failures and status codes (502/503/504); exponential backoff; step-logged withWARN - Per-request timeout override —
apiClient().get("/report").timeout(120).send() - Query parameter builder —
.queryParam("page", 1).queryParam("limit", 10)with URL encoding - Request/Response interceptors —
ApiClient.addRequestInterceptor()andaddResponseInterceptor(); global, thread-safe - Cookie jar —
.withCookies()captures and auto-sends cookies across requests; thread-local - Response time assertion —
res.assertDurationLessThan(500)andassertDurationLessThan(2, TimeUnit.SECONDS) - Header assertions —
assertHeader("Content-Type", "application/json"),assertHeaderPresent("X-Request-Id") - Body regex assertion —
assertBodyMatches("\\d{4}-\\d{2}-\\d{2}")with dotall mode - JSON structure assertions —
assertJsonExists("$.path"),assertJsonNull("$.field"),assertJsonArraySize("$.items", 3) - Configurable truncation limit —
api.truncationLimit: 1000(default 300) - Self-healing locator cache — healed locators persisted across runs for faster recovery
api:
retry:
enabled: true
maxAttempts: 3
backoffMs: 500
retryOnStatus: [502, 503, 504]
retryOnException: true
Added — Report Portal Enhancements
- Auto run type detection — suite test classes scanned;
BaseApiTest→ "API", otherwise → "Web";reporting.reportportal.type: api|web|auto - Enriched launch name —
<name> — <API|Web> | <env> | <timestamp> - Enriched description — run type, context-aware base URL (Web→execution.baseUrl, API→api.baseUrl), environment, user@hostname, CI platform + build info
- CI platform detection — GitHub Actions, Jenkins, GitLab CI, CircleCI, Travis CI, Bitbucket Pipelines, Azure Pipelines
- JUnit 5 → Report Portal —
agent-java-junit5dependency +ReportPortalJUnit5Bridgereflection bridge; JUnit 5 tests push results to RP automatically
reporting:
reportPortal:
enabled: true
launch: "Demo Web - Dev"
type: auto
Fixed
- OAuth2 token cache race condition — double-checked locking prevents thundering herd on expired tokens
- RP launch naming — context-aware base URL selection based on run type (Web vs API)
- Dark theme text visibility — CSS safety nets for all Prism token types; fixed invisible code block text; dark mode overrides for search dropdown, tabs, collapsible, badges, footer
- AI model defaults and validation —
ai.modelis optional and defaults per provider (claude-haiku-4-5-20251001for Claude,gemini-2.5-flashfor Gemini); sanitized Gemini model names against injection - Session cache isolation & script safety —
BrowserSessionCacheandPreconditionSessionCacheclear localStorage before restore and pass items safely via WebDriver script arguments - PreCondition retry vs DataProvider isolation — fixed premature session cache invalidation during multi-row
@DataProviderruns; cache is now only invalidated on true retries (result.wasRetried()) - LocatorAssert failure propagation — restrict caught wait exceptions to
TimeoutExceptionso unexpected browser/WebDriver faults are not masked - Locator withText matching —
Locator.withTextdefaults to case-insensitive substring matching and respects the exact-match parameter - ReportPortal credential guard — skip RP registration when credentials are missing instead of failing the suite
- Headless viewport — automatically configure 1920×1080 viewport for headless Chrome/Edge when
startMaximizedis set
[1.0.0] — 2026-08-20
Changed
- Project rebrand to TestFly — complete identity migration:
- Maven coordinates:
io.testfly:testfly:1.0.0(historical entry: legacy group ID; the current coordinate isio.github.hakanngul:testfly) - Java namespace:
io.testfly - Config file:
testfly.yml - Public API annotation:
@TestFlyApi - Report artifacts:
testfly-report.htmlandtestfly-metrics.json
- Maven coordinates:
Security
- API credentials moved to
${ENV_VAR}placeholders sourced from environment or.envfile.
Build
- Integration tests split into
src/test/java/io/testfly/integration/withmaven-failsafe-plugin qualityMaven profile: JaCoCo, SpotBugs, Checkstyle, PMD
[0.24.0] — 2026-08-15
Fixed
execution.parallelvalidation — now delegates to TestNG'sXmlSuite.ParallelMode;testsandinstancesmodes accepted
[0.23.0] — 2026-07-18
Added
waitForAttribute(By, attribute, value)— exact attribute matchwaitForUrlMatches(String regex)— URL regex matchwaitForTextMatches(By, String regex)— element text regex match
[0.22.0] — 2026-06-26
Fixed
- Report overwrite with multiple test engines —
testfly.reports.dirsystem property honored by all report outputs
[0.21.0] — 2026-06-25
Added
- Accessibility-first locators —
getByRole,getByText,getByLabel,getByPlaceholder,getByTestId,getByAltText,getByTitle getByRole(Role)— 36 WAI-ARIA roles with implicit + explicit matching;.withName(),.withLevel()(corrected from the original count of 38)toBy()escape hatch — returns synthesized SeleniumBy
getByRole(Role.BUTTON).withName("Submit").click();
getByText("Welcome").isVisible();
getByTestId("checkout-btn").click();
[0.20.0] — 2026-06-21
Added
- TestRail —
@TestRailCase("C1234")auto-pushes results; multiple IDs; auto-creates runs - Xray —
@XrayTest("PROJ-123")for Cloud (OAuth2) and Server/DC (Basic auth) - Zero extra dependencies — both use
java.net.http.HttpClient
[0.19.0] — 2026-06-20
Added
- Gradle build support —
testImplementation 'io.testfly:testfly'+test { useTestNG() }(historical entry: legacy group ID; the current coordinate isio.github.hakanngul:testfly) - JUnit XML auto-detects Maven vs Gradle directory layout
FrameworkVersion.get()readsMANIFEST.MF(works with both build tools)
[0.18.0] — 2026-06-20
Added
- Accessibility assertions (axe-core) —
accessibility().withTags("wcag2a","wcag21aa").withLevel(Impact.SERIOUS).run() - axe-core 4.10.2 bundled in JAR — no CDN dependency
[0.17.0] — 2026-05-19
Added
- Performance assertions (Core Web Vitals) —
assertPerformance().lcp().isBelow(2500).cls().isBelow(0.1) performance.captureOnEveryTest: true— ⚡ metrics strip in HTML report
[0.16.0] — 2026-05-17
Added
- Test quarantine —
testfly-quarantine.ymlfor permanent test skipping; TestNG, JUnit 5, Cucumber support
[0.15.0] — 2026-05-12
Added
- External
@TestDatasources —csv:,excel:(Apache POI),db:(JDBC) prefixes TestClock—clock().set("2030-01-01T00:00:00Z")freezes browser time;clock().advance()fast-forwards
[0.14.0] — 2026-05-04
Added
- BrowserStack —
execution.mode: browserstack; W3C capabilities; mobile devices; session URL in report - Sauce Labs —
execution.mode: saucelabs; three regions
[0.13.0] — 2026-05-04
Added
- Email verification —
mailbox().waitForEmail(to("[email protected]")); Mailhog, Mailtrap, Outlook, IMAP email.assertSubject(),email.assertBodyContains(),email.extractLink()
[0.12.0] — 2026-05-03
Added
@NoBrowser— skip WebDriver creation; ideal for DB/API-only tests
[0.11.0] — 2026-05-03
Added
- Multi-session testing —
withSession("alice", () -> { ... }); named browser sessions - Database assertions —
db().assertRowExists(),db().query(),db().scalar(); plain JDBC
[0.10.0] — 2026-05-03
Added
@Retryablefor JUnit 5 —InvocationInterceptorwith driver recreation@Retryablefor Cucumber — full scenario rerun from step 1
[0.9.0] — 2026-05-02
Added
- JUnit 5 support —
TestFlyExtension(@ExtendWith); full lifecycle management WebDriverinjectable as test method parameterBaseJUnit5Testbase class;TestFlyLauncherListenervia ServiceLoader
[0.8.0] — 2026-05-02
Added
- Cucumber integration —
BaseCucumberTest+BaseCucumberSteps; auto driver lifecycle per scenario CucumberStepLoggerpipes Gherkin steps into HTML report
[0.7.0] — 2026-04-16
Added
- Self-healing locators — fallback through
id,name,text,class,data-testid;⚠ healedbadge - AI failure analysis — root-cause + fix suggestion in HTML report via AI model
- Flakiness prediction — STABLE/WATCH/HIGH classification; Flakiness Radar card
[0.6.0] — 2026-04-16
Added
- Trace viewer — self-contained HTML trace per failed test; step timeline with screenshots
- Visual regression —
VisualAssert.assertScreenshot()pixel comparison; auto-baseline - Device emulation —
DeviceEmulator.emulate("iPhone 14"); 6 built-in profiles - Network interception —
NetworkMock.stub(pattern)via CDP - Fluent Locator API —
find(css)chainable;filter(),withText(),nth() - Web-first assertions —
assertThat(By)withisVisible,hasText,count
[0.5.0] — 2026-04-07
Added
- Shadow DOM helpers —
shadowFind,shadowClick,shadowPierce - Angular/React waits —
waitForAngular(),waitForReactHydration() - Enhanced HTML report — pass rate gauge, donut chart, dark mode, search
- Allure adapter — opt-in Allure 2 JSON results
- Slack / Teams notifications — webhook-based post-suite summary
@DependsOnApi— skip test if endpoint unreachable
[0.4.0] — 2026-03-28
Added
- Schema validation —
res.assertSchema("schemas/user.json") @UseAuthannotation — apply named auth strategy from config- OAuth2 client credentials —
ApiAuth.oauth2()with token caching
[0.3.0] — 2026-03-25
Added
BaseApiTest— pure API testing without browserApiClient— fluent HTTP client (JDKHttpClient)ApiResponse— JSONPath extraction, fluent assertionsApiAuth— Bearer token and Basic auth strategiesScenarioContext/SuiteContext— thread-local and global state stores
[0.2.0] — 2026-03-22
Added
@TestData— annotation-driven test data from JSON/YAML; env overrides- Browser matrix — run every test on every browser in one
mvn test SessionCache— cross-thread session reuse- Soft assertions — collect failures, flush at test end
[0.1.0] — 2026-03-16
Added
BaseTest— test base class with framework lifecycleBasePage— page object base:click,type,getText,withinFrameWaitEngine— centralized explicit waitsLocator— fluent auto-waiting locator chainStepLogger— named steps with timestamps and screenshotsDriverManager— thread-local WebDriver lifecycletestfly.yml— convention-over-configuration YAML- HTML report — tabbed dashboard, pass rate gauge, retry badges
- JUnit XML + CI auto-detection (GitHub Actions, Jenkins, CircleCI, GitLab CI)
- Build quality gates — pass-rate and flaky-test thresholds
- Plugin system — SPI-based
TestFlyPlugin, custom driver providers, report adapters @PreCondition— session-aware pre-conditions with cookie caching@Retryable— per-method retry with config- Chrome + Firefox providers with auto download directory
- Console error collector, download manager, iFrame helpers, alert handling