{"id":{"repo_id":"ubc","oai_identifier":"oai:circle.library.ubc.ca:2429/77008"},"canonical_url":"https://search.ndltd.org/etd/ubc/oai:circle.library.ubc.ca:2429/77008","repository":{"repo_id":"ubc","name":"University of British Columbia","base_url":"http://circle.library.ubc.ca/oai/request"},"display":{"title":"Automated human-in-the-loop assertion generation","abstract":"Test cases use assertions to check program behaviour. While these assertions may not be complex, they are themselves code and must be written correctly in order to distinguish between passing and failing test cases. I assert that test assertions are relatively repetitive and straight-forward, making their construction well suited to automation; and that tools can reduce developer effort (and simultaneously improve the quality of the assertions in their test suites) by automatically generating assertions that the tester can choose to accept, modify, delete, or augment. Such a tool can fit into a developer workflow where tests are frequently written alongside runnable source code. I examined 33,873 assertions from 105 projects and identified twelve high-level categories that account for the vast majority of developer-written test assertions, confirming that test assertions are fairly simple in practice. To assess the utility of my human-in-the-loop assertion generation thesis, I developed the AutoAssert framework, which generates typical assertions for test cases written for JavaScript code. AutoAssert uses dynamic analysis to determine both which assertions to generate and what values they should verify. The developer can choose to accept, modify, delete, or add to the set of generated assertions. I compared assertions generated by AutoAssert to those written by developers and found that it generates the same kind of assertions as written by developers 84\\% of the time in a sample of over 1,000 assertions. Additionally I validated the utility of AutoAssert-generated assertions with 17 developers; these developers found that the majority of generated assertions were useful and expressed considerable interest in using such a tool/approach for their own projects.","abstract_html":"Test cases use assertions to check program behaviour. While these assertions may not be complex, they are themselves code and must be written correctly in order to distinguish between passing and failing test cases. I assert that test assertions are relatively repetitive and straight-forward, making their construction well suited to automation; and that tools can reduce developer effort (and simultaneously improve the quality of the assertions in their test suites) by automatically generating assertions that the tester can choose to accept, modify, delete, or augment. Such a tool can fit into a developer workflow where tests are frequently written alongside runnable source code. I examined 33,873 assertions from 105 projects and identified twelve high-level categories that account for the vast majority of developer-written test assertions, confirming that test assertions are fairly simple in practice. To assess the utility of my human-in-the-loop assertion generation thesis, I developed the AutoAssert framework, which generates typical assertions for test cases written for JavaScript code. AutoAssert uses dynamic analysis to determine both which assertions to generate and what values they should verify. The developer can choose to accept, modify, delete, or add to the set of generated assertions. I compared assertions generated by AutoAssert to those written by developers and found that it generates the same kind of assertions as written by developers 84\\% of the time in a sample of over 1,000 assertions. Additionally I validated the utility of AutoAssert-generated assertions with 17 developers; these developers found that the majority of generated assertions were useful and expressed considerable interest in using such a tool/approach for their own projects.","abstract_has_math":false,"creators":["Zamprogno, Lucas Alan"],"institution":"University of British Columbia","degree_name":"Master of Science - MSc","degree_level":"master's","degree_discipline":"Computer Science","degree_department":null,"school":null,"contributors":[],"advisors":[],"committee_chairs":[],"committee_members":[],"year":2020,"date_issued":"2020","date_published":"2020","updated_at":"2026-11-19T15:12:12Z","subjects":[],"languages":["eng"],"rights":["Attribution-NonCommercial-NoDerivatives 4.0 International"],"rights_urls":["http://creativecommons.org/licenses/by-nc-nd/4.0/"],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"http://hdl.handle.net/2429/77008","outbound_label":"Handle","outbound_source":"dc:identifier","record_url":"http://hdl.handle.net/2429/77008","record_label":"Repository record","record_kind":"handle","record_source":"dc:identifier","download_url":"http://circle.library.ubc.ca/bitstream/2429/77008/4/ubc_2021_may_zamprogno_lucas.pdf","download_label":"Download PDF","download_source":"dc:identifier","access_status":null,"embargo_until":null,"access_note":null},"source_record":{"url":"http://circle.library.ubc.ca/oai/request?verb=GetRecord&metadataPrefix=etdms&identifier=oai%3Acircle.library.ubc.ca%3A2429%2F77008","prefix":"etdms"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:creator","label":"Author","values":["Zamprogno, Lucas Alan"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date","label":"Dc Date","values":["2020"]},{"key":"dc:publisher","label":"Institution","values":["University of British Columbia"]},{"key":"dc:type","label":"Dc Type","values":["Text"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Computer Science"]},{"key":"thesis:degree_level","label":"Degree Level","values":["master's"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Science - MSc"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["University of British Columbia"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language","label":"Dc Language","values":["eng"]},{"key":"dc:rights","label":"Dc Rights","values":["http://creativecommons.org/licenses/by-nc-nd/4.0/","Attribution-NonCommercial-NoDerivatives 4.0 International"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["http://hdl.handle.net/2429/77008","http://circle.library.ubc.ca/bitstream/2429/77008/4/ubc_2021_may_zamprogno_lucas.pdf"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description","label":"Description","values":["Test cases use assertions to check program behaviour. While these assertions may not be complex, they are themselves code and must be written correctly in order to distinguish between passing and failing test cases. I assert that test assertions are relatively repetitive and straight-forward, making their construction well suited to automation; and that tools can reduce developer effort (and simultaneously improve the quality of the assertions in their test suites) by automatically generating assertions that the tester can choose to accept, modify, delete, or augment. Such a tool can fit into a developer workflow where tests are frequently written alongside runnable source code. I examined 33,873 assertions from 105 projects and identified twelve high-level categories that account for the vast majority of developer-written test assertions, confirming that test assertions are fairly simple in practice. To assess the utility of my human-in-the-loop assertion generation thesis, I developed the AutoAssert framework, which generates typical assertions for test cases written for JavaScript code. AutoAssert uses dynamic analysis to determine both which assertions to generate and what values they should verify. The developer can choose to accept, modify, delete, or add to the set of generated assertions. I compared assertions generated by AutoAssert to those written by developers and found that it generates the same kind of assertions as written by developers 84\\% of the time in a sample of over 1,000 assertions. Additionally I validated the utility of AutoAssert-generated assertions with 17 developers; these developers found that the majority of generated assertions were useful and expressed considerable interest in using such a tool/approach for their own projects."]},{"key":"dc:format","label":"Dc Format","values":["2873537","application/pdf"]},{"key":"dc:title","label":"Title","values":["Automated human-in-the-loop assertion generation"]}]}],"canonical_facts":{"dc:creator":["Zamprogno, Lucas Alan"],"dc:date":["2020"],"dc:description":["Test cases use assertions to check program behaviour. While these assertions may not be complex, they are themselves code and must be written correctly in order to distinguish between passing and failing test cases. I assert that test assertions are relatively repetitive and straight-forward, making their construction well suited to automation; and that tools can reduce developer effort (and simultaneously improve the quality of the assertions in their test suites) by automatically generating assertions that the tester can choose to accept, modify, delete, or augment. Such a tool can fit into a developer workflow where tests are frequently written alongside runnable source code. I examined 33,873 assertions from 105 projects and identified twelve high-level categories that account for the vast majority of developer-written test assertions, confirming that test assertions are fairly simple in practice. To assess the utility of my human-in-the-loop assertion generation thesis, I developed the AutoAssert framework, which generates typical assertions for test cases written for JavaScript code. AutoAssert uses dynamic analysis to determine both which assertions to generate and what values they should verify. The developer can choose to accept, modify, delete, or add to the set of generated assertions. I compared assertions generated by AutoAssert to those written by developers and found that it generates the same kind of assertions as written by developers 84\\% of the time in a sample of over 1,000 assertions. Additionally I validated the utility of AutoAssert-generated assertions with 17 developers; these developers found that the majority of generated assertions were useful and expressed considerable interest in using such a tool/approach for their own projects."],"dc:format":["2873537","application/pdf"],"dc:identifier":["http://hdl.handle.net/2429/77008","http://circle.library.ubc.ca/bitstream/2429/77008/4/ubc_2021_may_zamprogno_lucas.pdf"],"dc:language":["eng"],"dc:publisher":["University of British Columbia"],"dc:rights":["http://creativecommons.org/licenses/by-nc-nd/4.0/","Attribution-NonCommercial-NoDerivatives 4.0 International"],"dc:title":["Automated human-in-the-loop assertion generation"],"dc:type":["Text"],"thesis:degree_discipline":["Computer Science"],"thesis:degree_level":["master's"],"thesis:degree_name":["Master of Science - MSc"],"thesis:institution_name":["University of British Columbia"]},"updated_at":"2026-11-19T15:12:12Z"}