{"id":{"repo_id":"texas","oai_identifier":"oai:repositories.lib.utexas.edu:2152/137058"},"canonical_url":"https://search.ndltd.org/etd/texas/oai:repositories.lib.utexas.edu:2152/137058","repository":{"repo_id":"texas","name":"University of Texas","base_url":"https://repositories.lib.utexas.edu/server/oai/request"},"display":{"title":"Mitigating and leveraging dependencies between tests","abstract":"Software testing is essential for ensuring the quality of software systems, but tests do not always behave consistently. While tests are expected to run independent of one another, developers may still accidentally or purposefully introduce dependencies between them. These dependencies can cause tests to pass or fail unpredictably due to test order being uncontrolled, making it difficult for developers to trust test results and identify faults in their code. Understanding and addressing test dependencies is important for improving the reliability and efficiency of software testing. While test dependencies can be problematic for reliability, they also present an opportunity to improve testing efficiency. One way to leverage test dependencies to speed up testing is by removing unnecessary test fixtures. Test fixtures, such as setup and teardown methods, are typically run before and after each test to ensure a clean environment. However, if tests do not need to be isolated from one another using these fixtures while still maintaining consistent outcomes, these fixtures can be executed less frequently or even removed. By grouping dependent tests and minimizing fixture invocations, the overall test execution time can be significantly reduced. First, we propose three new techniques to detect order-dependent flaky tests (OD tests) through a more systematic means of producing test orders. Our techniques build upon prior work in Tuscan squares to cover test pairs in a minimal set of test orders while also obeying the constraints of how tests can be positioned in a test order w.r.t. their test classes. Further, as there are many test pairs that need to be covered, we develop a technique that can take a specified set of test pairs to cover and produce test orders that aim to cover just those test pairs. Our evaluation with 289 known OD tests across 47 test suites from open-source projects shows that our most cost-effective technique can detect 97.2% of the known OD tests with 104.7 test orders, on average, per subject. While all techniques produce a relatively large number of test orders, our analysis of the minimal set of test orders needed to detect OD tests shows a tremendous reduction in the test orders needed to detect OD tests, which represents an opportunity for future work to prioritize test orders. Second, we propose ODRepair, an automated technique to repair OD tests even when no existing test code is available to reset the shared state. The idea is to first determine the exact polluted shared state that results in the OD test to fail and then generate code that can modify and reset the shared state so that the OD test can pass. We focus on shared state through internal heap memory, in particular shared state reachable from static fields. Once we know which static field leads to the pollution, we search for reset-methods in the codebase that can potentially access and modify state reachable from that static field. We then apply an automatic test-generation tool to generate method-call sequences, targeting these reset-methods. Our evaluation on 327 OD tests from a publicly available dataset shows that ODRepair automatically identifies the polluted static field for 181 tests, and it can generate patches for 141 of these tests. Compared against state-of-the-art iFixFlakies, ODRepair can generate patches for 24 tests that iFixFlakies cannot. Third, we propose a new technique to transform test code to speed up test runtime. Our technique, TestBoost, transforms the test fixtures within a test class to instead run once before/after all tests in the test class, thereby running the test fixtures less frequently while still running all tests and ensuring that tests all still pass, as they did before. Our evaluation on 697 test classes from 34 projects shows that on average we can reduce the runtime per test class by 28.39% for the cases with positive significant improvement. Using these transformed test classes can result in an average 18.24% reduction per test suite runtime. We find that the coverage of the transformed test classes changes by less than 1%, and when we submitted 15 pull requests, 9 have already been merged.","abstract_html":"Software testing is essential for ensuring the quality of software systems, but tests do not always behave consistently. While tests are expected to run independent of one another, developers may still accidentally or purposefully introduce dependencies between them. These dependencies can cause tests to pass or fail unpredictably due to test order being uncontrolled, making it difficult for developers to trust test results and identify faults in their code. Understanding and addressing test dependencies is important for improving the reliability and efficiency of software testing. While test dependencies can be problematic for reliability, they also present an opportunity to improve testing efficiency. One way to leverage test dependencies to speed up testing is by removing unnecessary test fixtures. Test fixtures, such as setup and teardown methods, are typically run before and after each test to ensure a clean environment. However, if tests do not need to be isolated from one another using these fixtures while still maintaining consistent outcomes, these fixtures can be executed less frequently or even removed. By grouping dependent tests and minimizing fixture invocations, the overall test execution time can be significantly reduced. First, we propose three new techniques to detect order-dependent flaky tests (OD tests) through a more systematic means of producing test orders. Our techniques build upon prior work in Tuscan squares to cover test pairs in a minimal set of test orders while also obeying the constraints of how tests can be positioned in a test order w.r.t. their test classes. Further, as there are many test pairs that need to be covered, we develop a technique that can take a specified set of test pairs to cover and produce test orders that aim to cover just those test pairs. Our evaluation with 289 known OD tests across 47 test suites from open-source projects shows that our most cost-effective technique can detect 97.2% of the known OD tests with 104.7 test orders, on average, per subject. While all techniques produce a relatively large number of test orders, our analysis of the minimal set of test orders needed to detect OD tests shows a tremendous reduction in the test orders needed to detect OD tests, which represents an opportunity for future work to prioritize test orders. Second, we propose ODRepair, an automated technique to repair OD tests even when no existing test code is available to reset the shared state. The idea is to first determine the exact polluted shared state that results in the OD test to fail and then generate code that can modify and reset the shared state so that the OD test can pass. We focus on shared state through internal heap memory, in particular shared state reachable from static fields. Once we know which static field leads to the pollution, we search for reset-methods in the codebase that can potentially access and modify state reachable from that static field. We then apply an automatic test-generation tool to generate method-call sequences, targeting these reset-methods. Our evaluation on 327 OD tests from a publicly available dataset shows that ODRepair automatically identifies the polluted static field for 181 tests, and it can generate patches for 141 of these tests. Compared against state-of-the-art iFixFlakies, ODRepair can generate patches for 24 tests that iFixFlakies cannot. Third, we propose a new technique to transform test code to speed up test runtime. Our technique, TestBoost, transforms the test fixtures within a test class to instead run once before/after all tests in the test class, thereby running the test fixtures less frequently while still running all tests and ensuring that tests all still pass, as they did before. Our evaluation on 697 test classes from 34 projects shows that on average we can reduce the runtime per test class by 28.39% for the cases with positive significant improvement. Using these transformed test classes can result in an average 18.24% reduction per test suite runtime. We find that the coverage of the transformed test classes changes by less than 1%, and when we submitted 15 pull requests, 9 have already been merged.","abstract_has_math":false,"creators":["Li, Chengpeng"],"institution":"The University of Texas at Austin","degree_name":"Doctor of Philosophy","degree_level":"DOCTORAL","degree_discipline":"Electrical and Computer Engineering","degree_department":"Electrical and Computer Engineering","school":null,"contributors":[],"advisors":["Shi, August (August Wang)"],"committee_chairs":[],"committee_members":["Legunsen, Owolabi","Lam, Wing","Gligoric, Milos","Khurshid, Sarfraz"],"year":2026,"date_issued":"2026-05","date_published":"2026-05","updated_at":"2026-11-20T21:53:44Z","subjects":["Programming analysis","Software testing","Software engineering"],"languages":["English"],"rights":[],"rights_urls":[],"identifier_entries":[{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/2152/137058"],"render_values":[{"text":"https://hdl.handle.net/2152/137058","href":"https://hdl.handle.net/2152/137058","code":true}]}],"person_identifier_entries":[]},"links":{"outbound_url":"https://doi.org/10.26153/tsw/64360","outbound_label":"DOI","outbound_source":"dc:identifier.uri","record_url":"https://doi.org/10.26153/tsw/64360","record_label":"Repository record","record_kind":"doi","record_source":"dc:identifier.uri","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Atexas%3Aoai%3Arepositories.lib.utexas.edu%3A2152%2F137058","prefix":"oai_dc"},"source_record":{"url":"https://repositories.lib.utexas.edu/server/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Arepositories.lib.utexas.edu%3A2152%2F137058","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["Shi, August (August Wang)"]},{"key":"dc:contributor.committeemember","label":"Committee Member","values":["Legunsen, Owolabi","Lam, Wing","Gligoric, Milos","Khurshid, Sarfraz"]},{"key":"dc:contributor.department","label":"Department","values":["Electrical and Computer Engineering"]},{"key":"dc:creator","label":"Author","values":["Li, Chengpeng"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2026-07-31T15:28:25Z"]},{"key":"dc:date.created","label":"Dc Date Created","values":["2026-05"]},{"key":"dc:date.issued","label":"Date","values":["2026-05"]},{"key":"dc:date.submitted","label":"Dc Date Submitted","values":["May 2026"]},{"key":"dc:date.updated","label":"Dc Date Updated","values":["2026-07-31T15:28:25Z"]},{"key":"dc:type","label":"Dc Type","values":["Thesis","text"]},{"key":"thesis:degree_college","label":"Thesis Degree College","values":["Cockrell School of Engineering"]},{"key":"thesis:degree_department","label":"Department","values":["Electrical and Computer Engineering"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Electrical and Computer Engineering"]},{"key":"thesis:degree_level","label":"Degree Level","values":["DOCTORAL"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Doctor of Philosophy"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["The University of Texas at Austin","UT Austin"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Programming analysis","Software testing","Software engineering"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["English"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/2152/137058","https://doi.org/10.26153/tsw/64360"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["Software testing is essential for ensuring the quality of software systems, but tests do not always behave consistently. While tests are expected to run independent of one another, developers may still accidentally or purposefully introduce dependencies between them. These dependencies can cause tests to pass or fail unpredictably due to test order being uncontrolled, making it difficult for developers to trust test results and identify faults in their code. Understanding and addressing test dependencies is important for improving the reliability and efficiency of software testing. While test dependencies can be problematic for reliability, they also present an opportunity to improve testing efficiency. One way to leverage test dependencies to speed up testing is by removing unnecessary test fixtures. Test fixtures, such as setup and teardown methods, are typically run before and after each test to ensure a clean environment. However, if tests do not need to be isolated from one another using these fixtures while still maintaining consistent outcomes, these fixtures can be executed less frequently or even removed. By grouping dependent tests and minimizing fixture invocations, the overall test execution time can be significantly reduced. First, we propose three new techniques to detect order-dependent flaky tests (OD tests) through a more systematic means of producing test orders. Our techniques build upon prior work in Tuscan squares to cover test pairs in a minimal set of test orders while also obeying the constraints of how tests can be positioned in a test order w.r.t. their test classes. Further, as there are many test pairs that need to be covered, we develop a technique that can take a specified set of test pairs to cover and produce test orders that aim to cover just those test pairs. Our evaluation with 289 known OD tests across 47 test suites from open-source projects shows that our most cost-effective technique can detect 97.2% of the known OD tests with 104.7 test orders, on average, per subject. While all techniques produce a relatively large number of test orders, our analysis of the minimal set of test orders needed to detect OD tests shows a tremendous reduction in the test orders needed to detect OD tests, which represents an opportunity for future work to prioritize test orders. Second, we propose ODRepair, an automated technique to repair OD tests even when no existing test code is available to reset the shared state. The idea is to first determine the exact polluted shared state that results in the OD test to fail and then generate code that can modify and reset the shared state so that the OD test can pass. We focus on shared state through internal heap memory, in particular shared state reachable from static fields. Once we know which static field leads to the pollution, we search for reset-methods in the codebase that can potentially access and modify state reachable from that static field. We then apply an automatic test-generation tool to generate method-call sequences, targeting these reset-methods. Our evaluation on 327 OD tests from a publicly available dataset shows that ODRepair automatically identifies the polluted static field for 181 tests, and it can generate patches for 141 of these tests. Compared against state-of-the-art iFixFlakies, ODRepair can generate patches for 24 tests that iFixFlakies cannot. Third, we propose a new technique to transform test code to speed up test runtime. Our technique, TestBoost, transforms the test fixtures within a test class to instead run once before/after all tests in the test class, thereby running the test fixtures less frequently while still running all tests and ensuring that tests all still pass, as they did before. Our evaluation on 697 test classes from 34 projects shows that on average we can reduce the runtime per test class by 28.39% for the cases with positive significant improvement. Using these transformed test classes can result in an average 18.24% reduction per test suite runtime. We find that the coverage of the transformed test classes changes by less than 1%, and when we submitted 15 pull requests, 9 have already been merged."]},{"key":"dc:format.mimetype","label":"Dc Format Mimetype","values":["application/pdf"]},{"key":"dc:title","label":"Title","values":["Mitigating and leveraging dependencies between tests"]},{"key":"others:access_status","label":"Others Access Status","values":["open.access"]}]}],"canonical_facts":{"dc:contributor.advisor":["Shi, August (August Wang)"],"dc:contributor.committeemember":["Legunsen, Owolabi","Lam, Wing","Gligoric, Milos","Khurshid, Sarfraz"],"dc:contributor.department":["Electrical and Computer Engineering"],"dc:creator":["Li, Chengpeng"],"dc:date.accessioned":["2026-07-31T15:28:25Z"],"dc:date.created":["2026-05"],"dc:date.issued":["2026-05"],"dc:date.submitted":["May 2026"],"dc:date.updated":["2026-07-31T15:28:25Z"],"dc:description.abstract":["Software testing is essential for ensuring the quality of software systems, but tests do not always behave consistently. While tests are expected to run independent of one another, developers may still accidentally or purposefully introduce dependencies between them. These dependencies can cause tests to pass or fail unpredictably due to test order being uncontrolled, making it difficult for developers to trust test results and identify faults in their code. Understanding and addressing test dependencies is important for improving the reliability and efficiency of software testing. While test dependencies can be problematic for reliability, they also present an opportunity to improve testing efficiency. One way to leverage test dependencies to speed up testing is by removing unnecessary test fixtures. Test fixtures, such as setup and teardown methods, are typically run before and after each test to ensure a clean environment. However, if tests do not need to be isolated from one another using these fixtures while still maintaining consistent outcomes, these fixtures can be executed less frequently or even removed. By grouping dependent tests and minimizing fixture invocations, the overall test execution time can be significantly reduced. First, we propose three new techniques to detect order-dependent flaky tests (OD tests) through a more systematic means of producing test orders. Our techniques build upon prior work in Tuscan squares to cover test pairs in a minimal set of test orders while also obeying the constraints of how tests can be positioned in a test order w.r.t. their test classes. Further, as there are many test pairs that need to be covered, we develop a technique that can take a specified set of test pairs to cover and produce test orders that aim to cover just those test pairs. Our evaluation with 289 known OD tests across 47 test suites from open-source projects shows that our most cost-effective technique can detect 97.2% of the known OD tests with 104.7 test orders, on average, per subject. While all techniques produce a relatively large number of test orders, our analysis of the minimal set of test orders needed to detect OD tests shows a tremendous reduction in the test orders needed to detect OD tests, which represents an opportunity for future work to prioritize test orders. Second, we propose ODRepair, an automated technique to repair OD tests even when no existing test code is available to reset the shared state. The idea is to first determine the exact polluted shared state that results in the OD test to fail and then generate code that can modify and reset the shared state so that the OD test can pass. We focus on shared state through internal heap memory, in particular shared state reachable from static fields. Once we know which static field leads to the pollution, we search for reset-methods in the codebase that can potentially access and modify state reachable from that static field. We then apply an automatic test-generation tool to generate method-call sequences, targeting these reset-methods. Our evaluation on 327 OD tests from a publicly available dataset shows that ODRepair automatically identifies the polluted static field for 181 tests, and it can generate patches for 141 of these tests. Compared against state-of-the-art iFixFlakies, ODRepair can generate patches for 24 tests that iFixFlakies cannot. Third, we propose a new technique to transform test code to speed up test runtime. Our technique, TestBoost, transforms the test fixtures within a test class to instead run once before/after all tests in the test class, thereby running the test fixtures less frequently while still running all tests and ensuring that tests all still pass, as they did before. Our evaluation on 697 test classes from 34 projects shows that on average we can reduce the runtime per test class by 28.39% for the cases with positive significant improvement. Using these transformed test classes can result in an average 18.24% reduction per test suite runtime. We find that the coverage of the transformed test classes changes by less than 1%, and when we submitted 15 pull requests, 9 have already been merged."],"dc:format.mimetype":["application/pdf"],"dc:identifier.uri":["https://hdl.handle.net/2152/137058","https://doi.org/10.26153/tsw/64360"],"dc:language.iso":["English"],"dc:subject":["Programming analysis","Software testing","Software engineering"],"dc:title":["Mitigating and leveraging dependencies between tests"],"dc:type":["Thesis","text"],"others:access_status":["open.access"],"thesis:degree_college":["Cockrell School of Engineering"],"thesis:degree_department":["Electrical and Computer Engineering"],"thesis:degree_discipline":["Electrical and Computer Engineering"],"thesis:degree_level":["DOCTORAL"],"thesis:degree_name":["Doctor of Philosophy"],"thesis:institution_name":["The University of Texas at Austin","UT Austin"]},"updated_at":"2026-11-20T21:53:44Z"}