How TsDD Improves the Quality and Efficiency of TDD: An Empirical Evaluation

Authors

  • Sahar A. Hussein Altaee
  • Saeed Parsa

Keywords:

Agile methodology , Software engineering, Software testing, Test-driven development, Testable driven development

Abstract

Test-oriented development, a key aspect of agile methodologies, prioritizes creating test functions and test classes before writing code. This approach relies on trial and error, guided by test results, to achieve software design. However, the large number of tests in such methodologies can be time-consuming and conflict with the goal of rapid software production. Parsa introduced a new method called Testability-driven Development (TsDD). This method involves evaluating testability using a static model without executing the code. If necessary, the code is refactored to improve testability, thereby ensuring effective testing. Notably, there is no specific classification of automatic refactoring methods or their associated quality improvements. Consequently, this research aims to define refactoring methods based on testability. The study aims to compare the testability of the new method with the established test-driven development approach. In this paper, we defined refactoring methods based on testability. It was observed that improving one quality parameter through renovation may have contradictory effects, leading to a reduction in other quality attributes. Hence, in the testability-based development method, it is suggested to measure the quality and refactor the code, if necessary, after the testing phase. Through statistical analysis, we achieved an increase in code coverage from 71.9% to 82.151% in the commons-codec project. On average, the testability improvement for three popular packages was 12.54%, resulting in an 8.96% reduction in test time for these packages.

References

K. Beck, “Manifesto for agile software development,” Agile Manifesto, 2001. https://agilemanifesto.org/.

N. Abbas, “Software Quality and Governance in Agile Software Development,” Dec. 01, 2009. https://www.researchgate.net/publication/45145862_Software_Quality_and_Governance_in_Agile_Software_Development.

I. Sommerville, “GlobAl EdiTioN Software Engineering 10th ed,” 2016. Available: https://dn790001.ca.archive.org/0/items/bme-vik-konyvek/Software%20Engineering%20-%20Ian%20Sommerville.pdf

K. Beck, Test driven development: By example. Addison-Wesley Professional, 2022, https://archive.org/details/est-driven-development-by-example/test-driven-development-by-example/

K. BЕСК, “Praise for Extreme Programming Explained, 2nd ed ,” 2000. Available: https://ptgmedia.pearsoncmg.com/images/9780321278654/samplepages/9780321278654.pdf

S. Parsa, Software Testing Automation. Springer Nature, 2023. doi: https://doi.org/10.1007/978-3-031-22057-9.

G. Fraser and A. Arcuri, “A Large-Scale Evaluation of Automated Unit Test Generation Using EvoSuite,” ACM Transactions on Software Engineering and Methodology, vol. 24, no. 2, pp. 1–42, Dec. 2014, doi: https://doi.org/10.1145/2685612.

G. Fraser, M. Staats, P. McMinn, A. Arcuri, and F. Padberg, “Does Automated Unit Test Generation Really Help Software Testers? A Controlled Empirical Study,” ACM Transactions on Software Engineering and Methodology, vol. 24, no. 4, pp. 1–49, Sep. 2015, doi: https://doi.org/10.1145/2699688.

S. A. Deshpande, A. N. Deshpande, M. V. Marathe, and G. V. Garje, “Improving Software Quality with Agile Testing,” International Journal of Computer Applications, vol. 1, no. 22, pp. 68–73, Feb. 2010, doi: https://doi.org/10.5120/440-673.

A. Kuchár, “Test and Behavior-driven Development in Software Companies,” Muni.cz, 2018. https://is.muni.cz/th/i01zi/ (accessed Jun. 10, 2025).

A. Gil et al., “Agile Testing Practices In Software Quality: State of the Art Review,” Journal of Theoretical and Applied Information Technology, vol. 92, no. 1, 2016, Accessed: Jun. 10, 2025. Available: https://www.jatit.org/volumes/Vol92No1/4Vol92No1.pdf

M. Zakeri-Nasrabadi and S. Parsa, “An ensemble meta-estimator to predict source code testability,” Applied Soft Computing, vol. 129, pp. 109562–109562, Aug. 2022, doi: https://doi.org/10.1016/j.asoc.2022.109562.

D. M. Huda, “Measuring Testability of Object Oriented Design: A Systematic Review,” ResearchGate, vol. Vol - 3, no. Issue - 10, p. Page 1313-1319, Oct. 2014. Available: https://www.researchgate.net/publication/266262170_Measuring_Testability_of_Object_Oriented_Design_A_Systematic_Review

V. Garousi, M. Felderer, and F. N. Kılıçaslan, “A survey on software testability,” Information and Software Technology, vol. 108, pp. 35–64, Apr. 2019, doi: https://doi.org/10.1016/j.infsof.2018.12.003.

M. Born and I. K. Schieferdecker, “Welcome To Zscaler Directory Authentication,” Researchgate.net, 2025. https://www.researchgate.net/publication/251793931_Model-Driven_Development_and_Testing_-_A_Case_Study (accessed Jun. 10, 2025).

De, M. L. Chaim, and F. Kon, “Spectrum-based Software Fault Localization: A Survey of Techniques, Advances, and Challenges,” Arxiv.Org, 2016. https://arxiv.org/abs/1607.04347

