The test fixture is a tool that can be used
consistently for testing some item, device or piece of a software. The test
fixture can be found when testing electronics, software and physical devices.
Generally, the text fixtures can be
set up in three ways: in-line setup, delegate setup and implicit setup. In
in-line set up the developers creates the test fixture in the same method as
the rest of the test. But in the simplest test fixture, it is easy to create
but later on its lead to duplication if multiple tests need to use the same
initial data. The delegate setup with the test fixtures is a standalone setup
method that can be accessed by multiple test methods. But in other ways, in
implicit set up methods the developers placed the test fixture in a setup
method subsequently that is later on used to set up multiple test methods.
This is different from the delegate setup,
in that the overall setup of multiple tests can perform in a single setup
method where the test fixture gets created instead of each test method. It has
their own setup of procedures and links for performing the external test
fixture. The main advantages of test fixtures are, it allows for tests to be repeatable one that is always
starting with the same set up every time. It also eases testing code design by
allowing the developers to separate the methods into different functions and
reuse each function for other tests. The test fixtures configured to a known
state at the start point, instead of working with any other device, they left
from a previous test run.
No comments:
Post a Comment