cucumber-js
cucumber-js copied to clipboard
On Failure get the details of feature file and error code snippet
Hi Team,
I'm implementing AI prompt for failed TC and I require below details, Kindly let me know how to get
- Steps from Feature file till failure Example: ✔ Given the user can open "@TD:google" ✖ Then the user sees page "google1"
- Error code snippet Example code snippet based on //src/main/typescript/pages/desktop/basic_page.ts:36:7
Console logs for failure
✔ Before # src/main/typescript/hooks/hooks.ts:41
✔ Given the user can open "@TD:google" # src/test/steps/basic_steps.ts:7
✖ Then the user sees page "google1" # src/test/steps/basic_steps.ts:11
locator._expect: selector: expected string, got undefined
at BasicPage.
- And the user can open "@TD:yahoo" in new window # src/test/steps/basic_steps.ts:16
- Then the user sees page "yahoo" # src/test/steps/basic_steps.ts:11 ✔ After # src/main/typescript/hooks/hooks.ts:57