Recently I was working on some internal parts of JSON-LD for SEO and realized that it would be an interesting glimpse into software development that most people never think about.
Most apps are tested by their developers but some like JSON-LD for SEO include automated tests too.
Automated tests are extra pieces of code that run to make sure the app works as expected.
The idea is that if I change the app and break something accidentally, these tests will catch that and warn me before the code gets to your store. They’re like a safety net for the code.
Since JSON-LD for SEO creates a complex Liquid file with your structured data, I’ve developed a massive set of tests for that file to make sure it’s correct and valid.
As of yesterday there are over 440 different tests for that file alone that check the data, integrations, and many of the advanced options (including a few that aren’t public yet). There’s almost 5x as much test code as there is code that your store sees.
The test suite even creates a simulated Shopify store with different data that the Liquid code runs in.
For example it creates a store with recipe data in order to test that the Recipe structured data is correct.
Or a store with vintage products to test that the products have the correct used item conditions.
This comprehensive test suite is what allows me quickly make changes to the structured data and update every store. That’s how the app is able to stay up to date with Google changes or to quickly add integrations with other apps.
Since I built this test suite, I can only remember one bug in the generated Liquid code that the test suite missed. That was around VAT pricing, and if you’ve ever dealt with VAT pricing you already know how complex that logic gets.
This test suite, combined with following Google’s guidelines are why I say JSON-LD for SEO is the safest option for structured data and Rich Results for Shopify stores.
You can use this link to install JSON-LD for SEO and benefit from Rich Results for your store (in a safe, tested way).
It’s been used and tested on thousands of stores now since it first launched in 2015.
P.S. Funny side story, I’ve been working with Liquid since around 2005. Back when Shopify was just a new business selling snowboarding gear and Shopify’s founder was the lead developer for a blogging system I used (and modified).
Get more organic search traffic for your Shopify store
Increase organic SEO traffic through Google’s Rich Results. One click allows search engines and others to understand your store and products.