What Is a JUnit Test Fixture?
Submitted by: AdministratorA test fixture is a fixed state of a set of objects used as a baseline for running tests. The purpose of a test fixture is to ensure that there is a well known and fixed environment in which tests are run so that results are repeatable. Examples of fixtures:
* Loading a database with a specific, known set of data
* Copying a specific known set of files
* Preparation of input data and setup/creation of fake or mock objects
In other word, creating a test fixture is to create a set of objects initialized to certain states.
If a group of tests requires diferent test fixtures, you can write code inside the test method to create its own test fixture.
If a group of tests shares the same fixtures, you should write a separate setup code to create the common test fixture.
Submitted by: Administrator
* Loading a database with a specific, known set of data
* Copying a specific known set of files
* Preparation of input data and setup/creation of fake or mock objects
In other word, creating a test fixture is to create a set of objects initialized to certain states.
If a group of tests requires diferent test fixtures, you can write code inside the test method to create its own test fixture.
If a group of tests shares the same fixtures, you should write a separate setup code to create the common test fixture.
Submitted by: Administrator
Read Online JUnit Job Interview Questions And Answers
Top JUnit Questions
☺ | What Is JUnit? |
☺ | Why Does Poeple Import org.junit.Assert Statically? |
☺ | How To Wirte a Simple JUnit Test Class? |
☺ | Why Do You Use JUnit to Test Your Code? |
☺ | How Do You Launch a Debugger When a Test Fails? |
Top Testing Categories
☺ | Manual Testing Interview Questions. |
☺ | Rational TestSuite Interview Questions. |
☺ | QTP Interview Questions. |
☺ | Database Testing Interview Questions. |
☺ | Software QA Interview Questions. |