Araştırma Makalesi
BibTex RIS Kaynak Göster

Automatic unit test generator software by collecting run-time data

Yıl 2024, Cilt: 42 Sayı: 4, 988 - 1008, 01.08.2024

Öz

Quality and productivity needs are considered together in software. For this reason, any existing software should be tested automatically with test automation. Software test automations is automated software testing activities. Automating constantly manually written tests, on the other hand, saves time, reduces error rates, produces better quality software, and reduces costs. This study aims to produce an automatic unit testing framework that is planned to work in run-time on software products. This developed application performs unit test transformations that can respond to the desired test scenarios on the product being studied.. Java agent is used as the basis of all these transformations. All information about the objects, methods, and variables of the sample java classes to be worked on is converted into data in run-time using byte code. During this transformation, information is saved in the database, and unit tests are created automatically through the template engine. Compared to the products developed on automatic unit test generation in the literature, the opcode parsing method was developed for this study. This method reads a byte code at run-time, uses the properties of the java class it belongs to, and automatically creates the unit test class and test methods. The study can also examine different object definitions and conditional and loop structures within a method and produce alternative test scenarios. The automatic unit test scenario produced has been turned into a flexible framework that can encounter minimum errors at run-time. Considering the scarcity of studies in the field of national software testing; It is thought that the automatic unit test generation product developed within the scope of this study, using byte code, will contribute to the work area.

Kaynakça

  • REFERENCES
  • [1] Damar M, Özdağoğlu G, Özdağoğlu A. Software quality and standards on a global scale: Trends in the literature from scientific and sectoral perspective. Alphanumeric J 2018;6:325–348. [CrossRef]
  • [2] Felice S. JUnit Vs TestNG: Differences between JUnit and TestNG. Available at: https://www.browserstack.com/guide/junit-vs-testng. Accessed on Jun 26, 2024.
  • [3] Graham D, Fewster M. Software test automation: effective use of test execution tools. Boston: Addison-Wesley Professional; 1999.
  • [4] Csallner C, Smaragdakis Y. JCrasher: An automatic robustness tester for Java. Softw Pract Exp 2004;34:1025–1050. [CrossRef]
  • [5] Pacheco C, Lahiri SK, Ernst MD, Ball T. Feedback-directed random test generation. In proceedings of the 29th International Conference on Software Engineering; 2007: Minneapolis, MN, USA. IEEE; 2007. pp.75– 84. [CrossRef]
  • [6] Pacheco C, Ernst MD. Randoop: Feedback-directed random testing for Java. Proceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA 2007:815–816. [CrossRef]
  • [7] Simons AJH. JWalk: A tool for lazy, systematic testing of java classes by design introspection and user interaction. Autom Softw Eng 2007;14:369–418. [CrossRef]
  • [8] Sen K, Marinov D, Agha G. Cute: A concolic unit testing engine for C. Available at: https://www.cs.columbia.edu/~junfeng/08fa-e6998/sched/readings/cute.pdf. Accessed Jun 26, 2024.
  • [9] Charreteur F, Gotlieb A. Constraint-based test input generation for java bytecode. In proceedings of the 21st IEEE International Symposium on Software Reliability Engineering; 2010 Nov; San Jose, CA, USA. IEEE; 2012. [CrossRef]
  • [10] Fraser G, Arcuri A. Evosuite: automatic test suite generation for object-oriented software. In proceedings of the 19th ACM SIGSOFT symposium and the 13th European Conference on Foundations of Software Engineering; 2011 Sept; New York, United States. 2011. pp. 416–419. [CrossRef]
  • [11] Sakti A, Pesant G, Gueheneuc YG. Instance generator and problem representation to improve object oriented code coverage. IEEE Trans Softw Eng 2015;41:294–313. [CrossRef]
  • [12] Tanno H, Zhang X, Hoshino T, Sen K. TesMa and CATG: automated test generation tools for models of enterprise applications. In proceedings of the 37th IEEE International Conference on Software Engineering; 2015 May 16–24; Florence, Italy. IEEE; 2015. pp. 717–720. [CrossRef]
  • [13] Tzoref-Brill R, Sinha S, Abu Nassar A, Goldin V, Kermany H. TackleTest: A tool for amplifying test generation via type-based combinatorial coverage. Available at: https://research.ibm.com/publications/tackletest-a-tool-for-amplifying-test-generation-via-type-based-combinatorial-coverage. Accessed on Jun 26, 2024.
  • [14] Higo Y. Constructing dataset of functionally equivalent Java methods using automated test generation techniques. Available at: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4543198. Accessed on Jun 26, 2024. [CrossRef]
  • [15] Lukasczyk S, Fraser G. Pynguin: Automated unit test generation for python. Available at: https://arxiv.org/abs/2202.05218. Accessed on Jun 26, 2024.
  • [16] Bardin S, Kosmatov N, Marcozzi M, Delahaye M. Specify and measure, cover and reveal: A unified framework for automated test generation. Sci Comput Program 2021;207:102641. [CrossRef]
  • [17] Arcuri A. RESTful API automated test case generation with EvoMaster. ACM Trans Softw Eng Methodol 2019;28:1–37. [CrossRef]
  • [18] Venners B. Bytecode basics : A first look at the bytecodes of the Java virtual machine. Available at: https://www.infoworld.com/article/2077233/bytecode-basics.html?page=2. Accessed on Jun 26, 2024.
  • [19] McMinn P. Search-based software testing: past, present and future. In proceedings of the IEEE Fourth International Conference on Software Testing, Verification and Validation Workshops; 2011 Mar 21–25; Berlin, Germany. IEEE; 2011. pp. 153–163. [CrossRef]
  • [20] Venkatesan P, Rozario RG, Fiaidhi J. Junit framework for unit testing. Available at: https://www.techrxiv.org/doi/full/10.36227/techrxiv.12092259.v1. Accessed on Jun 26, 2024.
  • [21] FreeMarker. What is a Apache FreeMarker? Available at: https://freemarker.apache.org/index.html. Accessed on Jun 26, 2024.
  • [22] Evosuite. SF110 corpus of classes. Available at: https://www.evosuite.org/experimental-data/sf110/. Accessed on Jun 26, 2024.
  • [23] Fraser G, Arcuri A. A large-scale evaluation of automated unit test generation using evosuite. Available at: https://www.evosuite.org/wp-content/papercite-data/pdf/tosem_evaluation.pdf. Accessed on Jun 26, 2024.
