Unit tests generation tool for .net powered by model checker
Nástroj pro generování unit testů pomocí model checkingu pro .net
Authors
Supervisors
Reviewers
Editors
Other contributors
Journal Title
Journal ISSN
Volume Title
Publisher
České vysoké učení technické v Praze
Czech Technical University in Prague
Czech Technical University in Prague
Date of defense
2023-02-08
Abstract
Jednotkové testy slouží jako základ testování softwaru a zdroj informací o fungování testovaného kódu, což je důležité pro jeho další rozvoj a vylepšování. Manuální formulace testů, které plně pokryjí testovanou metodu a ukáží všechny její vlastnosti je náročná a k~chybám náchylná práce. Nástroj dnWalker využívá konkolickou exekuci - kombinaci symbolické a konkrétní exekuce - k automatickému nalezení testovacích případů pro kód napsaný v .NET jazycích. Z testovacích případů vygeneruje soubor testů, který zajistí vysoké pokrytí kódu. Pro procházení a odhalení podmínek pro všechny cesty v kódu využívá dnWalker kombinaci teorií splnitelnosti a separační logiky. Kromě konkrétních dat je dnWalker schopný pracovat i s abstraktními objekty. Pro izolaci jednotkových testů pak používá vygenerované testové dvojníky, přičemž uživatel může specifikovat konkrétní izolační framework. Třebaže dnWalker je nástroj s omezenou funkcionalitou, experimentální výsledky ukazují, že při práci s jak primitivními tak i komplexními daty dosahuje srovnatelných anebo lepších výsledků než zavedené a komerční nástroje.
Unit tests are the base of software testing, part of the software verification and validation process, and a source of information about functionality of the code under test, an important element for its refactorization. Manual formulation of test cases which cover the software under test and demonstrate all of its properties is hard and error-prone work. The tool dnWalker uses concolic execution - a combination of symbolic and concrete execution - for automatic test cases discovery for code written in .NET languages. From these test cases it generates a test suite which ensures high code coverage. In order to test and discover all conditions for all paths through the code, dnWalker uses a combination of satisfiability modulo theories and separation logic. Apart from concrete data dnWalker is capable of working with abstract objects. Isolation of the unit tests is achieved using generated test doubles while using concrete isolation framework provided by the user. Although dnWalker isn't a full-featured tool, experimental results show that when working with both primitive and dynamic data dnWalker achieves comparable or better results than matured and commercial tools.
Unit tests are the base of software testing, part of the software verification and validation process, and a source of information about functionality of the code under test, an important element for its refactorization. Manual formulation of test cases which cover the software under test and demonstrate all of its properties is hard and error-prone work. The tool dnWalker uses concolic execution - a combination of symbolic and concrete execution - for automatic test cases discovery for code written in .NET languages. From these test cases it generates a test suite which ensures high code coverage. In order to test and discover all conditions for all paths through the code, dnWalker uses a combination of satisfiability modulo theories and separation logic. Apart from concrete data dnWalker is capable of working with abstract objects. Isolation of the unit tests is achieved using generated test doubles while using concrete isolation framework provided by the user. Although dnWalker isn't a full-featured tool, experimental results show that when working with both primitive and dynamic data dnWalker achieves comparable or better results than matured and commercial tools.
Description
Citation
Underlying research data set URL
Permanent link
Rights/License
A university thesis is a work protected by the Copyright Act of the Czech Republic. Extracts, copies and transcripts of the thesis are allowed for personal use only and at one`s own expense. The use of thesis should be in compliance with the Copyright Act.
Vysokoškolská závěrečná práce je dílo chráněné autorským zákonem. Je možné pořizovat z něj na své náklady a pro svoji osobní potřebu výpisy, opisy a rozmnoženiny. Jeho využití musí být v souladu s autorským zákonem v platném znění.
Vysokoškolská závěrečná práce je dílo chráněné autorským zákonem. Je možné pořizovat z něj na své náklady a pro svoji osobní potřebu výpisy, opisy a rozmnoženiny. Jeho využití musí být v souladu s autorským zákonem v platném znění.