We use cookies to improve your experience with our site.
Yong-Hao Long, Yan-Cheng Chen, Xiang-Ping Chen, Xiao-Hong Shi, Fan Zhou. Test-Driven Feature Extraction of Web Components[J]. Journal of Computer Science and Technology, 2022, 37(2): 389-404. DOI: 10.1007/s11390-022-0673-4
Citation: Yong-Hao Long, Yan-Cheng Chen, Xiang-Ping Chen, Xiao-Hong Shi, Fan Zhou. Test-Driven Feature Extraction of Web Components[J]. Journal of Computer Science and Technology, 2022, 37(2): 389-404. DOI: 10.1007/s11390-022-0673-4

Test-Driven Feature Extraction of Web Components

  • With the growing requirements of web applications, web components are developed to package the implementation of commonly-used features for reuse. In some cases, the developer may want to reuse some features which cannot be customized by the component's APIs. He/she has to extract the implementation by hand. It is labor-intensive and error-prone. Considering the widely-used test cases which can be useful to specify the software features, a test-driven approach is proposed to extract the implementation of the desired features in web components. The satisfaction of the user's requirements is transformed into the passing rate of user-specified test cases. In this way, the quality of the extraction result can be evaluated automatically. Meanwhile, a record/replay-based GUI test generation method is proposed to ensure that the extraction result has the correct GUI appearance. To extract the feature implementation, a hierarchical genetic algorithm is proposed to find the code snippet that can pass all the tests and has the approximate smallest size. We compare our method with two existing feature extraction methods. The result shows that our method can extract the correct implementation with the minimum size. A human-subject study is conducted to show the effectiveness and weaknesses of our method in helping users extract the features.

  • loading

Catalog

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return