Linking unit tests and properties

Alex Gerdes, John Hughes, Nicholas Smallbone, Meng Wang
{"title":"Linking unit tests and properties","authors":"Alex Gerdes, John Hughes, Nicholas Smallbone, Meng Wang","doi":"10.1145/2804295.2804298","DOIUrl":null,"url":null,"abstract":"QuickCheck allows us to verify software against particular properties. A property can be regarded as an abstraction over many unit tests. QuickCheck uses generated random input data to test such properties. If a counterexample is found, it becomes immediately clear what we have tested. This is not the case when all tests pass, since we do not (and shall not) see the actual generated test cases. How can we be sure about what is tested? QuickCheck has the ability to gather statistics about the test cases, which is insightful. But still it does not tell us whether the particular unit test scenarios we have in mind are included. For this reason, we have developed a tool that can answer this question. It checks if a given unit test can be generated by a property, making it easier to judge the property's quality. We have applied our tool to an industrial use case of testing the AUTOSAR basic software modules and shows that it can handle complex models and large unit tests.","PeriodicalId":266108,"journal":{"name":"Proceedings of the 14th ACM SIGPLAN Workshop on Erlang","volume":"34 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2015-08-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"7","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 14th ACM SIGPLAN Workshop on Erlang","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2804295.2804298","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 7

Abstract

QuickCheck allows us to verify software against particular properties. A property can be regarded as an abstraction over many unit tests. QuickCheck uses generated random input data to test such properties. If a counterexample is found, it becomes immediately clear what we have tested. This is not the case when all tests pass, since we do not (and shall not) see the actual generated test cases. How can we be sure about what is tested? QuickCheck has the ability to gather statistics about the test cases, which is insightful. But still it does not tell us whether the particular unit test scenarios we have in mind are included. For this reason, we have developed a tool that can answer this question. It checks if a given unit test can be generated by a property, making it easier to judge the property's quality. We have applied our tool to an industrial use case of testing the AUTOSAR basic software modules and shows that it can handle complex models and large unit tests.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
链接单元测试和属性
QuickCheck允许我们根据特定属性验证软件。一个属性可以被看作是对许多单元测试的抽象。QuickCheck使用生成的随机输入数据来测试这些属性。如果找到一个反例,我们测试的内容就会立即变得清晰。当所有测试都通过时,情况并非如此,因为我们没有(也不会)看到实际生成的测试用例。我们如何确定测试的是什么?QuickCheck有能力收集关于测试用例的统计信息,这是有洞察力的。但是它仍然没有告诉我们是否包含了我们所考虑的特定单元测试场景。出于这个原因,我们开发了一个工具来回答这个问题。它检查给定的单元测试是否可以由属性生成,从而更容易判断属性的质量。我们已经将我们的工具应用于测试AUTOSAR基本软件模块的工业用例,并表明它可以处理复杂的模型和大型单元测试。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Attribute grammars in Erlang Linking unit tests and properties Performance portability through semi-explicit placement in distributed Erlang Proceedings of the 14th ACM SIGPLAN Workshop on Erlang Smother: an MC/DC analysis tool for Erlang
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1