M. Ghafari, T. Gross, D. Fucci, and M. Felderer, “Why Research on Test-Driven Development is Inconclusive?,” Proceedings of the 14th ACM / IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM), Oct. 2020, doi: https://doi.org/10.1145/3382494.3410687.

A. A. S. Ivo, E. M. Guerra, S. M. Porto, J. Choma, and M. G. Quiles, “An approach for applying Test-Driven Development (TDD) in the development of randomized algorithms,” Journal of Software Engineering Research and Development, vol. 6, no. 1, Sep. 2018, doi: https://doi.org/10.1186/s40411-018-0053-5.

Z. Khanam, “(PDF) Evaluating the effectiveness of test driven development: Advantages and pitfalls,” ResearchGate, 2017. https://www.researchgate.net/publication/327395450_Evaluating_the_effectiveness_of_test_driven_development_Advantages_and_pitfalls

S. Mäkinen and J. Münch, “Effects of Test-Driven Development: A Comparative Analysis of Empirical Studies,” Software Quality. Model-Based Approaches for Advanced Software and Systems Engineering, pp. 155–169, 2014, doi: https://doi.org/10.1007/978-3-319-03602-1_10.

D. Fucci, H. Erdogmus, B. Turhan, M. Oivo, and N. Juristo, “A Dissection of the Test-Driven Development Process: Does It Really Matter to Test-First or to Test-Last?,” IEEE Transactions on Software Engineering, vol. 43, no. 7, pp. 597–614, Jul. 2017, doi: https://doi.org/10.1109/tse.2016.2616877.

M. Z. Nasrabadi and S. Parsa, “Learning to Predict Software Testability,” 2021 26th International Computer Conference, Computer Society of Iran (CSICC), Mar. 2021, doi: https://doi.org/10.1109/csicc52343.2021.9420548.

D. Kelly, R. Gray, and Y. Shao, “Examining random and designed tests to detect code mistakes in scientific software,” Journal of Computational Science, vol. 2, no. 1, pp. 47–56, Dec. 2010, doi: https://doi.org/10.1016/j.jocs.2010.12.002.

J. Hanhela, "Usage of test-driven development in open source projects," J. Hanhela, 2015. https://oulurepo.oulu.fi/bitstream/handle/10024/40414/nbnfioulu-201505211608.pdf?sequence=1&isAllowed=y

I. Bluemke and A. Malanowska, “Software Testing Effort Estimation and Related Problems,” ACM Computing Surveys, vol. 54, no. 3, pp. 1–38, Jun. 2021, doi: https://doi.org/10.1145/3442694.

S. Fraser, K. Beck, B. Caputo, T. Mackinnon, J. Newkirk, and C. Poole, "Test driven development (tdd)," in International Conference on Extreme Programming and Agile Processes in Software Engineering, 2003: Springer, pp. 459-462. https://link.springer.com/chapter/10.1007/3-540-44870-5_84

M. M. Moe, “Comparative Study of Test-Driven Development TDD, Behavior-Driven Development BDD and Acceptance Test–Driven Development ATDD,” International Journal of Trend in Scientific Research and Development, vol. 3, no. 4, pp. 231–234, Jun. 2019, doi: https://doi.org/10.31142/ijtsrd23698.

J. Estdale and E. Georgiadou, “Applying the ISO/IEC 25010 Quality Models to Software Product,” Communications in Computer and Information Science, pp. 492–503, 2018, doi: https://doi.org/10.1007/978-3-319-97925-0_42.

J. Newkirk and A. Vorontsov, “MICROSOFT PROFESSIONAL.” Available: https://ptgmedia.pearsoncmg.com/images/9780735619487/samplepages/9780735619487.pdf

J. Padolsey, Clean Code in Javascript: craft reliable, maintainable, and intriguing javascript. 2020.

B. Noble, “Test Driven: Practical TDD and Acceptance TDD for Java Developers eBook,” Barnes & Noble, Aug. 31, 2007. https://www.barnesandnoble.com/w/test-driven-lasse-koskela/1136796396

J. Langr, "Modern C++ Programming with Test-driven Development: Code Better, Sleep Better," USA: The Pragmatic Programmers, pp. 1-368, 2013. https://pragprog.com/titles/lotdd/modern-c-programming-with-test-driven-development/

M. Wynne, A. Hellesoy, and S. Tooke, The cucumber book: behaviour-driven development for testers and developers. Pragmatic Bookshelf, 2017. https://dl.acm.org/doi/10.5555/2331446

L. Koskela, Test driven: practical TDD and acceptance TDD for Java developers. Greenwich, Conn.: Manning, 2008.

K. Beck and E. Gamma, “Test-Infected: Programmers Love Writing Tests,” Cambridge University Press eBooks, pp. 357–376, Jan. 2000, doi: https://doi.org/10.1017/cbo9780511550881.029.

Published

2025-06-20

How to Cite

Sahar A. Hussein Altaee, & Saeed Parsa. (2025). How TsDD Improves the Quality and Efficiency of TDD: An Empirical Evaluation. International Journal of Computer Science, Algorithms and Programming Languages, 1(1), 26–46. Retrieved from https://matjournals.net/engineering/index.php/IJCSAPL/article/view/2049

Issue

Section

Articles