The Pynguin Logo Pynguin

Automatic Unit Test Generation Tool for Python

Pynguin (IPA: ˈpɪŋɡuiːn), the PYthoN General UnIt test geNerator, is a tool that allows developers to generate unit tests automatically.

Pynguin is developed at the Chair of Software Engineering II of the University of Passau.

The Pynguin Logo

About

Pynguin is a command line tool written in Python that allows to automatically generate unit tests for Python programs. It aims to remove the burden of crafting tests manually from the developer. For that Pynguin is an extensible tool that allows the implementation of various test-generation approaches; this enables the usage of Pynguin not only for developers but also for researchers.

News

We list at most the five latest posts here. Consider having a look at our Blog for further posts.

Key Publications on Pynguin

  • S. Lukasczyk and G. Fraser. Pynguin: Automated Unit Test Generation for Python. In Proceedings of the 44th International Conference on Software Engineering Companion. pp. 168–172. ACM, 2022. DOI: 10.1145/3510454.3516829 arXiv:2202.05218

    BibTeX entry:

     1@InProceedings{conf/icse/LukasczykF22,
     2  author    = {Stephan Lukasczyk and Gordon Fraser},
     3  title     = {Pynguin: Automated Unit Test Generation for Python},
     4  booktitle = {ICSE'22: Proceedings of the ACM/IEEE 44th International Conference
     5               on Software Engineering: Companion Proceedings},
     6  pages     = {168--172},
     7  year      = {2022},
     8  publisher = {{ACM}},
     9  doi       = {10.1145/3510454.3516829},
    10}
    

    Describes Pynguin as a tool, its internal structure and workings, as well as possibilities to enhance it and how to use it.

  • S. Lukasczyk, F. Kroiß, and G. Fraser. An Empirical Study of Automated Unit Test Generation for Python. Accepted to the EMSE Special Edition on “Advances in Search-Based Software Engineering”. arXiv:2111.05003

    BibTeX entry:

     1@Article{journals/corr/abs-2111-05003,
     2  author    = {Stephan Lukasczyk and Florian Kroi{\ss} and Gordon Fraser},
     3  title     = {An Empirical Study of Automated Unit Test Generation for
     4               Python},
     5  journal   = {CoRR},
     6  volume    = {abs/2111.05003},
     7  year      = {2021},
     8  eprinttype = {arXiv},
     9  eprint    = {2111.05003},
    10}
    

    Extends the SSBSE paper on Pynguin by enhancing the description of Pynguin and its implemented algorithms. Furthermore provides an enriched empirical evaluation of Pynguin.

  • S. Lukasczyk, F. Kroiß, and G. Fraser. Automated Unit Test Generation for Python. In Proceedings of the 12th Symposium on Search-based Software Engineering. Lecture Notes in Computer Science, vol. 12420, pp. 9–24. Springer, 2020. DOI: 10.1007/978-3-030-59762-7_2. arXiv:2007.14049

    BibTeX entry:

     1@InProceedings{conf/ssbse/LukasczykKF20,
     2  author    = {Stephan Lukasczyk and Florian Kroi{\ss} and Gordon Fraser},
     3  title     = {Automated Unit Test Generation for Python},
     4  booktitle = {Proceedings of the 12th Symposium on Search-based Software
     5               Engineering (SSBSE 2020, Bari, Italy, October 7–8)},
     6  year      = {2020},
     7  publisher = {Springer},
     8  series    = {Lecture Notes in Computer Science},
     9  volume    = {12420},
    10  pages     = {9--24},
    11  doi       = {10.1007/978-3-030-59762-7\_2},
    12}
    

    The initial publication on Pynguin. Describes test generation with random and whole-suite generation approaches and introduces several challenges to the community.

Publications using Pynguin

This is an incomplete list of publications that use Pynguin. If your work is missing here, drop Stephan a note that he can add it here.

  • D. Trübenbach, S. Müller, and L. Grunske. A Comparative Evaluation on the Quality of Manual and Automatic Test Case Generation Techniques for Scientific Software—A Case Study of a Python Project for Material Science Workflows. Proceedings of the 15th International Workshop on Search-Based Software Testing. 2022.