Google Structured Data Testing Tool Updated

by Aaron Bradley on May 13, 2016

in Semantic Web, SEO

Google Structured Data Testing Tool Updated

The Google Structured Data Testing Tool has been given a makeover, as noted yesterday by Kenichi Suzuki on Google+.

In addition to updating the Testing Tool, Google has also published a help page on Google Developers describing the features of the Testing Tool and how to use it.

Structured Data Testing Tool features

The updated Testing Tool has a number of capabilities, most of which were available in the prior version of the tool, but some of which are new.

Support for URLs or code

The Testing Tool will attempt to validate either a URL or a code snippet that's entered directly.

Syntax highlighting and validation code matching

Users can click on a validated class, property or value (or a reported error for any one of these) and see it highlighted in the source code.

Syntax and error highlighting in the Google Structured Data Testing Tool

Syntax and error highlighting in the Google Structured Data Testing Tool. Click to enlarge.

Entity-specific inspection

When more than one entity is present, you can now drill down to look at details just for that item.

Entity-specific details in the Google Structured Data Testing Tool

You can now also choose to inspect all entities, only those with errors, or only those with warnings.

Entity classification by validation errors and warnings in the Google Structured Data Testing Tool

Search and replace keyboard shortcuts

The updated tool now supports search and search and replace functions via keyboard shortcuts, including the use of regular expressions. This is especially useful when you want to edit code for a fetched URL.

  • Control-F / Command-F — Search Search
  • Control-G / Command-G — Find next
  • Shift-Control-G / Shift-Command-G — Find previous
  • Shift-Control-F / Command-Option-F — Replace
  • Shift-Control-R / Shift-Command-Option-F — Replace all

The find and replace function of the Google Structured Data Testing Tool

JSON-LD and schema.org auto-completion

This new Testing Tool feature brings up auto-complete suggestions for JSON-LD reserved keywords, triggered by the Ctrl-Space keyboard shortcut.

Google Structured Data Testing Tool automatic completion for JSON-LD reserved keywords

For schema.org markup provided in JSON-LD, Ctrl-Space triggers auto-complete for any markup element. These schema.org auto-complete suggestions are context-aware, so only properties that are valid for the declared type are provided. In the Product code below, for example, the auto-complete suggestions do not include the genre property, which is not valid for Product.

Google Structured Data Testing Tool automatic completion for schema.org properties

Validation errors for Google examples

UPDATE (Added 19 May 2016) – Since this post was written the information on Google's Structured Data specifications pages has changed, including examples. These all now mostly pass Testing Tool validation. See this post for further details, as well as a discussion of the new preview functionality of the Tool which was not covered here. The information about errors below is retained just for the record, but is no longer valid.

A number of the examples provided by Google on the structured data section of the Google Developers site return errors when they're run through the Testing Run. So you might want to exercise caution when employing these examples as a template for your own markup.

Note that I have enumerated only errors generated by the example code, not warnings.

  • Event Markup: Official Performer Sites
    • The example code for the delegation markup option ("a way to specify that your events should be sourced from another web page of your choice") throws two errors: a required and missing value for the location property; a required and missing value for the startDate property.
  • Provide Actions
    • The example for "an action to stream a Movie" throws one error: a required and missing value for the inLanguage property.
  • Music Actions
    • The example for MusicGroup (erroneously labelled "MusicArtist") throws three errors: two errors for a required and missing value for the inLanguage property; one error for a required and missing value for the actionPlatform property.
    • The example for MusicAlbum throws the same three errors as the MusicGroup example.
  • TV and Music Watch Actions
    • The example for Movie throws two errors: both errors are for a required and missing value for the inLanguage property.
    • The example for TVEpisode throws six errors: four errors for a required and missing value for the inLanguage property; two errors for a required and missing value for the actionPlatform property.
    • The example for TVSeason throws two errors: one error for a required and missing value for the inLanguage property; one error for a required and missing value for the expectsAcceptanceOf property.
    • The example for TVSeries throws the same three errors as the TVSeason example.
  • Live Blogs
    • The example for LiveBlogPosting throws six errors: one error for an invalid value for the @type declaration for articleBody; two errors for a required and missing value for the description property; one error each for a missing and required value for the name, uploadDate and description properties.
  • Place Actions
    • The example for "Reserve fitness class" (type HealthClub) throws two errors related to the invalid and unknown-to-Google type HealthClubReservation.

