Certified Developer for Apache Kafka · 15% of the exam

Application Testing: free practice questions

5 sample questions from our 12-question bank for this domain — answers and explanations included. These are the same scenario-based style as the real Confluent exam.

1. A test must verify that a new Avro schema version is COMPATIBLE with existing consumers before deployment. What should the test check against?

  • A. Schema Registry compatibility rules (e.g., backward/forward compatibility) for the subject✓ Correct
  • B. The number of partitions in the topic
  • C. The consumer group's offset
  • D. The broker's disk size
Explanation

Testing schema evolution means validating the new schema against the Schema Registry's configured compatibility mode (backward, forward, full) for that subject, so consumers won't break. Partition count (B), offsets (C), and disk size (D) are unrelated to schema compatibility.

2. Why is testing delivery semantics (e.g., at-least-once vs exactly-once) important in a Kafka application's test suite?

  • A. Because failure and retry paths can cause duplicates or loss, and tests should verify the application handles them as designed✓ Correct
  • B. Because it changes the topic's partition count
  • C. Because it determines the broker's Region
  • D. Because it sets the Schema Registry URL
Explanation

Delivery semantics govern behavior under failures/retries (possible duplicates or loss), so tests should exercise those paths and confirm the app's handling (idempotency, deduplication, transactional processing). It doesn't change partitions (B), Regions (C), or Schema Registry config (D).

3. Which Kafka Streams utility lets a developer unit-test a topology by piping input records through it and reading outputs WITHOUT a running Kafka cluster?

  • A. TopologyTestDriver✓ Correct
  • B. MockProducer only
  • C. An embedded broker only
  • D. The Schema Registry
Explanation

TopologyTestDriver runs a Kafka Streams topology in-memory, letting you feed input records and assert on outputs and state without a real cluster — fast, deterministic unit testing. MockProducer (B) tests plain producers, an embedded broker (C) is heavier integration testing, and the Schema Registry (D) manages schemas.

4. A developer wants to assert that a producer with idempotence enabled does not create duplicate records on retry. What is the BEST testing approach?

  • A. An integration test that injects failures/retries and verifies the consumed output contains no duplicates✓ Correct
  • B. A unit test that only checks the producer config value is set
  • C. Manually eyeballing production logs
  • D. Skipping the test since idempotence is automatic
Explanation

Verifying no-duplicates-on-retry behavior requires exercising the failure/retry path end-to-end (integration test) and asserting the output has no duplicates. Merely checking the config value (B) doesn't prove behavior, eyeballing logs (C) isn't a repeatable test, and skipping (D) leaves the guarantee unverified.

5. What does testing a Kafka Streams application's state store behavior typically involve?

  • A. Feeding input records and asserting the resulting state (e.g., aggregation values) via the TopologyTestDriver's access to state stores✓ Correct
  • B. Checking the broker's CPU usage
  • C. Measuring network bandwidth between brokers
  • D. Counting the number of consumer groups
Explanation

Testing stateful logic means driving inputs through the topology and asserting the state store contents/aggregation results, which TopologyTestDriver exposes. Broker CPU (B), network bandwidth (C), and consumer-group counts (D) are operational metrics unrelated to unit-testing state logic.

7 more questions in this domain

Practice the full bank with instant grading, flashcards, and a timed mock exam.

Start practicing free