Giter Site home page Giter Site logo

oa's Introduction

Logo

oa (short for "ooh ooh ah ah") is a simple command-line tool for monkey testing frontend applications.

Monkey testing is a technique in which random click, input and keyboard events are sent to an application to test its resilience. In other words, as if a monkey was using it. Monkey testing can also be helpful for adding an increased load to the application to debug performance and memory bottlenecks.

Unlike other load testing tools, oa uses Puppeteer under-the-hood to run your website in a real browser environment. While the browser is hidden by default, you can choose to show it via the --show flag.

Disclaimer: this tool is intended primarily for use on local websites. Attempting to run oa on a hosted website, especially one you don't own, is a good way to get your IP blocked.

Installation

Until official binaries can be released, the easiest way to install oa is from Deno itself:

deno install --allow-env --allow-write --allow-read --allow-run --allow-net https://deno.land/x/oa2

Usage

Using oa is fairly straightforward. You can test a website using the default options by just passing the URL to the command:

oa http://127.0.0.1:8080/login

Flags

oa supports a few flags to customize its behavior:

Name Alias Description Default
--show -s Show the browser window while testing. false
--num -n The number of monkeys/instances to run. 1
--duration -d The duration to run the test. Supports human-readable times such as '5m', '1 hour', etc. 10s
--header -H HTTP header to pass to the browser. Can be used multiple times.
--cookie -c Cookie string to pass to the browser. Can be used multiple times.
--skip-links -L Skip clicking on links. false
--skip-inputs -I Skip filling in inputs. false
--skip-clicking -C Skip random clicking on the page. false
--skip-buttons -B Skip clicking on buttons. false
--filter-links -l Only click on links that contain the provided string.
--config-file -F Path to a configuration file.

Configuration File

You can also pass a oa.config.json configuration file to oa to specify the above options as well:

{
  "$schema": "./oa.schema.json",
  "url": "http://127.0.0.1:8080/login",
  "show": false,
  "cookies": [
    {
      "name": "Key",
      "value": "Value",
      "expiresIn": 5000,
      "domain": "facebook.com"
    }
  ],
  "headers": {
    "Key": "Value"
  },
  "targets": {
    "links": {
      "enabled": true,
      "filter": "/read/1"
    },
    "buttons": {
      "enabled": true
    },
    "inputs": {
      "enabled": true
    },
    "clicking": {
      "enabled": true
    },
    "typing": {
      "enabled": true
    }
  }
}

In this case, you just need to run oa to start the monkeys. Unless the --config-file flag is used, oa will look in the current directory for a oa.config.json file.

oa's People

Contributors

nickersoft avatar renovate[bot] avatar

Stargazers

Evgeny avatar Mark Omarov avatar Andrew Brey avatar Eduardo Rabelo avatar Yoshiya Hinosawa avatar  avatar Chad Rhonan Stewart avatar Ivan Melnikov avatar Maxwell DeMaio avatar

Watchers

 avatar  avatar

oa's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

None detected


  • Check this box to trigger a request for Renovate to run again on this repository

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.