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

[Entity Analytics] Remove before and after hooks from Cypress tests #175023

Closed
Tracked by #173327
MadameSheema opened this issue Jan 17, 2024 · 7 comments
Closed
Tracked by #173327

[Entity Analytics] Remove before and after hooks from Cypress tests #175023

MadameSheema opened this issue Jan 17, 2024 · 7 comments
Assignees
Labels
Team:Entity Analytics Security Entity Analytics Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.

Comments

@MadameSheema
Copy link
Member

MadameSheema commented Jan 17, 2024

Relates to:

#173327
#174247

Get rid of the before and after hooks in favor of the beforeEach and afterEach hooks. Or at least make sure that the code executed in the before and after hook is not prone to fail (i.e. es_archiver).

@MadameSheema MadameSheema added Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Entity Analytics Security Entity Analytics Team labels Jan 17, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-entity-analytics (Team:Entity Analytics)

@jaredburgettelastic
Copy link
Contributor

👋 Hey there @MadameSheema! Is there a list of test cases that need to have this change made? If not, I'll get with the team to assess how many instances of this we have within Entity Analytics tests.

Additionally, do we have a timeline for when we want this completed for the second quality gate?

@hop-dev
Copy link
Contributor

hop-dev commented Feb 14, 2024

Edit: missed that this is only relevant for cypress tests 🤦 so no need for tasks

currently these are the files I found based on our code ownership, going to split into 2 subtasks, one for cypress and one for integration

## integration
x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/asset_criticality_privileges.ts
x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_engine_privileges.ts
x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_score_calculation.ts
x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_score_preview.ts
x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_scoring_task/task_execution.ts
x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_scoring_task/task_execution_nondefault_spaces.ts
x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/telemetry_usage.ts

## cypress
x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/entity_analytics.cy.ts
x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/upgrade_risk_score.cy.ts
x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/enrichments.cy.ts
x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts
x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_flyout.cy.ts
x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/host_details/risk_tab.cy.ts
x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/host_risk_tab.cy.ts
x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/hosts_risk_column.cy.ts

@hop-dev hop-dev self-assigned this Feb 14, 2024
@jaredburgettelastic
Copy link
Contributor

@MadameSheema could you confirm if we should do the same for FTR tests, or only for Cypress? (regarding @hop-dev 's comment above)

@MadameSheema
Copy link
Member Author

@MadameSheema could you confirm if we should do the same for FTR tests, or only for Cypress? (regarding @hop-dev 's #175023 (comment))

Cypress :)

@hop-dev
Copy link
Contributor

hop-dev commented Feb 19, 2024

PR ready just runnning flaky test runner #177175

Only very small changes were needed, we primarily used only the archiver in our before and after calls.

@hop-dev hop-dev closed this as completed Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Entity Analytics Security Entity Analytics Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
Projects
None yet
Development

No branches or pull requests

4 participants