Skip to content

Latest commit

 

History

History

structured-data

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Structured Data

Looking on the web you can find a few webistes to test out "Structured Data", most of them are mantained by Google but you always need to test manually with different Urls.

I wasn't happy with this workflow that's why I implemented "Structured Data Testing Tool" directly from withing Cypress!

To make it possible I had to follow the following steps:

  1. Find a node/NPM package to test strucutred data
  2. Implement a simple "Cypress Plugin" interface to make this package usable from within Cypress
  3. Finally use the plugin to run this task and test out different pages.

Examples

How does it work?

To solve the previous 3 steps we did the following:

  1. Install the package "structured-data-testing-tool" with
yarn add structured-data-testing-tool
  1. Create the Cypress Plugin code, you can copy most of the code from the plugins folder here, especially these 2 files:
  1. Write some tests to test out the plugin: apple-store