mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 08:09:27 +00:00
### **PR Type**
Tests
___
### **Description**
- Stabilize unflattened Playwright tests
- Add structured test logging throughout
- Increase waits for indexing and UI readiness
- Ensure query refresh and result validation
___
### Diagram Walkthrough
```mermaid
flowchart LR
Login["Login and setup"] -- "ingestion + waits" --> Streams["Open Streams"]
Streams -- "configure store original data" --> Schema["Update Schema"]
Schema -- "ingest + index wait" --> Explore["Explore Logs"]
Explore -- "set time range" --> Results["Load Results"]
Results -- "expand row" --> Details["_o2_id in details"]
Explore -- "SQL mode + SELECT * + refresh" --> Results
```
<details> <summary><h3> File Walkthrough</h3></summary>
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Tests</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>unflattened.spec.js</strong><dd><code>Stabilize
unflattened Playwright tests with logging</code>
</dd></summary>
<hr>
tests/ui-testing/playwright-tests/Logs/unflattened.spec.js
<ul><li>Add structured testLogger.info/error messages.<br> <li> Replace
flaky short waits; add longer indexing waits.<br> <li> Add query
refresh, SQL mode selection, and result assertions.<br> <li> Minor
formatting fixes and consistent waits in setup/teardown.</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8808/files#diff-35703a04047bd3dc257e8e606360e196f9ead45fc44f3857a6e04023590f1a1e">+171/-137</a></td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
zinc-observe-ui-automation
Playwright UI Testing
Installation
npm install
Running Tests
Using Playwright Runner UI (Recommended)
cd playwright-runner
npm start
Then open http://localhost:3000 to access the test runner interface.
Using Command Line
# Run all tests
npx playwright test
# Run specific test by tag
npx playwright test -g @alertsImportExport
# Run in headed mode
npx playwright test --headed
# Run specific test file
npx playwright test Alerts/alerts-import.spec.js
Environment Configuration
Tests can be configured using:
- Playwright Runner UI - Set environment variables through the web interface
- Environment Variables - Set variables in terminal or .env file