Skip to content
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

[AO] Test scenarios for the new threshold rule #161237

Closed
4 tasks done
maryam-saeidi opened this issue Jul 5, 2023 · 3 comments · Fixed by #167757
Closed
4 tasks done

[AO] Test scenarios for the new threshold rule #161237

maryam-saeidi opened this issue Jul 5, 2023 · 3 comments · Fixed by #167757
Assignees
Labels
Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.10.0

Comments

@maryam-saeidi
Copy link
Member

maryam-saeidi commented Jul 5, 2023

📝 Summary

We want to have good test coverage for the new threshold rule. In this ticket, we cover scenarios that we want to implement for this new rule.
We need to cover AAD fields as much as possible for all scenarios. We can ignore checking all the fields.

Test location
https://github.com/elastic/kibana/tree/main/x-pack/test/alerting_api_integration/observability/custom_threshold_rule

We also need to consider testing permission. We can use different permissions for different scenarios and not add another scenario for it.

  • one with a superuser
  • one with write access for that feature
  • one with read access for that feature

🧾 Scenario 1 - Conditions and fields types

  • Multiple conditions with different types of fields (such as number, string, percent) without grouping (Can we have one condition for every condition type? 😄)
    -- Verifying if the reason was generated in the correct field format
    -- Make sure to at least have one for document count and one for max/min/average/... (When we add percentile and rate, we need to cover them separately too)

🧾 Scenario 2 - No data

  • No data alert without grouping

🧾 Scenario 3 - Missing group

  • Group alerts based on a field and make one of the group disappears to get the missing group alert

🧾 Scenario 4 - Grouping

  • Group alerts based on one of the fields that have additional context (like host.name)
    -- Make sure that the context for the group is preserved correctly in the AAD (like host.ip)
    -- Possibly validate multiple contextual fields with different value types (like keyword, long, array, single value)
    -- Make sure the number of generated alerts matches the number of groups
    -- It would also be good to check the tags field, it should consist of source and rule tags

🧾 Scenario 5 - Filtering

  • Filter data and make sure the generated alert is triggered correctly based on the filter

🧾 Scenario 6 - Equation

  • Create a complicated equation with multiple variables to test the result of the evaluation

✅ Acceptance Criteria

  • Implement the above-mentioned test scenarios as API integration tests

⚙️ Implementation tickets

@maryam-saeidi maryam-saeidi added Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.10.0 labels Jul 5, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/actionable-observability (Team: Actionable Observability)

@maryam-saeidi
Copy link
Member Author

@fkanout @simianhacker Any idea how to distribute checking permissions for different scenarios? How many different permission levels should we check?

@emma-raffenne emma-raffenne added this to the 8.10 milestone Jul 20, 2023
@simianhacker
Copy link
Member

For Scenario 4 I would make sure you include indexing a "non-standard" group by field. It can be made up like processor.outcome or something that's not included in the standard ECS library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.10.0
Projects
None yet
5 participants