Skip to content

Test: add integration tests for template creation and form fill routes#426

Open
Arijit429 wants to merge 10 commits into
fireform-core:mainfrom
Arijit429:api-route-integration-tests
Open

Test: add integration tests for template creation and form fill routes#426
Arijit429 wants to merge 10 commits into
fireform-core:mainfrom
Arijit429:api-route-integration-tests

Conversation

@Arijit429

@Arijit429 Arijit429 commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Closes #24
Closes #265

🚀 Summary

This PR adds route-level integration tests for the core API workflow to improve backend reliability and strengthen regression safety.

The tests cover the two most critical endpoints in the current pipeline:

  • /templates/create
  • /forms/fill

✨ What Changed

Added a new integration test file:

tests/test_api_routes.py

This validates the end-to-end API behavior using FastAPI’s TestClient.


🧪 Test Coverage Added

1) Template creation route

Verifies successful template creation with valid payload structure and ensures response correctness.

Validated:

  • status code = 200
  • response contains template name
  • template creation flow is functional

2) Form fill route

Tests the complete workflow:

template create
↓
template id retrieval
↓
form fill request
↓
successful response

This provides strong route-level regression protection for the core extraction pipeline.


💡 Why This Helps

These tests strengthen:

  • API route reliability
  • regression safety
  • production readiness
  • backend workflow confidence

This is especially important for the form generation pipeline since it directly impacts end-user functionality.


🧪 Local Validation

Executed locally using:

PYTHONPATH=. pytest tests/test_api_routes.py -q

Result:

2 passed

🎯 Impact

This improves confidence in the application’s most critical routes and makes future refactors significantly safer.

@Arijit429

Copy link
Copy Markdown
Contributor Author

Hi maintainers, added integration tests for the core API flow and verified both routes locally—happy to extend coverage for additional edge cases if needed.

@Arijit429

Copy link
Copy Markdown
Contributor Author

Hi maintainers, continuing the milestones outlined in my post-proposal contribution plan, I’ve been steadily progressing across extraction reliability, validation workflow, database initialization, and now route-level integration testing to move the project closer to production-ready stability.

@Arijit429 Arijit429 force-pushed the api-route-integration-tests branch from 899237a to cc0b684 Compare April 19, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant