Robot Framework - ConfluentKafkaLibrary
ConfluentKafkaLibrary library is wrapper for confluent-kafka-python.
ConfluentKafkaLibrary works with latest confluent-kafka-python, tags are 1:1 (ConfluentKafkaLibrary 1.3.0 == confluent-kafka-python 1.3.0 ). Bugfixes and updates are set after the '-' e.g. 1.3.0-1
.
Documentation
Keyword documentation is available here
How to generate documentation:
python -m robot.libdoc -f html src/ConfluentKafkaLibrary docs/index.html
Installation
pip install robotframework-confluentkafkalibrary
Usage
In most cases confluent-kafka-python documentation is your friend. Every keyword should match the same API as python functions, if you are not sure which are pre-configured please check our robotframework-ConfluentKafkaLibrary documentation. Up to date documentation of configuration properties and its values is maintained here by kafka team.
- Find basic usage examples at ./examples/test.robot
- More complex examples (handle byte data from topic, use more consumers, run avro consumer threaded) are at documentation too.
Testing
- This library is tested by black-box tests written in RobotFramework and tests could be found at
- Kafka platform used for testing is dockerized enterprise kafka with schema registry support and rest proxy, deployed & tested on each PR and merge to master.
- Output of latest run can be found at https://robooo.github.io/robotframework-ConfluentKafkaLibrary/log.html
- Tests are divided to:
- test.robot - Basic tests to verify functionality of Consumer / Producer.
- test_adminclient.robot - Verifications of admin client functionality.
- test_avro.robot - Verifications of avro and serializers functionality.
- Not executable example of oauth usage can be found here
- Update of deployment #21 is required.
- Core of the testing logic is to produce data to kafka, connect one consumer in thread and work with the results in specific test cases.