To retry failed XCUITest cases on BrowserStack App Automate, submit the suite through its XCUITest builds API with retryTestsOnFailure: true and set testIterations to an integer from 1 to 5. The API retry options require iOS 15 or later and do not work when singleRunnerInvocation is true. For xctestrun builds, configure test repetition in the XCTestPlan instead.
Configure retries in the XCUITest builds API
Use the API path when you submit an XCUITest build and want BrowserStack to retry individual failed test cases. The parameters correspond to Xcode’s -retry-tests-on-failure and -test-iterations options. BrowserStack documents testIterations as greater than zero and no more than five.
- Confirm the build is an App Automate XCUITest build targeting iOS 15 or later. See BrowserStack’s XCUITest getting-started guide.
- Submit the build to
POST /app-automate/xcuitest/v2/buildwith retries enabled and a chosen iteration limit. For example, the following JSON illustrates three iterations; choose a limit that fits the suite’s debugging needs and runtime budget:{"devices":["<device selection>"],"app":"<app_url>","testSuite":"<test_suite_url>","retryTestsOnFailure":true,"testIterations":3} - Leave
singleRunnerInvocationfalse (the default) if failed cases must be isolated and rerun individually.
With retries enabled, a case that fails is run again until it passes or reaches the configured iteration count. The case’s displayed status after multiple runs is the status of its last attempt. A final pass therefore does not show whether an earlier attempt failed; inspect that attempt’s logs when diagnosing intermittent behavior. The retry documentation describes the API settings and their limits.
Choose the right retry method for the build
BrowserStack documents two paths, depending on how the test suite is supplied:
Recommended Free Tools
#1 Best Overall
- AN AMAZING MAC AT A SURPRISING PRICE — With an incredibly portable and durable aluminum design, up to 16 hours of battery life,* and the A18 Pro chip, MacBook Neo is ready to go wherever school takes you.
- FOUR STUNNING COLORS. ONE DURABLE DESIGN — Choose from four beautiful colors — Silver, Blush, Citrus, or Indigo — each with a color-coordinated keyboard. And MacBook Neo is made with a durable recycled aluminum enclosure that helps it reach 60 percent recycled content by weight — the most ever in any Apple product.*
- FLY THROUGH EVERYDAY ASSIGNMENTS — Whether you’re cramming for finals, using Apple Intelligence* to summarize class notes, creating presentations, or even playing the latest Apple Arcade game,* MacBook Neo delivers the performance and AI capabilities you need to get things done.
- UP TO 16 HOURS OF BATTERY LIFE — MacBook Neo delivers all day battery life, so you can power through from early morning classes to late night study sessions without worrying about plugging in.
- A VIBRANT 13-INCH DISPLAY* — The gorgeous Liquid Retina display on MacBook Neo supports 1 billion colors, so photos and videos pop and text is crisp for easy reading.
| Build path | Where to set repetition | Important constraint |
|---|---|---|
| XCUITest build submitted through the REST API | Set retryTestsOnFailure and testIterations in the build request. |
API retry options require iOS 15 or later and are incompatible with singleRunnerInvocation=true. |
| xctestrun build using an XCTestPlan | Set the plan’s Test Repetition Mode. | Available modes have different stopping behavior; select the one that matches the intended run. |
For an xctestrun build, use the repetition mode in the XCTestPlan. BrowserStack lists Retry on Failure, Up Until Maximum Repetitions, Until Failure, and None. Retry on Failure reruns a test where failure occurred; Up Until Maximum Repetitions uses the configured maximum; Until Failure continues until a failure occurs; None does not repeat. See BrowserStack’s XCTestPlan advanced-use-cases guide for this route.
Interpret the result instead of treating a retry as a fix
A retry can surface a transient failure and reduce manual reruns, but a later pass does not establish that an application bug is fixed. Check the failed attempt and classify what happened before deciding whether the test is genuinely flaky or the underlying issue remains.
Rank #2
- BUILT FOR COLLEGE. AND BEYOND — MacBook Air with the M5 chip packs blazing speed and powerful AI capabilities into an incredibly portable design. And with up to 18 hours of battery life,* this thin and light powerhouse is ready to take on almost any major, just about anywhere.
- TEAR THROUGH TOUGH ASSIGNMENTS — With its faster CPU and unified memory, the M5 chip delivers even more performance and fluidity across apps, making multitasking and creative workflows smooth and responsive. A powerful Neural Engine and next-generation GPU with Neural Accelerators give you a powerful platform for AI.
- MAKE QUICK WORK OF YOUR TO-DO LIST — Apple Intelligence helps you write, express yourself, and get things done effortlessly — whether it’s for school or everyday life. With groundbreaking privacy protections, it gives you peace of mind that no one else can access your data — not even Apple.*
- UP TO 18 HOURS OF BATTERY LIFE — MacBook Air delivers incredible battery life with amazing performance, so you can power through a full day of classes without worrying about plugging in.
- A BRILLIANT 13.6-INCH DISPLAY* — The gorgeous Liquid Retina display on MacBook Air supports 1 billion colors, making photos and videos pop with rich contrast and sharp detail, and text appears supercrisp. So everything — from class presentations to movies to games — looks truly stunning.
- Assertion or repeatable app failure: investigate the application behavior and test assumptions; a retry does not resolve a deterministic failure.
- Runner communication or process crash: BrowserStack documents
testRelaunchEnabledas an option to use alongside retry and iterations for these scenarios. It is not a general-purpose setting for every failure. - Device or network issue: compare the available device and network logs, if those logs were enabled for the run.
- Failure followed by pass: retain the earlier attempt’s evidence and look for repeatability or signs of infrastructure or runner instability.
Find logs and inspect failed attempts
The App Automate XCUITest session API exposes per-test status and debugging fields, including instrumentation logs and, when enabled, device and network logs. BrowserStack also provides crash-log retrieval for OS-generated iOS reports and an endpoint for downloading an XCUITest result bundle that can be opened in a compatible Xcode editor. See the XCUITest session API reference.
Quick Recap
Best Value
- SUPERCHARGED BY M5 — The 14-inch MacBook Pro with M5 brings next-generation speed and powerful on-device AI to personal, professional, and creative tasks. Featuring all-day battery life and a breathtaking Liquid Retina XDR display with up to 1600 nits peak brightness, it’s pro in every way.*
- HAPPILY EVER FASTER — Along with its faster CPU and unified memory, M5 features a more powerful GPU with a Neural Accelerator built into each core, delivering faster AI performance. So you can blaze through demanding workloads at mind-bending speeds.
- BUILT FOR APPLE INTELLIGENCE — Apple Intelligence is the personal intelligence system that helps you write, express yourself, and get things done effortlessly. With groundbreaking privacy protections, it gives you peace of mind that no one else can access your data — not even Apple.*
- ALL-DAY BATTERY LIFE — MacBook Pro delivers the same exceptional performance whether it’s running on battery or plugged in.
- APPS FLY WITH APPLE SILICON — All your favorites, including Microsoft 365 and Adobe Creative Cloud, run lightning fast in macOS.*
Rank #4
- AN AMAZING MAC AT A SURPRISING PRICE — With an incredibly portable and durable aluminum design, up to 16 hours of battery life,* and the A18 Pro chip, MacBook Neo is ready to go wherever school takes you.
- FOUR STUNNING COLORS. ONE DURABLE DESIGN — Choose from four beautiful colors — Silver, Blush, Citrus, or Indigo — each with a color-coordinated keyboard. And MacBook Neo is made with a durable recycled aluminum enclosure that helps it reach 60 percent recycled content by weight — the most ever in any Apple product.*
- FLY THROUGH EVERYDAY ASSIGNMENTS — Whether you’re cramming for finals, using Apple Intelligence* to summarize class notes, creating presentations, or even playing the latest Apple Arcade game,* MacBook Neo delivers the performance and AI capabilities you need to get things done.
- UP TO 16 HOURS OF BATTERY LIFE — MacBook Neo delivers all day battery life, so you can power through from early morning classes to late night study sessions without worrying about plugging in.
- A VIBRANT 13-INCH DISPLAY* — The gorgeous Liquid Retina display on MacBook Neo supports 1 billion colors, so photos and videos pop and text is crisp for easy reading.
Rank #3
- AN AMAZING MAC AT A SURPRISING PRICE — With an incredibly portable and durable aluminum design, up to 16 hours of battery life,* and the A18 Pro chip, MacBook Neo is ready to go wherever school takes you.
- FOUR STUNNING COLORS. ONE DURABLE DESIGN — Choose from four beautiful colors — Silver, Blush, Citrus, or Indigo — each with a color-coordinated keyboard. And MacBook Neo is made with a durable recycled aluminum enclosure that helps it reach 60 percent recycled content by weight — the most ever in any Apple product.*
- FLY THROUGH EVERYDAY ASSIGNMENTS — Whether you’re cramming for finals, using Apple Intelligence* to summarize class notes, creating presentations, or even playing the latest Apple Arcade game,* MacBook Neo delivers the performance and AI capabilities you need to get things done.
- UP TO 16 HOURS OF BATTERY LIFE — MacBook Neo delivers all day battery life, so you can power through from early morning classes to late night study sessions without worrying about plugging in.
- A VIBRANT 13-INCH DISPLAY* — The gorgeous Liquid Retina display on MacBook Neo supports 1 billion colors, so photos and videos pop and text is crisp for easy reading.
- Locate the affected test and review its individual status and instrumentation logs, including earlier attempts when it was retried.
- Check device and network logs if you enabled the corresponding logging parameters for the run.
- For a crash, retrieve the crash log; for deeper examination, download the result bundle and open it in a compatible Xcode editor.
Troubleshoot retries that do not happen
- The target is earlier than iOS 15: the API-based retry options are not supported before iOS 15. Check the device selection and target OS, or use the XCTestPlan repetition path if appropriate to your xctestrun build.
singleRunnerInvocationis true: BrowserStack cannot isolate and rerun an individual case when all cases execute together in one process. Set it to false for per-test retries.testIterationsis invalid: use an integer from 1 through 5; zero and values above five are outside the documented range.- A retry ends in a pass but the suite still seems flaky: the displayed status reflects the last attempt. Review earlier-attempt instrumentation and relevant device or network logs rather than treating the final status as a full account of the run.
- The test runner loses communication or crashes: consider
testRelaunchEnabledtogether with the retry settings for these documented runner/process scenarios, then inspect crash and session evidence.
Or skip the browser setup
For website screenshots—not iOS test execution—ScreenshotNeo is a screenshot API and MCP server. Its one-call API can return an image or PDF, with options for clean captures that accept consent banners and remove supported popups and chat widgets. It is a separate tool from App Automate and does not retry XCUITest cases.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. Cookie banners, popups and chat widgets are removed before the shot; bot checks, blank pages and failed loads are never billed. An MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo free.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




