The pros and cons of two ways [Contract] code test Solidity contract

 

First, use Truffle such a framework inherited testing tools, as long as you can write js script and test logic web3 contract.

The advantage is fully controllable, fine enough granularity, ease of integration testing; disadvantage is the need to spend some time writing test scripts, but worth it.

 

Second, the use of Remix call provides a graphical method, you can quickly verify the correctness of the method return value, convenient debugging.

Remix need only load files, deployment contracts and commissioning. The advantage is patterned, quick; disadvantage is not possible to cover all the test cases, coarse granularity.

 

Summary: You can make use of a combination of the above two methods for the preparation of the development phase of test cases to verify the proper use of the commissioning phase can graphically.

 

Link:https://www.cnblogs.com/farwish/p/12446093.html

Guess you like

Origin www.cnblogs.com/farwish/p/12446093.html