-
Hello dear community, I am trying to implement Microcks in our company but haven't been able to find an answer to one question – is it possible to perform tests using assertions in AsyncAPI? I envision it working like this: microcks-minion generates a message to a RabbitMQ queue (i.e. Q1), then an internal corporate microservice picks up the message, performs certain actions, and then sends the result of those actions to another queue (i.e. Q2). After that, Microcks tests would analyze the messages from Q2 and, based on assertions, determine the success of the test. As far as I understand, this functionality is only implemented for SOAP artifacts, but not for AsyncAPI. Is that correct? Additionally, microcks-minion continuously generates messages to the RabbitMQ endpoint at a certain frequency. Is there a way to schedule this instead of having it run continuously? I would greatly appreciate any help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @vmamonov Yes, you're correct: assertions checking is only valid using SoapUI or Postman Collection artifacts that allow specifying assertions or additional checks on SOAP or REST APIs. We don't have such a mechanism for AsyncAPI at the moment. The conformance checking at the AsyncAPI level is purely schema conformance validation. If you would need additional checks, we only way to do it at the moment would be to launch Microcks tests via our Testcontainers module and then do the extra work in your JUnit, Jst or Go tests. How are you planning to define/write your assertions? Do you have some artifact specifications in mind? Yes, at the moment, mock messages publication is continuous and sends all the available messages as a batch. We started discussing allowing some dispatching policy but didn't come to clear requirements. I also started a GitHub discussion here about triggering async message publication from REST mock invocation but didn't get real feedback on it... As of today, if your need is just to enable/disable publication on a certain period, the easiest would be to just use the Microcks API to change the frequency of publication (0 means "stop publication"). Cheers, |
Beta Was this translation helpful? Give feedback.
Hi @vmamonov
Yes, you're correct: assertions checking is only valid using SoapUI or Postman Collection artifacts that allow specifying assertions or additional checks on SOAP or REST APIs. We don't have such a mechanism for AsyncAPI at the moment. The conformance checking at the AsyncAPI level is purely schema conformance validation. If you would need additional checks, we only way to do it at the moment would be to launch Microcks tests via our Testcontainers module and then do the extra work in your JUnit, Jst or Go tests. How are you planning to define/write your assertions? Do you have some artifact specifications in mind?
Yes, at the moment, mock messages publication is continuous an…