4 votes
Accepted

Testing Contracts

Try eosfactory Here is a simple tutorial you can follow: https://medium.com/coinmonks/your-first-eos-dapp-using-eosfactory-aa0394df95d9
user avatar
3 votes
Accepted

EOSFactory Testnet Error

This looks like a consequence of the incompatibility between EOSIO v.1.1.x and EOSFactory v1.1. EOSFactory v1.1 is compatible only with EOSIO v1.0.8 and v1.0.9, not higher (the assumptions made in the ...
user avatar
2 votes

Is it possible to compile a smart contract using g++ or clang?

With eosio.cdt, it is now possible to compile object code which can then be tested using unit tests. Check out https://eosio.github.io/eosio.cdt/1.5.0/guides/native-tester.html for a detailed guide. ...
user avatar
2 votes

Unit testing custom contracts

This seemed like an important thing to be able to answer since good automated tests are part of completing a piece of code IMHO, particularly a smart contract dealing with lots of valuable assets. ...
user avatar
2 votes

Initialization of system account within unit tests

Found the answer. It is genesis block initialization (mostly by eosio.bios.wast).
user avatar
  • 125
1 vote
Accepted

eoslime test not saving data in table

the problem is coming from beforeEach function => you are deploying each time a new contract and it throws, because you are creating your user only in the first test suite Solutions: Replace ...
user avatar
1 vote

How to access and manipulate tables when using native unit tests?

Native tester is not available yet unless you implement intrinsics by yourself. You can find partial implementations of intrinsics from development branch named by testerXXX, (eosio.cdt/tools/tester/...
user avatar
  • 2,255
1 vote

How to match object value from fc::variant which is std::pair type in contract unit test via Boost test?

You can pass variant_object to initialize the other variant_object. For example, auto fa_obj = mvo()("first", "apk")("second", 1); REQUIRE_MATCHING_OBJECT(notary, mvo()("account", "ins")("...
user avatar
  • 2,255
1 vote
Accepted

What is the usage of intrinsic read_action_data to set more than one action data?

Setting a next action value need to set the value through increment of 1 in void pointer, i.e. intrinsics::set_intrinsic<intrinsics::read_action_data>( [](void* m, uint32_t len) { ...
user avatar
1 vote

Relation chain_config fields and tx_cpu_usage

Yes there is relation between fields and eos resources because by adding that field to your code it will take more ram,cpu and bandwith to process.,To resolve this issue stake more resources than ...
user avatar
  • 957
1 vote
Accepted

Meaning of stake2votes function

That's a test function that helps making sure the stake2vote() works as intended. The stake2vote() function fromcontracts/eosio.system/voting.cpp is as follows: double stake2vote( int64_t staked ) { ...
user avatar
  • 5,524
1 vote

Time dependent EOS unit test

You can use timestamp to have this functionality. You can use now() this function will return you current timestamp(in seconds),you can set your own timestamp with help of this function Let say for ...
user avatar
  • 957
1 vote

Unittests. cross_15_percent_threshold() failure;

Ok, found the answer: The eosiosystem::min_activated_stake (contracts/eosio.system/producer_pay.cpp) value was bigger than 150 billion.
user avatar
  • 21

Only top scored, non community-wiki answers of a minimum length are eligible