1

How can we log a debug info (like debug id / UUID String / Random Unique Str) for each scenario to the karate report.

It will be useful in Http service/API layer and karate report to track each scenario / service transaction.

i.e., doc string karate / cucumber html report

Other Info: XXXX
Unique Debug Id: 175ee69c-ddc1-11ed-b5ea-0242ac120002

And this will be passed to API 175ee69c-ddc1-11ed-b5ea-0242ac120002 as well (via header/request body).

And we're trying to log the debug id by using the some JS/Java util with background section and publishing the same in reports.

Andrey Popov
  • 7,362
  • 4
  • 38
  • 58
Divya
  • 65
  • 4

1 Answers1

1

Typically teams add a unique header to each HTTP call by an approach similar to this: https://github.com/karatelabs/karate#http-header-manipulation

Else look at the RuntimeHook: https://stackoverflow.com/a/59080128/143475

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248