FRONT END TESTING
Muhammad Afif Alfiano H
Front end Developer
(Tim BPM Army - BSI UII)
@afifalfiano
afifalfiano
Front end Testing
Software Testing is a method to
check whether the actual
software product matches
expected requirements and to
ensure that software product is
Defect free
What is Testing?
What is Testing?
2. Expected Result
3. Test
1. Code
Failure
Success
4. Modify
& Fix End
Automate
Test &
Simply
Benefit
Save time
Get an error if your
break code
Think about possible
issues and bugs
Integrate into build
workflow
Break up complex
dependencies
Improve your code
E2E Test
Is a software testing method
that validates entire software
from starting to the end along
with its integration with
external interfaces
Integration Test
Unit Test
is a type of software
testing where individual
units or components of a
software are tested
01
is defined as a type of
testing where software
modules are integrated
logically and tested as a
group
02
Type of test
03
Headless Browser
Headless browsers provide
automated control of a web
page in an environment similar
to popular web browsers, but
they are executed via a cli
using network communication
Assertion
Library
Task Runner
is the library or tool that picks
up a source code that contains
unit tests, and a bunch of
settings, and then executes
them and writes the test
results to the console or log
files.
01
Assertion libraries are
tools to verify that
things are correct.
02
Setup Test
03
Library of Test
What about Angular?
Test Runner Assertion Library E2E Test
Unit Test + Integration Test
Angular
Unit Test (AAA Pattern)
3A
1. Arrange
This is the first step of a unit test application. Here we will
arrange the test, in other words we will do the necessary setup of
the test
2. Act
This is the middle step of a unit step application. In this step we
will execute the test. In other words we will do the actual unit
testing and the result will be obtained from the test application.
3. Assertion
This is the last step of a unit test application. In this step we will
check and verify the returned result with expected results.
Simple App
Unit Test
I
n
t
e
g
r
a
t
io
n
T
e
s
t
E2E Test (Protractor)
E2E Test (Cypress)
Result (Unit Test & Integration Test)
Result (E2E Test - Protractor)
Result (E2E Test - Cypress)
Extensions Browser
Extension (E2E Test)
Extension (E2E Test)
Extension (E2E Test)
Extension (E2E Test)
Extension (E2E Test)
Extension (E2E Test)
DEMO
��
https://github.com/afifalfiano/angular-testing
Quote
References
● https://www.youtube.com/watch?v=r9HdJ8P6GQI Testing javascript by maximilian
● https://www.guru99.com/
● https://angular.io/guide/testing
● https://slidesgo.com/
● https://images.google.com/imghp?hl=en&gl=ar&gws_rd=ssl
● https://dev.to/mustapha/angular-unit-testing-101-with-examples-6mc
● https://www.c-sharpcorner.com/UploadFile/dacca2/fundamental-of-unit-testing-under
stand-aaa-in-unit-testing/
● https://docs.cypress.io/guides/overview/why-cypress.html
CREDITS: This presentation template was created by Slidesgo,
including icons by Flaticon, and infographics & images by Freepik
THANKS
Do you have any questions?
afifalfiano2@gmail.com
Please keep this slide for attribution

Testing on frontend