Generating Unit Tests with Descriptive Names Or: Would You Name Your Children Thing1 and Thing2?. Daka, E., Rojas, J. M., & Fraser, G. In ACM Int. Symposium on Software Testing and Analysis (ISSTA), pages 57–67, 2017. ACM. doi abstract bibtex The name of a unit test helps developers to understand the purpose and scenario of the test, and test names support developers when navigating amongst sets of unit tests. When unit tests are generated automatically, however, they tend to be given non-descriptive names such as ``test0'', which provide none of the benefits a descriptive name can give a test. The underlying challenge is that automatically generated tests typically do not represent real scenarios and have no clear purpose other than covering code, which makes naming them difficult. In this paper, we present an automated approach which generates descriptive names for automatically generated unit tests by summarizing API-level coverage goals. The tests are optimized to be short, descriptive of the test, have a clear relation to the covered code under test, and allow developers to uniquely distinguish tests in a test suite. An empirical evaluation with 47 participants shows that developers agree with the synthesized names, and the synthesized names are equally descriptive as manually written names. Study participants were even more accurate and faster at matching code and tests with synthesized names compared to manually derived names.
@inproceedings{ISSTA17_IDNaming,
author = {Ermira Daka and Jos\'e Miguel Rojas and Gordon Fraser},
title = {Generating Unit Tests with Descriptive Names Or: Would
You Name Your Children Thing1 and Thing2?},
booktitle = ISSTA,
publisher = {ACM},
year = {2017},
labels = {conf},
doi = {10.1145/3092703.3092727},
abstract = {The name of a unit test helps developers to understand
the purpose and scenario of the test, and test names
support developers when navigating amongst sets of unit
tests. When unit tests are generated automatically,
however, they tend to be given non-descriptive names
such as ``test0'', which provide none of the benefits a
descriptive name can give a test. The underlying
challenge is that automatically generated tests
typically do not represent real scenarios and have no
clear purpose other than covering code, which makes
naming them difficult. In this paper, we present an
automated approach which generates descriptive names
for automatically generated unit tests by summarizing
API-level coverage goals. The tests are optimized to be
short, descriptive of the test, have a clear relation
to the covered code under test, and allow developers to
uniquely distinguish tests in a test suite. An
empirical evaluation with 47 participants shows that
developers agree with the synthesized names, and the
synthesized names are equally descriptive as manually
written names. Study participants were even more
accurate and faster at matching code and tests with
synthesized names compared to manually derived names.},
pages = {57--67},
doi = {10.1145/3092703.3092727}
}
Downloads: 0
{"_id":"spKAinzy2PYjWAk2w","bibbaseid":"daka-rojas-fraser-generatingunittestswithdescriptivenamesorwouldyounameyourchildrenthing1andthing2-2017","author_short":["Daka, E.","Rojas, J. M.","Fraser, G."],"bibdata":{"bibtype":"inproceedings","type":"inproceedings","author":[{"firstnames":["Ermira"],"propositions":[],"lastnames":["Daka"],"suffixes":[]},{"firstnames":["José","Miguel"],"propositions":[],"lastnames":["Rojas"],"suffixes":[]},{"firstnames":["Gordon"],"propositions":[],"lastnames":["Fraser"],"suffixes":[]}],"title":"Generating Unit Tests with Descriptive Names Or: Would You Name Your Children Thing1 and Thing2?","booktitle":"ACM Int. Symposium on Software Testing and Analysis (ISSTA)","publisher":"ACM","year":"2017","labels":"conf","doi":"10.1145/3092703.3092727","abstract":"The name of a unit test helps developers to understand the purpose and scenario of the test, and test names support developers when navigating amongst sets of unit tests. When unit tests are generated automatically, however, they tend to be given non-descriptive names such as ``test0'', which provide none of the benefits a descriptive name can give a test. The underlying challenge is that automatically generated tests typically do not represent real scenarios and have no clear purpose other than covering code, which makes naming them difficult. In this paper, we present an automated approach which generates descriptive names for automatically generated unit tests by summarizing API-level coverage goals. The tests are optimized to be short, descriptive of the test, have a clear relation to the covered code under test, and allow developers to uniquely distinguish tests in a test suite. An empirical evaluation with 47 participants shows that developers agree with the synthesized names, and the synthesized names are equally descriptive as manually written names. Study participants were even more accurate and faster at matching code and tests with synthesized names compared to manually derived names.","pages":"57–67","bibtex":"@inproceedings{ISSTA17_IDNaming,\n author = {Ermira Daka and Jos\\'e Miguel Rojas and Gordon Fraser},\n title\t = {Generating Unit Tests with Descriptive Names Or: Would\n You Name Your Children Thing1 and Thing2?},\n booktitle = ISSTA,\n publisher = {ACM},\n year\t = {2017},\n labels = {conf},\n doi\t = {10.1145/3092703.3092727},\n abstract = {The name of a unit test helps developers to understand\n the purpose and scenario of the test, and test names\n support developers when navigating amongst sets of unit\n tests. When unit tests are generated automatically,\n however, they tend to be given non-descriptive names\n such as ``test0'', which provide none of the benefits a\n descriptive name can give a test. The underlying\n challenge is that automatically generated tests\n typically do not represent real scenarios and have no\n clear purpose other than covering code, which makes\n naming them difficult. In this paper, we present an\n automated approach which generates descriptive names\n for automatically generated unit tests by summarizing\n API-level coverage goals. The tests are optimized to be\n short, descriptive of the test, have a clear relation\n to the covered code under test, and allow developers to\n uniquely distinguish tests in a test suite. An\n empirical evaluation with 47 participants shows that\n developers agree with the synthesized names, and the\n synthesized names are equally descriptive as manually\n written names. Study participants were even more\n accurate and faster at matching code and tests with\n synthesized names compared to manually derived names.},\n pages\t = {57--67},\n doi\t = {10.1145/3092703.3092727}\n}\n\n","author_short":["Daka, E.","Rojas, J. M.","Fraser, G."],"key":"ISSTA17_IDNaming","id":"ISSTA17_IDNaming","bibbaseid":"daka-rojas-fraser-generatingunittestswithdescriptivenamesorwouldyounameyourchildrenthing1andthing2-2017","role":"author","urls":{},"metadata":{"authorlinks":{}},"downloads":0,"html":""},"bibtype":"inproceedings","biburl":"https://jmrojas.github.io/cv/mybibtex.bib","dataSources":["HH2ZMm8PqShQeXCWM"],"keywords":[],"search_terms":["generating","unit","tests","descriptive","names","name","children","thing1","thing2","daka","rojas","fraser"],"title":"Generating Unit Tests with Descriptive Names Or: Would You Name Your Children Thing1 and Thing2?","year":2017}