Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.
Auszug
hiddentrue

Nuclos unit test: JUnit, TestNG, Spring, SpringJUnit4ClassRunner, AbstractTestNGSpringContextTests, Mockito, @Autowired, ReflectionTestUtils.

globe with meridians Language: Deutsch · English

open book Unit tests with TestNG or JUnit and Spring support

Unit tests in Nuclos – JUnit and TestNG with a Spring context, ReflectionTestUtils, Mockito and @Autowired.

Status
colourGrey
titleReferenz
Status
colourBlue
titleDeveloper
Status
colourGreen
titleUpdated: Jul 2026
Status
colourGrey
titleapplies to Nuclos 4.2026.x

Panel
bgColor#F4F5F7

On this page

Inhalt
maxLevel2
minLevel2

Nuclos supports classic unit tests. A unit test checks a single method/class independently of the rest of the code – ideal for calculations. In the build and CI process all tests run automatically.

Frameworks

  • JUnit – the best-known framework, supported by Nuclos.
  • TestNG – also supported (its own Eclipse plugin, testng.xml suites).

Spring support

Nuclos tests can use Spring to inject beans and load the context:

ApproachDescription
SpringJUnit4ClassRunnerJUnit test with a Spring context.
AbstractTestNGSpringContextTestsTestNG test with a Spring context.
ReflectionTestUtilssets private fields for tests.
@Autowired / @Configurableinjection into test or domain objects.
Mockito / Springockitomocking dependencies in combination with Spring.
Info
titleExamples

The most extensive examples are in the FDM project (Nuclos staff only). This page gives everyone else an overview of what is possible.

Related pages

gear Code coverage (JaCoCo)


Coverage.

Open →

gear Sonar code analysis


Sonar.

Open →