简体   繁体   English

Solidity & Truffle - 在 Solidity 和 JavaScript 中自动生成测试用例,最好的选择是什么? 利弊?

[英]Solidity & Truffle - Automatic test case generate in Solidity and JavaScript, What is the best option? Props and Cons?

I created new ERC-20 token and now, want to add test code.我创建了新的 ERC-20 令牌,现在想要添加测试代码。 Is there any ways to auto-generate test-cases in SOL files?有没有办法在 SOL 文件中自动生成测试用例? And also want to know the way of auto generate test code in Truffle JavaScript framework.也想知道在Truffle JavaScript框架中自动生成测试代码的方式。

I already googled and got some useful libraries but it's not auto generated code.我已经用谷歌搜索并获得了一些有用的库,但它不是自动生成的代码。 (Like mocha or chai ) Please help me. (如mochachai )请帮助我。

Thank you谢谢

I used the brownie test framework for testing Vyper smart contracts.我使用了布朗尼测试框架来测试 Vyper 智能合约。 And it can be used for testing solidity smart contracts, too.它也可以用于测试可靠性智能合约。 Refer to this repository.请参阅此存储库。 https://github.com/webelf101/curve-volumegauge https://github.com/webelf101/curve-volumegauge

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何为javascript / truffle中的每个测试创建新的以太坊/实体合约 - how to create new ethereum/solidity contract for each test in javascript/truffle truffle & solidity 在测试中无法访问 function - truffle & solidity cant access to a function in test 如何使用松露测试代码牢固地读取公共变量? - How to read public variable in solidity with truffle test codes? 是否有必要发出事件,而没有事件? Solidity Truffle 测试中名为“未发出事件”的错误 - Is it necessary to emit event, while there is no event? Error called "No events were emitted" in Solidity Truffle test 从 javascript 调用 solidity 方法 - Calling a solidity method from javascript 从 Solidity 返回的数组在 Javascript 中分配为 bigNumber - Array returned from Solidity assigned as bigNumber in Javascript 这个语法在solidity中是什么意思。 为了 (;;) {} - What does this syntax in solidity mean. for (;;) {} 接受JavaScript中的参数以发送到Solidity智能合约 - Accepting parameters in javascript to send to solidity smart contract 为网站自动化生成JavaScript测试对象的最佳方法是什么? - What is the best way to generate JavaScript test objects for website automation 松露 - 有没有办法自动生成测试用例? - Truffle - Is There Any Way to Auto Generate Test Cases?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM