Giter VIP home page Giter VIP logo

api-test's Introduction

api-test

This repository aims to test go-seele. basically it includes the following three types of testing.

An independent reporisity for cli-api. it's name is e2e-blackbox.

Prepare your environment

virtualenv ~/testEnv
source ~/testEnv
pip install -r requirements.txt

Manual testing

Simply test me

py.test http/test_*

Generates a HTML report for the test results.

# for http only
py.test --html=report.html http/test_*
# for websocket only
gunicorn --bind 0.0.0.0:5000 ws2http:app # a middleware for access node by websocket.
py.test --html=report.html ws/test_*

Send the result to someone, who care about it by email. python main.py

Automation testing

to notice developer as soon as test finished. you should set your email.

export MAIL_ADDR=<[email protected]>
export MAIL_PASSWD=<your-email-password>

Run on docker

docker build -t my-test-server .
docker run -it --rm --name my-running-app my-test-server
# or run it in daemon mode
docker run -d --rm --name my-running-app my-test-server

How to trigger

To fire up your test case, there are three way to reach that.

  • scheduler job
  • monitor the commit of the reporisity by developer.
  • manual trigger

API's List

HTTP WS TCP CLI Status
seele_getInfo - - getinfo ✔︎
seele_getAccountNonce - - getnonce
seele_getBlockHeight - - getblockheight ✔︎
seele_getBlock - - getblock ✔︎
seele_call - - call ✔︎
seele_getBlockByHeight - - - ✔︎
seele_getBlockByHash - - getdebtbyhash ✔︎
monitor_nodeInfo - - getinfo ✔︎
monitor_nodeStats - - - ✔︎
seele_getBalance - - getbalance ✔︎

Deprecated API

  • debug_getTPS
  • debug_dumpHeap
  • network_getProtocolVersion
  • network_getPeersInfo
  • network_getPeerCount
  • network_getNetVersion
  • network_getNetworkID
  • miner_start
  • miner_stop
  • miner_status
  • miner.GetCoinbase
  • miner_setThreads
  • miner_setcoinbase
  • miner_getEngineInfo
  • debug_printBlock
  • debug_getTxPoolContent
  • debug_getTxPoolTxCount
  • debug_getPendingTransactions
  • debug_getPendingDebts
  • debug_dumpHeap
  • download_getStatus

Hard to test API

  • seele_addTx

api-test's People

Contributors

land-pack avatar lucusfly avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.