0% found this document useful (0 votes)
19 views10 pages

Testing Angular Applications Slides

The document discusses testing Angular applications, focusing on unit tests and end-to-end tests. It outlines the differences between the two types of tests, their benefits, and the testing pyramid structure. Additionally, it highlights the importance of ensuring code functionality and preventing regression bugs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views10 pages

Testing Angular Applications Slides

The document discusses testing Angular applications, focusing on unit tests and end-to-end tests. It outlines the differences between the two types of tests, their benefits, and the testing pyramid structure. Additionally, it highlights the importance of ensuring code functionality and preventing regression bugs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Testing Angular Applications

Joe Eames
Google Developer Expert

@josepheames | joeeames.me
Overview

Unit tests
End-to-end tests
Unit Tests and End to End Tests

End to End Tests


Unit Tests
Test an application action, or user
Test a single “unit”. Method/class. story.
Fast to execute, easy to write. Slow to execute, more difficult to
write.
Testing Pyramid

E2E
Tests

Functional /
Integration Tests

Unit Tests
Assure code works as written

Benefits of Unit Easy to test unusual conditions

Testing Easy to test all code branches


Stop regression bugs
Assure units work together
Benefits of End to Test actual app functionality that users care
End Testing about
Stop regression bugs
Defining Inputs

export class Details {


@Input() lineItem: LineItem;

getTotal() {
return this.lineItem.qty * this.lineItem.price;
}
}
Summary
Unit tests and end-to-end tests
Running tests
Modifying tests
@josepheames
@jimthecoop
Thanks

You might also like