Tools for detection and analysis of flaky software tests |
|
Author: | Kivikko, Ville1 |
Organizations: |
1University of Oulu, Faculty of Information Technology and Electrical Engineering, Computer Science |
Format: | ebook |
Version: | published version |
Access: | open |
Online Access: | PDF Full Text (PDF, 0.9 MB) |
Pages: | 60 |
Persistent link: | http://urn.fi/URN:NBN:fi:oulu-202212143762 |
Language: | English |
Published: |
Oulu : V. Kivikko,
2022
|
Publish Date: | 2022-12-14 |
Thesis type: | Master's thesis (tech) |
Tutor: |
Sangi, Pekka Silvén, Olli |
Reviewer: |
Sangi, Pekka Silvén, Olli |
Description: |
Abstract Software testing is an essential part of developing a high-quality product. Test cases that pass or fail in a nondeterministic manner can cause severe problems and be difficult to fix. Unstable test cases cause increased resource usage on many different levels, as well as delays for the project they appear on. Increased resource usage might also cause delays over the project boundaries. There are multiple different reasons why tests might become unstable. A common one is the order dependency between test cases, which can also make the addition of new test cases more difficult. At the start of this work, the test cases of an under development version of eCPRI module were rather unstable. To improve the stability level, this work introduces three tools designed for test cases based on CppUTest framework with multiple use cases to help the developers to tackle the issue of unstable test cases occurring due to order dependencies. The tools are aimed to investigate different types of order dependencies that could occur between test cases. The main methods the tools are utilizing are test repeating and shuffling the testing order. In some cases, the tools were able to increase the reproducibility of the occurring failures, which is very important when solving the root cause for the failures. The tools also provide an easy way to perform an extensive, automated test running which offers a chance for the user to be absent while the logs are gathered from multiple test runs, which can be helpful when investigating random failures. Combined with the principle of binary search on reducing the executed test cases, the usage of these tools was useful when pinpointing the tests and reasons for failures. The stability level of the eCPRI module’s test cases was improved with the methods and tools presented in this thesis. The stability level of shuffled test runs was brought up from 0 % to 70 % and the stability level of normal test order was brought from 82.5 % to 100 % for one of the compilers used. Työkaluja epästabiilien ohjelmistotestien tunnistamiseen ja analysointiin Tiivistelmä Ohjelmistotestaus on välttämätön osa korkealaatuisen tuotteen kehitystä. Testit, joiden lopputulos vaihtelee epämääräisesti, voivat aiheuttaa vaikeita ongelmia ja ne voivat olla hankalia korjattavia. Epästabiilit testit kasvattavat resurssien käyttöä useilla eri tavoilla, minkä lisäksi ne aiheuttavat viivästyksiä projektin etenemiseen. Kasvanut resurssien käyttöaste voi myös aiheuttaa viivästyksiä toisiin meneillä oleviin projekteihin. On useita syitä miksi testistä voi tulla epästabiili. Yksi yleisimmistä syistä on testien riippuvuus niiden suorittamisjärjestyksestä, joka voi myös hankaloittaa uusien testien lisäämistä. Työn alkaessa kehitteillä olevan eCPRI moduulin testit olivat suhteellisen epästabiileja. Osittaisena ratkaisuna tähän ongelmaan tässä työssä esitellään kolme työkalua, jotka on suunniteltu helpottamaan eCPRI moduulin CppUTest sovelluskehystä hyödyntävien testien stabiiliuden parantamista. Työkalut keskittyvät erityyppisten testien välillä olevien järjestysriippuvuuksien tunnistamiseen ja paikantamiseen. Tärkeimmät metodit, joita työkalut käyttävät, ovat testien toistaminen ja testijärjestyksen sekoittaminen. Työkaluilla onnistuttiin parantamaan joidenkin ilmenneiden suoritusvirheiden toistettavuutta, joka on äärimmäisen tärkeää paikannettaessa virheen aiheuttajaa. Työkalut myös tarjoavat helpon tavan automatisoidun laajamittaisen testauksen suorittamiseen, mikä mahdollistaa useiden testiajojen logien keräämisen ilman tarvetta jatkuvalle käyttäjän läsnäololle. Tämä helpottaa tärkeiden tietojen keräämistä ja kokoamista harvoin tapahtuvista testitai suoritusvirheistä. Näiden työkalujen käyttö, yhdistettynä puolitushaun periaatteeseen ennen virhettä suoritettujen testien määrän vähentämisessä, oli hyödyllistä virheiden aiheuttavien testien ja syiden paikantamisessa. Tässä työssä esitettyjen työkalujen ja metodien käyttämisellä onnistuttiin parantamaan eCPRI moduulin testien stabiilisuutta. Sekoitettujen testiajojen stabiilisuusaste oli työn alkaessa 0 % ja se onnistuttiin nostamaan 70 %:iin. Tavallisen testijärjestyksen stabiilisuusaste oli työn alussa 82.5 % ja se onnistuttiin nostamaan 100 %:iin. see all
|
Subjects: | |
Copyright information: |
© Ville Kivikko, 2022. Except otherwise noted, the reuse of this document is authorised under a Creative Commons Attribution 4.0 International (CC-BY 4.0) licence (https://creativecommons.org/licenses/by/4.0/). This means that reuse is allowed provided appropriate credit is given and any changes are indicated. For any use or reproduction of elements that are not owned by the author(s), permission may need to be directly from the respective right holders. |
https://creativecommons.org/licenses/by/4.0/ |