/automated-lighthouse-testing

Given a set of sitemaps, this program automatically lighthouse tests every page and saves them to a mongo database.

Primary LanguageJavaScriptMIT LicenseMIT

Lighthouse tests

This is a tool using Lighthouse to test all the pages in a list of sites and save the results in a MongoDB database.

Dependencies and installation

Step 1

Install node.js v10.15.3 or later https://nodejs.org/en/download/

Step 2

Clone this project. Go up to the "Clone or Download" button on the right and copy the URL. Then run this:

git clone https://github.com/auaruss/automated-lighthouse-testing.git

Step 3

Install all dependencies by navigating to the project on your computer in the terminal and running

npm install

Step 4

Make a copy the file config.json.example named config.json in the config directory of the project. It contains the following values:

Key Value
"uri" the location of your MongoDB; see https://mongodb.github.io/node-mongodb-native/driver-articles/mongoclient.html#the-url-connection-format
"SITE_LIST" an array of strings, each being a site with a sitemap (do not add http:// or https:// )
"LIGHTHOUSE_OPTS" see below

More about Lighthouse options

Example of LIGHTHOUSE_OPTS (feel free to use this example):

{
    "chromeFlags": ["--headless"],
}

To learn more, see:

Usage

Navigate with the command line to the src folder, then run

node index.js