쉐도잉 연습: Playwright API Testing with TypeScript (from scratch in 10 minutes) - 영상으로 영어 말하기 배우기

연습 모드 선택

각 모드는 전체 화면 연습실로 열립니다.

135 문장
문장이 너무 짧거나 길면 Edit를 눌러 조정하세요.
1
You want to automate APIs with Playwright but don't know where to start?
2
So let me show you how to do that.
3
It's actually very simple.
4
So first of all, navigate to nodejs .org, you will need to install Node .js.
5
So click on install
6
Node .js, download it and install on your computer.
7
After that, create a new empty folder anywhere on your computer and open this folder in new terminal.
8
Then run this command in this terminal npm init playwright at latest.
9
After execution of this command just answer everything by default yes
10
so playwright will ask you do you want typescript yes do you want to use test folder yes
11
and so on and so forth just click enter enter enter
12
and after you've done this you will have a sample project generated by the playwright
13
that would look like this open it in visual studio code
14
and you pretty much ready to go
15
so under the test folder you will see example .spec .ts that's the sample test file
16
that you can start with test number one test number two
17
this is the body number one body number two
18
you can see this test is configured to run ui test playwright is using a thing called fixture page fixture
19
so this page fixture is responsible for opening a new browser page
20
and do whatever operations you need on this browser page
21
but for api automation we don't need page so for
22
that we have a different fixture which is called request fixture
23
and with the request fixture you can make api request
24
so using this example let's make a simple simple get request
25
and i will show you how to use this fixture so we don't need page fixture.
26
I just remove it and I remove all this stuff.
27
We don't need it.
28
I'm going to keep this test as our placeholder.
29
So where would you start?
30
Await request dot and then you have methods inside of the request.
31
So if you want to make get request, you call get method.
32
If you want to make post request, you make post method.
33
Patch, put, delete and so on.
34
So let's start with the get request
35
which example we will use for this demonstration here conduit bonder
36
academy let's look into the networking tab for this app
37
and take the very first api request for example for the tags endpoints this is a get request tags endpoint
38
so let's use it as our demo i take the tags
39
and inside of get request i just paste this url that i want to call and that's it
40
Look, if I run it, it's already working.
41
128 milliseconds took to run this single line.
42
So Playwright already sending requests.
43
Now we need to process the response.
44
Then you assign the result to some constant or variable, for example, response equals to.
45
And then from this response, I need to extract the JSON object.
46
So I type const response object equals to await response dot method json.
47
So with the method json, you can get the json object that is coming back.
48
And let's print it out to the console.
49
Console dot log.
50
And I print out the response object and running this test.
51
Running this test.
52
Here we go we have a response object that is printed out and after
53
that we can make the assertions to make assertions in the playwright you can use a built -in assertion library
54
which is expect and we can call our response object
55
that has property tags inside tags and this is the array
56
so i take the first value of array we see it should be a test
57
and i type to equal test and i run this test again
58
and test pass successfully and let's write one more validation for example expect
59
that our response object tags and the amount of text we have 10 values
60
so let's to have for example length of 10.
61
Like this and then running this test again and this test passed successfully.
62
If I mess with this test around and let's say I change to 9
63
and run this test and the test failed expectedly.
64
Look received length 10 but expected length 9.
65
So assertion working successfully and test working successfully.
66
So that's well that's the approach.
67
You basically have three steps in any API test.
68
First you make a request, second you make the extraction of the JSON object with the JSON method
69
and the third step is making the validations of your response.
70
That's basically
71
whole thing about api testing you send request validate response send request validate response that's it
72
and let me show you just one more example
73
this was the very simple get request let me show you how to make a post
74
or put request i copy this thing and for example sample post request
75
so the same thing here we need to change get to post
76
because it will be a post request
77
and let's find in our application example for the post request
78
so I will create a new article let me type any random values right click inspect network publish the article
79
and this is the request
80
for the post request so post request this is the url
81
and now i just simply copying the values inside of our request
82
so this is the post request for the post request we need a payload as well
83
and authorization header because this is authorized request
84
so i need to paste the headers into authorization
85
so where would you put
86
that stuff put the comma over here after the url then start a new object
87
and within this new object you can put different parameters
88
so such as headers this is another object
89
and we will use authorization no let's do this authorization
90
and the value for authorization will be going back this is the token paste the token
91
and then wow that's a huge token okay
92
and then we need to add uh request object
93
and in playwright it's called as data so i paste this object
94
and let me find this payload over here
95
so this is my payload i'm copying it here going back
96
and pasting it right here so i guess that's it so url authorization header,
97
payload that I'm sending to the API and we can send the request.
98
Let me send like test, test will be title for the article, response object.
99
I will remove the assertions because response will be different and we will see the response object that should,
100
at least we should see the response object sending the request and the request was successful.
101
You can see the new article was created.
102
If I go back to the test application, click over here.
103
Here we go.
104
Test test article using API was created.
105
Well guys and that's pretty much it.
106
This is how easy you create your API test in Playwright.
107
You call get, post, put or delete methods depending on operation that you want to do.
108
For the get request it's very very simple.
109
Just send request, validate response, make the assertions for the post request you need maybe headers
110
and data that you send as your payload in the same way.
111
You extract the JSON and then validate the response.
112
You can also chain the commands. For example, we send the post request and then after
113
that we can send get request to validate that the article that was created before is there.
114
But that's more about the scenarios, right?
115
That's not about the scripting anymore.
116
It's more about scenarios.
117
So yeah, it's very, very simple.
118
So if have just a handful of tests to automate, just go with this route, automate those scenarios and you are done.
119
If you need to automate more than that and your application is more sophisticated, you need to generate some test data,
120
make a schema validation and all that fun stuff, you can build some other test frameworks around the Playwright using this approach.
121
And for example, I built my own approach to API testing using Playwright using this approach.
122
For example, you provide path, you provide parameters that way, you make a get request with a custom getter and all that stuff.
123
And then your test would look nicely organized.
124
I have a custom should match schema method to validate the schema
125
and the test looks nicely and more compact and for example random data generator and all that stuff.
126
And here are my custom utils such as schema validator, request handler, custom expect assertion data generator and so on.
127
But again if you need to run just something very simple.
128
Just use built -in tools that isn't playwright.
129
If you need to automate something more complex, you may need to build something more sophisticated like this.
130
If you want to learn how to build the framework like this, check the link in the description below.
131
I have a course where I teach how exactly step -by -step to build this stuff like this.
132
It is a very good training to get an advanced programming skills.
133
All right, so I hope it was helpful.
134
If you have any questions write them down below put the likes
135
and subscribe and I'll see you in the next one

