Git Product home page Git Product logo

cdn-test's Introduction

https://travis-ci.com/augustoliks/cdn-test.svg?branch=main

cdn-test

CLI tool created to automate tests for verify time cache in web-site delivered by CDN - CloudFront.

How to Install

The cdn-test package is hosted in Python Package Index (PyPI). To install cnd-test, it's recommend create a virtualenv and install the package using pip. Example:

$ virtualenv --python=$(which python3) venv
$ source venv/bin/activate
$ pip3 install cdn-test

Manual

$ cdn-test -h

usage: cli.py [-h] [--url URL] [--time-step [TIME_STEP]] [--http-verb [HTTP_VERB]] [--header-name [HEADER_NAME]] [--output-file [OUTPUT_FILE]] [--version]

options:
  -h, --help            show this help message and exit
  --url URL, -u URL     URL to verified cache in cloudfront
  --time-step [TIME_STEP], -s [TIME_STEP]
                        time interval between requests
  --http-verb [HTTP_VERB], -x [HTTP_VERB]
                        HTTP verb utilized for requests to URL
  --header-name [HEADER_NAME]
                        response header name that contains "Miss from cloudfront" or "Hit from cloudfront"
  --output-file [OUTPUT_FILE], -f [OUTPUT_FILE]
                        file path to save records
  --version, -v         show cdn-test version

Examples

Each 10 seconds, it will be made a request with GET HTTP verb to web-site hosted by cloudformation with follow URL https://aws.amazon.com/pt/cloudfront/. The request history will be save on ~/cdn-report.json.

$ cdn-test --url=https://aws.amazon.com/pt/cloudfront/ --http-verb=GET --time-step=10s --output-file=~/cdn-report.csv

Package Struct

├── src
│   ├── cdn_test            # source code directory
│   ├── __init__.py         # module definition file
│   ├── cli.py              # parser cli parameters
│   └── domain.py           # module composed only domain logics
├── poetry.lock             # poetry dependencies versions
├── pyproject.toml          # poetry package definition file
├── README.rst              # project documentation
└── tests                   # directory composed only with unit tests
    └── ...

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.