GithubHelp home page GithubHelp logo

marce1994 / blaezi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from irving-caamal/blaezi

0.0 1.0 0.0 35 KB

blaezi is a super-lightweight smoke testing tool with zero dependencies, written purely in Go. ๐Ÿ”ฅ

License: Apache License 2.0

Go 96.11% Dockerfile 3.89%

blaezi's Introduction

๐Ÿ”ฅ blaezi

to test

blaezi is a super-lightweight smoke testing tool with zero dependencies, written purely in Go.

blaezi can perform smoke tests on endpoints specified by the user. blaezi also has the ability to check the content of the endpoint.

๐Ÿ”ฅ You can see blaezi in action here.

Installation

  • Using GitHub Actions:
  • Using releases:
  • Using source code:
    • You can clone the repo and run go run main.go for testing blaezi:
    • git clone https://github.com/burntcarrot/blaezi && cd blaezi
    • go run main.go
  • Docker: You can build the Docker image using:
    • git clone https://github.com/burntcarrot/blaezi
    • docker build . -t blaezi -f Dockerfile --no-cache
    • and run it
    docker run \
      --rm \
      -t \
      -v "$PWD/YOURTEST.json":"/test.json" \
     -it IMAGE_ID https://someurl.io -tests "test.json"
    

Usage

Usage of ./blaezi:
  -auth string
        Authorization string.
  -secure
        Secure connection.
  -tests string
        Complete path to the tests file. (default "test.json")
  -timeout int
        Timeout for client. (default 5)

Tests:

A test can be specified using JSON. url, status_code and method are necessary, content, request_body are optional.

Here is a sample test:

[
  {
    "url": "/",
    "status_code": 200,
    "content": "Hello",
    "method": "GET"
  },
  {
    "url": "/posts",
    "status_code": 200,
    "content": "Hello",
    "method": "GET"
  },
  {
    "url": "/posts",
    "status_code": 200,
    "content": "Hello",
    "method": "POST",
    "request_body": "{\"id\": 1, \"title\": \"H\", \"text\": \"Hello\"}"
  },
  {
    "url": "/nonexistent",
    "status_code": 404
  }
]

Example

With the test specified above we can run blaezi like:

./blaezi http://localhost:8080 -tests test.json

If you want to specify a timeout for 10 seconds, you can do so by:

./blaezi http://localhost:8080 -tests test.json -timeout 10

Acknowledgements:

Some parts of blaezi were inspired by vape.

blaezi is rewritten from scratch and aims to add additional features on top of vape. (Spoiler: blaezi currently provides some features like GitHub integration, etc.)

blaezi's People

Contributors

burntcarrot avatar irving-caamal avatar marce1994 avatar

Watchers

 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.