Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.Questo contenuto non è disponibile nella lingua selezionata.
Chapter 13. Testing Support in SwitchYard
SwitchYard uses JUnit, which is a unit testing framework for Java. SwitchYard provides comprehensive unit test support for testing your applications. There are three primary elements to test support in SwitchYard:
SwitchYardRunner
SwitchYardTestKit
SwitchYardTestCaseConfig
13.1. SwitchYardRunner Class Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
The SwitchYardRunner Class is a JUnit test Runner class that takes care of bootstrapping an embedded SwitchYard runtime and deploying a SwitchYard application for the test instance.
In order to take advantage of the test support in SwitchYard, ensure that your unit test is annotated with the
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
The
SwitchYardRunner
JUnit test Runner class. The SwitchYardRunner
creates and starts an embedded runtime for each test method. After the embedded runtime starts, the project containing the test is packaged as a SwitchYard application and deployed to it. An instance of the SwitchYardTestKit
class is injected into the test when a property of type SwitchYardTestKit is declared in the test. This instance represents the runtime state of the deployed SwitchYard test application.
SwitchYardTestKit
class provides a set of utility methods for performing all sorts of deployment configuration and test operations.