vendredi 27 mars 2020

Cannot publish json message on Kafka topic using ZeroCode

I am trying to create a test framework using ZeroCode for Kafka. The product I am trying to test is based on micro-services and Kafka. All I am trying to do is to connect to my topic and publish a message to it, at the moment. But when I run the test case I get an error saying 'Exception during operation:produce

I am using .properties file to give broker and SSL credentials. Then send a test JSON. If publishing is successful then I plan to consume from a certain topic and assert on the values - thereby performing an integration test on the service.

Please help me resolving this as I cannot find any meaningful information online as to how to fix this. Much appreciated!

My .properties file look something like this:

security.properties=SSL
ssl.keystore.password=<myPassword>
ssl.keystore.location=<myLocation>
kafka.bootstrap.servers=<myServer>

My JSON file (Test Scenario, null key is a valid input to my topic) looks something like this:

{
    "scenarioName": "Produce a message to kafka topic - vanilla",
    "steps": [
        {
            "name": "produce_step",
            "url": "kafka-topic:my.topic",
            "operation": "produce",
            "request": {
                "records":[
                    {
                        "value": "My test value"
                    }
                ]
            },
            "assertions": {
                "status" : "Ok",
             }
        }
    ]
}

Aucun commentaire:

Enregistrer un commentaire