Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
XUnit
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Architecture == An xUnit framework has the following general [[Software architecture|architecture]].<ref>{{cite web|last1=Beck|first1=Kent|title=Simple Smalltalk Testing: With Patterns|url=http://www.xprogramming.com/testfram.htm|access-date=25 June 2015|archive-url=https://web.archive.org/web/20150315073817/http://www.xprogramming.com/testfram.htm|archive-date=15 March 2015}}</ref> === Test case === A [[test case]] is the smallest part of a test that generally encodes a simple path through the software under test. The test case code prepares input data and environmental state, invokes the software under test and verifies expected results. A programmer writes the code for each test case. === Assertions === A test case is implemented with one or more [[Assertion (computing)|assertions]] that validate expected results. Generally, the framework provides assertion functionality. A framework may provide a way to use custom assertions. === Test suite === A [[test suite]] is a collection of related test cases. They share a framework which allows for reuse of environment setup and cleanup code. Generally, a test runner may run the cases of a suite in any order so the programmer should not depend on top-to-bottom execution order. === Test fixture === A [[test fixture]] (also known as a test context) provides the environment for each test case of a suite. Generally, a fixture is configured to setup a known, good, [[Runtime (program lifecycle phase)|runtime]] environment before tests run, and to cleanup the environment after. The fixture is configured with one or more functions that setup and cleanup state. The test runner runs each setup function before each case and runs each cleanup function after. === Test runner === A test runner is a program that runs tests and reports results.<ref>Meszaros, Gerard (2007) ''xUnit Test Patterns'', Pearson Education, Inc./Addison Wesley</ref> The program is often part of a framework. A test runner may produce results in various formats. Often, a common and default format is [[human-readable]], [[plain-text]]. Additionally, the runner may produce structured output. Some xUnit adaptations (i.e. JUnit) can output [[XML]] that can be used by a continuous integration system such as [[Jenkins (software)|Jenkins]] and [[Atlassian bamboo|Atlassian Bamboo]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)