Skip to content

Adding backend tests - #10

Merged
Polliog merged 15 commits into
mainfrom
E2E-Tests
Nov 28, 2025
Merged

Adding backend tests#10
Polliog merged 15 commits into
mainfrom
E2E-Tests

Conversation

@Polliog

@Polliog Polliog commented Nov 28, 2025

Copy link
Copy Markdown
Collaborator

This pull request introduces a comprehensive continuous integration (CI) workflow, testing infrastructure, and performance/load testing setup for the backend. It adds GitHub Actions CI, Docker Compose configuration for test environments, backend test environment variables, and a full load testing suite using k6. Documentation and status badges are also updated to reflect these improvements.

CI & Testing Infrastructure:

  • Added a new GitHub Actions workflow (.github/workflows/ci.yml) that runs backend tests with coverage, performs TypeScript checks, builds Docker images, and includes a deploy-to-staging step for the main branch. The workflow also enforces a minimum 70% code coverage threshold and uploads results to Codecov.
  • Introduced a dedicated Docker Compose file (docker-compose.test.yml) to spin up isolated test services for Postgres, Redis, MailHog, and the backend, with appropriate health checks and optimized settings for testing and load scenarios.
  • Added a .env.test file for the backend, specifying environment variables tailored for test runs, including database, Redis, API key, SMTP, and rate limiting configuration.

Performance & Load Testing:

  • Added a load-tests directory to the backend with a detailed README.md explaining how to run performance and load tests using k6, including scenarios, targets, and troubleshooting tips.
  • Implemented a k6 load test script (ingestion.js) that simulates various log ingestion scenarios (sustained, burst, ramp-up), collects latency and error metrics, and outputs a summary report.

Documentation & Status Badges:

  • Updated the main README.md to include CI and code coverage badges, providing visibility into build and test status.

@Polliog
Polliog merged commit c0825cb into main Nov 28, 2025
3 checks passed
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