- add url and page as env variables to choice where to test and update the others
- To pass a variable to a job's service, they have to be declared in the "variables" global -> doesn't work (see: [#37])
- use of the deployed image to do E2E test instead of services of gitlab
The Home Monitor project uses Cypress to automate both End-to-End (E2E) and unit tests. These tests ensure that the main features of the application work correctly, both from the user’s and the developer’s perspectives.
End-to-End (E2E) testing verifies that the application functions correctly from a user's perspective by testing the complete application workflow. This document outlines the E2E testing approach for the Home Monitor application.
### Types of Tests
### Goals of E2E Testing
- **End-to-End (E2E) Tests**: Simulate real user behavior on the web interface. They check critical user flows, data display, error handling, and the responsiveness of the application.
- **Unit Tests**: Verify the correct functioning of JavaScript/TypeScript components and functions in isolation.
- Validate critical user flows function correctly
- Ensure components work together as expected
- Detect regression issues before production deployment
- Verify application behavior in real-world scenarios
### Test Structure
## Testing Strategy
- E2E tests are located in `web-app/cypress/e2e/`
- Unit tests are located in `web-app/cypress/unit/`
- Custom commands and global setup are in `web-app/cypress/support/`
- Cypress configuration is in `web-app/cypress.config.ts`
Home Monitor uses Cypress for E2E testing with two primary approaches:
### Example Scenarios Covered
1.**Mock Testing (Without Server)**: Fast, reliable tests using mocked DOM elements and data
2.**Real Environment Testing (With Server)**: Full application testing with a running development server
- Application loading and display of main sections
- Control panel functionality (buttons, filters)
- User, room, and device selection
- Display and update of measurement charts
- Handling of error or empty data states
- Responsive layout for mobile and desktop
### Mock vs. Real Testing Comparison
| Aspect | Mock Testing | Real Environment Testing |
- [Vue Test Utils](https://vue-test-utils.vuejs.org/)
- [Testing Library](https://testing-library.com/)
- [Cypress Best Practices](https://docs.cypress.io/guides/references/best-practices)
### Run unit Tests
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.