Professional Documents
Culture Documents
Unit Testing
Worksheet 2.1
Check out the list of words and tell your teacher and classmates how many
of them you already know. Share their meanings with the class and write
down the meanings of the ones you don’t know.
Vocabulary
Performs
Isolate
Mock
Fix
Bugs
Catch
Trace
To refactor
Worksheet 2.2
Use the new vocabulary in order to complete the crossword. Make sure you
read carefully all the words.
1. A topic sentence expresses the main a. the main idea expressed in the
idea topic sentence is true or valid.
1. Dogs make better companions than cats. 2. The main reason why many people prefer
dogs to cats is their loyalty. 3. They show this by being obedient and showing affection
to their masters. 4. Cats, on the other hand, cannot be trained and treat their owners
with indifference.
5. Secondly, dogs are more fun to spend time with. You can take your dog running,
swimming at the beach or even play frisbee. 7. Conversely, cats like to do their own thing
and are not inclined to join in play such as chasing a ball. 8. Finally, dogs help make your
home more secure. 9. If an unknown person tries to enter your home or property, a dog
will alert you with their bark or even attack the intruder. 10. A cat, on the other hand,
will stay silent and let anyone enter your home. 11. To sum up, dogs are the best choice
as a pet because they are loyal, fun and provide security.
Worksheet 2.3
In the text below you will see that there are gaps for all the subtitles. Read
each section and choose the best subtitle from the list below. This activity
will help you to identify the key idea of each section.
3. _________________________
Some developer say: It requires time, and I am always busy. My code is rock
solid! I do not need unit tests.
Programmers think that Integration Testing will catch all errors and do not
execute the unit test. Once units are integrated, very simple errors take a
very long time to be traced and fixed. Therefore, the truth is Unit testing
increments the speed of development.
4. _________________________
There are many positive aspects about Unit testing. First, developers can look
at the unit tests to gain a basic understanding of the unit API. Second, unit
testing allows the programmer to refactor code at a later date, and make
sure the module still works correctly. Finally, due to the modular nature of
the unit testing, we can test parts of the project without waiting for others to
be completed.
5. _________________________
However, there are also some negative aspects. Unit testing can't catch every
error in a program. It is not possible to evaluate all execution paths even in
the most trivial programs. Also, unit testing by its very nature focuses on a
unit of code. As a result, it can't catch integration errors or broad system
level errors.
Worksheet 2.4
WRAP-UP
After reading the text “Unit Testing Basics”, answer the following
questions.
Yes 😃 Maybe 😐 No 😟
Yes 😃 Maybe 😐 No 😟