Qin Sheng

dblp:76/3036 · DBLP profile ↗
← Back
2ranked-venue papers
0as first author
1since 2021 · last 2024
0009-0004-8527-9297ORCID · corroborated

Domains — the database's venue-derived domains; a paper can count in several

Software engineering, systems software and programming languages · 2 · 1 since 2021

Expertise — from the expertise taxonomy: the topics of the expert's papers under the CCF categories. A weight counts papers with recency: 1 for a paper about the topic, 0.3 when the topic is its context, halved every five years.

Software engineering, system software, and programming languages
2 papers
Software testing · 94% Empirical software engineering · 6%

Topics — the 3 heaviest of 3, each with the papers that count most for it

TopicWeightPapersLastEvidence papers
Software testing
unit testing
1.222024
StubCoder: Automated Generation and Repair of Stub Code for Mock Objects · ACM Trans. Softw. Eng. Methodol. 2024
MockSniffer: Characterizing and Recommending Mocking Decisions for Unit Tests · ASE 2020
Software testing › test generation
test code generation
0.812024
StubCoder: Automated Generation and Repair of Stub Code for Mock Objects · ACM Trans. Softw. Eng. Methodol. 2024
Empirical software engineering
mining software repositories
0.112020
MockSniffer: Characterizing and Recommending Mocking Decisions for Unit Tests · ASE 2020

Methods — techniques the papers use, named apart from their topics

runtime behavior guidance · 0.8evolutionary algorithm · 0.8machine learning · 0.4feature-based classification · 0.4
YearPublicationVenuePosition
2024 StubCoder: Automated Generation and Repair of Stub Code for Mock Objects
abstract
Mocking is an essential unit testing technique for isolating the class under test from its dependencies. Developers often leverage mocking frameworks to develop stub code that specifies the behaviors of mock objects. However, developing and maintaining stub code is labor-intensive and error-prone. In this article, we present StubCoder to automatically generate and repair stub code for regression testing. StubCoder implements a novel evolutionary algorithm that synthesizes test-passing stub code guided by the runtime behavior of test cases. We evaluated our proposed approach on 59 test cases from 13 open source projects. Our evaluation results show that StubCoder can effectively generate stub code for incomplete test cases without stub code and repair obsolete test cases with broken stub code.
Hengcheng Zhu 0001, Lili Wei 0001, Valerio Terragni, Yepang Liu 0001, Shing-Chi Cheung, Qin Sheng, Lihong Song
ACM Trans. Softw. Eng. Methodol.7
2020 MockSniffer: Characterizing and Recommending Mocking Decisions for Unit Tests
abstract
In unit testing, mocking is popularly used to ease test effort, reduce test flakiness, and increase test coverage by replacing the actual dependencies with simple implementations. However, there are no clear criteria to determine which dependencies in a unit test should be mocked. Inappropriate mocking can have undesirable consequences: under-mocking could result in the inability to isolate the class under test (CUT) from its dependencies while over-mocking increases the developers' burden on maintaining the mocked objects and may lead to spurious test failures. According to existing work, various factors can determine whether a dependency should be mocked. As a result, mocking decisions are often difficult to make in practice. Studies on the evolution of mocked objects also showed that developers tend to change their mocking decisions: 17% of the studied mocked objects were introduced sometime after the test scripts were created and another 13% of the originally mocked objects eventually became unmocked. In this work, we are motivated to develop an automated technique to make mocking recommendations to facilitate unit testing. We studied 10,846 test scripts in four actively maintained open-source projects that use mocked objects, aiming to characterize the dependencies that are mocked in unit testing. Based on our observations on mocking practices, we designed and implemented a tool, MockSniffer, to identify and recommend mocks for unit tests. The tool is fully automated and requires only the CUT and its dependencies as input. It leverages machine learning techniques to make mocking recommendations by holistically considering multiple factors that can affect developers' mocking decisions. Our evaluation of MockSniffer on ten open-source projects showed that it outperformed three baseline approaches, and achieved good performance in two potential application scenarios.
Hengcheng Zhu 0001, Lili Wei 0001, Ming Wen 0001, Yepang Liu 0001, Shing-Chi Cheung, Qin Sheng, Cui Zhou
ASE6