testing_skill
- Python
6
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill pluginagentmarketplace/custom-plugin-angular --skill testing- SKILL.md10.1 KB
Overview
This skill implements comprehensive testing and deployment workflows for Angular applications. It covers unit and component tests, Cypress E2E suites with page objects, test mocking strategies, build optimization, CI/CD pipeline configuration, and multi-target deployment. The goal is stable releases, reliable test coverage, and reproducible production builds.
How this skill works
I write and organize unit tests using Angular TestBed, Jasmine/Karma patterns, and async testing helpers (fakeAsync, tick, waitForAsync). For integration and E2E I implement Cypress tests and a Page Object Model to keep suites maintainable. I add HTTP and service mocks to isolate units, configure production builds (AOT, optimization, code splitting), and wire CI/CD pipelines (GitHub Actions) to run lint, build, tests, coverage, and deploy stages.
When to use it
- When adding or refactoring components and services to ensure behavior is covered
- Before merging feature branches to run automated unit and E2E checks
- When preparing production releases to optimize bundles and verify performance
- When adopting CI/CD to automate test, build, and deployment steps
- When you need repeatable test mocks to isolate external APIs
Best practices
- Structure tests with Arrange-Act-Assert and keep tests focused
- Mock external dependencies (HTTP, services) to avoid flaky network calls
- Prefer one logical assertion per test and cover error cases as well as success paths
- Use Page Object Model in Cypress to reduce duplication and improve readability
- Enable AOT, optimization, and output hashing for production builds
Example use cases
- Create TestBed unit tests for services using HttpClientTestingModule and HttpTestingController
- Add component specs that spy on injected services and assert DOM updates
- Write Cypress E2E flows: navigation, filtering, detail pages, using data-testid selectors
- Analyze bundles with webpack-bundle-analyzer and implement route-based code splitting
- Configure GitHub Actions to run lint, build, unit tests, E2E, upload coverage, and deploy on main
FAQ
Use HttpClientTestingModule and HttpTestingController to expect requests and flush mock responses or errors.
When should E2E tests run in CI?
Run a focused E2E job after successful unit tests and build steps, ideally on merge to main or nightly; keep suites fast and stable by using fixtures and mocks where appropriate.