JoshOrndorff / librho

A Standard Library for Rholang
Apache License 2.0
12 stars 6 forks source link

Standard for testing #6

Open JoshOrndorff opened 5 years ago

JoshOrndorff commented 5 years ago

We currently have tests laying around in nonstandard and non automated ways in each file. We need a framework for starting an interpreter, deploying contracts, running the tests and reporting how many tests failed.

How does truffle handle this?

Maybe it could build on a javascript testing framework and use rchain-api?

JoshOrndorff commented 5 years ago

There is also this https://github.com/xiphiness/RDebug

I haven't really played with it.

JoshOrndorff commented 5 years ago

There is also https://github.com/rchain/rchain/blob/dev/casper/src/main/rholang/ListOps.rho#L3-L11

I wonder how we re-create those results.

dckc commented 5 years ago

RhoSpec seems relevant here; I can't quite tell how committed the core dev team is to it:

https://github.com/rchain/rchain/pull/2100 https://github.com/rchain/rchain/blob/cc5345eb6b945cdbec722dd9ed01e7e0384e8cef/casper/src/test/rholang/RhoSpec.rho

odeac commented 5 years ago

I'm migrating existing Rholang tests in casper project to RhoSpec. If everything works fine RhgoSpec will be merged and replace TestSet

JoshOrndorff commented 5 years ago

Very excited to hear that rhospec is coming along. I'm all for if as long as rho:test:assertAck, rho:test:testSuiteCompleted, and other relevant details are documented so that non-RChain rholang implementations can also have them.

Actually, I guess documentation is a bigger ask than just testing, and I haven't let it stop me before...