앱 다운로드

유창하게 말하는 데 필요한 모든 것

AI 발음 평가문장마다 점수 확인
IPA 발음 연습모든 소리 마스터
단어 학습나만의 단어장 만들기
단어 게임놀면서 외우기
FOR YOU

추천 영상

이 레슨의 어휘와 말하기 포인트

이 말하기 레슨은 영상 “Playwright API Testing with TypeScript”을(를) 바탕으로 합니다. 가장 자주 반복되는 단어는 다음과 같습니다: request, test, response, object, example. 이 영상에는 섀도잉할 문장 135개와 단어 1552개가 있습니다. 말하는 구간의 길이는 9:54입니다. 화자는 분당 약 157단어로, 일상 대화에 가까운 자연스러운 속도로 말합니다. 단어의 83%가 영어에서 가장 많이 쓰이는 3,000단어에 속합니다. 나머지는 연습 전에 미리 확인해 두세요.

이 영상의 핵심 어휘

영상에 나오는 익혀 둘 만한 단어 15개를 발음, 뜻과 함께 정리했습니다.

단어발음뜻
assertion 명사/əˈsɜɹʃən/단정, 주장
authorization 명사/ˌɔːθəɹaɪˈzeɪʃən/허가, 인가
custom 명사/ˈkʌstəm/습관, 풍속
pasta 명사/ˈpɑ.stə/파스타
folder 명사/ˈfoʊldɚ/서류철, 폴더
scenario 명사/sɪˈnɛəɹioʊ/각본, 대본
install 동사/ɪnˈstɔl/설치하다, 깔다
token 명사/ˈtoʊkən/토큰
terminal 명사/ˈtɚmɪnəl/터미널, 공항 터미널
delete 동사/dɪˈliːt/삭제(削除)하다
sophisticated 형용사정교한
generator 명사/ˈdʒɛnəɹeɪtə(ɹ)/발전기
await 동사/əˈweɪt/기다리다
parameter 명사/pəˈɹæm.ə.tɚ/파라미터, 매개변수
skill 명사/skɪl/기술, 스킬

