Skip to content

oslabs-beta/pinocchio

Repository files navigation

pinocchio




Pinocchio

Pinocchio is a codeless test generator for Puppeteer with Mocha and Chai. It allows users to identify selectors for tests and preview code in the provided code editor. Once the tests have been created, an exportation of the test suites into the user's application is only a button click away.




For developers who are interested in using Google's powerful Puppeteer Node library specifically for testing purposes, they may have to initially spend some time parsing through the plethora of functionalities Puppeteer provides in order to identify which methods are most relevant to their testing goals.

Pinocchio minimizes Puppeteer onboarding labor and isolates specific Puppeteer methods that are often used in testing in conjunction with Mocha and Chai. The result is a more seamless transition that allows users to dive right into these technologies, saving developers precious time and energy.

As a fresh beta product, Pinocchio was developed for the open source community with the tech accelerator OSLabs.

Installation

To get started,

  1. Download the app from our website, which is available on MacOS, Window, and Linux. (If you are on MacOS you will need to open the app in your Folder directory directly, since licensing is still in progress.)

  1. Install Puppeteer, Mocha, and Chai.

npm install puppeteer mocha chai

  1. Now, let's generate some tests!

How to use

  1. From the landing page, the user will be able to input their application's URL and upload their app code base.

  1. Upon upload, the user will be able to
  • reference directories and files directly in the app itself using the file tree and code preview section powered by Monaco Editor and
  • use the Pinocchio test generation GUI to generate test code without having to touch any code editor.
  1. Users have the option of generating one Describe block that wraps their test and are able to generate as many It statements as needed.

  1. Each It statement will correspond with any of the Puppeteer actions that the user selects as well as one Assertion block.

  2. When ready, simply click on "Export Test" in the navigation bar. That's it!

Tech Stack

Javascript, React (Context, Hooks, Router, Toastify), Express, Webpack, Electron, Typescript, HTML/CSS/SASS, Monaco Editor, Node.js, Jest, Enzyme, Styled-Components

Read more

Medium

Contact Us

pinocchiodevs@gmail.com
LinkedIn

We encourage and appreciate any feedback, suggestions, and stars if you feel so inclined!

Co-Creators: