diff --git a/README.md b/README.md index 9bc3b0a..d8a457e 100644 --- a/README.md +++ b/README.md @@ -121,17 +121,87 @@ flutter gen-l10n flutter run ``` -### Running Tests +### Environment Configuration + +The app supports multiple environments via flavor configuration: -**Backend:** ```bash -cd backend -pytest -v +# Development (default) +flutter run +flutter run -t lib/main_dev.dart + +# Production +flutter run -t lib/main_prod.dart --release + +# With explicit environment variable +flutter run --dart-define=ENV=prod ``` -**Frontend:** +Configuration is managed in `lib/core/config/app_config.dart`. + +## Specialization Topic + +**Testing + Internationalization** + +This project focuses on two specialization areas for the HFTM Mobile Computing course: + +1. **Testing**: Comprehensive test coverage with unit, widget, and integration tests +2. **Internationalization**: Full i18n support with English and German, locale-aware date formatting + +## Testing Strategy + +The project follows a multi-layered testing approach: + +### Unit Tests +- **Domain Layer**: Entity validation, enum behavior +- **Data Layer**: Model serialization/deserialization (JSON) +- **Presentation Layer**: ViewModel business logic with mocked repositories + +### Widget Tests +- Component rendering and display +- User interactions (tap, input) +- State changes and callbacks + +### Integration Tests +- End-to-end user flows +- Navigation between screens +- Task creation and management lifecycle + +### Running Tests + ```bash +# Run all unit and widget tests flutter test + +# Run with coverage +flutter test --coverage + +# Run integration tests (requires device/emulator) +flutter test integration_test + +# Run specific test file +flutter test test/features/tasks/presentation/viewmodels/daily_tasks_viewmodel_test.dart +``` + +### Test Structure + +``` +test/ +├── features/ +│ ├── auth/ +│ │ ├── data/models/ # Model serialization tests +│ │ └── domain/entities/ # Entity tests +│ ├── tasks/ +│ │ ├── data/models/ +│ │ ├── domain/ +│ │ └── presentation/ +│ │ ├── viewmodels/ # ViewModel unit tests +│ │ └── widgets/ # Widget tests +│ └── onboarding/ +└── helpers/ # Test utilities + +integration_test/ +└── app_test.dart # End-to-end tests ``` ## Internationalization (i18n)