Yıl 2024, Cilt: 42 Sayı: 4, 988 - 1008, 01.08.2024

Öz

Kaynakça

  • REFERENCES
  • [1] Damar M, Özdağoğlu G, Özdağoğlu A. Software quality and standards on a global scale: Trends in the literature from scientific and sectoral perspective. Alphanumeric J 2018;6:325–348. [CrossRef]
  • [2] Felice S. JUnit Vs TestNG: Differences between JUnit and TestNG. Available at: https://www.browserstack.com/guide/junit-vs-testng. Accessed on Jun 26, 2024.
  • [3] Graham D, Fewster M. Software test automation: effective use of test execution tools. Boston: Addison-Wesley Professional; 1999.
  • [4] Csallner C, Smaragdakis Y. JCrasher: An automatic robustness tester for Java. Softw Pract Exp 2004;34:1025–1050. [CrossRef]
  • [5] Pacheco C, Lahiri SK, Ernst MD, Ball T. Feedback-directed random test generation. In proceedings of the 29th International Conference on Software Engineering; 2007: Minneapolis, MN, USA. IEEE; 2007. pp.75– 84. [CrossRef]
  • [6] Pacheco C, Ernst MD. Randoop: Feedback-directed random testing for Java. Proceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA 2007:815–816. [CrossRef]
  • [7] Simons AJH. JWalk: A tool for lazy, systematic testing of java classes by design introspection and user interaction. Autom Softw Eng 2007;14:369–418. [CrossRef]
  • [8] Sen K, Marinov D, Agha G. Cute: A concolic unit testing engine for C. Available at: https://www.cs.columbia.edu/~junfeng/08fa-e6998/sched/readings/cute.pdf. Accessed Jun 26, 2024.
  • [9] Charreteur F, Gotlieb A. Constraint-based test input generation for java bytecode. In proceedings of the 21st IEEE International Symposium on Software Reliability Engineering; 2010 Nov; San Jose, CA, USA. IEEE; 2012. [CrossRef]
  • [10] Fraser G, Arcuri A. Evosuite: automatic test suite generation for object-oriented software. In proceedings of the 19th ACM SIGSOFT symposium and the 13th European Conference on Foundations of Software Engineering; 2011 Sept; New York, United States. 2011. pp. 416–419. [CrossRef]
  • [11] Sakti A, Pesant G, Gueheneuc YG. Instance generator and problem representation to improve object oriented code coverage. IEEE Trans Softw Eng 2015;41:294–313. [CrossRef]
  • [12] Tanno H, Zhang X, Hoshino T, Sen K. TesMa and CATG: automated test generation tools for models of enterprise applications. In proceedings of the 37th IEEE International Conference on Software Engineering; 2015 May 16–24; Florence, Italy. IEEE; 2015. pp. 717–720. [CrossRef]
  • [13] Tzoref-Brill R, Sinha S, Abu Nassar A, Goldin V, Kermany H. TackleTest: A tool for amplifying test generation via type-based combinatorial coverage. Available at: https://research.ibm.com/publications/tackletest-a-tool-for-amplifying-test-generation-via-type-based-combinatorial-coverage. Accessed on Jun 26, 2024.
  • [14] Higo Y. Constructing dataset of functionally equivalent Java methods using automated test generation techniques. Available at: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4543198. Accessed on Jun 26, 2024. [CrossRef]
  • [15] Lukasczyk S, Fraser G. Pynguin: Automated unit test generation for python. Available at: https://arxiv.org/abs/2202.05218. Accessed on Jun 26, 2024.
  • [16] Bardin S, Kosmatov N, Marcozzi M, Delahaye M. Specify and measure, cover and reveal: A unified framework for automated test generation. Sci Comput Program 2021;207:102641. [CrossRef]
  • [17] Arcuri A. RESTful API automated test case generation with EvoMaster. ACM Trans Softw Eng Methodol 2019;28:1–37. [CrossRef]
  • [18] Venners B. Bytecode basics : A first look at the bytecodes of the Java virtual machine. Available at: https://www.infoworld.com/article/2077233/bytecode-basics.html?page=2. Accessed on Jun 26, 2024.
  • [19] McMinn P. Search-based software testing: past, present and future. In proceedings of the IEEE Fourth International Conference on Software Testing, Verification and Validation Workshops; 2011 Mar 21–25; Berlin, Germany. IEEE; 2011. pp. 153–163. [CrossRef]
  • [20] Venkatesan P, Rozario RG, Fiaidhi J. Junit framework for unit testing. Available at: https://www.techrxiv.org/doi/full/10.36227/techrxiv.12092259.v1. Accessed on Jun 26, 2024.
  • [21] FreeMarker. What is a Apache FreeMarker? Available at: https://freemarker.apache.org/index.html. Accessed on Jun 26, 2024.
  • [22] Evosuite. SF110 corpus of classes. Available at: https://www.evosuite.org/experimental-data/sf110/. Accessed on Jun 26, 2024.
  • [23] Fraser G, Arcuri A. A large-scale evaluation of automated unit test generation using evosuite. Available at: https://www.evosuite.org/wp-content/papercite-data/pdf/tosem_evaluation.pdf. Accessed on Jun 26, 2024.
Toplam 24 adet kaynakça vardır.

Ayrıntılar

Birincil Dil İngilizce
Konular Klinik Kimya
Bölüm Research Articles
Yazarlar

Sevdanur Genç 0000-0003-4774-9265

Yayımlanma Tarihi 1 Ağustos 2024
Gönderilme Tarihi 17 Kasım 2022
Yayımlandığı Sayı Yıl 2024 Cilt: 42 Sayı: 4

Kaynak Göster

Vancouver Genç S. Automatic unit test generator software by collecting run-time data. SIGMA. 2024;42(4):988-1008.

IMPORTANT NOTE: JOURNAL SUBMISSION LINK https://eds.yildiz.edu.tr/sigma/