Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kafka message consumption based on a template within time range #1547

Closed
alexaladin opened this issue Apr 7, 2021 · 0 comments · Fixed by #1549
Closed

Kafka message consumption based on a template within time range #1547

alexaladin opened this issue Apr 7, 2021 · 0 comments · Fixed by #1549
Assignees
Labels
feature New feature or request
Milestone

Comments

@alexaladin
Copy link

There is a Step in Kafka plugin that sounds like
When I wait with $timeout timeout until count of consumed Kafka messages is $comparisonRule $expectedCount

In application under test there is a validation step that evaluates the POST request sent to generate kafka message.
in case of successful validation a massage is being created. IF validation fails a message should not be created.

I need a step similar to the one above that checks if there are messages created in kafka topic that matches particular template
It should be aligned with scenario below (new step functionality is described in point 3)

  1. connect to kafka topic to consume messages - there is a separate step for that

  2. perform some action to generate a request - e.g. API request

  3. Vividus checks if there are messages in kafka topic that match predefined sample;
    a) when we expect e.g. >=5 messages the step should be completed once at least 5 messages are found (PASSED) OR when wait timeout is over (FAILED)
    b) when we expect 0 messages to be in inserted in kafka topic the step should be completed once the message is found (FAILED) OR when wait timeout is over and there is no any message found (PASSED)
    c) messages found should be saved into a variable. So the variable contains a list of messages that match predefined template AND were consumed after connection to kafka topic was established

  4. stop consuming messages from kafka

Ideal solution:
When I wait with $timeout timeout until count of consumed Kafka messages matching $template is $comparisonRule $expectedCount

Alternative (limited) solution:
if using step "When I wait with $timeout timeout until count of consumed Kafka messages is $comparisonRule $expectedCount" for the case when 0 messages are expected to be inserted, vividus should wait for $timeout checking if there are any messages are being inserted to kafka topic

@alexaladin alexaladin added the feature New feature or request label Apr 7, 2021
@alexaladin alexaladin changed the title Kafka message consumption based on a template Kafka message consumption based on a template within time range Apr 7, 2021
@ikalinin1 ikalinin1 self-assigned this Apr 8, 2021
@ikalinin1 ikalinin1 mentioned this issue Apr 10, 2021
@valfirst valfirst added this to the 0.3.4 milestone Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants