Get self-healing report API in Test Reporting & Analytics
Use this API to get the self-healing report for a specific build run. The API returns a presigned URL. Access the presigned URL to download the full report, which includes the overall healing status, aggregated metrics, and per-session healing logs with the original and healed locators.
Get self-healing report
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
https://api-automation.browserstack.com/ext/v1/builds/3543140d886164300f2188d68feafd2b86bacc69/selfHealingReport
-
build_uuid* String
The unique identifier of the build run for which you want to retrieve the self-healing report.
Response attributes 200 OK JSON
The API returns a presigned URL and an expiry timestamp. To get the full self-healing report, access the presigned URL, which returns detailed healing data as described in Presigned URL response attributes below.
API response
{
"presignedUrl": "https://s-selenium-logs-aps.s3.ap-south-1.amazonaws.com/17ef9a26ead241d62fe5d101d9e985ca8d7e9/17ef9a26ead241d62fe5d101d9e985ca8d7e9_healingReport.json?X-Amz-Security-Token=IQoJ3JpZ2luX2VjEKP%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMSJHMEUCIQCRkuup8a5iAkoqTSvpQMXelGNRJGupdLGFAIHtlQq0gIgGdrFHap6UHiR9%2BFWwpy5eEV2iE%2F7UyEVgg3vc%2FLKxIqhgUIaxAAGgw3Mzc5NjMxMjM3MzYiDIDQc3OA4SvYxhvsSrjBOC2VEQ5go1FVnnSuSmxvYjuwNdEh34F5jotSgW2jq1lvft6yOY8xwgPNr%2BWU7V3a0e8h1DGk%2BphNHk3B6%2FPS1uRUVSvGBWfwyT8Xtk%2FelTmOHUn7JckfQjV6Utedp50zcdCol52ot1E82DQ0now%2BDSJofh2gJed7kGOFpiEGyxZslx0IXAzhKrchfoY3AKVSSDnANYFesGMPNq2z5W97kJ4hUgV%2FrUHtxRifqa4FedDidh5LVdwuU%2FOinWFu0nj9AlvQBO5KjOWc3RReDeKEm1s4cW4USRqZZnLg%2BBGH5fwWQEJpoL21Xep68E0IzaK5A6F7J7AaoWclcl2rIW0dHGWe2nBAZjgxJFKtFaMpVjVjcewTuNlVHlkjR5CP2cuOfh%2FcIuwBfk48%2BTMhc2GJfMovwZ%2BPJncrA%2BtFpCM2NS96qvuL5S6KOG555%2Bh5Jfo8TLY59509n9YETC8UOZcveoctuAR%2F%2BivFifZH1moKqPFXRw3dhQcAiwtoCjCwmvFOtta5VRdGsN7DD1617sxBeDo%2BCOTWI5ZEqEB6DOOtNHe5ORQYJXEWYUstO80t7nLQN11QvTjrZO5GV9dh0oK4RDtv0Dm03xC1DbE02DTWTTmcNoWvvYyarImPfzEvR5Mv3O1fi9EtWQMMMIxyqW1LRlyY84LuFviyTyoDySnUmdkcu%2BnNSdfxG92M1atQmy%2B%2FWVCikcC%2B1CuBCpyrhdWtJHQBOtdruwCXLO%2F8t%2FThS87CoBYwluFdhk%2Fqs3w%2BsxTV4wxnHBwxmrt3VK%2Fc6rgdziiYc%2FUx8eTrLpjz%2BeMxMOyDuc4GOpgBR3U%2BMgi1LjU0ZqKG08ZEtAHCqLFotnruJFrJz9jhlP6CcczkLi01HHnajBM0V9rwGhhM%2BBUyrgDEY8sP2ZjUQLKXTfVoHZemv%2Bvk%2Bnx5zsgH%2BI4SB851CF5sjnH3inHXA8%2BlgKVuqLeBEWD2IRAcidXpvtmwn0SShnoMTmNnOCVNyzlIcwq8IT38tPv%2BrXs5t1a9HiBpM%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20260402T101613Z&X-Amz-SignedHeaders=host&X-Amz-Expires=1799&X-Amz-Credential=ASIA2XUQHUQMJ3DMIQGW%2F20260402%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Signature=40c416aed9754c001e479867fff796cce971544dd4a9685e9c82434e5f",
"expiresAt": "2026-04-02T10:46:13.386Z"
}
-
presigned_url String
A presigned URL to download the full self-healing report in JSON format. The report includes report_meta, healing_logs, healing_attempted_logs, and session_url. The URL is valid for a limited time.
-
expiresAt String
The timestamp indicating when the presigned URL will expire and the report will no longer be available for download.
Presigned URL response attributes
When you access the presigned_url, you get the full self-healing report in JSON format.
Presigned URL response
{
"report_meta": {
"report_name": "Healing Report-Mocha-Manual-Build-Implicit-Wait",
"build_name": "Mocha-Manual-Build-Implicit-Wait",
"build_uuid": "17ef9a26ead241d62fe5d101d9e985ca8d7e9",
"build_number": 115720424,
"user": "10526345",
"healing_build_status": "Healed",
"metrics": {
"distinct_locators_healed_count": 1,
"total_distinct_locators_healed": 2,
"distinct_locators_healed_percentage": 50.0,
"tests_stabilized_count": 1,
"total_tests_stabilized": 1,
"tests_stabilized_percentage": 100.0
}
},
"healing_logs": [
{
"session_id": "096f5f1782e0cc77f9d68ce9e6a7760e50979fe",
"session_name": "Self-Heal Test Run",
"product": "automate",
"os": "win11",
"browser": "chrome",
"browser_version": "138.0",
"healed_selectors": [
{
"original_locator": {
"type": "css selector",
"value": "span#modalClose"
},
"timestamp": "2026-04-02T05:29:07.322Z",
"healed_locator": {
"type": "css selector",
"value": "span.modal-close"
},
"healing_thought": "The original selector failed. An alternative element was identified using the historical context and intent of the locator.",
"healed_element_screenshot_url": "https://automate.browserstack.com/s3-debug/browserstack-debug-screenshots-prod-aps1/096f5f1782e0cc77f9d68ce9e6a7760e50979fe/healing-screenshot-1775107747321.png"
},
{
"original_locator": {
"type": "css selector",
"value": "span#modalClose"
},
"timestamp": "2026-04-02T05:29:22.107Z",
"healed_locator": {
"type": "css selector",
"value": "span.modal-close-llm"
},
"healing_thought": "The original selector failed. An alternative element was identified using the historical context and intent of the locator.",
"healed_element_screenshot_url": "https://automate.browserstack.com/s3-debug/browserstack-debug-screenshots-prod-aps1/096f5f1782e0cc77f9d68ce9e6a7760e50979fe/healing-screenshot-1775107762106.png"
}
],
"healing_attempted_logs": [],
"session_url": "https://automation.browserstack.com/projects/Self-Heal+Project/builds/Mocha-Manual-Build-Implicit-Wait/7?tab=sessions&details=096f5f1782e0cc77f9d68ce9e6a7760e50979fe"
}
]
}
-
report_meta Object
▶ SHOW VALUESAn object containing metadata about the self-healing report and aggregated healing metrics for the build.
-
report_name String
The display name of the self-healing report.
-
build_name String
The name of the build run associated with this report.
-
build_uuid String
Unique identifier of the build run.
-
build_number Integer
Serial number of the build run generated by Test Reporting & Analytics.
-
user String
User identifier of the person who initiated the build run.
-
healing_build_status String
Overall healing status of the build run. Possible values are “Healed” and “Not Healed”.
-
metrics Object
▶ SHOW VALUESAn object containing aggregated self-healing metrics for the build run.
-
distinct_locators_healed_count Integer
The number of distinct locators that were successfully healed in this build run.
-
total_distinct_locators_healed Integer
The total number of distinct locators that were identified for healing across the build run.
-
distinct_locators_healed_percentage Float
The percentage of distinct locators that were successfully healed out of the total identified for healing.
-
tests_stabilized_count Integer
The number of test sessions that were stabilized through self-healing in this build run.
-
total_tests_stabilized Integer
The total number of test sessions that required stabilization through self-healing.
-
tests_stabilized_percentage Float
The percentage of test sessions that were successfully stabilized through self-healing.
-
-
-
healing_logs Array
▶ SHOW VALUESAn array of healing log objects, one per test session, containing details of all selectors healed during that session.
-
session_id String
Unique identifier of the test session in which the healing occurred.
-
session_name String
Name of the test session.
-
product String
The BrowserStack product on which the session ran. For example, “automate”.
-
os String
The operating system on which the test session ran. For example, “win10”.
-
browser String
The browser used for the test session. For example, “chrome”.
-
browser_version String
The version of the browser used for the test session.
-
healed_selectors Array
▶ SHOW VALUESAn array of objects representing each locator that was healed during the session.
-
original_locator Object
▶ SHOW VALUESAn object describing the original locator that failed and triggered the healing process.
-
type String
The strategy used by the locator. For example, “css selector” or “xpath”.
-
value String
The value of the locator.
-
-
timestamp String
The ISO 8601 timestamp of when the healing occurred.
-
healed_locator Object
▶ SHOW VALUESAn object describing the alternative locator that was used as a replacement after healing.
-
type String
The strategy used by the locator. For example, “css selector” or “xpath”.
-
value String
The value of the locator.
-
-
healing_thought String
A description of the reasoning used by the self-healing engine to identify and apply the alternative locator.
-
healed_element_screenshot_url String
URL to the screenshot of the healed element captured during the session.
-
-
-
healing_attempted_logs Array
▶ SHOW VALUESAn array of attempted healing log objects, containing details of all selectors for which healing was attempted but not successful during that session.
-
session_id String
Unique identifier of the test session in which the healing occurred.
-
session_name String
Name of the test session.
-
product String
The BrowserStack product on which the session ran. For example, “automate”.
-
os String
The operating system on which the test session ran. For example, “win10”.
-
browser String
The browser used for the test session. For example, “chrome”.
-
browser_version String
The version of the browser used for the test session.
-
healed_selectors Array
▶ SHOW VALUESAn array of objects representing each locator that was healed during the session.
-
original_locator Object
▶ SHOW VALUESAn object describing the original locator that failed and triggered the healing process.
-
type String
The strategy used by the locator. For example, “css selector” or “xpath”.
-
value String
The value of the locator.
-
-
timestamp String
The ISO 8601 timestamp of when the healing occurred.
-
healed_locator Object
▶ SHOW VALUESAn object describing the alternative locator that was used as a replacement after healing.
-
type String
The strategy used by the locator. For example, “css selector” or “xpath”.
-
value String
The value of the locator.
-
-
healing_thought String
A description of the reasoning used by the self-healing engine to identify and apply the alternative locator.
-
healed_element_screenshot_url String
URL to the screenshot of the healed element captured during the session.
-
-
-
session_url String
A URL to the BrowserStack dashboard where you can view detailed information about the test sessions included in the self-healing report.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.