Skip to content

test(T-05): add server health BDD test with TestClient fixture#62

Open
raschmitt wants to merge 3 commits into
mainfrom
test/test-suite-setup
Open

test(T-05): add server health BDD test with TestClient fixture#62
raschmitt wants to merge 3 commits into
mainfrom
test/test-suite-setup

Conversation

@raschmitt
Copy link
Copy Markdown
Owner

Task/Issue

T-05 · Test suite setup

What?

  • Add server_health.feature with a root-route-responds BDD scenario
  • Add test_server_health.py step definitions for the server health feature
  • Remove sonar.coverage.exclusions=app/static/** so static files are included in coverage
  • Mark all T-05 subtasks as done in docs/tasks.md

Why?

  • Establishes a basic health-check test to confirm the application starts and serves the root route
  • Removing the SonarCloud exclusion ensures coverage metrics reflect the full codebase including static files

Add server_health.feature with a root-route-responds scenario and
its pytest-bdd step definitions. Remove static-file exclusion from
SonarCloud config so coverage now includes app/static/.

Co-authored-by: big-pickle <big-pickle@users.noreply.github.com>
@raschmitt
Copy link
Copy Markdown
Owner Author

🤖 This PR was automatically generated by the auto-implement workflow using OpenCode CLI with the big-pickle model.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

💡 AI Code Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b95c129b4d

ℹ️ About this review

This review was generated automatically by the AI Code Review workflow using OpenCode CLI with the Minimax M2.5 Free model.

Reviews are triggered on every pull request push.

def app_is_running(client: TestClient):
return client.get("/")


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Redundant fixture step

@given("the application is running") and @when('a GET request is made to "/"') both execute client.get("/"). This means the scenario performs the GET request twice. For a health check scenario, the intent is typically to make a single request and then verify it. One of these steps is either dead code or indicates the scenario design needs clarification.

scenarios("../features/server_health.feature")


@given("the application is running", target_fixture="response")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Redundant fixture step (already flagged in prior review — P2)

Both @given("the application is running") and @when('a GET request is made to "/"') call client.get("/") and return the same response. Since TestClient has no state changes between steps and both target the same fixture response, the second step definition is redundant. One option is to have the @given store the client on a session-scoped fixture and have @when reuse that same response fixture rather than making a second identical request.

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant