测试模型的生成和细化

Luis Eduardo Bueso de Barrio, Lars-Åke Fredlund, Clara Benac Earle, Ángel Herranz, Julio Mariño-Carballo
{"title":"测试模型的生成和细化","authors":"Luis Eduardo Bueso de Barrio, Lars-Åke Fredlund, Clara Benac Earle, Ángel Herranz, Julio Mariño-Carballo","doi":"10.1145/3609022.3609415","DOIUrl":null,"url":null,"abstract":"Writing property-based testing models is a challenging task. This article introduces a new tool, Faktory, which is capable of automatically generating an executable property-based testing model from less complicated sources: normal function type specifications, and traditional function calling contracts using pre- and post-conditions. Concretely, Faktory is an Elixir library which from an API annotated with executable calling contracts written using the Corsa contract checking library, automatically generates a property-based testing model in the form of a state machine implemented using the Makina state machine DSL. In the article we illustrate the functionalities of the Faktory tool using a number of examples. The first one shows how to test a functional data structure; the second shows how to improve test-case generation by reusing test results; and in the third example a stateful key-value storage is tested by first deriving an initial test model using Faktory, and then refining the generated model using the Makina model/state machine extension mechanism.","PeriodicalId":270362,"journal":{"name":"Proceedings of the 22nd ACM SIGPLAN International Workshop on Erlang","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2023-08-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Generation and Refinement of Testing Models\",\"authors\":\"Luis Eduardo Bueso de Barrio, Lars-Åke Fredlund, Clara Benac Earle, Ángel Herranz, Julio Mariño-Carballo\",\"doi\":\"10.1145/3609022.3609415\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Writing property-based testing models is a challenging task. This article introduces a new tool, Faktory, which is capable of automatically generating an executable property-based testing model from less complicated sources: normal function type specifications, and traditional function calling contracts using pre- and post-conditions. Concretely, Faktory is an Elixir library which from an API annotated with executable calling contracts written using the Corsa contract checking library, automatically generates a property-based testing model in the form of a state machine implemented using the Makina state machine DSL. In the article we illustrate the functionalities of the Faktory tool using a number of examples. The first one shows how to test a functional data structure; the second shows how to improve test-case generation by reusing test results; and in the third example a stateful key-value storage is tested by first deriving an initial test model using Faktory, and then refining the generated model using the Makina model/state machine extension mechanism.\",\"PeriodicalId\":270362,\"journal\":{\"name\":\"Proceedings of the 22nd ACM SIGPLAN International Workshop on Erlang\",\"volume\":null,\"pages\":null},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-08-30\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 22nd ACM SIGPLAN International Workshop on Erlang\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3609022.3609415\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 22nd ACM SIGPLAN International Workshop on Erlang","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3609022.3609415","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

编写基于属性的测试模型是一项具有挑战性的任务。本文介绍了一个新工具factory,它能够从不太复杂的来源自动生成一个可执行的基于属性的测试模型:普通的功能类型规范,以及使用前置和后用条件的传统功能调用契约。具体来说,factory是一个Elixir库,它从一个带有可执行调用契约注释的API(使用Corsa契约检查库编写)中自动生成一个基于属性的测试模型,以使用Makina状态机DSL实现的状态机的形式。在本文中,我们将使用一些示例来说明factory工具的功能。第一个演示了如何测试一个功能数据结构;第二部分展示了如何通过重用测试结果来改进测试用例的生成;在第三个示例中,通过首先使用factory派生初始测试模型,然后使用Makina模型/状态机扩展机制对生成的模型进行细化,来测试有状态键值存储。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Generation and Refinement of Testing Models
Writing property-based testing models is a challenging task. This article introduces a new tool, Faktory, which is capable of automatically generating an executable property-based testing model from less complicated sources: normal function type specifications, and traditional function calling contracts using pre- and post-conditions. Concretely, Faktory is an Elixir library which from an API annotated with executable calling contracts written using the Corsa contract checking library, automatically generates a property-based testing model in the form of a state machine implemented using the Makina state machine DSL. In the article we illustrate the functionalities of the Faktory tool using a number of examples. The first one shows how to test a functional data structure; the second shows how to improve test-case generation by reusing test results; and in the third example a stateful key-value storage is tested by first deriving an initial test model using Faktory, and then refining the generated model using the Makina model/state machine extension mechanism.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Mria: An Eventually Consistent Mnesia TLS the Erlang/OTP Way (Experience Report) Generation and Refinement of Testing Models Code Analysis at WhatsApp (Keynote) A Semantics of Core Erlang with Handling of Signals
×
引用
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