Inline Tests
Yu Liu, Pengyu Nie, Owolabi Legunsen, Milos Gligoric
摘要
Unit tests are widely used to check source code quality, but they can be too coarse-grained or ill-suited for testing individual program statements. We introduce inline tests to make it easier to check for faults in statements. We motivate inline tests through several language features and a common testing scenario in which inline tests could be beneficial. For example, inline tests can allow a developer to test a regular expression in place. We also define language-agnostic requirements for inline testing frameworks. Lastly, we implement I-Test, the first inline testing framework. I-Test works for Python and Java, and it satisfies most of the requirements. We evaluate I-Test on open-source projects by using it to test 144 statements in 31 Python programs and 37 Java programs. We also perform a user study. All nine user study participants say that inline tests are easy to write and that inline testing is beneficial. The cost of running inline tests is negligible, at 0.007x-0.014x, and our inline tests helped find two faults that have been fixed by the developers. CCS CONCEPTS • Software and its engineering → Software testing and debugging.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper1
问问它们各自怎么用它它引用的顶会 Paper3
- A study on the lifecycle of flaky testsWing Lam, Kivanç Muslu, Hitesh Sajnani, Suresh ThummalapentaICSE 2020 · 被引用 107 次
- No Strings Attached: An Empirical Study of String-related Software BugsAryaz Eghbali, Michael PradelASE 2020 · 被引用 17 次
- Unifying execution of imperative generators and declarative specificationsPengyu Nie, Marinela Parovic, Zhiqiang Zang, Sarfraz Khurshid 等OOPSLA 2020 · 被引用 7 次
相关 Paper
- Block TestsKevin Guan, Pengyue Jiang, Milos Gligoric, Owolabi LegunsenOOPSLA 2026
- Extracting Inline Tests from Unit TestsYu Liu, Pengyu Nie, Anna Guo, Milos Gligoric 等ISSTA 2023 · 被引用 7 次
- PyNose: A Test Smell Detector For PythonTongjie Wang, Yaroslav Golubev, Oleg Smirnov, Jiawei Li 等ASE 2021 · 被引用 44 次
- Improving Testing Behavior by Gamifying IntelliJPhilipp Straubinger, Gordon FraserICSE 2024 · 被引用 5 次
- An automatic refactoring framework for replacing test-production inheritance by mocking mechanismXiao Wang, Lu Xiao, Tingting Yu, Anne Woepse 等FSE 2021 · 被引用 15 次
