· Jan 7, 2022

Ensemble Production Tests with Deferred Responses

Hi all,

I am busy trying out the %UnitTest.TestProduction class to implement some automated production testing.

I have a scenario which I am not sure how to get the final results of for assertion. Below is the scenario I am trying to test, with comments on what I have done.

  • Receive a  request on a service (Service A).
  • Send the request to the BPL
    • I use SendMessage of the TestProduction class.
  • The BPL sends a request to a Business Operation (SendToProvider)
  • The SendToProvider operation sends a message out to the Service Provider. DeferResponse is done. It then inserts a table entry linking a Reference from the request to the generated token of DeferResponse
    • After this, I check that the table entry inserted correctly and get the Reference value from the table.
  • I then simulate a message(delayed response) from the Service Provider to a Business Service, providing the Reference and other values
  • The Business Service then gets the Token from the table using the Reference  It builds a response and calls SendDeferredResponse. This then responds to the BPLs request that was sent to the SendToProvider operation.
  • I need the values of this response to check if the values align with what has been sent in the delayed message from the provider

How do I get this response and/or its values?
Any advice on how to do this will be greatly appreciated.

Product version: Ensemble 2018.1
Discussion (0)3
Log in or sign up to continue