Jurnal Nasional Teknik Elektro dan Teknologi Informasi
Vol 15 No 1: Februari 2026

Test-First Protocol for Deriving Unit Tests from Use Case Specifications

Muhammad Ridho Kurniawan Pratama (Unknown)
Deni Utama (Unknown)
Rauhil Fahmi (Unknown)



Article Info

Publish Date
27 Feb 2026

Abstract

Early and systematic derivation of unit test scenarios remains challenging in software engineering, particularly in aligning functional requirements with executable tests. Graduate-level observations reveal that most students operate without granular traceability, standardized structures, or alternate flow testing. This study explored a structured test-first protocol that transformed use case specifications into coverage-aware test scenarios by applying object-oriented analysis and design principles. The protocol integrated sequence diagrams via behavioral modeling. Internal logic was extracted from sequence diagrams and visualized using control flow graphs. Basis path testing identified independent paths, serving as foundations for deriving unit test cases using the arrange-act-assert pattern. The “Pay the Order” use case in a hypothetical e-commerce system demonstrated the feasibility of the protocol. Cyclomatic complexity analysis yielded a complexity of 2, indicating that two independent test paths were required for complete coverage. The protocol successfully derived two-unit test cases with 100% basis path coverage, demonstrating complete traceability from functional requirements to unit test scenarios with one-to-one mapping between control flow paths and test cases. Results highlight the protocol’s ability to support early verification and validation processes. Unlike prior works focused on automated system-level test generation, this protocol offers a lightweight, human-centric approach promoting testability, traceability, and strong semantic alignment between requirements and implementation. The protocol is well-suited for educational settings and environments that prioritize traceability. Future research should pursue empirical validation, scalability investigations, semi-automated tool development, domain generalization across paradigms, and longitudinal impact assessment.

Copyrights © 2026






Journal Info

Abbrev

JNTETI

Publisher

Subject

Computer Science & IT Control & Systems Engineering Electrical & Electronics Engineering Energy Engineering

Description

Topics cover the fields of (but not limited to): 1. Information Technology: Software Engineering, Knowledge and Data Mining, Multimedia Technologies, Mobile Computing, Parallel/Distributed Computing, Artificial Intelligence, Computer Graphics, Virtual Reality 2. Power Systems: Power Generation, ...