Sword-Smith / Sword

Sword — A financial derivative language for the blockchain
MIT License
28 stars 2 forks source link

Interface for running all integration tests #9

Closed Ulrik-dk closed 3 years ago

Ulrik-dk commented 4 years ago

A program that runs all tests, and preferably gives some overview of the results.

Ulrik-dk commented 4 years ago

The program should stop and clearly show a failure, if any test fails. This can potentially be done through return values or through javascript. This is up to the implementer. The purpose of the program is to quickly run all the integration tests in the sandbox environment.

Ulrik-dk commented 4 years ago

Made progress here: https://github.com/einar-io/geth_tools/commit/fbcceae59d4aecdbe7bcfa81f607a77e3b75320f

Stuff left to do:

Ulrik-dk commented 4 years ago

Other than the tests I have written, Einar has written two integration tests. Einar wants to make one more test to be included, dealing with #1 #3 This should be added to the run_all_tests.sh.

It is Thorkil's responsibility to:

  • [x] Make perl detect 'throw' from javascript and pass this information to the shellscript, so everything stops.

2 hrs

Ulrik-dk commented 4 years ago

deadline: August 20, 23:59.

Ulrik-dk commented 4 years ago

Mostly solved with this commit: https://github.com/einar-io/geth_tools/commit/1d477442933a9056f9912eb6c81c28da816a0793, although there still are some old leftover files in the folders that could be cleaned out.

Ulrik-dk commented 4 years ago

The tests BettingExampleNew and BettingExampleNewScale should be set up to use assertions to enforce the correct numbers, rather than checking them by hand. The numbers displayed with printBalances should be directly asserted upon. Ulrik's setup should be used for this.

Sword-Smith commented 4 years ago

What are your thoughts on this, @Ulrik-dk, done?

Ulrik-dk commented 4 years ago

Refactoring those two tests will involve expanding the js library a bit. Definitely feasable and desirable, but not something I will get to very soon.

sshine commented 3 years ago

Closing this issue because @Ulrik-dk has made ./run_all_tests.sh.