Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
FrontEnd Test Night - Fukuoka #1
Search
puku0x
March 05, 2019
Technology
460
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
FrontEnd Test Night - Fukuoka #1
puku0x
March 05, 2019
More Decks by puku0x
See All by puku0x
え?フロントエンドエンジニアの ワイがインフラも!?
puku0x
1
1.6k
新メンバーのために、シニアエンジニアが環境を作る時代
puku0x
0
1.6k
Agent Skills 入門
puku0x
0
2.3k
ファインディにおけるフロントエンド技術選定の歴史
puku0x
2
2.3k
生成AIではじめるテスト駆動開発
puku0x
0
1.6k
実践!カスタムインストラクション&スラッシュコマンド
puku0x
2
3.4k
Nx × AI によるモノレポ活用 〜コードジェネレーター編〜
puku0x
0
1.8k
ファインディにおけるフロントエンド技術選定の歴史
puku0x
2
330
ファインディでのGitHub Actions活用事例
puku0x
9
4k
Other Decks in Technology
See All in Technology
Kiro Meetup #8 Kiro アップデート (2026/3/21〜2026/9/24)
katzueno
1
290
あけおめLINE 傾向とその対策
nasa9084
0
340
Lambda MicroVMsは常駐サーバーの代わりに なるか? Kiro Crew を動かして検証してみた / Kiro Crew on Lambda MicroVMs
k_adachi_01
2
270
サーバーレスをどこまで使う? WebRTC対戦ゲームで選んだVPSとの共存設計
kaidouji85
0
460
20260929_AmazonGuardDutyの検出通知メールにAWS DevOpsAgentの調査結果を追加する
yhana
1
230
2026-09-08 そのJavaモダナイゼーション、AIに丸投げで大丈夫?IBM Bobで変わる品質と効率
yutanonaka
1
210
音声コミュニティを守るAI監視基盤_ 90%以上の入力削減を支えたServerless設計と運用判断
shuheioka123
0
110
【Findyテック文化祭ワークショップ】新卒エンジニア&採用担当と作る、 なりたい姿と今やるべき一歩
dip_tech
PRO
0
110
特殊変数大全
dak2
0
150
「どのログを見ればいい?」 から始めた サーバーレス障害解析
y_waka1
1
150
【技術的負債conf】事業成長に伴う技術的負債の説明責任とAIによるモニタリング、認知的負債について
i35_267
4
2.3k
SREへの勘違いに気づいた後の話
tomodakengo
0
180
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
From π to Pie charts
rasagy
1
380
The Curious Case for Waylosing
cassininazir
1
540
The Language of Interfaces
destraynor
162
27k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.9k
Paper Plane
katiecoart
PRO
4
53k
Accessibility Awareness
sabderemane
1
220
A Tale of Four Properties
chriscoyier
163
24k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
470
Transcript
Angularがやれって言うから テスト書き始めました FrontEnd Test Night - Fukuoka #1
Noriyuki Shinpuku ng-fukuoka organizer @puku0x 2 VEGA corporation Co., Ltd.
3 AngularJS
Testing? 4
5 Angular
Angular A platform for building modern Web Apps • Move
faster • Scale better • Reach further https://angular.io/ 6
7 Angular CLI
Generating a component $ ng generate component sample CREATE src/app/sample/sample.component.scss
(0 bytes) CREATE src/app/sample/sample.component.html (23 bytes) CREATE src/app/sample/sample.component.spec.ts (614 bytes) CREATE src/app/sample/home.component.ts (262 bytes) UPDATE src/app/app.module.ts (467 bytes) 8
Generating a service $ ng generate service api CREATE src/app/api.service.spec.ts
(323 bytes) CREATE src/app/api.service.ts (133 bytes) 9
*.spec.ts? 10
11 Karma
12 Protractor
Creating an app $ ng new my-app --routing --style=scss CREATE
my-app/angular.json (3895 bytes) CREATE my-app/package.json (1389 bytes) CREATE my-app/src/karma.conf.js (1019 bytes) CREATE my-app/src/tsconfig.spec.json (256 bytes) CREATE my-app/e2e/protractor.conf.js (752 bytes) CREATE my-app/e2e/tsconfig.e2e.json (213 bytes) CREATE my-app/src/main.ts (372 bytes) ... 13
Unit Test 14
describe('SampleComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [
SampleComponent ] }).compileComponents(); })); it('should create', () => { fixture = TestBed.createComponent(SampleComponent); component = fixture.componentInstance; expect(component).toBeTruthy(); }); }); 15
import { NO_ERRORS_SCHEMA } from '@angular/core'; describe('SomeComplexComponent', () => {
beforeEach(async(() => { TestBed.configureTestingModule({ ... schemas: [NO_ERRORS_SCHEMA] }).compileComponents(); })); }); 16
describe('ApiService', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [
HttpClientTestingModule ] }); service = TestBed.get(ApiService); }); it('should be created', () => { expect(service).toBeTruthy(); }); }); 17
import { HttpTestingController } from '@angular/common/http/testing'; describe('UserService', () => {
beforeEach(() => { ... httpMock = TestBed.get(HttpTestingController); }); afterEach(() => httpMock.verify()); it('should successfully mock request', () => { const response = {...}; service.fetch().subscribe(result => expect(result).toBe(response)); const req = httpMock.expectOne(`/api/v1/samples`); expect(req.request.method).toEqual('GET'); req.flush(response); }); }); 18
E2E test 19
import { browser, by, element } from 'protractor'; describe('App', ()
=> { it('should display title', () => { browser.get('/'); const title = element(by.css('h1')).getText(); expect(title).toEqual('Hello Angular!'); }); }); 20
Snapshot test? 21
$ ng add @briebug/jest-schematic 22
describe('AppComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [AppComponent]
}).compileComponents(); })); test('should match to snapshot', () => { const fixture = TestBed.createComponent(AppComponent); expect(fixture).toMatchSnapshot(); }); }); 23
24 Nx(Nrwl Extensions for Angular)
25
26
• Integrated Unit Test • Integrated E2E Test • Extensible
CLI 27
28 https://angular.jp/ More details are in...
@puku0x Noriyuki Shinpuku ng-fukuoka organizer Thank you! 29