Robot Avro Serializer is a custom Robot Framework library written in Python to serialize JSON messages into binary Avro format using user-defined schemas.
- ✅ Load Avro schema from
.avscfiles - 🔄 Serialize JSON objects into Avro binary
- 📦 Return binary as hexadecimal string
- 🤖 Seamless integration with Robot Framework
pip install robotframework AvroSerializerRobot Test:
*** Settings ***
Library AvroSerializer
*** Variables ***
${SCHEMA_FILE} example_schema.avsc
${JSON_MSG} {"name": "Ana", "age": 30, "email": "ana@email.com"}
*** Test Cases ***
Serialize JSON To Avro
Load Avro Schema From File ${SCHEMA_FILE}
${hex}= Serialize And Return Hex ${JSON_MSG}
Log Serialized Avro Hex: ${hex}example_schema.avsc
{
"type": "record",
"name": "User",
"fields": [
{ "name": "name", "type": "string" },
{ "name": "age", "type": "int" },
{ "name": "email", "type": ["null", "string"], "default": null }
]
}git clone https://github.com/darioajr/AvroSerializer.git
cd AvroSerializer
pip install .This project is licensed under the Apache-2.0 License.