Solidity Code : Contract/Contract.sol
deploey Code : Contract/build_script/All.js
(注意:deploey前必須先產出 Contract之abi,bytecode ,即deploeycontract 之步驟5 'npm run solc')
Gherkin : features/exchange.feature
high level test code : features/step_definitions/exchange.steps.js
features Code : script/exchangRequest.js
low level test code : Test/test/test.js
- 安裝
npm install -g node-gyp
npm install -g ethereumjs-testrpc
- 執行
testrpc -p 8545 -a 100 -l 88888888
cd Contractmkdir build(one time)cd build_scriptnpm install -g solc@0.4.8 && npm install(one time)npm run solc && npm run release(ornpm run solc && npm run debugfor testrpc)
testrpc -l 88888888 -p 8545or connect to private chaincd Contractmkdir build(one time)cd build_scriptnpm install -g solc@0.4.8 && npm install(one time)npm run solc(if contract has changed)cd ../../Testtestrpc -p 8545 -l 88888888npm install && npm test
testrpc -l 88888888 -p 8545or connect to private chain- npm instll
- node node_modules/cucumber/bin/cucumber.js