{"id":{"repo_id":"passau-thes","oai_identifier":"oai:kobv.de-opus4-uni-passau:2109"},"canonical_url":"https://search.dev.ndltd.org/etd/passau-thes/oai:kobv.de-opus4-uni-passau:2109","repository":{"repo_id":"passau-thes","name":"Universität Passau","base_url":"https://opus4.kobv.de/opus4-uni-passau/oai"},"display":{"title":"Automated Unit Test Generation for the Python Programming Language","abstract":"Automated unit test generation is an attempt to minimise the effort of manually writing test cases for a software system from the developers. The Python programming language imposes additional challenges to the test-generation problem, such as the dynamic typing. Previous work has confirmed that type information is beneficial for a test generator. However, the type information is often not available. This thesis provides a comprehensive overview over the Pynguin test-generation framework for Python. Pynguin aims to generate high-coverage unit tests for Python libraries using state-of-the-art evolutionary algorithms. We provide an up-to-date description of the Pynguin framework reflecting its recent advances. Furthermore, we target two previously identified open research problems: (1) The used evolutionary algorithms provide many hyperparameters that allow the user to configure them. It is, however, not clear what the optimal values for these parameters are, thus, tools provide default values that are not necessarily backed by empirical evidence, to allow off-the-shelf usage. We overcome this limitation by tuning the DynaMOSA and MIO test-generation algorithms as implemented in Pynguin with two tuning algorithms: differential evolution and grid search. (2) To deal with lacking type information, we propose type tracing, an approach that extracts type-related information during test-case execution and gradually refines the available type information. For hyperparameter tuning, we were able to show that the default values used for Pynguin’s DynaMOSA algorithm were indeed not optimal. Furthermore, using differential evolution as a tuning algorithm outperforms grid search for tuning both in terms of providing the best result from tuning as well as consuming fewer resources. For type tracing, our approach leads to improved branch coverage and mutation score, and to type information of similar quality to what is produced by other state-of-the-art type-inference tools.","abstract_html":"Automated unit test generation is an attempt to minimise the effort of manually writing test cases for a software system from the developers. The Python programming language imposes additional challenges to the test-generation problem, such as the dynamic typing. Previous work has confirmed that type information is beneficial for a test generator. However, the type information is often not available. This thesis provides a comprehensive overview over the Pynguin test-generation framework for Python. Pynguin aims to generate high-coverage unit tests for Python libraries using state-of-the-art evolutionary algorithms. We provide an up-to-date description of the Pynguin framework reflecting its recent advances. Furthermore, we target two previously identified open research problems: (1) The used evolutionary algorithms provide many hyperparameters that allow the user to configure them. It is, however, not clear what the optimal values for these parameters are, thus, tools provide default values that are not necessarily backed by empirical evidence, to allow off-the-shelf usage. We overcome this limitation by tuning the DynaMOSA and MIO test-generation algorithms as implemented in Pynguin with two tuning algorithms: differential evolution and grid search. (2) To deal with lacking type information, we propose type tracing, an approach that extracts type-related information during test-case execution and gradually refines the available type information. For hyperparameter tuning, we were able to show that the default values used for Pynguin’s DynaMOSA algorithm were indeed not optimal. Furthermore, using differential evolution as a tuning algorithm outperforms grid search for tuning both in terms of providing the best result from tuning as well as consuming fewer resources. For type tracing, our approach leads to improved branch coverage and mutation score, and to type information of similar quality to what is produced by other state-of-the-art type-inference tools.","abstract_has_math":false,"creators":["Lukasczyk, Stephan"],"institution":"Universität Passau","degree_name":null,"degree_level":"thesis.doctoral","degree_discipline":null,"degree_department":null,"school":null,"contributors":["Fraser, Gordon","Gay, Gregory"],"advisors":[],"committee_chairs":[],"committee_members":[],"year":2026,"date_issued":"2026-06-26","date_published":"2026-06-26","updated_at":"2026-07-24T03:45:12Z","subjects":["Pynguin","Testgenerierungsframework","dynamische Typisierung"],"languages":[],"rights":["Creative Commons - CC BY - Namensnennung 4.0 International"],"rights_urls":[],"identifier_entries":[]},"links":{"outbound_url":"https://opus4.kobv.de/opus4-uni-passau/frontdoor/index/index/docId/2109","outbound_label":"Repository record","outbound_source":"source_url"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor","label":"Contributor","values":["Fraser, Gordon","Gay, Gregory"]},{"key":"dc:creator","label":"Author","values":["Lukasczyk, Stephan"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:publisher","label":"Institution","values":["Universität Passau"]},{"key":"dc:type","label":"Dc Type","values":["doctoralThesis"]},{"key":"thesis:degree_level","label":"Degree Level","values":["thesis.doctoral"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["Universität Passau"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Pynguin","Testgenerierungsframework","dynamische Typisierung"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:rights","label":"Dc Rights","values":["Creative Commons - CC BY - Namensnennung 4.0 International"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["Automated unit test generation is an attempt to minimise the effort of manually writing test cases for a software system from the developers. The Python programming language imposes additional challenges to the test-generation problem, such as the dynamic typing. Previous work has confirmed that type information is beneficial for a test generator. However, the type information is often not available. This thesis provides a comprehensive overview over the Pynguin test-generation framework for Python. Pynguin aims to generate high-coverage unit tests for Python libraries using state-of-the-art evolutionary algorithms. We provide an up-to-date description of the Pynguin framework reflecting its recent advances. Furthermore, we target two previously identified open research problems: (1) The used evolutionary algorithms provide many hyperparameters that allow the user to configure them. It is, however, not clear what the optimal values for these parameters are, thus, tools provide default values that are not necessarily backed by empirical evidence, to allow off-the-shelf usage. We overcome this limitation by tuning the DynaMOSA and MIO test-generation algorithms as implemented in Pynguin with two tuning algorithms: differential evolution and grid search. (2) To deal with lacking type information, we propose type tracing, an approach that extracts type-related information during test-case execution and gradually refines the available type information. For hyperparameter tuning, we were able to show that the default values used for Pynguin’s DynaMOSA algorithm were indeed not optimal. Furthermore, using differential evolution as a tuning algorithm outperforms grid search for tuning both in terms of providing the best result from tuning as well as consuming fewer resources. For type tracing, our approach leads to improved branch coverage and mutation score, and to type information of similar quality to what is produced by other state-of-the-art type-inference tools.","Die automatisierte Generierung von Unit-Tests ist ein Ansatz, den Aufwand für das manuelle Schreiben von Testfällen für ein Softwaresystem durch Entwicklerinnen und Entwickler zu minimieren. Die Programmiersprache Python stellt zusätzliche Herausforderungen für das Testgenerierungsproblem dar, beispielsweise durch ihre dynamische Typisierung. Frühere Arbeiten haben bestätigt, dass Typinformationen für einen Testgenerator vorteilhaft sind. Diese Typinformationen sind jedoch häufig nicht verfügbar. Diese Arbeit bietet einen umfassenden Überblick über das Pynguin-Testgenerierungsframework für Python. Pynguin zielt darauf ab, mithilfe moderner evolutionärer Algorithmen Unit-Tests mit hoher Abdeckung für Python-Bibliotheken zu generieren. Wir liefern eine aktuelle Beschreibung des Pynguin-Frameworks, die dessen jüngste Weiterentwicklungen widerspiegelt. Darüber hinaus adressieren wir zwei zuvor identifizierte offene Forschungsprobleme: (1) Die verwendeten evolutionären Algorithmen stellen zahlreiche Hyperparameter bereit, mit denen Anwenderinnen und Anwender diese konfigurieren können. Es ist jedoch unklar, welche Werte für diese Parameter optimal sind; daher stellen Werkzeuge Standardwerte bereit, die nicht notwendigerweise empirisch abgesichert sind, um eine sofortige Nutzung zu ermöglichen. Wir überwinden diese Einschränkung, indem wir die in Pynguin implementierten Testgenerierungsalgorithmen DynaMOSA und MIO mithilfe zweier Tuning-Verfahren – Differential Evolution und Grid Search – optimieren. (2) Um mit fehlenden Typinformationen umzugehen, schlagen wir Type Tracing vor, einen Ansatz, der typbezogene Informationen während der Ausführung von Testfällen extrahiert und die verfügbaren Typinformationen schrittweise verfeinert. Für das Hyperparameter-Tuning konnten wir zeigen, dass die für Pynguins DynaMOSA-Algorithmus verwendeten Standardwerte tatsächlich nicht optimal waren. Darüber hinaus übertrifft die Verwendung von Differential Evolution als Tuning-Algorithmus die Grid Search sowohl hinsichtlich der Erreichung der besten Tuning-Ergebnisse als auch in Bezug auf einen geringeren Ressourcenverbrauch. Für Type Tracing führt unser Ansatz zu einer Verbesserung der Branch Coverage und des Mutationsscores sowie zu Typinformationen von vergleichbarer Qualität zu denen, die von anderen modernen Typinferenzwerkzeugen erzeugt werden."]},{"key":"dc:format.medium","label":"Dc Format Medium","values":["application/pdf"]},{"key":"dc:title","label":"Title","values":["Automated Unit Test Generation for the Python Programming Language"]}]}],"canonical_facts":{"dc:contributor":["Fraser, Gordon","Gay, Gregory"],"dc:creator":["Lukasczyk, Stephan"],"dc:description.abstract":["Automated unit test generation is an attempt to minimise the effort of manually writing test cases for a software system from the developers. The Python programming language imposes additional challenges to the test-generation problem, such as the dynamic typing. Previous work has confirmed that type information is beneficial for a test generator. However, the type information is often not available. This thesis provides a comprehensive overview over the Pynguin test-generation framework for Python. Pynguin aims to generate high-coverage unit tests for Python libraries using state-of-the-art evolutionary algorithms. We provide an up-to-date description of the Pynguin framework reflecting its recent advances. Furthermore, we target two previously identified open research problems: (1) The used evolutionary algorithms provide many hyperparameters that allow the user to configure them. It is, however, not clear what the optimal values for these parameters are, thus, tools provide default values that are not necessarily backed by empirical evidence, to allow off-the-shelf usage. We overcome this limitation by tuning the DynaMOSA and MIO test-generation algorithms as implemented in Pynguin with two tuning algorithms: differential evolution and grid search. (2) To deal with lacking type information, we propose type tracing, an approach that extracts type-related information during test-case execution and gradually refines the available type information. For hyperparameter tuning, we were able to show that the default values used for Pynguin’s DynaMOSA algorithm were indeed not optimal. Furthermore, using differential evolution as a tuning algorithm outperforms grid search for tuning both in terms of providing the best result from tuning as well as consuming fewer resources. For type tracing, our approach leads to improved branch coverage and mutation score, and to type information of similar quality to what is produced by other state-of-the-art type-inference tools.","Die automatisierte Generierung von Unit-Tests ist ein Ansatz, den Aufwand für das manuelle Schreiben von Testfällen für ein Softwaresystem durch Entwicklerinnen und Entwickler zu minimieren. Die Programmiersprache Python stellt zusätzliche Herausforderungen für das Testgenerierungsproblem dar, beispielsweise durch ihre dynamische Typisierung. Frühere Arbeiten haben bestätigt, dass Typinformationen für einen Testgenerator vorteilhaft sind. Diese Typinformationen sind jedoch häufig nicht verfügbar. Diese Arbeit bietet einen umfassenden Überblick über das Pynguin-Testgenerierungsframework für Python. Pynguin zielt darauf ab, mithilfe moderner evolutionärer Algorithmen Unit-Tests mit hoher Abdeckung für Python-Bibliotheken zu generieren. Wir liefern eine aktuelle Beschreibung des Pynguin-Frameworks, die dessen jüngste Weiterentwicklungen widerspiegelt. Darüber hinaus adressieren wir zwei zuvor identifizierte offene Forschungsprobleme: (1) Die verwendeten evolutionären Algorithmen stellen zahlreiche Hyperparameter bereit, mit denen Anwenderinnen und Anwender diese konfigurieren können. Es ist jedoch unklar, welche Werte für diese Parameter optimal sind; daher stellen Werkzeuge Standardwerte bereit, die nicht notwendigerweise empirisch abgesichert sind, um eine sofortige Nutzung zu ermöglichen. Wir überwinden diese Einschränkung, indem wir die in Pynguin implementierten Testgenerierungsalgorithmen DynaMOSA und MIO mithilfe zweier Tuning-Verfahren – Differential Evolution und Grid Search – optimieren. (2) Um mit fehlenden Typinformationen umzugehen, schlagen wir Type Tracing vor, einen Ansatz, der typbezogene Informationen während der Ausführung von Testfällen extrahiert und die verfügbaren Typinformationen schrittweise verfeinert. Für das Hyperparameter-Tuning konnten wir zeigen, dass die für Pynguins DynaMOSA-Algorithmus verwendeten Standardwerte tatsächlich nicht optimal waren. Darüber hinaus übertrifft die Verwendung von Differential Evolution als Tuning-Algorithmus die Grid Search sowohl hinsichtlich der Erreichung der besten Tuning-Ergebnisse als auch in Bezug auf einen geringeren Ressourcenverbrauch. Für Type Tracing führt unser Ansatz zu einer Verbesserung der Branch Coverage und des Mutationsscores sowie zu Typinformationen von vergleichbarer Qualität zu denen, die von anderen modernen Typinferenzwerkzeugen erzeugt werden."],"dc:format.medium":["application/pdf"],"dc:publisher":["Universität Passau"],"dc:rights":["Creative Commons - CC BY - Namensnennung 4.0 International"],"dc:subject":["Pynguin","Testgenerierungsframework","dynamische Typisierung"],"dc:title":["Automated Unit Test Generation for the Python Programming Language"],"dc:type":["doctoralThesis"],"thesis:degree_level":["thesis.doctoral"],"thesis:institution_name":["Universität Passau"]},"updated_at":"2026-07-24T03:45:12Z"}