I am currently on eosio v1.1 but will be upgrading to v1.2 shortly.

I am trying to create a new unit test for my contract. The existing unittest work when I run the following:

cd eos/build/unittest

unit_test -t tic_tac_toe_tests

Random number generator seeded to 1535128111

Running 1 test case...

*** No errors detected

Now I want to create a new test for my contract For example:

unit_test -t mycontract_tests

Random number generator seeded to 1535128123

Test setup error: no test cases matching filter or all test cases were disabled

Where I made the file eos/unittests/mycontract_tests.cpp

I am guessing I need to add this file name in somewhere?


Look https://www.npmjs.com/package/eoslime. It allows you to write javascript tests for your contracts

Check out the eoslime example to get a better idea of how to write tests.
-> example: https://github.com/LimeChain/eoslime/blob/master/example/eosio-token/usage-example.js

Not the answer you're looking for? Browse other questions tagged or ask your own question.