Google News
logo
JUnit - Interview Questions
What is a test fixture with respect to JUnit?
A test fixture is also known as a regulated state of objects that can be used as a platform for running the tests. The primary purpose is to make sure that there is a known climate in which the development tests can be run. Various examples can be cited in this context. They are as follows :
 
* Copying the fixed known set of files
* Preparing the input data and the creation of mock and fake objects
* Assessing a database with fixed and known sets of data

It is also essential for you to note that if a group of tests shares the same fittings, one needs to write a different setup code. On the other hand, if the group of assessments is in need of a different test fixture, one can write the code alongside the test procedure. In this manner, one can create the best accessory related to a test.
Advertisement