Files
openobserve/tests/api-testing
Neha PandSubhradeep Chakraborty 56024fe950 fix: dynamic stream name should work if it starts with { and ends with } (#8882)
### **PR Type**
Tests, Enhancement


___

### **Description**
- Add comprehensive dynamic template tests

- Introduce reusable validation utilities

- Parameterize edge and nested cases

- Standardize waits and identifiers


___

### Diagram Walkthrough


```mermaid
flowchart LR
  Consts["Add constants (waits, limits)"]
  Utils["Add utils: time window, query builder, validator, enabler"]
  DynamicTest["Enhance dynamic template test"]
  ComplexTests["Add complex, special-char, edge, nested tests"]
  Perf["Add performance and cleanup tests"]

  Consts -- "used by" --> Utils
  Utils -- "reused in" --> DynamicTest
  Utils -- "reused in" --> ComplexTests
  Utils -- "reused in" --> Perf
```



<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>test_pipeline_dynamic.py</strong><dd><code>Expand
pipeline dynamic template tests and utilities</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

tests/api-testing/tests/test_pipeline_dynamic.py

<ul><li>Add constants and safety helpers.<br> <li> Add reusable
validation and enable helpers.<br> <li> Expand tests: complex, special
chars, edge, nested.<br> <li> Add performance and cleanup tests.</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8882/files#diff-0bbefbbf7a34e3414a0aadd1963ffe6a2af8b5df4d619076207e361b2a42bcb1">+774/-49</a></td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___

---------

Co-authored-by: Subhradeep Chakraborty <chakrabortysubhradeep556@gmail.com>
2025-10-27 18:27:49 +05:30
..
2025-07-31 14:31:33 +08:00
2025-07-31 14:31:33 +08:00

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 rye to manage the python version and environment - https://github.com/mitsuhiko/rye
  • Once installed, simply run the following steps:
    • rye sync
    • rye 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 alpha1 or production endpoints.