Giter Site home page Giter Site logo

geppetto.js's Introduction

Geppetto.js

MIT License Codacy Badge

Website testing tool based on Puppeteer.js that allows for the evaluation of Core Web Vitals and storing screenshots of certain elements or full page visualizations

  • Puppeteer.js: This technology enables the creation of browser instances and taking screenshots of various elements on the rendered page
  • Lighthouse: Runs a full suite of performance and rendering tests to rate the quiality of your suite
  • Resemble.js: Image analysis tool that enabled comparison of past and currently rendered elements

Features

  • Running instances of desktop/mobile user agents
  • Full page and selector-specific screenshots
  • Running reports for performance and evaluation of CWVs
  • Performance auditing results output as JSON
  • Live view of progress on the command line

Running Geppetto.js

To run tests, run the following command (the las argument related to the specific test configuration the user would decide to enact on this run)

  node script.js path-to-your-config.json

Test configuration JSON

Running your specific tests

In order to maximize flexibility the project can run any supported configuration that Puppeteer.js and Lighthouse already do (the last argument of the command will allow to plug this config file)

  path-to-your-config.json

Inside the top level of the JSON under the tests property an Object array contains parameters for each test run, these are as follows:

Parameter Type Description
name string Required. Name of the test that will be run (the output of this test will be stored in a new directory ./results/name + time and date of test
url string Required. URL to page that will be subject to the test
viewport object Required. Object with the viewport properties to initialize a browser instance
lighthouseOutputsJson boolean With every lighthouse report comes alongside a JSON report (which is a big file), setting this flag as true will save the output in the test directory
lighthouseConfig object This is a config for the report that will be run, follows the same format of Lighthouse API
puppeteerConfig object This is a config for the report that will be run, follows the same format of Puppeteer.js API

Examples of config file on sample JSON

Installation

Install dependencies on Geppetto.js by changing directories into the project root and running

  npm install

Roadmap

  • Better storing solutions for results metrics
  • Support for image analysis integrations (so a current test can be compared to a past run)
  • Event-triggered screenshots
  • Support for external code to be run in browser instance
  • CSV output of Geppeto.js summary
  • Cookies and other forms of authentication

geppetto.js's People

Contributors

hugoagax avatar

Stargazers

Jorge Rodriguez avatar Hugo A. Gaxiola avatar

Watchers

James Cloos avatar Jorge Rodriguez avatar  avatar  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.