Giter Site home page Giter Site logo

counterstringjs's Introduction

CounterString JS

An Example of creating a CounterString tool in JavaScript.

Initially created as a "Snippet" run from chrome dev tools.

The source for this is in the \snippets directory.

Then the Snippet was converted into a simple Chrome Extension.

See the extension folder.

Blog Posts & Videos

Description of writing the snippets version:

Detailed Description

A CounterString is a string of text e.g. *3*5*7*9*12*15* where:

  • the string is a specific length e.g. 15
  • the last character in the string is an *
  • the numbers before each * are the position of the *

This can act as Test Data for helping test the length allowed in forms and other data fields. If the value is truncated then you can tell from the numbers and the '' how long the string is e.g. *3*5*7*9*12*15 is 14 characters long because the '' after 15 is missing.

Counterstrings are commonly used in exploratory testing.

This extension is a simple CounterString generator, which:

  • displays a dialog asking for the number of characters,
  • then generates a CounterString of that length
  • the CounterString is logged to the dev console to allow copy and pasting,
  • the extension also inserts the CounterString into the value of the field that was selected when the right click context menu was displayed
  • this supports supports testing online forms.

Instructions for use:

  • right click on and input field
  • enter value of CounterString
  • CounterString will be logged to the console (use dev tools to see it)
  • CounterString will be inserted as the value of the WebElement you clicked on

Note:

  • works with forms on the actual page
  • this extension does not work with forms embedded in frames

This is open source and source can be found at GitHub:

How to Install as Chrome Extension?

You can download this from the Chrome Store:

To install from source added as an "unpacked extension":

  • download the zip file from releases
  • unzip the file
  • visit chrome://extensions
  • switch on Developer mode
  • Click Load Unpacked
  • choose the extension folder (the one with the manifest.json in it)

counterstringjs's People

Contributors

eviltester 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.