development: {
host: '127.0.0.1',
port: 8545,
network_id: '*', // Match any network id
},
coverage: {
host: 'localhost',
network_id: '*',
port: 8555, // <-- If you change this, also set the port option in .solcover.js.
gas: 0xfffffffffff, // <-- Use this high gas value
gasPrice: 0x01 // <-- Use this low gas price
}
truffle test
?
truffle run coverage
.
During instrumentation:
interface/IERC20.sol
solidity-coverage cleaning up, shutting down ganache server
ParserError: Could not instrument: interface/IERC20.sol. (Please verify solc can compile this file without errors.) extraneous input 'abstract' expecting {<EOF>, 'pragma', 'import', 'contract', 'interface', 'library'} (9:0)
etherlime
working with solidity-coverage
before. Do you currently support this scenario? I am hitting a lot of issues trying to either use the etherlime
coverage functionality (which utilises 0x coverage tool under the bonnet) or use the solidity-coverage
on top of an etherlime
project. I don’t get why the tools have to be so tied in with the test/deploy framework underneath, i.e. solidity-coverage
with truffle
and etherlime
with 0x coverage
I don’t get why the tools have to be so tied in with the test/deploy framework underneath, i.e. solidity-coverage with truffle and etherlime with 0x coverage
Hello,
I am Getting compilation failed error while generation coverage, precisely after instrumentation and truffle compile is working fine
Error:
* Line 1, Column 1
Syntax error: value, object or array expected.
* Line 1, Column 2
Extra non-whitespace after JSON value.
Compilation failed. See above.
My solidity version is 0.5.7
Please check this for my truffle-config and .solcover.js https://ethereum.stackexchange.com/questions/79460/compilation-failed-during-instrumentation-of-solidity-coverage
Could anyone help me if i am doing any mistake in config
updated solidity-coverage version to 0.7.1 and truffle 5.0.31
Getting this error now, during compilation after instrumentation
> solidity-coverage cleaning up, shutting down ganache server
Error: TypeError: Cannot convert undefined or null to object
at Object.compile (/home/udkreddy/Dushyanth/NexusMutual/nxm-smart-contracts/node_modules/truffle/build/webpack:/packages/truffle-workflow-compile/legacy/index.js?6101:72:1)
at <anonymous>
Find repo here : https://github.com/udkreddy/nxm-smart-contracts/tree/coverage-fix
@udkreddy I haven't been able to get the tests to run to completion - the setup takes a really long time - I don't know if it's due to the coverage tool because I can't get the regular tests to run. If you add a network flag to...
npx truffle run coverage --network development
in test.sh, coverage will use 8545 but the before block for the first test just seems to hang. If you omit the network flag, eventually you will see some tests running but some of the before blocks error because they are using the wrong port to make Web3 calls.