﻿1
00:00:07,700 --> 00:00:11,467
TDD is an acronym
for Test Driven Development.

2
00:00:11,800 --> 00:00:13,100
As the name implies,

3
00:00:13,125 --> 00:00:17,838
this concept revolves around the idea
that your software development's flow,

4
00:00:17,863 --> 00:00:19,667
will be guided by tests.

5
00:00:20,246 --> 00:00:23,570
It started getting a lot of traction
in the early 2000

6
00:00:23,595 --> 00:00:25,983
when Kent Beck published a book

7
00:00:26,008 --> 00:00:29,330
entitled Test Driven
Development by Example.

8
00:00:30,067 --> 00:00:32,233
You might recognize Kent Beck,

9
00:00:32,433 --> 00:00:36,200
he is also known for his contributions
to Extreme Programming

10
00:00:36,259 --> 00:00:38,667
and the Agile Manifesto.

11
00:00:40,635 --> 00:00:43,356
The fundamental process
of Test Driven Development

12
00:00:43,381 --> 00:00:48,400
is to write our code by looping
over three main application stages,

13
00:00:48,700 --> 00:00:51,867
red, green, and refactor.

14
00:00:53,467 --> 00:00:54,907
For the red stage,

15
00:00:54,932 --> 00:00:59,233
we start by writing a test
that describes a requirement

16
00:00:59,258 --> 00:01:01,433
we want our application to fulfill.

17
00:01:02,093 --> 00:01:03,596
While writing the test,

18
00:01:03,621 --> 00:01:07,033
we pretend that all the functionality
is already there.

19
00:01:07,867 --> 00:01:10,367
This test will most likely fail.

20
00:01:11,907 --> 00:01:15,287
We will then focus on doing
the least amount of work

21
00:01:15,333 --> 00:01:18,667
necessary to get this new test to pass.

22
00:01:19,167 --> 00:01:22,117
While at the same time keeping
all the other tests

23
00:01:22,167 --> 00:01:25,267
we already have in place, still passing.

24
00:01:25,567 --> 00:01:27,680
As soon as all the tests are passing,

25
00:01:27,705 --> 00:01:30,627
we have officially reached
the green stage.

26
00:01:31,200 --> 00:01:36,400
Don't worry if your most recent work
looks a bit messy and hard to read.

27
00:01:38,510 --> 00:01:41,033
Now we're ready to make our code better.

28
00:01:41,500 --> 00:01:46,967
It's critical that we perform
incremental improvements and commit often.

29
00:01:47,672 --> 00:01:53,667
Each improvement can only be accepted
if we keep all tests still passing.

30
00:01:54,173 --> 00:01:57,600
The refactor phase
can last as long as we want.

31
00:01:57,886 --> 00:02:02,333
We will stop once we think
our code is looking good enough.

32
00:02:03,786 --> 00:02:06,633
As soon as we're happy
with the state of the code,

33
00:02:06,700 --> 00:02:11,800
we can write another test for another
goal we want our application to fulfill.

34
00:02:11,967 --> 00:02:16,167
This will bring us
right back to the red stage.

35
00:02:16,660 --> 00:02:19,733
This is the red-green refactor loop

36
00:02:19,767 --> 00:02:23,767
that is the driving force
behind test-driven development.

37
00:02:25,190 --> 00:02:29,033
Why don't we put
these concepts to the test?

38
00:02:29,997 --> 00:02:33,533
In this course,
we will be creating a clone

39
00:02:33,558 --> 00:02:37,605
of the popular game Wordle,
using test-driven development.

40
00:02:37,993 --> 00:02:40,267
As we are creating this application,

41
00:02:40,299 --> 00:02:43,400
we will focus
on how test-driven development

42
00:02:43,400 --> 00:02:48,533
not only allows you to write software
with robust and clear requirements,

43
00:02:48,733 --> 00:02:54,300
but also helps you and your team
write very clean and maintainable code.

44
00:02:56,490 --> 00:02:58,833
Besides learning test-driven development,

45
00:02:58,933 --> 00:03:04,333
this course will also make use
of Vue 3 and its composition API.

46
00:03:04,920 --> 00:03:08,033
We will run our tests with Vitest

47
00:03:08,067 --> 00:03:13,300
and make ample use of Vue test Utils
to help us perform assertions.

48
00:03:13,766 --> 00:03:18,383
Last but not least, this course
is also a good opportunity

49
00:03:18,408 --> 00:03:21,100
for us to explore
a little bit of TypeScript.

50
00:03:22,003 --> 00:03:27,633
I would recommend some basic experience
with Vue before watching this course.

51
00:03:28,153 --> 00:03:31,900
Don't worry if you've never written
any TypeScript before,

52
00:03:32,039 --> 00:03:35,400
you'll still be able to follow along
with the content.

53
00:03:35,800 --> 00:03:40,500
Also, we won't be focusing
on fundamentals and syntax

54
00:03:40,525 --> 00:03:42,567
of testing tools in this course,

55
00:03:42,700 --> 00:03:46,467
but rather on the process
of test-driven development itself.

56
00:03:47,146 --> 00:03:49,776
Therefore,
if you are brand new to testing,

57
00:03:49,801 --> 00:03:53,167
it might be worth browsing
the Vue Test Utils docs

58
00:03:53,192 --> 00:03:57,267
or checking out our course
on how to test Vue components first.

59
00:03:57,613 --> 00:04:01,933
I've left links for both of these
resources in the description below.


