How to test Blockscout, including requirements, commands, and environment setup.
chromedriver
. It is required to run tests from ./apps/block_scout_web
of the Umbrella application.
mix test
) suite:
TEST_DATABASE_URL
and DATABASE_READ_ONLY_API_URL
environment variables for more details.
cd apps/block_scout_web/assets && npm run build; cd -
mix format
mix credo --strict
mix dialyzer --halt-exit-status
cd apps/explorer && mix sobelow --config; cd -
cd apps/block_scout_web && mix sobelow --config; cd -
cd apps/block_scout_web/assets && npm run eslint; cd -
cd apps/block_scout_web/assets && npm run test; cd -
indexer
mix do ecto.create --quiet, ecto.migrate && cd apps/indexer && mix do compile, test --no-start && cd -
explorer
mix do ecto.create --quiet, ecto.migrate && cd apps/explorer && mix do compile, test --no-start && cd -
block_scout_web
mix do ecto.create --quiet, ecto.migrate && cd apps/block_scout_web && mix do compile, test --no-start && cd -
ethereum_jsonrpc
mix do ecto.create --quiet, ecto.migrate && cd apps/ethereum_jsonrpc && mix do compile, test --no-start && cd -
mix test --no-start
will work on its own, but to be explicit, use the following setup:
Protocol | URL |
---|---|
HTTP | http://localhost:8545 |
WebSocket | ws://localhost:8546 |
Protocol | URL |
---|---|
HTTP | https://mainnet.infura.io/8lTvJTKmHPCHazkneJsY |
WebSocket | wss://mainnet.infura.io/ws/8lTvJTKmHPCHazkneJsY |