Testing Basics
Testing Basics
Bootcamp - TAE
Agenda
● Theory
■ Testing.
■ Types of testing.
■ Testing Approaches
■ Functional Test.
■ Non-Functional Test.
● Practice
■ Git.
■ Maven.
■ Junit.
■ Exercise.
Theory
Theory
Testing
¿Why is it necessary?
Unit tests
Exercises the smallest pieces of testable software (object or method) in the
application to determine whether they behave as expected.
Component tests
Limits the scope of the exercised software to a portion of the system under test,
manipulating the system through internal code interfaces and using test doubles to
isolate the code under test from other components.
Integration tests
Collect modules together and test them as a subsystem in order to verify that they
collaborate as intended to achieve some larger piece of behavior. They check for
any incorrect assumptions each module has about how to interact with its peers.
Verifies that the system as a whole meets business goals irrespective of the
component architecture in use. Since end-to-end tests are more business facing,
they often utilise business readable Domain Syntax Language (DSL, such as
Gherkin) to express test cases.
Black Tests what the software should do Unbiased Testing each/every input is
Box Based on the module’s definitions and User based unrealistic. Insufficient time. Many
specifications testing paths go untested
Does not care about the program’s Requirement Hard to evaluate how much has
internals validation been tested
Functional test, produced by data, inputs approach Suites grow fast. High maintenance
and outputs of automated tests
Test redundancy
Positive Verifies the ability of the system to implement a solution to the business needs under normal
conditions
Negative Verifies the ability of the system to detect, document and resolve user errors or any other condition
not considered normal
Functional Testing Types
Smoke testing: Refers to the first tests that are executed to provide quick
feedback to determine if system under test is stable and won’t fail drastically.
Sanity testing: Refers to the suite of tests that is executed to verify the main
functions of a system are working without errors to determine if it is
reasonable to continue with further (more detailed) tests.
Practice
Practice
● Git
● Maven
● Junit
Exercise
Design the tests of Math Java library where the trainee tests the main functionality of the
library.