Giter Club home page Giter Club logo

underarmourseotest's Introduction

Page Tester

Requirements

  • node v7.6.0+ (for async and await)

Installation

Everything is included in the package.json dependencies and can be installed with

% npm i

This will install the following packages:

  • cheerio
  • puppeteer
  • mocha
  • expect.js

Preparation

To prepare, simply populate a urls.json file with an array of URL category objects containing a name and urls. See urls.json.example for the desired format.

Running

The page tests are written as a Mocha test suite, and as such with a urls.json in place, all that is required to run the tests is to execute mocha with npm test. When this is complete, you should see something like this:

Testing "Product Pages" URLs
    http://localhost:8080
      Page Title
        ✓ should exist
        ✓ should be between 30 and 60 characters
      h1 Tags
        ✓ should have an h1
      Canonical Tag
        ✓ should exist
        ✓ should be a valid URL
      Meta Description
        ✓ should exist
        ✓ should be between 40 and 165 characters
      Image Tags
        ✓ should have alt text on all images
      Robots Tags
        ✓ should be indexable
        ✓ should be followable
    URLs in group
      ✓ should have unique titles
      ✓ should have unique meta descriptions
Canonical URLs in Product Pages all self-referencing: true


  12 passing (205ms)

with entries for each category and URL provided.

underarmourseotest's People

Contributors

zachary-russell avatar

Watchers

James Cloos 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.