PyNose: A Test Smell Detector For Python
Similarly to production code, code smells also occur in test code, where they are called test smells. Test smells have a detrimental effect not only on test code but also on the production code that is being tested. To date, the majority of the research on test smells has been focusing on programmin...
Gespeichert in:
| Veröffentlicht in: | IEEE/ACM International Conference on Automated Software Engineering : [proceedings] S. 593 - 605 |
|---|---|
| Hauptverfasser: | , , , , , |
| Format: | Tagungsbericht |
| Sprache: | Englisch |
| Veröffentlicht: |
IEEE
01.11.2021
|
| Schlagworte: | |
| ISSN: | 2643-1572 |
| Online-Zugang: | Volltext |
| Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
| Abstract | Similarly to production code, code smells also occur in test code, where they are called test smells. Test smells have a detrimental effect not only on test code but also on the production code that is being tested. To date, the majority of the research on test smells has been focusing on programming languages such as Java and Scala. However, there are no available automated tools to support the identification of test smells for Python, despite its rapid growth in popularity in recent years. In this paper, we strive to extend the research to Python, build a tool for detecting test smells in this language, and conduct an empirical analysis of test smells in Python projects.We started by gathering a list of test smells from existing research and selecting test smells that can be considered language-agnostic or have similar functionality in Python's standard Unittest framework. In total, we identified 17 diverse test smells. Additionally, we searched for Python-specific test smells by mining frequent code change patterns that can be considered as either fixing or introducing test smells. Based on these changes, we proposed our own test smell called Suboptimal Assert. To detect all these test smells, we developed a tool called PYNOSE in the form of a plugin to PyCharm, a popular Python IDE. Finally, we conducted a large-scale empirical investigation aimed at analyzing the prevalence of test smells in Python code. Our results show that 98% of the projects and 84% of the test suites in the studied dataset contain at least one test smell. Our proposed Suboptimal Assert smell was detected in as much as 70.6% of the projects, making it a valuable addition to the list. |
|---|---|
| AbstractList | Similarly to production code, code smells also occur in test code, where they are called test smells. Test smells have a detrimental effect not only on test code but also on the production code that is being tested. To date, the majority of the research on test smells has been focusing on programming languages such as Java and Scala. However, there are no available automated tools to support the identification of test smells for Python, despite its rapid growth in popularity in recent years. In this paper, we strive to extend the research to Python, build a tool for detecting test smells in this language, and conduct an empirical analysis of test smells in Python projects.We started by gathering a list of test smells from existing research and selecting test smells that can be considered language-agnostic or have similar functionality in Python's standard Unittest framework. In total, we identified 17 diverse test smells. Additionally, we searched for Python-specific test smells by mining frequent code change patterns that can be considered as either fixing or introducing test smells. Based on these changes, we proposed our own test smell called Suboptimal Assert. To detect all these test smells, we developed a tool called PYNOSE in the form of a plugin to PyCharm, a popular Python IDE. Finally, we conducted a large-scale empirical investigation aimed at analyzing the prevalence of test smells in Python code. Our results show that 98% of the projects and 84% of the test suites in the studied dataset contain at least one test smell. Our proposed Suboptimal Assert smell was detected in as much as 70.6% of the projects, making it a valuable addition to the list. |
| Author | Smirnov, Oleg Li, Jiawei Ahmed, Iftekhar Golubev, Yaroslav Wang, Tongjie Bryksin, Timofey |
| Author_xml | – sequence: 1 givenname: Tongjie surname: Wang fullname: Wang, Tongjie email: tongjiew@uci.edu organization: University of California, Irvine,Irvine,CA,United States – sequence: 2 givenname: Yaroslav surname: Golubev fullname: Golubev, Yaroslav email: yaroslav.golubev@jetbrains.com organization: University of California, Irvine,Irvine,CA,United States – sequence: 3 givenname: Oleg surname: Smirnov fullname: Smirnov, Oleg email: oleg.smirnov@jetbrains.com organization: University of California, Irvine,Irvine,CA,United States – sequence: 4 givenname: Jiawei surname: Li fullname: Li, Jiawei email: jiawl28@uci.edu organization: University of California, Irvine,Irvine,CA,United States – sequence: 5 givenname: Timofey surname: Bryksin fullname: Bryksin, Timofey email: timofey.bryksin@jetbrains.com organization: University of California, Irvine,Irvine,CA,United States – sequence: 6 givenname: Iftekhar surname: Ahmed fullname: Ahmed, Iftekhar email: iftekha@uci.edu organization: University of California, Irvine,Irvine,CA,United States |
| BookMark | eNotj81Kw0AURkdRsK19AhFm6SZx7p1_d6G2KhQttK7LJHODgTSRTDZ5ewt28XHO6sA3Zzdd3xFjjyByAOGfi_1ag0aVo0DIvbHOgL5iczBGKyGllddshkbJDLTFO7ZMqSmFck4p682MPe2mzz7RCy_4gdLI9ydqW_5KI1VjP_DNebtp_Om7e3ZbhzbR8sIF-96sD6v3bPv19rEqtllAZ8fMBllBVBhlDMZKDCVpKjUGqMmCLqH2vqqid1GQt8EIZ85GOgYNiBDkgj38dxsiOv4OzSkM0_FyTP4BMh1C2Q |
| CODEN | IEEPAD |
| ContentType | Conference Proceeding |
| DBID | 6IE 6IL CBEJK RIE RIL |
| DOI | 10.1109/ASE51524.2021.9678615 |
| DatabaseName | IEEE Electronic Library (IEL) Conference Proceedings IEEE Xplore POP ALL IEEE Xplore All Conference Proceedings IEEE Electronic Library (IEL) IEEE Proceedings Order Plans (POP All) 1998-Present |
| DatabaseTitleList | |
| Database_xml | – sequence: 1 dbid: RIE name: IEEE Xplore Digital Library (LUT) url: https://ieeexplore.ieee.org/ sourceTypes: Publisher |
| DeliveryMethod | fulltext_linktorsrc |
| Discipline | Computer Science |
| EISBN | 1665403373 9781665403375 |
| EISSN | 2643-1572 |
| EndPage | 605 |
| ExternalDocumentID | 9678615 |
| Genre | orig-research |
| GroupedDBID | 29I 6IE 6IF 6IH 6IK 6IL 6IM 6IN 6J9 AAJGR AAWTH ABLEC ACREN ADYOE ADZIZ AFYQB ALMA_UNASSIGNED_HOLDINGS AMTXH APO BEFXN BFFAM BGNUA BKEBE BPEOZ CBEJK CHZPO IEGSK IPLJI M43 OCL RIE RIL |
| ID | FETCH-LOGICAL-a287t-7a3c1d42d3da6732abe5eb52a1fe715b1f99ccd98d0e97a6086d0ee5da51221a3 |
| IEDL.DBID | RIE |
| ISICitedReferencesCount | 22 |
| ISICitedReferencesURI | http://www.webofscience.com/api/gateway?GWVersion=2&SrcApp=Summon&SrcAuth=ProQuest&DestLinkType=CitingArticles&DestApp=WOS_CPL&KeyUT=000779309000051&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D |
| IngestDate | Wed Aug 27 03:02:55 EDT 2025 |
| IsPeerReviewed | false |
| IsScholarly | true |
| Language | English |
| LinkModel | DirectLink |
| MergedId | FETCHMERGED-LOGICAL-a287t-7a3c1d42d3da6732abe5eb52a1fe715b1f99ccd98d0e97a6086d0ee5da51221a3 |
| PageCount | 13 |
| ParticipantIDs | ieee_primary_9678615 |
| PublicationCentury | 2000 |
| PublicationDate | 2021-Nov. |
| PublicationDateYYYYMMDD | 2021-11-01 |
| PublicationDate_xml | – month: 11 year: 2021 text: 2021-Nov. |
| PublicationDecade | 2020 |
| PublicationTitle | IEEE/ACM International Conference on Automated Software Engineering : [proceedings] |
| PublicationTitleAbbrev | ASE |
| PublicationYear | 2021 |
| Publisher | IEEE |
| Publisher_xml | – name: IEEE |
| SSID | ssib048844796 ssj0051577 |
| Score | 2.363163 |
| Snippet | Similarly to production code, code smells also occur in test code, where they are called test smells. Test smells have a detrimental effect not only on test... |
| SourceID | ieee |
| SourceType | Publisher |
| StartPage | 593 |
| SubjectTerms | code change patterns code smells Codes Detectors empirical studies Focusing Java mining software repositories Production Python Software Test smells |
| Title | PyNose: A Test Smell Detector For Python |
| URI | https://ieeexplore.ieee.org/document/9678615 |
| WOSCitedRecordID | wos000779309000051&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D |
| hasFullText | 1 |
| inHoldings | 1 |
| isFullTextHit | |
| isPrint | |
| link | http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwlV1LSwMxEB5q8eCpaiu-ycGDB7fdZB_ZeCva4kHKQiv0VrLJLAi1lXYr9N872d1WBC8eAiGQkOdMvkm-GYC7jGCGjfzco6ODnqNCeioK6SKHStL13-jElH5mX-VolEynKm3Aw54Lg4jl5zPsumz5lm-XZuNMZT1FkjV2jPIDKeOKq7XbO7QPw7B0HVdJYVLTUtaMHe6rXn88oCLhrCiCd-uGfkVUKRXKsPW_rhxD54eZx9K9zjmBBi5OobULzcDqk9qG-3Q7Wq7xkfXZhOQ-G3_gfM6esSiN9GxIKd06twEdeBsOJk8vXh0UwdMEbgpP6sBwGwobWB3LQOgMI8wioXmOkkcZz5UyxqrE-jTdOibIQjmMrCbVLrgOzqC5WC7wHJhPYIlqCRMYSbjOT3QSCm2sDVQcKhNfQNsNfPZZ-b2Y1WO-_Lv4Co7c3FY8vWtoFqsN3sCh-Sre16vbcrG-ATrwklE |
| linkProvider | IEEE |
| linkToHtml | http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwlV3NS8MwFA9jCnqauonf5uDBg93aNG0ab0M3Js5S2ITdRpq8wWBusnXC_ntf2m4iePEQCIGEfL6X30t-7xFylyLMMIE7cfDogGOpkI4MOF7kQAq8_msV6dzPbF_EcTQayaRCHnZcGADIP59B02bzt3yz0GtrKmtJlKyhZZTvBZwzt2BrbXcP7kTOc-dxhRxGRS1EydnxXNlqDzpYxKwdhXnNsqlfMVVyldKt_a8zR6Txw82jyU7rHJMKzE9IbRucgZZntU7uk028WMEjbdMhSn46-IDZjD5DlpvpaRdTsrGOAxrkvdsZPvWcMiyCoxDeZI5QvvYMZ8Y3KhQ-UykEkAZMeRMQXpB6Eym1NjIyLk64ChG0YA4Co1C5M0_5p6Q6X8zhjFAX4RLWYtrXApGdG6mIM6WN8WXIpQ7PSd0OfPxZeL4Yl2O--Lv4lhz0hm_9cf8lfr0kh3aeC9beFalmyzVck339lU1Xy5t84b4BDU-VmA |
| openUrl | ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=proceeding&rft.title=IEEE%2FACM+International+Conference+on+Automated+Software+Engineering+%3A+%5Bproceedings%5D&rft.atitle=PyNose%3A+A+Test+Smell+Detector+For+Python&rft.au=Wang%2C+Tongjie&rft.au=Golubev%2C+Yaroslav&rft.au=Smirnov%2C+Oleg&rft.au=Li%2C+Jiawei&rft.date=2021-11-01&rft.pub=IEEE&rft.eissn=2643-1572&rft.spage=593&rft.epage=605&rft_id=info:doi/10.1109%2FASE51524.2021.9678615&rft.externalDocID=9678615 |