
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.
Entity-specific inspection
When more than one entity is present, you can now drill down to look at details just for that item.
You can now also choose to inspect all entities, only those with errors, or only those with warnings.
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
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.
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
.
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 thestartDate
property.
- 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
- Provide Actions
- The example for "an action to stream a Movie" throws one error: a required and missing value for the
inLanguage
property.
- The example for "an action to stream a Movie" throws one error: a required and missing value for the
- Music Actions
- The example for
MusicGroup
(erroneously labelled "MusicArtist") throws three errors: two errors for a required and missing value for theinLanguage
property; one error for a required and missing value for theactionPlatform
property. - The example for
MusicAlbum
throws the same three errors as theMusicGroup
example.
- The example for
- TV and Music Watch Actions
- The example for
Movie
throws two errors: both errors are for a required and missing value for theinLanguage
property. - The example for
TVEpisode
throws six errors: four errors for a required and missing value for theinLanguage
property; two errors for a required and missing value for theactionPlatform
property. - The example for
TVSeason
throws two errors: one error for a required and missing value for theinLanguage
property; one error for a required and missing value for theexpectsAcceptanceOf
property. - The example for
TVSeries
throws the same three errors as theTVSeason
example.
- The example for
- Live Blogs
- The example for
LiveBlogPosting
throws six errors: one error for an invalid value for the@type
declaration forarticleBody
; two errors for a required and missing value for thedescription
property; one error each for a missing and required value for thename
,uploadDate
anddescription
properties.
- The example for
- Place Actions
- The example for "Reserve fitness class" (type
HealthClub
) throws two errors related to the invalid and unknown-to-Google typeHealthClubReservation
.
- The example for "Reserve fitness class" (type
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.
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.
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.
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?
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.
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.
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.
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.
I’ve been using rich snippets for your website is http://www.canvietnhat.com, but at still not showing on google.
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.
I know Google had a structured data tool where you could preview visually what your website would look like in search results. Where can you see that now? So you can test your data rich snippets – as beginner,
Depending on the data type you’re marking up (and whether or not the code for that type is valid), a “Preview” link may appear in the Structured Data Testing Tool results.
does not show a preview link… no way.
why? how? halp! 🙁
Lack of a preview link can be caused by:
I was trying festival data type for a client. Although the structured data testing tool by Google shows no errors, I still see missing URLs for performers. I’ve used Facebook pages for performers who don’t have an official website. Should it be removed in this case?
If there’s no better URL to represent a specific performer, there’s no reason you shouldn’t use their Facebook Page URL – and if the markup is error-free, no need to remove it.
love it! use this tool every day
I am just learning to code. Got sent here from a fellow coder. Good content here. Thanks for the read.
I’ve been trying to implement this on more of my sites lately. It definitely helps Google better understand what the webpage is about.