2. Continuous Testing
If we want to build software systems that are truly
reliable, we have to guarantee reliability at the object
level, which can only be achieved through successful
unit tests. Otherwise, we can not expect to build
highly reliable applications. Of course, just writing
the unit test for an object does not necessarily
guarantee reliability. The test must effectively exercise
the use of the object; In addition, the test must be
executed often.
3. Continuous Testing
• Automate Unit Test
• Automate Component Tests
• Automate System Tests
• Automate Functional Tests
• Categorize Developer Tests
• Run Faster Tests First
• Write Tests for Defects
• Make Component Tests Repeatable
• Limit Test Cases to One Asset
Practice makes perfect.
—ENGLISH PROVERB
4. Automate Unit Test
Unit tests verify the behavior of small elements in a software
system, which are generally a single class. Occasionally, however,
the one-to-one relationship between a unit test and a class
increases slightly with additional classes because the classes under
test are closely linked.
Some unit tests require minimal external dependencies, which are
just other classes. These dependent classes are simple and do not
have deep object graphics. Occasionally, unit tests even employ
simulations, which are simple objects that substitute real and
more complicated objects.
5. Automate Component Tests
Testing components or subsystems verify parts of a system and may require a
fully installed system or some external dependencies, such as databases, file
systems, or network endpoints, to name a few.
These tests verify that the components interact to produce the expected behavior.
A typical component test requires that the underlying database is running and
can even cross architectural boundaries. Because each test case exerts a greater
amount of code, more code coverage is obtained per test and, therefore, these tests
tend to last longer than unit tests.
6. Automate System Tests
System tests exert a complete software system and
therefore requires a fully installed system.
These tests verify that external interfaces such as Web
Pages, web service endpoints, and GUIs function end-to-
end as designed.
The tests of the system have the tendency to prolong the
execution times in addition to the long configuration
times.
7. Automate Functional Tests
Functional tests, as the name implies,
test the functionality of an application
from a customer's point of view, which
means that the tests themselves imitate
customers.
These tests are also known as acceptance
tests.
We need a common understanding that
tests are differentiated specifically by the
configuration they require (initialization
databases, etc.), which correlates directly
with the time it takes to run.
8. Categorize Developer Tests
Categorizing developer tests into respective groups
(unit tests, component tests, system tests, and even
functional tests) helps you run slower execution
tests after the fastest execution tests. For example,
running system tests every time you change the
repository is a time-consuming and resource-
consuming task and delays in notifying interested
parties if there is a problem with the compilation.
Writing and running tests is obviously a
good thing, but unless we treat them as an
architectural component that requires proper
categorization and structure, they may begin
to seem like an obstacle, rather than the key,
to success. As you increase the code base
during your project, we are talking about
many tests, and if you run all the written
tests at all times in your system, the
compilations take more time to complete.
9. Run Faster Tests First
• Unit Tests
• Component Tests
• System Tests
Para cambiar la imagen de esta diapositiva, seleccione la imagen y elimínela. Después, haga clic en el icono Imágenes del marcador de posición para insertar su propia imagen.