In this section we will reveal as much details about validators as possible. First we describe the architecture and then we discuss an approach to develop new validators.
Please note that the process of validation can have a significant impact on the performance measurement. It is advised to use them only during the development of a performance test or to validate suspicious results.
Similarly to reporting, validation is started from the
received response message is passed to the
ValidationManager which stores
them to a pipeline (i.e.
MessageValidators then consume the messages from this pipeline and count
the correct and failed response messages.
MessageValidator always receives the original message as well so it
can see the particular request after any string templates were replaced with concrete
MessageValidator interface is the easiest to implement in PerfCake.
It only has s ingle method, it does not need to be thread-safe because it is always
called from a single thread in parallel to the running test. It should not perform any
resource demanding tasks.
By default, before the scenario execution has finished, there is only a single call to
MessageValidator every 500ms (unless configured otherwise). After
that, the validation runs without no pauses.
The single method is
isValid() and returns
successful message validation. There is no common abstract ancestor and you are supposed
to implement the interface directly.