Open lvaylet opened 2 years ago
After some initial tests in #360, I am not sure how to write end-to-end tests for timeseries and results (SLOs) that change all the time and depend on the time the tests are executed.
I can keep using Cucumber and Gherkin to write tests that are time-independent. For example to check that the SLO Generator API exposed in a Cloud Run service is available and return the right type of response. I might not be able to test the correctness of the response though, as the actual results change all the time.
What about using the new Synthetic Monitors (currently in Preview) to mimic the behavior of end users and go beyond simple uptime checks?
Replacing (or enhancing) end-to-end tests with Synthetic Monitoring (based on Mocha) sounds like a great idea indeed. Elastic wrote this article in Dec 2021: https://www.elastic.co/blog/why-and-how-replace-end-to-end-tests-synthetic-monitors. Synthetic Monitoring can be used to continuously check the behavior of the service, and it looks like synthetic journeys can be used in CI too.
Other articles: Proactive API Testing and Best practices for creating end-to-end tests by Datadog Synthetic monitoring by Dynatrace
We have unit and integration tests. Let's add e2e tests, for example with Cucumber and Gherkin: https://cucumber.io/docs/guides/overview/
@BrunoReboul uses this approach for https://github.com/BrunoReboul/ram