Skip to main content

Testing

Testing guides and tools for the FishingLog API and frontend applications.

Testing Tools

Testing Approaches

Manual Testing

  1. Swagger UI: Test endpoints interactively at /swagger
  2. Insomnia: Use the provided workspace for comprehensive API testing
  3. Postman: Import OpenAPI spec from Swagger

Automated Testing

Unit Tests

  • Unit tests for business logic, services, and utilities
  • Target: 70%+ code coverage
  • Framework: xUnit/NUnit

Integration Tests

  • API endpoint testing with real database (TestContainers)
  • Authentication/authorization testing
  • Payment flow testing
  • Framework: xUnit + WebApplicationFactory

End-to-End Tests

  • Backend: xUnit + TestContainers for API E2E tests
  • Web App: Playwright for browser-based E2E tests
  • Mobile App: Detox for React Native E2E tests
  • Cross-platform: Full user journey testing across all apps

See E2E Testing Strategy for complete details.

Insomnia Workspace

A complete Insomnia workspace is available with:

  • All API endpoints pre-configured
  • Multiple environments (Local, Staging, Production)
  • Authentication requests
  • Example requests and responses

See Insomnia Setup Guide for details.

Testing Checklist

Backend API

  • Authentication flows (login, token refresh)
  • CRUD operations (all entities)
  • Authorization and permissions
  • Payment flows (Stripe integration)
  • Webhook processing
  • Error handling
  • Edge cases
  • Performance

Web Application

  • User authentication flow
  • Critical user journeys
  • Payment flows
  • Social features
  • Responsive design
  • Cross-browser compatibility

Mobile Application

  • User authentication flow
  • Critical user journeys
  • Payment flows
  • Offline functionality
  • Push notifications
  • iOS and Android compatibility

Test Coverage Goals

  • Critical Paths: 100% coverage (auth, payments, core CRUD)
  • Important Features: 80% coverage (social, tournaments, circles)
  • Nice to Have: 60% coverage (advanced features, analytics)

Additional Resources