4.5 Article

Supporting refactoring of BDD specifications-An empirical study

Journal

INFORMATION AND SOFTWARE TECHNOLOGY
Volume 141, Issue -, Pages -

Publisher

ELSEVIER
DOI: 10.1016/j.infsof.2021.106717

Keywords

Refactoring; Normalized Compression Distance (NCD); Normalized Compression Similarity (NCS); Reuse; Similarity ratio (SR); BDD; Behavior-driven development; Specifications; Testing

Ask authors/readers for more resources

This study proposed a semi-automated approach and two measures of similarity to support practitioners in refactoring BDD specifications. The results showed that this method can identify refactoring candidates faster than manual approaches and accurately identify suitable specifications for refactoring. Additionally, the study described four types of refactoring techniques applicable to BDD specifications.
Context: Behavior-driven development (BDD) is a variant of test-driven development where specifications are described in a structured domain-specific natural language. Although refactoring is a crucial activity of BDD, little research is available on the topic. Objective: To support practitioners in refactoring BDD specifications by (1) proposing semi-automated approaches to identify refactoring candidates; (2) defining refactoring techniques for BDD specifications; and (3) evaluating the proposed identification approaches in an industry context. Method: Using Action Research, we have developed an approach for identifying refactoring candidates in BDD specifications based on two measures of similarity and applied the approach in two projects of a large software organization. The accuracy of the measures for identifying refactoring candidates was then evaluated against an approach based on machine learning and a manual approach based on practitioner perception. Results: We proposed two measures of similarity to support the identification of refactoring candidates in a BDD specification base; (1) normalized compression similarity (NCS) and (2) similarity ratio (SR). A semiautomated approach based on NCS and SR was developed and applied to two industrial cases to identify refactoring candidates. Our results show that our approach can identify candidates for refactoring 6o times faster than a manual approach. Our results furthermore showed that our measures accurately identified refactoring candidates compared with a manual identification by software practitioners and outperformed an ML-based text classification approach. We also described four types of refactoring techniques applicable to BDD specifications; merging candidates, restructuring candidates, deleting duplicates, and renaming specification titles. Conclusion: Our results show that NCS and SR can help practitioners in accurately identifying BDD specifications that are suitable candidates for refactoring, which also decreases the time for identifying refactoring candidates.

Authors

I am an author on this paper
Click your name to claim this paper and add it to your profile.

Reviews

Primary Rating

4.5
Not enough ratings

Secondary Ratings

Novelty
-
Significance
-
Scientific rigor
-
Rate this paper

Recommended

No Data Available
No Data Available