Testing
Sentinet provides non-intrusive automated testing and service-mockup capabilities, that make developers more productive by enabling them to concurrently develop and test consumer and service applications by delivering functional, performance and security testing without any custom code development.
Virtual services can be configured to return test response messages on all or some of its operations instead of forwarding requests to the business services. If business services metadata and contracts are registered, services can be immediately tested without concrete implementation or even actual hosting. Developers of consumer applications can test their applications against mock-up virtual services hosted in Sentinet Nodes and against virtual request-reply or even one-way operations. Additionally, they can simulate and test security models and performance implications. Consumer applications can be functionally tested against test response messages; test response messages can be organized in test sets.
Select the TEST tab to assign virtual service testable operations and test response messages.
Place checkmarks next to the operations to be tested. One-way operations do not produce response messages, therefore do not require test responses assignment. Click the Add response message button to add a test response message.
The Add Response Message dialog box helps to generate test messages. Select service operation that has to be assigned a test message and click Next button to add test response message to the selected operation.
A test message can be generated as a valid SOAP response or as a SOAP fault. Select the radio button for the SOAP version protocol that will be used to generate a test message. A choice of SOAP protocol version is provided for convenience only, because the actual SOAP version will be determined at runtime once a virtual endpoint is configured with a specific policy. The Array Size field determines how many array elements to generate in the test response message if a message includes arrays. The Max hierarchy levels field determines how deep the message hierarchy should be during the message generation process. Click the Generate Test Message button to generate a test message. Sentinet uses service data schemas to generate XML elements with data types that match data schemas. Actual values are randomly generated and can be replaced with user-defined values.
Each test response message is added to a test set with Count and Delay properties that can be modified in the Response Messages list.
The Count property determines how many consecutive response messages a virtual operation will be returning before moving to the next test response message in the test set. When Count is set to 0, the test message will be skipped.
The Delay property determines how much additional delay in milliseconds to simulate in the operation implementation. Non-zero values of the Delay property are valuable when functionally testing responsiveness on consumer applications with long-running services or services that produce delayed responses. The Move Up and Move Down buttons in the status bar allow for rearranging the order of test response messages in the test set.
When a specific operation element is selected in the service tree in the Test view, the Response Messages list shows only those test messages assigned to that operation. If an upper level service interface or service element is selected, the Response Messages grid shows all test messages relevant to that selected element (for example, select a top-level service element to see all test response messages in the Response Messages grid).
An operation can be unchecked and still have test response messages assigned. The operation is then not testable, but test response messages remain assigned until it is checked again. An operation checked as testable must be assigned at least one response message with a non-zero Count value.