Research on aided generation technology of Mock in software testing
CSTR:
Author:
  • Feng Junchi

    Feng Junchi

    Mock technology plays an important role in improving the independence and comprehensiveness of software unit testing. The existing Mock generation framework needs to write the logic of Mock method manually, which leads to heavy workload and possibly introduce human errors. In view of the low efficiency of Mock method construction in testing, an aided generation method of Mock based on data driven idea is proposed, which defines the Mock model to describe internal logic of the implementation, so that the input and output data are independent of the test script. Firstly, through the analysis of programs under test, the simulated method and its input and output parameters are found and analyzed. Secondly, the input and output relationship is modeled. Thirdly, the Mock method is generated for the simulated method based on the input and output relation. Finally, the simulated method in programs under test is replaced by the Mock method. The effectiveness of the proposed method is proved by experiments.
    Find this author on All Journals
    Find this author on BaiDu
    Search for this author on this site
  • Lian Yao

    Lian Yao

    Mock technology plays an important role in improving the independence and comprehensiveness of software unit testing. The existing Mock generation framework needs to write the logic of Mock method manually, which leads to heavy workload and possibly introduce human errors. In view of the low efficiency of Mock method construction in testing, an aided generation method of Mock based on data driven idea is proposed, which defines the Mock model to describe internal logic of the implementation, so that the input and output data are independent of the test script. Firstly, through the analysis of programs under test, the simulated method and its input and output parameters are found and analyzed. Secondly, the input and output relationship is modeled. Thirdly, the Mock method is generated for the simulated method based on the input and output relation. Finally, the simulated method in programs under test is replaced by the Mock method. The effectiveness of the proposed method is proved by experiments.
    Find this author on All Journals
    Find this author on BaiDu
    Search for this author on this site
  • Dong Chao

    Dong Chao

    Mock technology plays an important role in improving the independence and comprehensiveness of software unit testing. The existing Mock generation framework needs to write the logic of Mock method manually, which leads to heavy workload and possibly introduce human errors. In view of the low efficiency of Mock method construction in testing, an aided generation method of Mock based on data driven idea is proposed, which defines the Mock model to describe internal logic of the implementation, so that the input and output data are independent of the test script. Firstly, through the analysis of programs under test, the simulated method and its input and output parameters are found and analyzed. Secondly, the input and output relationship is modeled. Thirdly, the Mock method is generated for the simulated method based on the input and output relation. Finally, the simulated method in programs under test is replaced by the Mock method. The effectiveness of the proposed method is proved by experiments.
    Find this author on All Journals
    Find this author on BaiDu
    Search for this author on this site
  • Yin Danghui

    Yin Danghui

    Mock technology plays an important role in improving the independence and comprehensiveness of software unit testing. The existing Mock generation framework needs to write the logic of Mock method manually, which leads to heavy workload and possibly introduce human errors. In view of the low efficiency of Mock method construction in testing, an aided generation method of Mock based on data driven idea is proposed, which defines the Mock model to describe internal logic of the implementation, so that the input and output data are independent of the test script. Firstly, through the analysis of programs under test, the simulated method and its input and output parameters are found and analyzed. Secondly, the input and output relationship is modeled. Thirdly, the Mock method is generated for the simulated method based on the input and output relation. Finally, the simulated method in programs under test is replaced by the Mock method. The effectiveness of the proposed method is proved by experiments.
    Find this author on All Journals
    Find this author on BaiDu
    Search for this author on this site
Clc Number:

TP311.5, TN06

  • Article
  • | |
  • Metrics
  • | |
  • Related [20]
  • | | |
  • Comments
    Abstract:

    Mock technology plays an important role in improving the independence and comprehensiveness of software unit testing. The existing Mock generation framework needs to write the logic of Mock method manually, which leads to heavy workload and possibly introduce human errors. In view of the low efficiency of Mock method construction in testing, an aided generation method of Mock based on data driven idea is proposed, which defines the Mock model to describe internal logic of the implementation, so that the input and output data are independent of the test script. Firstly, through the analysis of programs under test, the simulated method and its input and output parameters are found and analyzed. Secondly, the input and output relationship is modeled. Thirdly, the Mock method is generated for the simulated method based on the input and output relation. Finally, the simulated method in programs under test is replaced by the Mock method. The effectiveness of the proposed method is proved by experiments.

    Reference
    Cited by
    Comments
    Comments
    分享到微博
    Submit
Get Citation
Share
Article Metrics
  • Abstract:639
  • PDF: 1136
  • HTML: 0
  • Cited by: 0
History
  • Online: August 03,2021
Article QR Code