0% found this document useful (0 votes)
145 views8 pages

Worksheet 2.11 Unit Testing

The document discusses unit testing, explaining that it is a type of software testing where individual components are tested to validate they perform as expected, and that it is done during development to isolate sections of code and check for correctness. It notes some advantages like finding bugs early and allowing quick changes, but also disadvantages like not catching all errors and being limited to individual units of code. The worksheets include activities like matching terms, identifying paragraph structures, and answering questions to help understand unit testing concepts.

Uploaded by

Edwar Rey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
145 views8 pages

Worksheet 2.11 Unit Testing

The document discusses unit testing, explaining that it is a type of software testing where individual components are tested to validate they perform as expected, and that it is done during development to isolate sections of code and check for correctness. It notes some advantages like finding bugs early and allowing quick changes, but also disadvantages like not catching all errors and being limited to individual units of code. The worksheets include activities like matching terms, identifying paragraph structures, and answering questions to help understand unit testing concepts.

Uploaded by

Edwar Rey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

ACÁ VA EL NOMBRE DEL DOCUMENTO

Acá puede ir una descripción breve o información adicional


sobre el documento.
Unit Testing
Worksheet 2.1

Vocabulary

 performs
 isolate
 mock
 fix
 bugs
 catch
 trace
 to refactor
Worksheet 2.2
 Complete the crossword in the link:

https://crosswordlabs.com/view/session-11-vocabulary

Across
3. Is a method/object that simulates the behavior of a real method/object in
controlled ways.
4. To find or look for something.
6. Is the process of restructuring existing computer code.
8. Those are errors or problems in a program.

Down
1. To separate something from other things with which it is connected or mixed.
2. The new program ... very well on my computer.
5. To notice something that is partly hidden or not clear, or to discover something,
especially using a method.
7. Remove errors from a computer program.
Worksheet 2.3
Watch the video about paragraph: Paragraph - YouTube and complete the next
activities.

https://wordwall.net/resource/19783318/match-up-activity-paragraph

Match the sentence halves together.


a. the main idea expressed in the
A topic sentence expresses the main idea topic sentence is true or valid.

b. help develop supporting ideas.


Supporting sentences help show that

Details can include examples or explanations c. in different words and may also
to summarize the supporting ideas
A concluding sentence restates the main d. of the paragraph and all sentences in
idea the paragraph support it.
Worksheet 2.4
Read the text below, in the text you will see that there are gaps for all the
sub-titles. 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.

A. Why Unit Testing?

B. Unit Testing Advantage

C. What is Unit Testing?

D. Unit Testing Disadvantages

E. Unit Testing Myth

Unit Testing Basics

1. ________________________
UNIT TESTING is a type of software testing where individual units or components of a software are
tested. The purpose is to validate that each unit of the software code performs as expected. Unit
Testing is done during the development (coding phase) of an application by the developers. Unit
Tests isolate a section of code and verify its correctness. A unit may be an individual function,
method, procedure, module, or object. It is important to know that unit testing relies on mock
objects to test sections of code that are not yet part of a complete application. Mock objects fill in
for the missing parts of the program.

2. ________________________
Unit Testing is important because of many reasons. First, unit tests help to fix bugs early in the
development cycle and save costs. Second, it helps the developers to understand the testing code
base and allows them to make changes quickly. Finally, good unit tests serve as project
documentation. In general, if proper unit testing is done in early development, then it saves time
and money in the end.

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.5

Answer the following questions:

1. What can be “a unit”?

2. How can unit tests help programmers?

3. Why do some developers never do unit testing?

4. What limitations does unit testing have?


Worksheet 2.5

Fill out the following self-evaluation section.

1. Entiendo qué es Unit Testing.

2. Entiendo en qué consiste la estrategia The subtitles in the paragraphs.

3. La estrategia The subtitles in the paragraphs me ayuda a entender el texto mejor.

You might also like