Fixtures

RvTest uses a RvFixture to define a test. A RvFixture is defined by composed of a name, stimuli, responses, and additional data. Once an RvFixture is defined it can be executed using the testing framework.

Test fixtures are loaded by a Java test case and are specified using a URI.

Fixture FormatURI SchemeURI LocatorDescription
XML Fixture xmlfilepath to fixture fileThis defines a test fixture and should conform to the xml fixture schema.
Load Test Fixtureloadtestpath to fixture fileUse this to specify a RV Load Test.
Custom RvFixtureclassFully qualified class nameThe class creator constructs concrete implementations of the interface RvFixture.

When specifying a URI the scheme and locator are combined. For example xmlfile://mytestfixture.xml.

Stimuli

Stimuli contain any number of Stimulus nodes and are used to drive an RV test fixture. A Stimulus represents one or more TibRv messages that should be sent as part of a test fixture.

Responses

Each fixture defines a series of Responses. The test fixture uses these as reference messages and performs a comparison between the actual and expected messages. This comparison is configurable.

Response Comparison

Each Response specified in a test fixture represents a messages that the test expects to receive. After the recording window has closed the expected messages are compared to the messages received. Each Response is specified with a comparison method which determines how this comparison works.

Comparison MethodDescriptions
EQUALSThis method will require that the message received is exactly the same as the expected. This involves a RV Field comparison for each expected field. If the actual message is missing a field or has an unexpected field the comparsion fails. For XML Messages XMLUnit is used to compare the messages.
EQUALSIGNOREThis method will perform a comparison of the message where es all expected fields are validated. However if ignoredFields are specified then their content will not be validated. For XML Messages XPath expressions are used to specify the ignored fields.
NONEThis method performs no validation of the message received. Using this comparison will only validate that the correct number of messages were received on the response subject.

Additional Data

Fixtures use Additional Data to specify custom properties. These properties can be used for extending rvtest.