cucumber-js icon indicating copy to clipboard operation
cucumber-js copied to clipboard

On Failure get the details of feature file and error code snippet

Open prince-inbaraj-sky opened this issue 7 months ago • 0 comments

Hi Team,

I'm implementing AI prompt for failed TC and I require below details, Kindly let me know how to get

  1. Steps from Feature file till failure Example: ✔ Given the user can open "@TD:google" ✖ Then the user sees page "google1"
  2. 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. (//src/main/typescript/pages/desktop/basic_page.ts:36:7) at fulfilled (/src/main/typescript/pages/desktop/basic_page.ts:38:58)

  • 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

prince-inbaraj-sky avatar May 02 '25 09:05 prince-inbaraj-sky