Files
openobserve/tests/api-testing
Neha PandShrinath Rao 000009f86d test: str_match_coalesce_fix (#8403)
### **PR Type**
Tests


___

### **Description**
- Add e2e test for str_match_ignore_case with coalesce

- Validate all hits contain expected match

- Ensure 200 response and correct schema

- Log query performance and totals


___

### Diagram Walkthrough


```mermaid
flowchart LR
  T["New e2e test: str_match_ignore_case + coalesce"] -- "executes query" --> API["/api/{org}/_search?type=logs"]
  API -- "returns hits" --> V["Validate coalesce and case-insensitive match"]
  V -- "assertions + logs" --> R["Report results and timing"]
```



<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_search.py</strong><dd><code>Add coalesce-aware
case-insensitive match test</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

tests/api-testing/tests/test_search.py

<ul><li>Add end-to-end test for str_match_ignore_case with coalesce<br>
<li> Post SQL search over recent timeframe<br> <li> Assert 200, hits
presence, and per-hit validation<br> <li> Print diagnostics and timing
information</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8403/files#diff-f3776a5bc02e67c163ed707f86b2192f47b73c641dde04b83523b95a74518141">+76/-0</a>&nbsp;
&nbsp; </td>

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

</details>

___

Co-authored-by: Shrinath Rao <shnath@openobserve.ai>
2025-09-12 18:40:35 +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.