Integration (E2E) test strategy - stolostron/search-v2-operator GitHub Wiki

Odyssey integration (E2E) test goals

  • Integration tests must be automated.
  • Tests reliability must be the top priority. Unreliable, flaky, or false positive errors diminish the value of automation. (Quality over quantity).
  • Automation must run before publishing the search operator bundle to validate that all search components in the bundle work.
  • A subset of the tests will run in the canary to validate that all search components work when integrated with ACM.

Integration (E2E) test outline

Operator deployment and configuration

Ticket: https://github.com/stolostron/acm-qe/issues/1536

Add-on deployment and configuration

Ticket: https://github.com/stolostron/acm-qe/issues/1537

API returns correct data

API tests are automated using jest.

  • Verify search using arbitrary strings (P1)
  • Verify search using a filter like "kind:pod" (P1)
  • Verify results only show authorized resources for the user. (P1)
  • Verify relationships are resolved. (P1)
  • Verify searches using operators like [!, <, >, <=, >= ] (P2)

Ticket: https://github.com/stolostron/acm-qe/issues/1538

Console search UI

UI tests are automated using Cypress and must focus on presentation, not data integrity. Scenarios for data variations such as RBAC, managed clusters, or resource editing are excluded from UI tests. These must be covered by API tests.

Upgrade/Migration

  • Upgrade from a release with search v1 (ACM 2.5 and 2.6) to a search v2 (ACM 2.7).

Scalability

Scalability tests are automated using locust.

  • Simulate 100 managed clusters and 20 concurrent (P1)
  • Simulate 1000 managed clusters and 100 concurrent users (P2)
  • Verify that pod replicas are scaled to handle the load. (future)
  • Verify that all components emit the expected metrics. (P2)
  • Record performance metrics and compare each build against previous test runs. (P2)

Error Scenarios

These must be excluded from canary tests because it will affect other tests running in the cluster.

  • Overview page renders in a degraded mode if it can't resolve the search query.
  • Crash testing: Deleting PVC's, secrets making sure pods come back as expected.
  • Search operator must be able to recover if the search database becomes corrupted.

More:

https://github.com/stolostron/backlog/issues/22937

⚠️ **GitHub.com Fallback** ⚠️