top of page

Introducing EventIQ: AI powered Low-Code Acceptance Testing Tool for Event based Microservices

  • Writer: Tuba Kaya
    Tuba Kaya
  • Apr 7
  • 4 min read

Updated: 5 days ago

One of the key benefits of autonomous microservices, improved testability, is not being utilized. We require a more effective and simpler approach.


In the current situation:


  • Tests lag behind

    Automating acceptance tests for the critical paths of a microservice often falls behind schedule, as it requires a significant amount of time from both QA engineers and software developers to develop and maintain these tests.


  • Scenarios are hard to reproduce

    Business tests lack visibility and reproducibility for business stakeholders, as they only run during deployments or on QA engineers' and developers' local machines. When tests fail during the deployment pipeline, the only way to reproduce the test is by running them from a local machine against the test environment.

    Testing critical functionality of a microservice should be easy to access and to reproduce.


  • Business and development alignment is inefficient

    An acceptance test scenario is worth a user story of a thousand words... Development teams aim to clearly identify their focus areas. Establishing acceptance test scenarios sets specific objectives to achieve.



I am designing EventIQ: The AI Powered Low-Code Microservice Acceptance Testing Tool


Automating acceptance tests for critical paths of a microservice can greatly benefit both the business and the development team. It's true that we should have fewer of these tests compared to more detailed ones. In this other post, I guide you through the test pyramid for autonomous microservices and I argue why we need acceptance tests in addition to more detailed tests.


With EventIQ, the AI powered low-code microservice acceptance testing tool (of which I am currently at the designing phase), this process can be completed in fraction of the time. This enablement creates a common ground for business and development to set clear goals. Acceptance tests become accessible both to the development team and the business stakeholders, while test runs during continous deployment pipeline are NOT compromised.


With the power of AI, EventIQ can watch the input and output streams of a given microservice to make test scenario suggestions. Team members can also directly create tests.


After business and development jointly identify the acceptance test scenarios, the technical experts can configure the test steps for execution using the user-friendly UI.


EventIQ Features


  • Create test scenarios using Gherkin language to enhance business readability.

  • Like Swagger or AsyncAPI, EventIQ can be integrated into your microservice. Simply add EventIQ's open source library as a reference to your project and configure test scenarios.

  • Automatically detect incoming or outgoing message structures.

  • Easily configure test steps to publish or to listen for messages, or to make HTTP requests.

  • All test scenarios are stored in YAML format within your solution for source control management.

  • Execute tests on demand on any test environment where the microservice is hosted, as well as during CI/CD pipeline execution. The EventIQ executable operates on your build server to execute your defined tests using the YAML code from your source control management tool of choice.



Example: Energy Consumption Monitoring Test


Here is the test scenario code written in Gherkin language for a fictional test scenario.


Feature: Energy Consumption Monitoring  

  @HappyFlow  
  @NoWarnings  

  Scenario: User stays within the daily energy usage limit  

    Given the user has set a daily energy consumption limit of 50 kWh  
    And the user owns the following appliances:  
      | Appliance        | Power Consumption (kWh) |  
      | Refrigerator     | 2                        |  
    And the refrigerator has been running for 15 hours   
    When the energy monitoring service runs at this time  
    Then the total energy usage for today should be 30 kWh  
    And the user should not receive a warning notification  
    And the user's energy consumption for the time is broadcasted as 30 kWh

In an event-driven microservices architecture, this test scenario can be replicated by generating a test user with a distinct ID. Following that, events can be published to indicate appliance detection and usage details.


Let's say that the following events we would publish in this scenario:

  • UserCreated, user id being a new unique id

  • ConsumptionLimitChanged, 50 kWh

  • ApplianceDetected, for the refrigerator with hourly usage of 2 kWh

  • ApplianceStarted, for the refrigerator


Validating expected results and handling cleanup


Then to verify that the user does not receive a warning message, we can send an API request and expect a response with "no warnings". Writing the test code for this check is not challenging. There are many REST libraries available to help with making such a request and verifying the response.


And we need to verify that a new event was published for ConsumptionChanged event with 30 kWh for this user. This is harder to accomplish. Since the test project must now establish a connection to the message broker, listen to ConsumptionChanged event for a certain amount of time and provide the verification via a shared context to the test in execution.


As clean up, the test should delete the user and the appliance created for this test.


  • UserDeleted, the user we used for the test case

  • ApplianceRemoved, for the refrigerator appliance we used in the test case


Here is a sequence diagram that displays all the steps involved in this simple test scenario.



Tedious to code the steps of the example acceptance test - sequence diagram
Sequence Diagram Steps of the Example Acceptance Test

How EventIQ Would Make It Easier to Conduct The Same Test


With EventIQ, you can easily outline test scenarios in business language and use the low-code platform to define test steps. EventIQ will handle input management and output verification. With this, EventIQ can make automated acceptance testing faster and easier. Therefore, it can enable companies to improve system reliability and accelerate delivery.


Simple steps to follow with EventIQ:

  1. Create a new test scenario

  2. Configure inputs as events to be published to mimic the scenario

  3. Configure expected outputs as the anticipated API response and events that the microservice will publish


EventIQ UI microservice acceptance testing tool
New Test Scenario Page in EventIQ

Following YAML code as the definition of this test would be generated, or it can be entered/adjusted on the page as the code for this test scenario.


YAML code for this test scenario from EventIQ

YAML code of the test will be saved to your solution, enabling source control management of the test cases.


Do you recognize the pain points to be solved by EventIQ? Do you have feedback for me on what features you would love to see? As a solopreneur with passion to make improvements in the software engineering field, I would immensely appreciate any feedback!


If this excites you, leave your email address here to join me in shaping the solution!

 
 
 

Comments


bottom of page