mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 08:09:27 +00:00
Major refactoring to fix Page Object Model violations in metrics test suite. This addresses critical code quality issues identified in the Sentinel audit. ## Changes ### Page Objects Enhanced - **metricsPage.js**: Added 350+ lines of new methods - Data visualization verification methods - Config sidebar operations - Stream selection, date ranges, notifications - Chart types, inputs, and generic UI helpers ### Test Files Fixed (5/8 - 62.5%) - ✅ **metrics-advanced.spec.js**: Fixed 13 POM violations - ✅ **metrics-aggregations.spec.js**: Fixed 8 POM violations - ✅ **metrics-config-tabs.spec.js**: Fixed 31/33 POM violations - ✅ **metrics-queries.spec.js**: Fixed 28 POM violations - ✅ **metrics-visualizations.spec.js**: Fixed 44 POM violations ### Additional Fixes - **apiCleanup.js**: Fixed error handling consistency - Unified error response format (message vs error field) - Added explicit code: 200 for successful responses ## Statistics - **Violations Fixed**: 132/184 (72%) - **Helper Functions Refactored**: 3 (eliminated 200+ lines of duplication) - **All fixed files**: ✓ Syntax validated ## Remaining Work - metrics-config.spec.js: 28 violations - metrics.spec.js: 30 violations - See POM_COMPLIANCE_FIXES_SUMMARY.md for completion guide 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
pytest-openobserve
This is a repo to test openobserve API endpoints.
Introduction:
The tests are running using pytest against alpha1 for now.
Idea is to parametrize it for the other endpoints like production as well.
Getting Started
- We use
ryeto manage the python version and environment - https://github.com/mitsuhiko/rye - Once installed, simply run the following steps:
rye syncrye run pytest
TODOS:
- Parametrize tests to run against different environments
- Run the tests as cron-job every few hours or daily etc. for different environments
- Send slack-notification ( use github-actions ) in case something fails on
alpha1orproductionendpoints.