Semantic‐aware two‐phase test case prioritization for continuous integration

Summary Continuous integration (CI) is a widely applied development practice to allow frequent integration of software changes, detecting early faults. However, extremely frequent builds consume amounts of time and resources in such a scenario. It is quite challenging for existing test case prioriti...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:Software testing, verification & reliability verification & reliability, 2024-01, Vol.34 (1), p.n/a
Hauptverfasser: Li, Yingling, Wang, Ziao, Wang, Junjie, Chen, Jie, Mou, Rui, Li, Guibing
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page n/a
container_issue 1
container_start_page
container_title Software testing, verification & reliability
container_volume 34
creator Li, Yingling
Wang, Ziao
Wang, Junjie
Chen, Jie
Mou, Rui
Li, Guibing
description Summary Continuous integration (CI) is a widely applied development practice to allow frequent integration of software changes, detecting early faults. However, extremely frequent builds consume amounts of time and resources in such a scenario. It is quite challenging for existing test case prioritization (TCP) to address this issue due to the time‐consuming information collection (e.g. test coverage) or inaccurately modelling code semantics to result in the unsatisfied prioritization. In this paper, we propose a semantic‐aware two‐phase TCP framework, named SatTCP, which combines the coarse‐grained filtering and fine‐grained prioritization to perform the precise TCP with low time costs for CI. It consists of three parts: (1) code representation, parsing the programme changes and test cases to obtain the code change and test case representations; (2) coarse‐grained filtering, conducting the preliminary ranking and filtering of test cases based on information retrieval; and (3) fine‐grained prioritization, training a pretrained Siamese language model based on the filtered test set to further sort the test cases via semantic similarity. We evaluate SatTCP on a large‐scale, real‐world dataset with cross‐project validation from fault detection efficiency and time costs and compare it with five baselines. The results show that SatTCP outperforms all baselines by 6.3%–45.6% for mean average percentage of fault detected per cost (APFDc), representing an obvious upward trend as the project scale increases. Meanwhile, SatTCP can reduce the real CI testing by 71.4%, outperforming the best baseline by 17.2% for time costs on average. Furthermore, we discuss the impact of different configurations, flaky tests and hybrid techniques on the performance of SatTCP, respectively. semantic‐aware two‐phase test case prioritization (SatTCP) is a test case prioritization (TCP) framework that combines coarse‐grained filtering and fine‐grained prioritization to perform the precise TCP with low time costs for continuous integration testing. It first uses information retrieval to filter test cases, then leverages a Siamese language model to precisely rank test cases based on semantic similarity between code changes and test cases.
doi_str_mv 10.1002/stvr.1864
format Article
fullrecord <record><control><sourceid>proquest_cross</sourceid><recordid>TN_cdi_proquest_journals_2904519081</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>2904519081</sourcerecordid><originalsourceid>FETCH-LOGICAL-c2924-33487c4bc3576d22d9830e1640a8ea7336503e0ff63f1cf4db4607036b4c24ab3</originalsourceid><addsrcrecordid>eNp1kM1KAzEUhYMoWKsL32DAlYtpbyZpJllK8Q8Kiq1uQyZNNKWd1GTGUlc-gs_ok5hp3bq6B-537s9B6BzDAAMUw9h8hAHmjB6gHgYhcsy4OEQ9EAxy4IQco5MYFwDABBM99Dg1K1U3Tv98fauNCiZrNj7p9ZuKSZvYZLpT6-B8cI37VI3zdWZ9yLRPvrr1bcxc3ZjXsGudoiOrltGc_dU-er65no3v8snD7f34apLrQhQ0J4TyUtNKk1HJ5kUxF5yAwYyC4kaVhLAREAPWMmKxtnReUQYlEFZRXVBVkT662M9dB__epjvlwrehTitlIYCOsACOE3W5p3TwMQZjZXpkpcJWYpBdYLILTHaBJXa4Zzduabb_g3I6e3naOX4BA7lwOg</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype><pqid>2904519081</pqid></control><display><type>article</type><title>Semantic‐aware two‐phase test case prioritization for continuous integration</title><source>Wiley Online Library - AutoHoldings Journals</source><creator>Li, Yingling ; Wang, Ziao ; Wang, Junjie ; Chen, Jie ; Mou, Rui ; Li, Guibing</creator><creatorcontrib>Li, Yingling ; Wang, Ziao ; Wang, Junjie ; Chen, Jie ; Mou, Rui ; Li, Guibing</creatorcontrib><description>Summary Continuous integration (CI) is a widely applied development practice to allow frequent integration of software changes, detecting early faults. However, extremely frequent builds consume amounts of time and resources in such a scenario. It is quite challenging for existing test case prioritization (TCP) to address this issue due to the time‐consuming information collection (e.g. test coverage) or inaccurately modelling code semantics to result in the unsatisfied prioritization. In this paper, we propose a semantic‐aware two‐phase TCP framework, named SatTCP, which combines the coarse‐grained filtering and fine‐grained prioritization to perform the precise TCP with low time costs for CI. It consists of three parts: (1) code representation, parsing the programme changes and test cases to obtain the code change and test case representations; (2) coarse‐grained filtering, conducting the preliminary ranking and filtering of test cases based on information retrieval; and (3) fine‐grained prioritization, training a pretrained Siamese language model based on the filtered test set to further sort the test cases via semantic similarity. We evaluate SatTCP on a large‐scale, real‐world dataset with cross‐project validation from fault detection efficiency and time costs and compare it with five baselines. The results show that SatTCP outperforms all baselines by 6.3%–45.6% for mean average percentage of fault detected per cost (APFDc), representing an obvious upward trend as the project scale increases. Meanwhile, SatTCP can reduce the real CI testing by 71.4%, outperforming the best baseline by 17.2% for time costs on average. Furthermore, we discuss the impact of different configurations, flaky tests and hybrid techniques on the performance of SatTCP, respectively. semantic‐aware two‐phase test case prioritization (SatTCP) is a test case prioritization (TCP) framework that combines coarse‐grained filtering and fine‐grained prioritization to perform the precise TCP with low time costs for continuous integration testing. It first uses information retrieval to filter test cases, then leverages a Siamese language model to precisely rank test cases based on semantic similarity between code changes and test cases.</description><identifier>ISSN: 0960-0833</identifier><identifier>EISSN: 1099-1689</identifier><identifier>DOI: 10.1002/stvr.1864</identifier><language>eng</language><publisher>Chichester: Wiley Subscription Services, Inc</publisher><subject>continuous integration ; Costs ; Fault detection ; Filtration ; Information retrieval ; pretrained language models ; Representations ; Semantics ; test case prioritization</subject><ispartof>Software testing, verification &amp; reliability, 2024-01, Vol.34 (1), p.n/a</ispartof><rights>2023 John Wiley &amp; Sons Ltd.</rights><rights>2024 John Wiley &amp; Sons, Ltd.</rights><lds50>peer_reviewed</lds50><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed><cites>FETCH-LOGICAL-c2924-33487c4bc3576d22d9830e1640a8ea7336503e0ff63f1cf4db4607036b4c24ab3</cites></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><linktopdf>$$Uhttps://onlinelibrary.wiley.com/doi/pdf/10.1002%2Fstvr.1864$$EPDF$$P50$$Gwiley$$H</linktopdf><linktohtml>$$Uhttps://onlinelibrary.wiley.com/doi/full/10.1002%2Fstvr.1864$$EHTML$$P50$$Gwiley$$H</linktohtml><link.rule.ids>314,776,780,1411,27903,27904,45553,45554</link.rule.ids></links><search><creatorcontrib>Li, Yingling</creatorcontrib><creatorcontrib>Wang, Ziao</creatorcontrib><creatorcontrib>Wang, Junjie</creatorcontrib><creatorcontrib>Chen, Jie</creatorcontrib><creatorcontrib>Mou, Rui</creatorcontrib><creatorcontrib>Li, Guibing</creatorcontrib><title>Semantic‐aware two‐phase test case prioritization for continuous integration</title><title>Software testing, verification &amp; reliability</title><description>Summary Continuous integration (CI) is a widely applied development practice to allow frequent integration of software changes, detecting early faults. However, extremely frequent builds consume amounts of time and resources in such a scenario. It is quite challenging for existing test case prioritization (TCP) to address this issue due to the time‐consuming information collection (e.g. test coverage) or inaccurately modelling code semantics to result in the unsatisfied prioritization. In this paper, we propose a semantic‐aware two‐phase TCP framework, named SatTCP, which combines the coarse‐grained filtering and fine‐grained prioritization to perform the precise TCP with low time costs for CI. It consists of three parts: (1) code representation, parsing the programme changes and test cases to obtain the code change and test case representations; (2) coarse‐grained filtering, conducting the preliminary ranking and filtering of test cases based on information retrieval; and (3) fine‐grained prioritization, training a pretrained Siamese language model based on the filtered test set to further sort the test cases via semantic similarity. We evaluate SatTCP on a large‐scale, real‐world dataset with cross‐project validation from fault detection efficiency and time costs and compare it with five baselines. The results show that SatTCP outperforms all baselines by 6.3%–45.6% for mean average percentage of fault detected per cost (APFDc), representing an obvious upward trend as the project scale increases. Meanwhile, SatTCP can reduce the real CI testing by 71.4%, outperforming the best baseline by 17.2% for time costs on average. Furthermore, we discuss the impact of different configurations, flaky tests and hybrid techniques on the performance of SatTCP, respectively. semantic‐aware two‐phase test case prioritization (SatTCP) is a test case prioritization (TCP) framework that combines coarse‐grained filtering and fine‐grained prioritization to perform the precise TCP with low time costs for continuous integration testing. It first uses information retrieval to filter test cases, then leverages a Siamese language model to precisely rank test cases based on semantic similarity between code changes and test cases.</description><subject>continuous integration</subject><subject>Costs</subject><subject>Fault detection</subject><subject>Filtration</subject><subject>Information retrieval</subject><subject>pretrained language models</subject><subject>Representations</subject><subject>Semantics</subject><subject>test case prioritization</subject><issn>0960-0833</issn><issn>1099-1689</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2024</creationdate><recordtype>article</recordtype><recordid>eNp1kM1KAzEUhYMoWKsL32DAlYtpbyZpJllK8Q8Kiq1uQyZNNKWd1GTGUlc-gs_ok5hp3bq6B-537s9B6BzDAAMUw9h8hAHmjB6gHgYhcsy4OEQ9EAxy4IQco5MYFwDABBM99Dg1K1U3Tv98fauNCiZrNj7p9ZuKSZvYZLpT6-B8cI37VI3zdWZ9yLRPvrr1bcxc3ZjXsGudoiOrltGc_dU-er65no3v8snD7f34apLrQhQ0J4TyUtNKk1HJ5kUxF5yAwYyC4kaVhLAREAPWMmKxtnReUQYlEFZRXVBVkT662M9dB__epjvlwrehTitlIYCOsACOE3W5p3TwMQZjZXpkpcJWYpBdYLILTHaBJXa4Zzduabb_g3I6e3naOX4BA7lwOg</recordid><startdate>202401</startdate><enddate>202401</enddate><creator>Li, Yingling</creator><creator>Wang, Ziao</creator><creator>Wang, Junjie</creator><creator>Chen, Jie</creator><creator>Mou, Rui</creator><creator>Li, Guibing</creator><general>Wiley Subscription Services, Inc</general><scope>AAYXX</scope><scope>CITATION</scope><scope>7SC</scope><scope>8FD</scope><scope>JQ2</scope><scope>L7M</scope><scope>L~C</scope><scope>L~D</scope></search><sort><creationdate>202401</creationdate><title>Semantic‐aware two‐phase test case prioritization for continuous integration</title><author>Li, Yingling ; Wang, Ziao ; Wang, Junjie ; Chen, Jie ; Mou, Rui ; Li, Guibing</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-c2924-33487c4bc3576d22d9830e1640a8ea7336503e0ff63f1cf4db4607036b4c24ab3</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2024</creationdate><topic>continuous integration</topic><topic>Costs</topic><topic>Fault detection</topic><topic>Filtration</topic><topic>Information retrieval</topic><topic>pretrained language models</topic><topic>Representations</topic><topic>Semantics</topic><topic>test case prioritization</topic><toplevel>peer_reviewed</toplevel><toplevel>online_resources</toplevel><creatorcontrib>Li, Yingling</creatorcontrib><creatorcontrib>Wang, Ziao</creatorcontrib><creatorcontrib>Wang, Junjie</creatorcontrib><creatorcontrib>Chen, Jie</creatorcontrib><creatorcontrib>Mou, Rui</creatorcontrib><creatorcontrib>Li, Guibing</creatorcontrib><collection>CrossRef</collection><collection>Computer and Information Systems Abstracts</collection><collection>Technology Research Database</collection><collection>ProQuest Computer Science Collection</collection><collection>Advanced Technologies Database with Aerospace</collection><collection>Computer and Information Systems Abstracts – Academic</collection><collection>Computer and Information Systems Abstracts Professional</collection><jtitle>Software testing, verification &amp; reliability</jtitle></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Li, Yingling</au><au>Wang, Ziao</au><au>Wang, Junjie</au><au>Chen, Jie</au><au>Mou, Rui</au><au>Li, Guibing</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Semantic‐aware two‐phase test case prioritization for continuous integration</atitle><jtitle>Software testing, verification &amp; reliability</jtitle><date>2024-01</date><risdate>2024</risdate><volume>34</volume><issue>1</issue><epage>n/a</epage><issn>0960-0833</issn><eissn>1099-1689</eissn><abstract>Summary Continuous integration (CI) is a widely applied development practice to allow frequent integration of software changes, detecting early faults. However, extremely frequent builds consume amounts of time and resources in such a scenario. It is quite challenging for existing test case prioritization (TCP) to address this issue due to the time‐consuming information collection (e.g. test coverage) or inaccurately modelling code semantics to result in the unsatisfied prioritization. In this paper, we propose a semantic‐aware two‐phase TCP framework, named SatTCP, which combines the coarse‐grained filtering and fine‐grained prioritization to perform the precise TCP with low time costs for CI. It consists of three parts: (1) code representation, parsing the programme changes and test cases to obtain the code change and test case representations; (2) coarse‐grained filtering, conducting the preliminary ranking and filtering of test cases based on information retrieval; and (3) fine‐grained prioritization, training a pretrained Siamese language model based on the filtered test set to further sort the test cases via semantic similarity. We evaluate SatTCP on a large‐scale, real‐world dataset with cross‐project validation from fault detection efficiency and time costs and compare it with five baselines. The results show that SatTCP outperforms all baselines by 6.3%–45.6% for mean average percentage of fault detected per cost (APFDc), representing an obvious upward trend as the project scale increases. Meanwhile, SatTCP can reduce the real CI testing by 71.4%, outperforming the best baseline by 17.2% for time costs on average. Furthermore, we discuss the impact of different configurations, flaky tests and hybrid techniques on the performance of SatTCP, respectively. semantic‐aware two‐phase test case prioritization (SatTCP) is a test case prioritization (TCP) framework that combines coarse‐grained filtering and fine‐grained prioritization to perform the precise TCP with low time costs for continuous integration testing. It first uses information retrieval to filter test cases, then leverages a Siamese language model to precisely rank test cases based on semantic similarity between code changes and test cases.</abstract><cop>Chichester</cop><pub>Wiley Subscription Services, Inc</pub><doi>10.1002/stvr.1864</doi><tpages>23</tpages><oa>free_for_read</oa></addata></record>
fulltext fulltext
identifier ISSN: 0960-0833
ispartof Software testing, verification & reliability, 2024-01, Vol.34 (1), p.n/a
issn 0960-0833
1099-1689
language eng
recordid cdi_proquest_journals_2904519081
source Wiley Online Library - AutoHoldings Journals
subjects continuous integration
Costs
Fault detection
Filtration
Information retrieval
pretrained language models
Representations
Semantics
test case prioritization
title Semantic‐aware two‐phase test case prioritization for continuous integration
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-27T20%3A41%3A49IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-proquest_cross&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Semantic%E2%80%90aware%20two%E2%80%90phase%20test%20case%20prioritization%20for%20continuous%20integration&rft.jtitle=Software%20testing,%20verification%20&%20reliability&rft.au=Li,%20Yingling&rft.date=2024-01&rft.volume=34&rft.issue=1&rft.epage=n/a&rft.issn=0960-0833&rft.eissn=1099-1689&rft_id=info:doi/10.1002/stvr.1864&rft_dat=%3Cproquest_cross%3E2904519081%3C/proquest_cross%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_pqid=2904519081&rft_id=info:pmid/&rfr_iscdi=true