Creating Tests

After RVTest has been properly configured then it is time to start writing tests.

Message Comparison Test

See MessageComparisonTest for examples of comparing TibrvMsgs using RVTestCase.

Functional Test

Functional tests driven from Fixtures. First create a test fixture. RV Test Fixtures can be created in many ways. An example XML Fixture using inlined RV Message Fields is available.

After the test fixture is created it must be run. Create a new test class that extends FunctionalTestCase. In this class create a test method that loads and runs the testcase. For an an example of a class that runs a fixture see ExampleFunctionalTest

Request Reply Test

TibrvRequestReplyTestCase is similar to FunctionalTestCase with a few differences.

A request reply fixture has the following requirements:

  • Exactly One Stimulus
  • Excatly One Response
  • If the Response subject is set to 'INBOX' a TibRv RequestReply INBOX subject will be generated and used as the Stimlus Reply to Subject and the Response Receive Subject. If the subject is not set to INBOX then the subject will be used as specified.
  • The method performRequestReplyTest(RvFixture) should be used.

performRequestReplyTest(RvFixture) will process the fixture with the above rules.

Load Test