ipfs / notes

IPFS Collaborative Notebook for Research
MIT License
402 stars 31 forks source link

Leveling up testing infrastructure #202

Open jbenet opened 7 years ago

jbenet commented 7 years ago

(Notes from a call)

Increase improvement rate of IPFS projects

Goals

Goal of the topic:

Goal of call:

Testing Concerns:

Clear Performance Tests:

  1. Simple end-to-end acceptance tests
  2. js-ipfs-bitswap in isolation, test building networks with N=(10, 100, 1000, ...) nodes transferring k=(10, 100, 1000, ...) files, of sizes S=(10, 100, 1000, ...)
  3. js-ipfs & js-ipfs-bitswap tests generation x files on n nodes, and then requesting all files on all nodes, such that at the end each node has n * x files.
  4. Fetch sites (iterative / lock-stepped requests)
  5. Test a simulated load of orbit-db (NOT using orbit-db, just same data pattern / sizes) over js-ipfs and go-ipfs.
  6. Test a network of orbit-db logs with js-ipfs and go-ipfs N=(10, 100, 1000, ...),
  7. Test Orbit itself (Final test?) Test orbit itself -- automated chat bots N=(10, 100, 1000, ...), messages M=(10, 100, 1000, 1000), on channels C=(1, 10, 100, 1000, ...)
  8. npm testing (all of the existing tools should have benchmark tests that spawn whenever things are cloned, stimulated networks)
  9. peer discovery and connectivity tests (test all the different discovery protocols in isolation, and with time bounds ("should get connected in t ms"))
  10. test moving files with ipfs networks N=(10, 100, 1000, ...), num-files=(10, 100, 1000, ...), size=(10, 100, 1000, ...)
  11. iptb working with ipfs, good baseline

Make a list of modules to cross reference tests. Each of these should be tested in these cases: {in isolation, w/ go-ipfs, w/ js-ipfs-node, w/ js-ipfs-browser, w/ all go-ipfs & js-ipfs-node & js-ipfs-browser} --

Make orbit, orbit-db and ipfs-log easily testable, ideally:

> git clone git@github.com/ipfs/{orbit, orbit- db, ipfs-log} && \
> npm install && \
> npm link {ipfs, ipfs-api} && \
> npm run {test, benchmark}:{electron, browser, node}:{go-ipfs, js-ipfs}

https://github.com/haadcode/orbit/issues/206#issuecomment-267403925

How to administer tests/Where are the tests administered:

IPFS Interop Tests

https://github.com/ipfs/ipfs-interop-stress-tests

IPFS Interface Tests

IPFS Benchmarks for different combinations of implementations

https://github.com/ipfs/js-ipfs/issues/556 https://github.com/ipfs/js-ipfsd-ctl/issues/136

Test Tooling

Goal: Figure out what tooling we want to use

List of state-of-the-art tools to evaluate

List of criteria to evaluate the tools

Main concern: Can we execute our tests with this tool?

ianopolous commented 7 years ago

As a data point, at my work we use kubernetes for testing, CI and manual deployment, and also prometheus. And both make the whole process totally painfree and we get great metrics.