Architecture and Methodology of Unit Testing Embedding Pair-Wise Mode for Small Team

Mengqing TanLi, Ying Zhang, Yulin WangJournal of Software Engineering and Applications 2022 · DOI

Abstract

In this paper, the new organization for unit testing embedding pair-wise mode is proposed with the core thought focused on the cooperation of programmer and tester by “cross-testing”. The typical content of unit testing for the new organizing mode should have three aspects, including self-checking, cross-testing and independent-testing. For cross-testing, executing “pair-wise” mode, mainly tackles data testing, function testing and state testing, which function testing must be done by details and state testing must be considered for completeness. With the specializing of independent-testing, it should be taken as more rigid testing without arbitrariness. Consequently, strategy and measure are addressed for data testing focusing on boundary testing and function/state testing. And organizing method of procedure and key points of tackling unit testing are investigated for the new organizing mode. In order to assess the validity of our study and approach, a series of actual examples are demonstrated for GUI software. The result indicates that the execution of unit testing for the new organizing mode is effective and applicable.

Introduction

Unit testing is the foundational stage of software quality assurance, yet it is notoriously labor-intensive, often accounting for 60% of the total testing workload. While large corporations can afford specialized QA teams, small teams—which represent approximately 75% of software companies in China—often struggle to organize testing effectively due to limited resources.

Existing methodologies frequently overlook the specific cooperation mechanisms needed when programmers must perform multiple roles. Without a clear structure, small teams often fall into the trap of "lonely programming," where developers only test their own code. This lack of objective oversight leads to overlooked bugs and reduced software quality. This paper proposes a pragmatic organizational framework specifically designed to bridge this gap for small development teams.

The "Pair-Wise" Organizational Framework

The core innovation of this research is the "Pair-Wise" Mode, which restructures the development team to foster a "cooperation atmosphere." The workflow is divided into three distinct tiers: self-checking, cross-testing, and independent-testing.

Organizational structure of the pair-wise unit testing mode, illustrating the interaction between programmers and testers across units.
  1. Self-Checking: The original programmer performs code reviews and constructs test classes before submission.
  2. Cross-Testing: This is the central pillar of the model. Programmer A acts as the tester for Programmer B’s unit, and vice versa. This peer-to-peer approach focuses on data, function, and state testing, ensuring that logic is scrutinized by a fresh set of eyes.
  3. Independent-Testing: A team manager or a dedicated tester performs rigid, "arbitrariness-free" testing on key or safety-critical units to ensure high-level quality control.
Hierarchy of unit testing activities, mapping specific testing tasks to the self-checking, cross-testing, and independent-testing tiers.

To support this structure, the authors introduce several specific techniques:

  • Distinguished Strategy Matrix: A decision framework that helps teams prioritize testing items (e.g., boundary, safety, interface) based on whether a system is "safety-critical," "general," or "lower-level."
  • Improved State Transform Diagrams (STD): A specialized modeling approach for GUI software that synthesizes similar states to ensure no "return states" or "exception states" are missed.
  • Time-Axis Management: Strategies to handle "Idle-Waiting" (when a developer waits for peer feedback) and "Parallel-Disposing" (concurrently working on other modules) to maintain team velocity.

Evaluation and Results

The methodology was evaluated using a real-world internal application: the PQMS2 (Product Quality Monitoring System version 2.0). The authors demonstrated the approach using specific GUI units, such as "Setting of Coefficient" and "Factory Division" management forms. For modern desktop applications, the authors argue that the "Sheet/Form" should be treated as the basic unit of testing, with all internal controls considered a single subject for state and data testing.

The results from the PQMS2 case study indicated that the organization mode is effective and applicable for small teams. Key findings include:

  • Efficiency: The pair-wise mode accelerated development by identifying bugs earlier in the cycle through intersection testing.
  • Coverage: The improved STD method generated comprehensive test cases for complex branch logic and state transitions, ensuring systematic verification of exception messages.
  • Cooperation: Beyond bug detection, the model broke down silos and encouraged developers to learn from each other's code segments and logic.

Conclusion and Future Work

While the proposed model offers a robust framework for small teams, it is heavily weighted toward GUI-based desktop software. Its application to back-end microservices or APIs remains a subject for future exploration. Additionally, the model assumes a high level of professional maturity to prevent friction during peer-to-peer reviews.

Future work could focus on integrating these organizational "pair-wise" checks with modern CI/CD automation tools, bridging the gap between human-centric cooperation and automated unit testing frameworks.

Summary updated

Abstract

In this paper, the new organization for unit testing embedding pair-wise mode is proposed with the core thought focused on the cooperation of programmer and tester by “cross-testing”. The typical content of unit testing for the new organizing mode should have three aspects, including self-checking, cross-testing and independent-testing. For cross-testing, executing “pair-wise” mode, mainly tackles data testing, function testing and state testing, which function testing must be done by details and state testing must be considered for completeness. With the specializing of independent-testing, it should be taken as more rigid testing without arbitrariness. Consequently, strategy and measure are addressed for data testing focusing on boundary testing and function/state testing. And organizing method of procedure and key points of tackling unit testing are investigated for the new organizing mode. In order to assess the validity of our study and approach, a series of actual examples are demonstrated for GUI software. The result indicates that the execution of unit testing for the new organizing mode is effective and applicable.
BibTeX
@article{tanli2022architecture,
  author = {Mengqing TanLi and Ying Zhang and Yulin Wang},
  title = {{Architecture and Methodology of Unit Testing Embedding Pair-Wise Mode for Small Team}},
  journal = {Journal of Software Engineering and Applications},
  year = {2022},
  doi = {10.4236/jsea.2022.1511022},
}
Figure