kubeshop / tracetest

🔭 Tracetest - Build integration and end-to-end tests in minutes, instead of days, using OpenTelemetry and trace-based testing.
https://docs.tracetest.io/
Other
983 stars 71 forks source link

Support triggering frontend applications via headless browser #3106

Open mathnogueira opened 10 months ago

mathnogueira commented 10 months ago

Is your feature request related to a problem? Please describe. @b2ronn opened #3104 because when triggering his frontend application via Tracetest, it would not generate any traces at all. This is happening because of two reasons:

  1. Our HTTP trigger implementation doesn't interpret the result of the HTTP response, thus all requests are just fetched as a blob of text and the application JavaScript code is not executed.
  2. Some tracing solutions (in this case, Elastic APM RUM) require a real browser to execute the request, otherwise they don't generate any telemetry data.

Describe the solution you'd like We could ship tracetest with some small headless browser and have a special trigger for it, acting just like our HTTP Trigger sending all the required headers for propagating the trace context. It would also require a script field where you could place the javascript code for triggering the test (not all tests will be executable by entering the page, some might require clicking on buttons, filling forms, etc).

Additional context Add any other context or screenshots about the feature request here.

jorgeepc commented 10 months ago

We have a research ticket for this: https://github.com/kubeshop/tracetest/issues/2544