What is SUT and where did it come from?
Asked Answered
R

6

103

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");
}
Reeder answered 6/9, 2011 at 14:18 Comment(0)
A
119

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.

Ameba answered 6/9, 2011 at 14:49 Comment(1)
Of course mocks and stubs are not part of the system being tested. This is not really a definition of SUT and does not explain why the term even exists. The correct definition is provided by xUnit Test Patterns which you can find here.Chummy
M
18

Where does this term come from?

DUT (device under test) and UUT (unit under test) are very common abbreviations among test engineers (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.

Mize answered 1/1, 2018 at 4:21 Comment(0)
F
17

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 someone else's responsibility).

Fbi answered 6/9, 2011 at 14:21 Comment(0)
D
13

I've never heard the term either, but a quick search gave

System under test (SUT) refers to a system that is being tested for correct operation. [...] The term is used mostly in software testing.

A special case of a software system is an application which, when tested, is called an application under test.

The term SUT can also refer to a stage of maturity of the software because system testing is the successor of integration testing in the testing cycle.

From good old Wikipedia.

Despiteful answered 6/9, 2011 at 14:19 Comment(1)
A quick search now points to this page ;)Openhearted
S
3

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.

Salutary answered 6/9, 2011 at 14:20 Comment(0)
R
2

It is good to distinguish SUT and Test System.
The SUT can be part of the test system, illustrated in below picture:

enter image description here

Rapallo answered 15/12, 2019 at 12:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.