영상에 나오는 구동사

단어뜻
go back 동사돌아가다
come back 동사돌아오다

주의할 발음

화자는 don't, I'm, I'll 같은 축약형과 약화된 형태를 10번 사용합니다. 들리는 대로 짧게 발음하세요.

  • “th” 소리: authorization /ˌɔːθəɹaɪˈzeɪʃən/, authorize /ˈɔθəɹaɪz/
  • “sh”와 “zh” 소리: assertion /əˈsɜɹʃən/, authorization /ˌɔːθəɹaɪˈzeɪʃən/, validation /ˌvæl.əˈdeɪ.ʃən/, execution /ˌɛk.sɪˈkjuː.ʃən/, publish /ˈpʌblɪʃ/
  • 긴 단어 — 강세 위치에 주의: authorization /ˌɔːθəɹaɪˈzeɪʃən/, successfully /səkˈsɛs.fə.li/, validation /ˌvæl.əˈdeɪ.ʃən/, generator /ˈdʒɛnəɹeɪtə(ɹ)/, parameter /pəˈɹæm.ə.tɚ/

한국어 화자가 어려워하는 소리:

  • /f/ — ㅍ(/p/)으로 바꾸지 말고 윗니를 아랫입술에 대기: fixture /ˈfɪks.t͡ʃə/, successfully /səkˈsɛs.fə.li/, folder /ˈfoʊldɚ/, framework /ˈfɹeɪm.wɜːk/, helpful /ˈhɛlp.fl̩/
  • /v/ — ㅂ(/b/)과 구별하기: validation /ˌvæl.əˈdeɪ.ʃən/, variable [ˈvæɹ.i.ə.bl̩], navigate /ˈnæv.ɪ.ɡeɪt/, validate /ˈvæl.ɪ.deɪt/
  • /z/ — ㅈ이 아니라 성대를 울리는 /s/: authorization /ˌɔːθəɹaɪˈzeɪʃən/, browser /ˈbɹaʊ.zəɹ/, organize /ˈɔɹɡənaɪz/, authorize /ˈɔθəɹaɪz/, initialize /ɪˈnɪʃəlaɪz/

이 영상으로 연습하는 방법

  1. 먼저 말하지 않고 영상을 끝까지 듣고 모르는 단어를 적어 둡니다.
  2. 0.75배속으로 한 문장씩 섀도잉을 시작하고, 익숙해지면 보통 속도로 돌아갑니다.
  3. 자신의 목소리를 녹음해 원본과 비교하고, assertion, authorization, custom 같은 단어에 특히 주의합니다.

쉐도잉이란? 영어 실력을 빠르게 키우는 과학적 방법

쉐도잉(Shadowing)은 원래 전문 통역사 훈련을 위해 개발된 언어 학습 기법으로, 다언어 학자인 Dr. Alexander Arguelles에 의해 대중화된 방법입니다. 핵심 원리는 간단하지만 매우 강력합니다: 원어민의 영어를 들으면서 1~2초의 짧은 지연으로 즉시 소리 내어 따라 말하는 것——마치 '그림자(shadow)'처럼 화자를 따라가는 것입니다. 문법 공부나 수동적인 청취와 달리, 쉐도잉은 뇌와 입 근육이 동시에 실시간으로 영어를 처리하고 재현하도록 훈련합니다. 연구에 따르면 이 방법은 발음 정확도, 억양, 리듬, 연음, 청취력, 말하기 유창성을 크게 향상시킵니다. IELTS 스피킹 준비와 자연스러운 영어 소통을 원하는 분들에게 특히 효과적입니다.

섀도잉 방법: 단계별 전체 가이드 읽기 →