-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Heartbeat] Add integration tests for browser monitors #31999
Labels
Heartbeat
Team:obs-ds-hosted-services
Label for the Observability Hosted Services team
technical debt
Comments
andrewvc
added
Heartbeat
Team:obs-ds-hosted-services
Label for the Observability Hosted Services team
technical debt
labels
Jun 21, 2022
Pinging @elastic/uptime (Team:Uptime) |
6 tasks
mergify bot
pushed a commit
that referenced
this issue
Aug 8, 2022
Fixes #31999 This PR turned out to be a bit of a monster. The main thing it does is add testing for functional 'scenarios', that is testing full heartbeat configs and the events they output going through all heartbeat specific code using the libbeat factory interface. This lets us do something sort of close to functional testing, where instead of using the heartbeat binary we actually use this factory interface. This gets us pretty close with a much simpler testing experience that's easier to debug and faster to run. It probably won't miss any error conditions from generating the full binary. This also cleans up a bunch of linter issues in modified files, which is a bit distracting, things like missing error return values, shadowed variable names etc. Finally, the new scenario test this adds, which checks that all events always contain a check group, revealed two bugs: Synthetics test runs create an empty event at the start of each run (with no check group) Any synth events prior to a journey start event would be missing a check group This PR fixes this by: Moving the check group generation code for synthexec up to the stream enricher, rather than the journey enricher. Creating the check group UUIDs after journeys end, rather than waiting for them to start. The synthetics node agent can produce output before any journey starts (cherry picked from commit 3fe6871)
andrewvc
added a commit
to andrewvc/beats
that referenced
this issue
Aug 8, 2022
Fixes elastic#31999 This PR turned out to be a bit of a monster. The main thing it does is add testing for functional 'scenarios', that is testing full heartbeat configs and the events they output going through all heartbeat specific code using the libbeat factory interface. This lets us do something sort of close to functional testing, where instead of using the heartbeat binary we actually use this factory interface. This gets us pretty close with a much simpler testing experience that's easier to debug and faster to run. It probably won't miss any error conditions from generating the full binary. This also cleans up a bunch of linter issues in modified files, which is a bit distracting, things like missing error return values, shadowed variable names etc. Finally, the new scenario test this adds, which checks that all events always contain a check group, revealed two bugs: Synthetics test runs create an empty event at the start of each run (with no check group) Any synth events prior to a journey start event would be missing a check group This PR fixes this by: Moving the check group generation code for synthexec up to the stream enricher, rather than the journey enricher. Creating the check group UUIDs after journeys end, rather than waiting for them to start. The synthetics node agent can produce output before any journey starts
cmacknz
pushed a commit
that referenced
this issue
Aug 24, 2022
Fixes #31999 This PR turned out to be a bit of a monster. The main thing it does is add testing for functional 'scenarios', that is testing full heartbeat configs and the events they output going through all heartbeat specific code using the libbeat factory interface. This lets us do something sort of close to functional testing, where instead of using the heartbeat binary we actually use this factory interface. This gets us pretty close with a much simpler testing experience that's easier to debug and faster to run. It probably won't miss any error conditions from generating the full binary. This also cleans up a bunch of linter issues in modified files, which is a bit distracting, things like missing error return values, shadowed variable names etc. Finally, the new scenario test this adds, which checks that all events always contain a check group, revealed two bugs: Synthetics test runs create an empty event at the start of each run (with no check group) Any synth events prior to a journey start event would be missing a check group This PR fixes this by: Moving the check group generation code for synthexec up to the stream enricher, rather than the journey enricher. Creating the check group UUIDs after journeys end, rather than waiting for them to start. The synthetics node agent can produce output before any journey starts (cherry picked from commit 3fe6871) Co-authored-by: Andrew Cholakian <[email protected]>
chrisberkhout
pushed a commit
that referenced
this issue
Jun 1, 2023
Fixes #31999 This PR turned out to be a bit of a monster. The main thing it does is add testing for functional 'scenarios', that is testing full heartbeat configs and the events they output going through all heartbeat specific code using the libbeat factory interface. This lets us do something sort of close to functional testing, where instead of using the heartbeat binary we actually use this factory interface. This gets us pretty close with a much simpler testing experience that's easier to debug and faster to run. It probably won't miss any error conditions from generating the full binary. This also cleans up a bunch of linter issues in modified files, which is a bit distracting, things like missing error return values, shadowed variable names etc. Finally, the new scenario test this adds, which checks that all events always contain a check group, revealed two bugs: Synthetics test runs create an empty event at the start of each run (with no check group) Any synth events prior to a journey start event would be missing a check group This PR fixes this by: Moving the check group generation code for synthexec up to the stream enricher, rather than the journey enricher. Creating the check group UUIDs after journeys end, rather than waiting for them to start. The synthetics node agent can produce output before any journey starts
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Heartbeat
Team:obs-ds-hosted-services
Label for the Observability Hosted Services team
technical debt
To prevent more bugs like #31997 we need better integration tests for browser and lightweight monitors. The python ones are hard to maintain.,
latest
andstable
NPM labelsThe text was updated successfully, but these errors were encountered: