Skip to main content
Top
Published in: Automated Software Engineering 1/2024

01-05-2024

Regression test selection in test-driven development

Authors: Zohreh Mafi, Seyed-Hassan Mirian-Hosseinabadi

Published in: Automated Software Engineering | Issue 1/2024

Log in

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

The large number of unit tests produced in the test-driven development (TDD) method and the iterative execution of these tests extend the regression test execution time in TDD. This study aims to reduce test execution time in TDD. We propose a TDD-based approach that creates traceable code elements and connects them to relevant test cases to support regression test selection during the TDD process. Our proposed hybrid technique combines text and syntax program differences to select related test cases using the nature of TDD. We use a change detection algorithm to detect program changes. Our experience is reported with a tool called RichTest, which implements this technique. In order to evaluate our work, seven TDD projects have been developed. The implementation results indicate that the RichTest plugin significantly decreases the number of test executions and also the time of regression testing despite considering the overhead time. The test suite effectively enables fault detection because the selected test cases are related to the modified partitions. Moreover, the test cases cover the entire modified partitions; accordingly, the selection algorithm is safe. The concept is particularly designed for the TDD method. Although this idea is applicable in any programming language, it is already implemented as a plugin in Java Eclipse.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Appendix
Available only for authorised users
Footnotes
3
Logical Structural Diff.
 
4
Statements such as synchronized, do, try, for, if, while, and switch.
 
5
Simple Theorem Prover.
 
6
Code normalization is a semantic-preserving transformation.
 
7
Each copy of the program a developer saves. It is not necessarily a new issue/version of the program.
 
8
Help → Install New Software, and also should set Window → Preferences as Dependency folder address.
 
9
Available from Window → Show View → Other → RichTest.
 
10
Available from Window → Preferences → RichTest.
 
11
Abstract Syntax Tree.
 
12
sw itch, while, if, for, foreach, and try.
 
13
result = autorank(data, alpha = 0.05, verbose = False).
 
Literature
go back to reference Ammann, P., Offutt, J.: Introduction to software testing. Cambridge University Press, Cambridge (2008)CrossRef Ammann, P., Offutt, J.: Introduction to software testing. Cambridge University Press, Cambridge (2008)CrossRef
go back to reference Apiwattanapong, T., Orso, A., Harrold, M.J.: JDiff: a differencing technique and tool for object-oriented programs. Autom. Softw. Eng.. Softw. Eng. 14(1), 3–36 (2007)CrossRef Apiwattanapong, T., Orso, A., Harrold, M.J.: JDiff: a differencing technique and tool for object-oriented programs. Autom. Softw. Eng.. Softw. Eng. 14(1), 3–36 (2007)CrossRef
go back to reference Archambault, D.: Structural differences between two graphs through hierarchies. In: Proceedings of Graphics Interface, Kelowna (2009) Archambault, D.: Structural differences between two graphs through hierarchies. In: Proceedings of Graphics Interface, Kelowna (2009)
go back to reference Asaduzzaman, M., Roy, C., Schneider, K., Di Penta, M.: LHDiff: a language-independent hybrid approach for tracking source code lines. In: IEEE International Conference on Software Maintenance, Eindhoven (2013) Asaduzzaman, M., Roy, C., Schneider, K., Di Penta, M.: LHDiff: a language-independent hybrid approach for tracking source code lines. In: IEEE International Conference on Software Maintenance, Eindhoven (2013)
go back to reference Astels, D.: Test Driven Development: A Practical Guide. Prentice-Hall/Pearson Education, New Jersey (2003) Astels, D.: Test Driven Development: A Practical Guide. Prentice-Hall/Pearson Education, New Jersey (2003)
go back to reference Beck, K.: Test Driven Development: By Example. Addison-Wesley, Boston (2002) Beck, K.: Test Driven Development: By Example. Addison-Wesley, Boston (2002)
go back to reference Beller, M., Georgios, G., Annibale, P.: Developer testing in the ide: patterns, beliefs, and behavior. IEEE Trans. Softw. Eng.softw. Eng. 45(3), 261–284 (2017)CrossRef Beller, M., Georgios, G., Annibale, P.: Developer testing in the ide: patterns, beliefs, and behavior. IEEE Trans. Softw. Eng.softw. Eng. 45(3), 261–284 (2017)CrossRef
go back to reference Beningo, J.: Testing, verification, and test-driven development. In: Embedded Software Design: A Practical Approach to Architecture, Processes, and Coding Techniques, pp. 197–218. Apress, Berkeley, CA (2022) Beningo, J.: Testing, verification, and test-driven development. In: Embedded Software Design: A Practical Approach to Architecture, Processes, and Coding Techniques, pp. 197–218. Apress, Berkeley, CA (2022)
go back to reference Binkley, D.: Using semantic differencing to reduce the cost of regression testing. In: IEEE Conference on Software Maintenance, Orlando (1992) Binkley, D.: Using semantic differencing to reduce the cost of regression testing. In: IEEE Conference on Software Maintenance, Orlando (1992)
go back to reference Biswas, S., Mall, R., Satpathy, M., Sukumaran, S.: Regression test selection techniques: a survey. Informatica 35(3), 289–321 (2011) Biswas, S., Mall, R., Satpathy, M., Sukumaran, S.: Regression test selection techniques: a survey. Informatica 35(3), 289–321 (2011)
go back to reference Borle, N.C., Feghhi, M., Stroulia, E., Greiner, R., Hindle, A.: Analyzing the effects of test driven development in GitHub. Empir. Softw. Eng.. Softw. Eng. 23(4), 1931–1958 (2018)CrossRef Borle, N.C., Feghhi, M., Stroulia, E., Greiner, R., Hindle, A.: Analyzing the effects of test driven development in GitHub. Empir. Softw. Eng.. Softw. Eng. 23(4), 1931–1958 (2018)CrossRef
go back to reference Canfora, G., Cerulo, L., Penta, M.D.: LDiff: an enhanced line differencing tool. In: 31st International Conference on Software Engineering. IEEE Computer Society, Washington (2009) Canfora, G., Cerulo, L., Penta, M.D.: LDiff: an enhanced line differencing tool. In: 31st International Conference on Software Engineering. IEEE Computer Society, Washington (2009)
go back to reference Cibulski, H., Amiram, Y.: Regression test selection techniques for test-driven development. In: IEEE Fourth International Conference on Software Testing, Verification and Validation Workshops, Washington (2011) Cibulski, H., Amiram, Y.: Regression test selection techniques for test-driven development. In: IEEE Fourth International Conference on Software Testing, Verification and Validation Workshops, Washington (2011)
go back to reference Dalton, J.: Test-driven development. In: Great Big Agile, pp. 263–264. Apress, Berkeley (2019) Dalton, J.: Test-driven development. In: Great Big Agile, pp. 263–264. Apress, Berkeley (2019)
go back to reference Debin, G., Reiter, M.K., Song, D.: Binhunt: automatically finding semantic differences in binary programs. In: International Conference on Information and Communications Security. Springer, Berlin (2008) Debin, G., Reiter, M.K., Song, D.: Binhunt: automatically finding semantic differences in binary programs. In: International Conference on Information and Communications Security. Springer, Berlin (2008)
go back to reference Erdogmus, H., Maurizio, M., Marco, T.: On the effectiveness of the test-first approach to programming. IEEE Trans. Softw. Eng.softw. Eng. 31(3), 226–237 (2005)CrossRef Erdogmus, H., Maurizio, M., Marco, T.: On the effectiveness of the test-first approach to programming. IEEE Trans. Softw. Eng.softw. Eng. 31(3), 226–237 (2005)CrossRef
go back to reference Falleri, J., Floréal, M., Xavier, B., Matias, M., Martin, M.: Fine-grained and accurate source code differencing. In: 29th ACM/IEEE International Conference on Automated Software Engineering. Västerås (2014) Falleri, J., Floréal, M., Xavier, B., Matias, M., Martin, M.: Fine-grained and accurate source code differencing. In: 29th ACM/IEEE International Conference on Automated Software Engineering. Västerås (2014)
go back to reference Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: In: Gamma, E. (ed.) Refactoring: improving the design of existing code. Pearson Education India, Karnataka (1999) Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: In: Gamma, E. (ed.) Refactoring: improving the design of existing code. Pearson Education India, Karnataka (1999)
go back to reference George, B., Williams, L.: A structured experiment of test-driven development. Inf. Softw. Technol.softw. Technol. 46(5), 337–342 (2004)CrossRef George, B., Williams, L.: A structured experiment of test-driven development. Inf. Softw. Technol.softw. Technol. 46(5), 337–342 (2004)CrossRef
go back to reference Görg, M., Zhao, J.: Identifying semantic differences in AspectJ programs. In: 18th International Symposium on Software Testing and Analysis (ACM), Chicago (2009) Görg, M., Zhao, J.: Identifying semantic differences in AspectJ programs. In: 18th International Symposium on Software Testing and Analysis (ACM), Chicago (2009)
go back to reference Goto, A., Yoshida, N., Ioka, M., Choi, E., Inoue, K.: How to extract differences from similar programs? A cohesion metric approach. In: 7th International Workshop on Software Clones (IEEE Press), San Francisco (2013) Goto, A., Yoshida, N., Ioka, M., Choi, E., Inoue, K.: How to extract differences from similar programs? A cohesion metric approach. In: 7th International Workshop on Software Clones (IEEE Press), San Francisco (2013)
go back to reference Herbold, S.: Autorank: a python package for automated ranking of classifiers. J. Open Sour. Softw. 5(48), 2173 (2020)CrossRef Herbold, S.: Autorank: a python package for automated ranking of classifiers. J. Open Sour. Softw. 5(48), 2173 (2020)CrossRef
go back to reference Horwitz, S.: Identifying the semantic and textual differences between two versions of a program. ACM Sigplan 25(6), 234–245 (1990)CrossRef Horwitz, S.: Identifying the semantic and textual differences between two versions of a program. ACM Sigplan 25(6), 234–245 (1990)CrossRef
go back to reference Hsu, R.: Method for detecting differences between graphical programs‏. U.S. Patent 5,974,254, 26 Oct 1999 Hsu, R.: Method for detecting differences between graphical programs‏. U.S. Patent 5,974,254, 26 Oct 1999
go back to reference Karac, I., Turhan, B.: What do we (really) know about test-driven development? IEEE Softw.softw. 35(4), 81–85 (2018)CrossRef Karac, I., Turhan, B.: What do we (really) know about test-driven development? IEEE Softw.softw. 35(4), 81–85 (2018)CrossRef
go back to reference Khanam, Z., Mohammed, N.A.: Evaluating the effectiveness of test driven development: advantages and pitfalls. Int. J. Appl. Eng. Res. 12(18), 7705–7716 (2017) Khanam, Z., Mohammed, N.A.: Evaluating the effectiveness of test driven development: advantages and pitfalls. Int. J. Appl. Eng. Res. 12(18), 7705–7716 (2017)
go back to reference Kim, M., David, N.: Discovering and representing systematic code changes. In: IEEE 31st International Conference on Software Engineering, Washington (2009) Kim, M., David, N.: Discovering and representing systematic code changes. In: IEEE 31st International Conference on Software Engineering, Washington (2009)
go back to reference Legunsen, O., August, S., Darko, M.: STARTS: STAtic regression test selection. In: 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE) (2017) Legunsen, O., August, S., Darko, M.: STARTS: STAtic regression test selection. In: 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE) (2017)
go back to reference Linares-Vásquez, M., Cortés-Coy, L., Aponte, J., Poshyvanyk, D.: Changescribe: a tool for automatically generating commit messages. In: 37th IEEE International Conference on Software Engineering, Florence (2015) Linares-Vásquez, M., Cortés-Coy, L., Aponte, J., Poshyvanyk, D.: Changescribe: a tool for automatically generating commit messages. In: 37th IEEE International Conference on Software Engineering, Florence (2015)
go back to reference Liu, C., Chen, C., Han, J., Yu, P.S.: GPLAG: detection of software plagiarism by program dependence graph analysis. In: 12th ACM SIGKDD international conference on Knowledge discovery and data mining. New York (2006) Liu, C., Chen, C., Han, J., Yu, P.S.: GPLAG: detection of software plagiarism by program dependence graph analysis. In: 12th ACM SIGKDD international conference on Knowledge discovery and data mining. New York (2006)
go back to reference Madeyski, L., Marcin, K.: Continuous test-driven development—a novel agile software development practice and supporting tool. In: Evaluation of Novel Approaches to Software Engineering (ENASE), pp. 260–267 Madeyski, L., Marcin, K.: Continuous test-driven development—a novel agile software development practice and supporting tool. In: Evaluation of Novel Approaches to Software Engineering (ENASE), pp. 260–267
go back to reference Madeyski, L., Kawalerowicz, M.: Continuous test-driven development: a preliminary empirical evaluation using agile experimentation in industrial settings. Towards Synerg. Combin. Res. Pract. Softw. Eng. 733, 105–118 (2018)CrossRef Madeyski, L., Kawalerowicz, M.: Continuous test-driven development: a preliminary empirical evaluation using agile experimentation in industrial settings. Towards Synerg. Combin. Res. Pract. Softw. Eng. 733, 105–118 (2018)CrossRef
go back to reference Maletic, J.I., Collard, M.L.: Supporting source code difference analysis. In: 20th IEEE International Conference on Software Maintenance, Chicago (2004) Maletic, J.I., Collard, M.L.: Supporting source code difference analysis. In: 20th IEEE International Conference on Software Maintenance, Chicago (2004)
go back to reference Neamtiu, I., Foster, J.S., Hicks, M.: Understanding source code evolution using abstract Syntax Tree Matching. Missouri (2005) Neamtiu, I., Foster, J.S., Hicks, M.: Understanding source code evolution using abstract Syntax Tree Matching. Missouri (2005)
go back to reference Nguyen, H.A., Nguyen, T.T., Nguyen, H.V., Nguyen, T.N.: iDIFF: interaction-based program differencing tool. In: 26th IEEE/ACM International Conference on Automated Software Engineering, Washington (2011) Nguyen, H.A., Nguyen, T.T., Nguyen, H.V., Nguyen, T.N.: iDIFF: interaction-based program differencing tool. In: 26th IEEE/ACM International Conference on Automated Software Engineering, Washington (2011)
go back to reference Nooraei Abadeh, M., Mirian-Hosseinabadi, S.: Delta-based regression testing: a formal framework towards model-driven regression testing. J. Softw. Evol. Process 27(12), 913–952 (2015)CrossRef Nooraei Abadeh, M., Mirian-Hosseinabadi, S.: Delta-based regression testing: a formal framework towards model-driven regression testing. J. Softw. Evol. Process 27(12), 913–952 (2015)CrossRef
go back to reference Riebisch, M., Farooq, Q., Lehnert, S.: Model-based regression testing: process, challenges and approaches. In: Emerging Technologies for the Evolution and Maintenance of Software Models, Ilmenau, Germany, pp. 254–297. IGI Global (2012) Riebisch, M., Farooq, Q., Lehnert, S.: Model-based regression testing: process, challenges and approaches. In: Emerging Technologies for the Evolution and Maintenance of Software Models, Ilmenau, Germany, pp. 254–297. IGI Global (2012)
go back to reference Rosero, R.H., Gómez, O.S., Rodríguez, G.: 15 Years of software regression testing techniques—a survey. Int. J. Softw. Eng. Knowl. Eng.softw. Eng. Knowl. Eng. 26(05), 675–689 (2016)CrossRef Rosero, R.H., Gómez, O.S., Rodríguez, G.: 15 Years of software regression testing techniques—a survey. Int. J. Softw. Eng. Knowl. Eng.softw. Eng. Knowl. Eng. 26(05), 675–689 (2016)CrossRef
go back to reference Rothermel, G., Harrold, M.J.: A safe, efficient regression test selection technique. ACM Trans. Softw. Eng. Methodol. (TOSEM) 6(2), 173–210 (1997)CrossRef Rothermel, G., Harrold, M.J.: A safe, efficient regression test selection technique. ACM Trans. Softw. Eng. Methodol. (TOSEM) 6(2), 173–210 (1997)CrossRef
go back to reference Rothermel, G., Mary, J.H.: Empirical studies of a safe regression test selection technique. IEEE Trans. Softw. Eng.softw. Eng. 24(6), 401–419 (1998)CrossRef Rothermel, G., Mary, J.H.: Empirical studies of a safe regression test selection technique. IEEE Trans. Softw. Eng.softw. Eng. 24(6), 401–419 (1998)CrossRef
go back to reference Santosh Singh, R., Kumar, S.: An approach for the prediction of number of software faults based on the dynamic selection of learning techniques. IEEE Trans. Reliab.reliab. 68(1), 216–236 (2018) Santosh Singh, R., Kumar, S.: An approach for the prediction of number of software faults based on the dynamic selection of learning techniques. IEEE Trans. Reliab.reliab. 68(1), 216–236 (2018)
go back to reference Shen, J., Sun, X., Li, B., Yang, H., Hu, J.: On automatic summarization of what and why information in source code changes. In: 40th Annual Computer Software and Applications Conference (COMPSAC), Atlanta (2016) Shen, J., Sun, X., Li, B., Yang, H., Hu, J.: On automatic summarization of what and why information in source code changes. In: 40th Annual Computer Software and Applications Conference (COMPSAC), Atlanta (2016)
go back to reference Vokolos, F.I., Frankl, P.: Empirical evaluation of the textual differencing regression testing technique. In: IEEE International Conference on Software Maintenance (Cat. No. 98CB36272), Bethesda (1998) Vokolos, F.I., Frankl, P.: Empirical evaluation of the textual differencing regression testing technique. In: IEEE International Conference on Software Maintenance (Cat. No. 98CB36272), Bethesda (1998)
go back to reference Wang, T., Wang, K., Su, X., Ma, P.: Detection of semantically similar code. Front. Comput. Sci. 8(6), 996–1011 (2014)MathSciNetCrossRef Wang, T., Wang, K., Su, X., Ma, P.: Detection of semantically similar code. Front. Comput. Sci. 8(6), 996–1011 (2014)MathSciNetCrossRef
go back to reference Wang, X., Pollock, L., Vijay-Shanker, K.: Automatic segmentation of method code into meaningful blocks to improve readability. In: 18th Working Conference on Reverse Engineering IEEE, Limerick (2011) Wang, X., Pollock, L., Vijay-Shanker, K.: Automatic segmentation of method code into meaningful blocks to improve readability. In: 18th Working Conference on Reverse Engineering IEEE, Limerick (2011)
go back to reference Yang, W.: Identifying syntactic differences between two programs. Softw. Pract. Exp. 21(7), 739–755 (1991)CrossRef Yang, W.: Identifying syntactic differences between two programs. Softw. Pract. Exp. 21(7), 739–755 (1991)CrossRef
go back to reference Yoo, S., Mark, H.: Regression testing minimization, selection and prioritization: a survey. Softw. Test. Verific. Reliab. 22(2), 67–120 (2012)CrossRef Yoo, S., Mark, H.: Regression testing minimization, selection and prioritization: a survey. Softw. Test. Verific. Reliab. 22(2), 67–120 (2012)CrossRef
go back to reference Zhang, L., Hao, D., Zhang, L., Rothermel, G.: Bridging the gap between the total and additional test-case prioritization strategies. In: Proceedings of the 2013 International Conference on Software Engineering, San Francisco (2013) Zhang, L., Hao, D., Zhang, L., Rothermel, G.: Bridging the gap between the total and additional test-case prioritization strategies. In: Proceedings of the 2013 International Conference on Software Engineering, San Francisco (2013)
go back to reference Zhu, C., Legunsen, O., Shi, A., Gligoric, M.: A framework for checking regression test selection tools. In: IEEE/ACM 41st International Conference on Software Engineering (ICSE), Montreal, QC, Canada (2019) Zhu, C., Legunsen, O., Shi, A., Gligoric, M.: A framework for checking regression test selection tools. In: IEEE/ACM 41st International Conference on Software Engineering (ICSE), Montreal, QC, Canada (2019)
Metadata
Title
Regression test selection in test-driven development
Authors
Zohreh Mafi
Seyed-Hassan Mirian-Hosseinabadi
Publication date
01-05-2024
Publisher
Springer US
Published in
Automated Software Engineering / Issue 1/2024
Print ISSN: 0928-8910
Electronic ISSN: 1573-7535
DOI
https://doi.org/10.1007/s10515-023-00405-w

Other articles of this Issue 1/2024

Automated Software Engineering 1/2024 Go to the issue

Premium Partner