The priceCalculation example - an example performing a very simple calculation of price, quantity and exchange rate - contains a class CurrencyCalculator having one attribute (exchangeRate) and two class operations (calculatePrice and createCurrencyCalculator). By applying the stereotype <<E2ETestable>> to the class this class is marked as testable.
|
If the flag generateTestService on the service composite is set to true, the compiler will generate test SOAP services for all testable classes of the model.
By the following tagged values you can configure the test settings:
|
We recommend creating a separate service for all testable classes (e.g. TestingService) and to set the tagged value wsdlPerService to true on the <<E2EComposite>>. By that means, a mix-up between main and testing service is avoided. The testing features get a separate WSDL and a separate service entry on the Bridge and can be started and stopped within the Bridge by the Activation checkbox as needed.
Please note that the compiler will not generate test SOAP services for testable classes from imported modules. |
For more information on the Bridge and service preferences refer to the Bridge User Guide .
Once the class is part of the SOAP interface, it is possible to test all class operations with the xUML SOAP Test Tool (or any other SOAP test tool) and with the Analyzer. The testable class may even be part of regression tests defined with the Analyzer.
Within each test case, attributes of the testable class are addressed via the self context, so that all information relevant for the execution of the test case can be provided.