iaincollins / structured-data-testing-tool

A library and command line tool to help inspect and test for Structured Data.
https://www.npmjs.com/package/structured-data-testing-tool
ISC License
63 stars 14 forks source link

Google preset not running #11

Closed willhowlett closed 4 years ago

willhowlett commented 4 years ago

Describe the bug It seems that when using the Google preset option no google specific tests run

To Reproduce sdtt --url https://www.techradar.com --presets "Google"

Expected behavior Tests run under Google heading (as happens when using Facebook, Twitter )

Screenshots Screen Shot 2019-10-24 at 10 47 46

iaincollins commented 4 years ago

Oh! I missed this somehow. Thank you for the bug report!

It looks like:

  1. It is not finding any schemas is knows about that Google consumes. Currently it supports about a dozen of the schemas Google uses, but currently they are mostly various different article types. It doesn't validate otherGoogle supported schemas yet, like Organization, but it should.

  2. It doesn't reflect what was done meaningfully in the output - it should probably do something like output how many known and unknown Google schema types it found, so that it is more transparent about what was found / not found.

Does this explanation make sense?

Having it meet your expectations of the "expected behaviour" seems very reasonable.

Happy to take details of feature requests for the sort of behaviour you would like to see.

iaincollins commented 4 years ago

This should be resolved with the release of version 4.0.

I've added explicit support for the above schemas. It seems they both only have "optional" properties in Google, so I added support for checking optional properties in version 4.0.

The way any Schema.org properties are detected and the results displayed has also changed, so it should also work better for people using other schemas, even ones the tool does not know that Google explicitly supports.