All Projects → Brunty → Cigar

Brunty / Cigar

Licence: mit
💨 Smoke testing tool written in PHP

Projects that are alternatives of or similar to Cigar

Box Node Sdk
A Javascript interface for interacting with the Box API. You can find the node package at
Stars: ✭ 146 (-1.35%)
Mutual labels:  hacktoberfest
Hacktoberfest2020
Make your first PR! ~ A beginner-friendly repository. Add your profile, a blog, or any program under any language (it can be anything from a hello-world program to a complex data structure algorithm) or update the existing one. Just make sure to add the file under the correct directory. Happy hacking!
Stars: ✭ 147 (-0.68%)
Mutual labels:  hacktoberfest
Rioxarray
geospatial xarray extension powered by rasterio
Stars: ✭ 148 (+0%)
Mutual labels:  hacktoberfest
Crafttweaker
Tweak your minecraft experience
Stars: ✭ 146 (-1.35%)
Mutual labels:  hacktoberfest
Parse Sdk Android
The Android SDK for the Parse Platform
Stars: ✭ 1,806 (+1120.27%)
Mutual labels:  hacktoberfest
Documentation
The source for Datadog's documentation site.
Stars: ✭ 147 (-0.68%)
Mutual labels:  hacktoberfest
Http
Universal HTTP Module for Nuxt.js
Stars: ✭ 146 (-1.35%)
Mutual labels:  hacktoberfest
Astarte
Core Astarte Repository
Stars: ✭ 148 (+0%)
Mutual labels:  hacktoberfest
Handwritten.js
Convert typed text to realistic handwriting!
Stars: ✭ 1,806 (+1120.27%)
Mutual labels:  hacktoberfest
Custom Pod Autoscaler
Custom Pod Autoscaler base, allows creation of Custom Pod Autoscalers
Stars: ✭ 148 (+0%)
Mutual labels:  hacktoberfest
Librobotcontrol
Robotics Focused library for embedded Linux computers.
Stars: ✭ 146 (-1.35%)
Mutual labels:  hacktoberfest
Django Sql Explorer
Easily share data across your company via SQL queries. From Grove Collab.
Stars: ✭ 1,958 (+1222.97%)
Mutual labels:  hacktoberfest
Macos Defaults
Incomplete list of macOS `defaults` commands with demos ✨
Stars: ✭ 146 (-1.35%)
Mutual labels:  hacktoberfest
Voctoweb
voctoweb – the frontend and backend software behind media.ccc.de
Stars: ✭ 146 (-1.35%)
Mutual labels:  hacktoberfest
Sonar Bsl Plugin Community
Поддержка языка 1С:Предприятие 8 и OneScript для SonarQube.
Stars: ✭ 147 (-0.68%)
Mutual labels:  hacktoberfest
Promster
⏰A Prometheus exporter for Hapi, express and Marble.js servers to automatically measure request timings 📊
Stars: ✭ 146 (-1.35%)
Mutual labels:  hacktoberfest
Hads
📚 Markdown superpowered documentation for Node.js
Stars: ✭ 147 (-0.68%)
Mutual labels:  hacktoberfest
Niapy
Python microframework for building nature-inspired algorithms. Official docs: http://niapy.readthedocs.io/en/stable/
Stars: ✭ 148 (+0%)
Mutual labels:  hacktoberfest
Hacktoberfest Swag
Looking for hacktoberfest swag? You've come to the right place.
Stars: ✭ 148 (+0%)
Mutual labels:  hacktoberfest
Znc
Official repository for the ZNC IRC bouncer
Stars: ✭ 1,851 (+1150.68%)
Mutual labels:  hacktoberfest

Cigar

Build Status Coverage Status SensioLabsInsight

A smoke testing tool inspired by symm/vape

Similar tools include:

Installation

Install via composer:

composer require brunty/cigar --dev

Pull via docker:

docker pull brunty/cigar

To use

Create a .cigar.json file that contains an array of json objects specifying the url, status, (optional) content, and (optional) content-type to check.

[
  {
    "url": "http://httpbin.org/status/418",
    "status": 418,
    "content": "teapot"
  },
  {
    "url": "http://httpbin.org/status/200",
    "status": 200,
    "content-type": "text/html"
  },
  {
    "url": "http://httpbin.org/status/304",
    "status": 304
  },
  {
    "url": "http://httpbin.org/status/500",
    "status": 500
  }
]

When installed via composer:

Run vendor/bin/cigar to have it check each of the URLs return the status code expected.

When pulled via docker:

Run docker run -v $(pwd):/app --rm brunty/cigar to have it check each of the URLs return the status code expected.

> vendor/bin/cigar                                           
✓ http://httpbin.org/status/418 [418:418] teapot
✓ http://httpbin.org/status/200 [200:200] [text/html:text/html] 
✓ http://httpbin.org/status/304 [304:304] 
✓ http://httpbin.org/status/500 [500:500] 

The format of the lines in the output is:

pass/fail url [expected_code:actual_code] [optional_expected_content-type:optional_actual_content-type] optional_text

If all tests pass, the return code $? will be 0 - if any of them don't return the expected status code, the return code will be 1

Quiet test mode

If you wish to suppress the output of the test run, pass the --quiet option to the command: vendor/bin/cigar --quiet

Alternative configuration files

If you wish to use an alternative configuration file, use the vendor/bin/cigar -c file.json or vendor/bin/cigar --config=file.json options when running the command.

Passing a base URL to check against

If you wish to check a file of URLs relative to the root of a site against a base URL, you can do so with by using vendor/bin/cigar -u http://httpbin.org or vendor/bin/cigar --url=http://httpbin.org

Your configuration file can then contain URLs including:

  • Full absolute URLs as before (cigar won't use the base URL when checking an absolute URL)
[
  {
    "url": "http://httpbin.org/status/418",
    "status": 418,
    "content": "teapot"
  }
]
  • URLs relative to the base url that you've specified, either with or without a leading slash.
[
 {
   "url": "/status/418",
   "status": 418,
   "content": "teapot"
 },
 
 {
   "url": "status/418",
   "status": 418,
   "content": "teapot"
 }
]

Disabling SSL cert verification

If you wish to run the tool without checking SSL certs, use the -i or --insecure option to the command: vendor/bin/cigar -i or vendor/bin/cigar --insecure

Only use this if absolutely necessary.

Passing Authorization header

If you wish to add the Authorization header, use the -a or --auth option to the command: vendor/bin/cigar -a "Basic dXNyOnBzd2Q=" or vendor/bin/cigar --auth="Basic dXNyOnBzd2Q="

Passing custom header

If you wish to add any custom header(s), use the -h or --header option to the command: vendor/bin/cigar -h "Cache-control: no-cache" or vendor/bin/cigar --header="Cache-control: no-cache"

Command help & command version

If you want to see all the available options for Cigar, use the command: vendor/bin/cigar --help

If you wish to see what version of Cigar you're using, use the command: vendor/bin/cigar --version

Contributing

This started as a small personal project.

Although this project is small, openness and inclusivity are taken seriously. To that end a code of conduct (listed in the contributing guide) has been adopted.

Contributor Guide

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].