I see many people talking about the term SUT, but do not understand why they use that term.
SUT is what you want to test?
Where does this term come from and what does it mean?
For example in this test, what is my SUT?
[TestMethod]
public void UsersAction_should_return_IndexAction()
{
const long id = 1;
UsersViewModel viewModel = new UsersViewModel()
{
SelectedUsers = new long[] { 1, 2, 3, 4 }
};
ActionResult result = _controller.Users(id, viewModel);
result.AssertActionRedirect().ToAction("Index");
}
The System Under Test (SUT) from a Unit Testing perspective represents all of the actors (i.e one or more classes) in a test that are not mocks or stubs. In your example that would be the controller.
I've never heard the term eiher, but a quick search gave
From good ole wikipedia.
System Under Test SUT.
In your unit test example, if you really want to talk about SUT it's probably
UsersAction
. However, I have not come across anyone use SUT when talking about unit testing. To me this sounds more like something that would fit with integration/system/performance testing or alike.For instance, take performance testing. Here you might say the SUT is the whole HW/SW system, or it might be just one of them depending on what you're testing in that specific performance test.
DUT (device under test) and UUT (unit under test) are very common abbreviations among test enginers (non-software test engineers). That's where the term SUT (system under test)
and CUT (code under test) ought to have come from.
related:
2008 MSDN blog post Naming SUT Test Variables .
It most likely means "System Under Test", i.e. the system being tested, as opposed to other systems it may interact with, but which are not being explicitly tested (because they're someon else's responsibility).