Missing: context-specific Google errors

Sometimes Google has different requirements and recommendations for the same schema.org type, depending on the use case for the markup. The prior version of the Testing Tool would allow users to select validation details for these different use cases.

The use case selector from the previous version of the Structured Data Testing Tool

This no longer appears to be the case: whether or not this is a deliberate deprecation of this feature or a bug remains to be seen.

Still missing: multi-type entity support

Jarno van Driel has noted that the Testing Tool still does not support valid code for multi-type entities (where two different schema.org classes are provided in the same type declaration, in order to provide access to the properties of both types).

This microdata should validate:

<div itemscope itemtype="http://schema.org/Service http://schema.org/MedicalTherapy">
  <h1 itemprop="name">Tummy Tuck</h1>
<div>

Alas, no.

Structured Data Testing Tool result for a multi-type entity in microdata

Google's Dan Brickley has noted that this issue is still under investigation.

Still working: the Testing Tool bookmarklet

This update leaves the functionality of the Google Structured Data Testing Tool Bookmarklet provided by Kevin Polley intact. So you can still use this bookmarklet for one-click access to Testing Tool validation of a web page you're currently viewing.

A new URL

UPDATE (Added 17 May 2016)

Something I initially missed is that the URL for the Structured Data Testing Tool has changed. The old URL was:

https://developers.google.com/structured-data/testing-tool/

The new URL is:

https://search.google.com/structured-data/testing-tool

As the old URL 301 redirects to the new URL, users shouldn't notice a difference, and as noted above the bookmarklet still works. However, to avoid any future issues I've updated the bookmarklet to reflect the URL change.


{ 7 comments… read them below or add one }

1 Jeannie Hill May 13, 2016 at 9:13 pm

Great article – thank you!

I am curious, out of the various schema.org markup types and formats, do you find that one or some produce more value than others?

Reply

2 Aaron Bradley June 6, 2016 at 5:06 pm

Thanks Jeannie! I guess the best answer I can give is the most obvious: those that produce rich snippets (or now, rich cards), or push information through to the Knowledge Graph.

Reply

3 rohit May 29, 2016 at 10:31 pm

Hi Aaron, its a great tip, well I am using a plugin for this however Its almost a month I am not found on search with snippets, can you guide me more on this thanks Aaron and yes your website is worth.

Reply

4 Aaron Bradley June 6, 2016 at 5:16 pm

Thanks Rohit. Not knowing any details of your situation, I’d afraid I couldn’t possibly provide useful advice except to say that the correct markup is a necessary, but not in itself, a sufficient condition for getting a rich snippet/rich card. If you wish to follow up on your specific issue please post details to the Google Product Forum and someone there might be able to help you out.

Reply

5 rohit July 9, 2016 at 10:49 pm

Thanks Aaron for reply, I have Investigated no plugin can be shown on results, one needs to do it by manually using Structured Data Testing Tool features and the other helpful google forums have cleared all my doubts thanks for great writeup.

Reply

6 Candientu VietNhat August 12, 2016 at 8:34 am

I’ve been using rich snippets for your website is http://www.canvietnhat.com, but at still not showing on google.

Reply

7 Aaron Bradley September 20, 2016 at 3:15 pm

Hi Candientu. “I have valid code but rich snippets are not appearing” is probably the most common question asked on the Google Product Forums for structured data. I won’t analyze your site to see if the code is actually valid, but you can ask your question again (preferably with more details) on the forum and it’s likely someone will respond.

Note that if your code is valid, often it is a question of Google not trusting the quality of a site.

Reply

Leave a Comment

Previous post:

Next post: