Testing fundamentals and tooling
Learn Testing fundamentals and tooling (Module 20 · Angular Testing, Angular) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Why test? Software testing fundamentals : tests are a safety net so you can change code without fear, like the seat belt in a car. They run automatically and tell you when behaviour breaks. A good test follows Arrange - Act - Assert : set up, do the thing, check the result. The test pyramid says: many fast unit tests , a medium number of integration tests , and few slow end-to-end (E2E) tests . • Unit testing : one piece in isolation (a pipe, a service, a validator). • Integration testing : pieces working together (a component with its template and a fake service). • End-to-end testing : a...