Design Unit Testing Application

Medium
Company: Premium
GoogleAmazon

Let's design a simplified Application that allows users to run pre-defined "Units of Work" and track their execution results. Think of this as a lightweight, in-memory task execution framework. The system should allow registering different Units of Work, executing them, and recording their status (success/failure) along with relevant output or error messages. We want to build this with a strong focus on testability, extensibility and thread safety.

This application will mimic a simple task scheduling system. Each unit of work will represent an independent task. For simplicity, consider these units of work as in-memory operations, avoiding heavy I/O (e.g., database interactions) to keep the focus on design patterns and concurrency. The core functionality lies in managing and executing these units of work efficiently and reliably.

Requirements

Interview Simulation

Experience a realistic interview conversation. The interviewer will ask clarifying questions,and you'll reveal your understanding of the requirements.

Interviewer

Let's start by understanding the scope. What are the core functionalities this system needs to provide?

💡 Interview Tip

Identify the Actors (Who uses the system?) and their Use Cases (What are they trying to achieve?). Start with the 'Happy Path' scenarios.

Press ⌘ + Enter to submit

Premium Content

View detailed solutions.

UNLOCK PREMIUM