

Áp dụng Tests với iOS
Presentation
•
Professional Development
•
Professional Development
•
Easy
Đào Royce
Used 3+ times
FREE Resource
91 Slides • 6 Questions
1
Áp dụng Tests với iOS
By Đào FnB
2
The test pyramid
Some text here about the topic of discussion
3
"A measure to check if the code meets the defined specifications."
Test
4
Multiple Choice
What is a test?
A measure to increase code coverage
A measure to check if the code meets the defined specifications
A measure to check if the code is visually beautiful
A measure to check if the code contains security vulnerabilities?
5
Multiple Choice
What is the most basic type of developer level test?
Integration Test
Basic Test
Unit Test
UI Test
6
The Art of Unit Testing
" A unit test is a piece of code that invokes a unit of work and checks one specific end result of that unit of work.”
7
Unit Test Structure
func testArraySorting() {
let input = [1, 7, 6, 3, 10]
let output = input.sorted()
XCTAssertEqual(output, [1, 3, 6, 7, 10])
}
Run the code
Prepare Input
Output
8
Testable code
9
Characteristic of Testable code
Control over inputs
Visibility into outputs
No hidden state
10
Multiple Choice
Testable code?
YES
NO
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Testability Techniques
Protocols and parameterization
Separating logic and effects
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Reduce references to shared instances
Accept parameterized input
Introduce a protocol Create a testing implementation
Protocols and Parameterization
59
Separating Logic and Effects
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
Extract algorithms
Functional style with value types
Thin layer on top to execute effects
Separating Logic and Effects
90
Testability Techniques
Protocols and parameterization
Separating logic and effects
91
Fill in the Blanks
Type answer...
92
Test driven development
Red: Writing a failing test.
Green: Writing just enough code to make the test pass.
Refactor: Cleaning up and optimizing your code.
93
Multiple Choice
____: Writing just enough code to make the test pass
Refactor
GREEN
RED
94
Demo
95
5:00 a.m.--11:59 a.m.
Good morning.
12:00 p.m.--4:59 p.m.
Good afternoon.
5:00 p.m.--4:59 a.m.
Good evening.
Time-of-Day Greeter
96
Multiple Choice
Which of the following is not a stage in TDD?
RED
GREEN
COMMIT
REFACTOR
97
Áp dụng Tests với iOS
By Đào FnB
Show answer
Auto Play
Slide 1 / 97
SLIDE
Similar Resources on Wayground
92 questions
HS II Honors Unit 2.02_Healthcare Safety and Infection Control
Presentation
•
KG - University
89 questions
phonics Step 1 Alphabet Lesson 1 Aa; Bb 4 Step Phonics
Presentation
•
KG
88 questions
English File Pre-Int
Presentation
•
KG - University
89 questions
Les associations et autres organismes à but non lucratif
Presentation
•
University
87 questions
CLASS 1 LESSON PLAN
Presentation
•
University
98 questions
05 - Good Communication Skills
Presentation
•
Professional Development
92 questions
Pembelajaran dan Asesmen
Presentation
•
Professional Development
96 questions
Module one -Introduction to MEAL
Presentation
•
Professional Development
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Assessment 2
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
12 questions
2026 TAP Technology in the Classroom
Presentation
•
Professional Development
15 questions
HCS SCI 05 Summer School Assessment 2 Review
Quiz
•
5th Grade
15 questions
HCS SCI 04 Summer School Review 2
Quiz
•
4th Grade
59 questions
Geometry Unit 3 Review
Quiz
•
9th - 12th Grade
14 questions
FAST ELA READING SMAPLE TEST MATERIALS
Passage
•
3rd Grade