Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
@iPullRank
iPullRank
Software Testing for SEO
http://www.slideshare.net/ipullrank
Has this ever happened to
you?
IPULLRANK.COM @ IPULLRANKhttps://twitter.com/iPullRank/status/1045435603851063296
IPULLRANK.COM @ IPULLRANK
IPULLRANK.COM @ IPULLRANK
IPULLRANK.COM @ IPULLRANK
IPULLRANK.COM @ IPULLRANK
IPULLRANK.COM @ IPULLRANK
IPULLRANK.COM @ IPULLRANK
IPULLRANK.COM @ IPULLRANK
IPULLRANK.COM @ IPULLRANK
What is Automated
Testing?
So first, let’s talk just a little
bit about modern web
development and how it
works.
IPULLRANK.COM @ IPULLRANK
Model-View-Controller Design Pattern
A lot of modern software frameworks follow this design patt...
IPULLRANK.COM @ IPULLRANK
React + Laravel Example
In this example the PHP framework Laravel manages the Model and the Cont...
IPULLRANK.COM @ IPULLRANK
A URL is Converted
into a Route
URLs point to controllers
which then return the right
views feat...
IPULLRANK.COM @ IPULLRANK
Waterfall Rarely Makes
Sense Anymore
It’s unlikely that the websites
you work on will follow a
w...
IPULLRANK.COM @ IPULLRANK
Most Dev Teams
Follow Agile
Methodology
Small pieces of functionality
are tackled in short time
...
IPULLRANK.COM @ IPULLRANK
Continuous Integration
Often engineering teams are following a Continuous Integration model wher...
IPULLRANK.COM @ IPULLRANK
Continuous Integration means lots of people can break
things
IPULLRANK.COM @ IPULLRANK
Deployment Pipelines feature Automated Tests
Deployment pipelines allow for safeguards to be put...
IPULLRANK.COM @ IPULLRANK
Tests Can Make the Build Fail
Certain tests are deemed as critical to the infrastructure of the ...
IPULLRANK.COM @ IPULLRANK
IPULLRANK.COM @ IPULLRANK
Automated Testing
There are three flavors of testing that are most relevant to us as SEOs: Unit ...
IPULLRANK.COM @ IPULLRANK
Unit Testing
With Unit tests you are
testing an individual function
or procedure to ensure that
...
IPULLRANK.COM @ IPULLRANK
Integration Testing
With integration testing you’re
testing how your logic comes
together to bui...
IPULLRANK.COM @ IPULLRANK
UI Testing
UI Testing is the testing of
the frontend interface of
your website. This is largely
...
IPULLRANK.COM @ IPULLRANK
This is What Headless Browsers are Actually For
In SEO we primarily use headless browsers for sc...
IPULLRANK.COM @ IPULLRANK
Read Why the Chrome DevTools Team Made Puppeteer
https://github.com/GoogleChrome/puppeteer
IPULLRANK.COM @ IPULLRANK
Test Driven Development
Some moderndevelopersfollow thismethodologywhereintheywritetheirtestsfir...
How Does This Apply to
SEO?
IPULLRANK.COM @ IPULLRANK
Last Year I Talked about Using Task Runners
https://searchengineland.com/get-developers-implemen...
IPULLRANK.COM @ IPULLRANK
I explained the Anderson-Alderson Scale
This is a scale of which the developers you interface wi...
IPULLRANK.COM @ IPULLRANK
@BritneyMuller brings
upp a great point
My goal with that post and
talk is to introduce you to
a...
Let’s go back through those
horror stories.
IPULLRANK.COM @ IPULLRANK
A Test Can Catch This
Unit Test Failure Condition
– Presence of meta noindex
tag on functions th...
IPULLRANK.COM @ IPULLRANK
Not Sure I’d Test for
this One
Integration Test Failure
Condition – H1 tag is the same
in the HT...
IPULLRANK.COM @ IPULLRANK
Robots.txt Test
Unit Test Failure Condition
– Presence of “User-agent: *
Disallow: /” on prod in...
IPULLRANK.COM @ IPULLRANK
SSR Test
Integrated Test/UI Test
Failure Condition -
Key body content is not
available in the HT...
IPULLRANK.COM @ IPULLRANK
Rel-canonical
UI Test Failure Condition –
URLs that should have a self-
referencing canonical do...
IPULLRANK.COM @ IPULLRANK
SSR Test
Integrated Test/UI Test
Failure Condition -
Key body content is not
available in the HT...
IPULLRANK.COM @ IPULLRANK
Invalid Tag Tests
UI Test Failure Condition –
Rendered DOM features tags in
the <head> sub-tree ...
IPULLRANK.COM @ IPULLRANK
But Testing is Not a
Magic Bullet
Sure, we can develop tests
for to look for the presence
of str...
IPULLRANK.COM @ IPULLRANKIn my experience, it’s usually developers writing their own tests, but I’ve heard of QA Engineers...
Doing an SEO Audit is
basically doing similar work
to that of a QA Engineer.
IPULLRANK.COM @ IPULLRANK
Crawling HTML is
Somewhat like
Integration Testing
You’re looking at the results
of what the sof...
IPULLRANK.COM @ IPULLRANK
Crawling JavaScript is
more like UI Testing
You’re looking at the results
when the user interfac...
IPULLRANK.COM @ IPULLRANK
…And you should be comparing the differences
John Hogg from ClickConsult shared his diff compari...
IPULLRANK.COM @ IPULLRANK
Your Role is To Help Plan the Tests
You’ll want to work with a QA Engineer, a Product Manager or...
IPULLRANK.COM @ IPULLRANK
Here are Few Examples
These examples of tests should be enough to get you started on defining yo...
Tools
Some tools you canuse to get your automated testing
for SEO off the ground
IPULLRANK.COM @ IPULLRANK
Meet Jenkins
If your developers are doing Continuous Integration or Continuous Delivery, it’s li...
IPULLRANK.COM @ IPULLRANK
Get Failure Alerts in Slack
https://plugins.jenkins.io/slack
IPULLRANK.COM @ IPULLRANK
Or in Jenkins’ logs
You could also just regularly the logs that Jenkins provides.
IPULLRANK.COM @ IPULLRANK
Or Pipe it into MySQL
Sending the Jenkins logs
into MySQL gives you the
opportunity to monitor a...
IPULLRANK.COM @ IPULLRANKYou’ll want a headless crawler and a text-based crawler to spin up pages and run tests on and a f...
IPULLRANK.COM @ IPULLRANK
Consider Making them Serverless
Building your crawler with AWS Lambda, Azure Functions or Google...
Shoutout to @vvgomes
IPULLRANK.COM @ IPULLRANK
Vini’s Blog Post on Serverless Architectures
http://vvgomes.com/edas-and-serverless/
IPULLRANK.COM @ IPULLRANK
Tips On Testing
Make only mission critical SEO tests potentially fail the build.
Most SEO issues...
Things to Play With
BecauseI never like to leaveyou without having
something you can do
IPULLRANK.COM @ IPULLRANK
Check out these Video Tutorials on Jenkins
Play with Jenkins: https://www.youtube.com/playlist?l...
IPULLRANK.COM @ IPULLRANK
Kantu Browser Automation Tool
See how Browser Automation tests work with a chrome extension: htt...
IPULLRANK.COM @ IPULLRANK
Codeception
If you dabble in PHP or have a WP site you want to play around with, check out Codec...
Wrapping Up
Who am I and where am I from?
IPULLRANK.COM @ IPULLRANK
I’M #ZORASDAD
First and foremost.
IPULLRANK.COM @ IPULLRANK
MY NAME IS MIKE
KING
Razorfish, Publicis Modem alum
Full Stack Developer
Full Stack Marketer
Moz...
IPULLRANK.COM @ IPULLRANK
We Do These Things
Machine
Learning
SEOContent
Strategy
Paid Media Measurement
& Optimization
Ma...
IPULLRANK.COM @ IPULLRANK
Machine Learning for Marketers Guide
skratchcoin.com
http://ipullrank.com/machine-learning-guide/
IPULLRANK.COM @ IPULLRANK
skratchcoin.com
THANK YOU /
Q&A
MICHAEL KING
FOUNDER &
MANAGING DIRECTOR
IPULLRANK
mike@ipullrank.com
DOWNLOAD THESE SLIDES: http://bit.ly...
Software Testing for SEO
Software Testing for SEO
Software Testing for SEO
You’ve finished this document.
Download and read it offline.
Upcoming SlideShare
What to Upload to SlideShare
Next
Upcoming SlideShare
What to Upload to SlideShare
Next
Download to read offline and view in fullscreen.

26

Share

Software Testing for SEO

Download to read offline

Managing Director of iPullRank, Mike King, talks about how to leverage automated testing to ensure that developers engaged in Continuous Integration don't end up accidentally breaking the optimizations in place for SEO

Related Books

Free with a 30 day trial from Scribd

See all

Software Testing for SEO

  1. 1. @iPullRank iPullRank Software Testing for SEO http://www.slideshare.net/ipullrank
  2. 2. Has this ever happened to you?
  3. 3. IPULLRANK.COM @ IPULLRANKhttps://twitter.com/iPullRank/status/1045435603851063296
  4. 4. IPULLRANK.COM @ IPULLRANK
  5. 5. IPULLRANK.COM @ IPULLRANK
  6. 6. IPULLRANK.COM @ IPULLRANK
  7. 7. IPULLRANK.COM @ IPULLRANK
  8. 8. IPULLRANK.COM @ IPULLRANK
  9. 9. IPULLRANK.COM @ IPULLRANK
  10. 10. IPULLRANK.COM @ IPULLRANK
  11. 11. IPULLRANK.COM @ IPULLRANK
  12. 12. What is Automated Testing?
  13. 13. So first, let’s talk just a little bit about modern web development and how it works.
  14. 14. IPULLRANK.COM @ IPULLRANK Model-View-Controller Design Pattern A lot of modern software frameworks follow this design pattern that allows for a separation of concerns between data, logic and frontend.
  15. 15. IPULLRANK.COM @ IPULLRANK React + Laravel Example In this example the PHP framework Laravel manages the Model and the Controller and the JavaScript framework React acts as the View.
  16. 16. IPULLRANK.COM @ IPULLRANK A URL is Converted into a Route URLs point to controllers which then return the right views featuring data from the right models. This is why segmented crawls are important to developers being able to implement recommendations.
  17. 17. IPULLRANK.COM @ IPULLRANK Waterfall Rarely Makes Sense Anymore It’s unlikely that the websites you work on will follow a waterfall methodology. Everything is agile now.
  18. 18. IPULLRANK.COM @ IPULLRANK Most Dev Teams Follow Agile Methodology Small pieces of functionality are tackled in short time frames or “sprints.”
  19. 19. IPULLRANK.COM @ IPULLRANK Continuous Integration Often engineering teams are following a Continuous Integration model where teams and individuals are autonomously pushing their code as they complete it.
  20. 20. IPULLRANK.COM @ IPULLRANK Continuous Integration means lots of people can break things
  21. 21. IPULLRANK.COM @ IPULLRANK Deployment Pipelines feature Automated Tests Deployment pipelines allow for safeguards to be put in place to ensure that everyone is following the same process to get things deployed.
  22. 22. IPULLRANK.COM @ IPULLRANK Tests Can Make the Build Fail Certain tests are deemed as critical to the infrastructure of the website and will cause the deployment process to fail and the developer has to go back and fix it before they can continue with their work.
  23. 23. IPULLRANK.COM @ IPULLRANK
  24. 24. IPULLRANK.COM @ IPULLRANK Automated Testing There are three flavors of testing that are most relevant to us as SEOs: Unit Tests, Integration Tests and GUI Tests.
  25. 25. IPULLRANK.COM @ IPULLRANK Unit Testing With Unit tests you are testing an individual function or procedure to ensure that that it works. These are generally small and fast. Codebases can have many of these. Unit tests can be used to determine the presence of tags and attributes in structure of code to be served to the client, but not the rendered code.
  26. 26. IPULLRANK.COM @ IPULLRANK Integration Testing With integration testing you’re testing how your logic comes together to build the bigger system. It can involve external data such as APIs and databases or how the various pieces of the systems work together. This is significantly slower than unit testing, but depends on how much of the system needs to be rendered in order to complete the test. Integration tests can be used to determine tags, features and content of completed HTML source being served to the client. However, there can be overlap with what can be viewed in an UI test.
  27. 27. IPULLRANK.COM @ IPULLRANK UI Testing UI Testing is the testing of the frontend interface of your website. This is largely used for ensuring front end components work as intended. This is the slowest version of testing because it requires the page to be fully rendered. UI tests can be used to determine tags, features and content of the rendered DOM being served to the client.
  28. 28. IPULLRANK.COM @ IPULLRANK This is What Headless Browsers are Actually For In SEO we primarily use headless browsers for scraping JavaScript-rendered content, but they are actually intended for automated tests.
  29. 29. IPULLRANK.COM @ IPULLRANK Read Why the Chrome DevTools Team Made Puppeteer https://github.com/GoogleChrome/puppeteer
  30. 30. IPULLRANK.COM @ IPULLRANK Test Driven Development Some moderndevelopersfollow thismethodologywhereintheywritetheirtestsfirstandthenwrite theircode until the tests pass.Unit testsare primarilyusedforthis,butanytype of test could be used.Note:UITestswill dramatically slow downdeployment.
  31. 31. How Does This Apply to SEO?
  32. 32. IPULLRANK.COM @ IPULLRANK Last Year I Talked about Using Task Runners https://searchengineland.com/get-developers-implement-seo-recommendations-280318
  33. 33. IPULLRANK.COM @ IPULLRANK I explained the Anderson-Alderson Scale This is a scale of which the developers you interface with are somewhere between an underachieving known-it-all and overachieving do-it-all.
  34. 34. IPULLRANK.COM @ IPULLRANK @BritneyMuller brings upp a great point My goal with that post and talk is to introduce you to another way to integrate developers and ensure we’re all moving towards working better together.
  35. 35. Let’s go back through those horror stories.
  36. 36. IPULLRANK.COM @ IPULLRANK A Test Can Catch This Unit Test Failure Condition – Presence of meta noindex tag on functions that impact the <head>. Integration Test Failure Condition – Presence of meta noindex on routes that should not have them. This is a critical issue so this test should fail the build.
  37. 37. IPULLRANK.COM @ IPULLRANK Not Sure I’d Test for this One Integration Test Failure Condition – H1 tag is the same in the HTML on every accessed page in our test dataset. UI Test Failure Condition - H1 tag is the same in the rendered DOM on every accessed page in our test dataset. I would not recommend having this test fail the build though.
  38. 38. IPULLRANK.COM @ IPULLRANK Robots.txt Test Unit Test Failure Condition – Presence of “User-agent: * Disallow: /” on prod in a function for the robots.txt route. Integration Test Failure Condition – Presence of “User-agent: * Disallow: /” on prod in robots.txt URL. This is a critical issue so this test should fail the build.
  39. 39. IPULLRANK.COM @ IPULLRANK SSR Test Integrated Test/UI Test Failure Condition - Key body content is not available in the HTML version. This one requires the rendered DOM as a comparison so it technically could be a UI and/or Integrated Test. This should definitely fail the build.
  40. 40. IPULLRANK.COM @ IPULLRANK Rel-canonical UI Test Failure Condition – URLs that should have a self- referencing canonical do not in the DOM. Integration Test Failure Condition – URLs that should have a self-referencing canonical do not in the HTML. Unit Test Failure Condition - Route does not set canonical tag on the server side. This is a critical issue so this test should fail the build.
  41. 41. IPULLRANK.COM @ IPULLRANK SSR Test Integrated Test/UI Test Failure Condition - Key body content is not available in the HTML version. This one requires the rendered DOM as a comparison so it technically could be a UI and/or Integrated Test. This should definitely fail the build.
  42. 42. IPULLRANK.COM @ IPULLRANK Invalid Tag Tests UI Test Failure Condition – Rendered DOM features tags in the <head> sub-tree that are invalid. Integration Test Failure Condition – HTML features tags in the <head> that are invalid or HTML does not pass W3C validation. Unit Test Failure Condition - Function that returns the <head> features tags that don’t fit a list of valid <head> tags. This is a critical issue so this test should fail the build.
  43. 43. IPULLRANK.COM @ IPULLRANK But Testing is Not a Magic Bullet Sure, we can develop tests for to look for the presence of structured markup and to enforce metadata specifications, but when things go this wrong, you have to put your team member, project management, consultant, management hat on and get to the bottom of what went wrong.
  44. 44. IPULLRANK.COM @ IPULLRANKIn my experience, it’s usually developers writing their own tests, but I’ve heard of QA Engineers also writing tests after the fact to help ensure quality moving forward. Who Usually Does this Work? Developer QA Engineer
  45. 45. Doing an SEO Audit is basically doing similar work to that of a QA Engineer.
  46. 46. IPULLRANK.COM @ IPULLRANK Crawling HTML is Somewhat like Integration Testing You’re looking at the results of what the software spits out when all the systems come together.
  47. 47. IPULLRANK.COM @ IPULLRANK Crawling JavaScript is more like UI Testing You’re looking at the results when the user interface is rendered.
  48. 48. IPULLRANK.COM @ IPULLRANK …And you should be comparing the differences John Hogg from ClickConsult shared his diff comparison Chrome extension that computes the DIFF between HTML and rendered DOM. When it’s released I encourage you to check it out.
  49. 49. IPULLRANK.COM @ IPULLRANK Your Role is To Help Plan the Tests You’ll want to work with a QA Engineer, a Product Manager or a Developer to develop test cases that can then be built into
  50. 50. IPULLRANK.COM @ IPULLRANK Here are Few Examples These examples of tests should be enough to get you started on defining your own potential tests for SEO. Test Case ID Test Scenario Test Type Test Steps Test Data Expected Results Actual Results Pass/Fail SEO01 Presence of Meta Descriptions Unit Test Check for presence of meta description tag in HTML Page template code All URLs should have meta description Product Detail Page is missing meta description PASS SEO02 Viable Internal Links Functional Test 1. Render pages 2. Open all internal links 3. Review response codes Crawled URL data All links return 200 response code Many links to redirects and 404s FAIL SEO03 Average Page Speed Less than 2 Seconds Functional/Integrat ion Test 1. Render pages 2. Capture page speed 3. Determine average page speed per page type Render all page types from URL list All page types should return an average of 2 seconds load time Homepage takes 5 seconds to load FAIL
  51. 51. Tools Some tools you canuse to get your automated testing for SEO off the ground
  52. 52. IPULLRANK.COM @ IPULLRANK Meet Jenkins If your developers are doing Continuous Integration or Continuous Delivery, it’s likely that they are using Jenkins. https://jenkins.io/
  53. 53. IPULLRANK.COM @ IPULLRANK Get Failure Alerts in Slack https://plugins.jenkins.io/slack
  54. 54. IPULLRANK.COM @ IPULLRANK Or in Jenkins’ logs You could also just regularly the logs that Jenkins provides.
  55. 55. IPULLRANK.COM @ IPULLRANK Or Pipe it into MySQL Sending the Jenkins logs into MySQL gives you the opportunity to monitor and visualize failures and successes of builds with respect to SEO in a variety of ways such as through Google Data Studio. https://chburmeister.github.io/2017/01/27/jenkins-logging-directly-to-mysql-database.html
  56. 56. IPULLRANK.COM @ IPULLRANKYou’ll want a headless crawler and a text-based crawler to spin up pages and run tests on and a fixed list of pages that represent all of the public-facing routes. You’ll Also Need a Crawler https://github.com/yujiosaka/ headless-chrome-crawler https://github.com/antivanov/ js-crawler
  57. 57. IPULLRANK.COM @ IPULLRANK Consider Making them Serverless Building your crawler with AWS Lambda, Azure Functions or Google Clouds Functions may be a great way to enjoy scale without having to manage additional servers.
  58. 58. Shoutout to @vvgomes
  59. 59. IPULLRANK.COM @ IPULLRANK Vini’s Blog Post on Serverless Architectures http://vvgomes.com/edas-and-serverless/
  60. 60. IPULLRANK.COM @ IPULLRANK Tips On Testing Make only mission critical SEO tests potentially fail the build. Most SEO issues will be spotted in your integration tests. Include your SEO tests in every build. Keep your testing suites separate. Do all crawling in parallel.
  61. 61. Things to Play With BecauseI never like to leaveyou without having something you can do
  62. 62. IPULLRANK.COM @ IPULLRANK Check out these Video Tutorials on Jenkins Play with Jenkins: https://www.youtube.com/playlist?list=PLzvRQMJ9HDiSaisKr7OnM4Fl7JXCDDcmt
  63. 63. IPULLRANK.COM @ IPULLRANK Kantu Browser Automation Tool See how Browser Automation tests work with a chrome extension: https://chrome.google.com/webstore/detail/kantu- browser-automation/gcbalfbdmfieckjlnblleoemohcganoc?hl=en
  64. 64. IPULLRANK.COM @ IPULLRANK Codeception If you dabble in PHP or have a WP site you want to play around with, check out Codeception. https://codeception.com
  65. 65. Wrapping Up Who am I and where am I from?
  66. 66. IPULLRANK.COM @ IPULLRANK I’M #ZORASDAD First and foremost.
  67. 67. IPULLRANK.COM @ IPULLRANK MY NAME IS MIKE KING Razorfish, Publicis Modem alum Full Stack Developer Full Stack Marketer Moz Associate
  68. 68. IPULLRANK.COM @ IPULLRANK We Do These Things Machine Learning SEOContent Strategy Paid Media Measurement & Optimization Marketing Automation
  69. 69. IPULLRANK.COM @ IPULLRANK Machine Learning for Marketers Guide skratchcoin.com http://ipullrank.com/machine-learning-guide/
  70. 70. IPULLRANK.COM @ IPULLRANK skratchcoin.com
  71. 71. THANK YOU / Q&A MICHAEL KING FOUNDER & MANAGING DIRECTOR IPULLRANK mike@ipullrank.com DOWNLOAD THESE SLIDES: http://bit.ly/testeo
  • saicosmo

    Mar. 13, 2020
  • chokrihamouda1

    Jun. 23, 2019
  • SiuLWong

    Jun. 11, 2019
  • AlejandroAlonsoNieto

    Jan. 14, 2019
  • Pomagalnik

    Dec. 13, 2018
  • jalbertbowden

    Nov. 29, 2018
  • HollyMiller1

    Oct. 17, 2018
  • LinneaBak

    Oct. 8, 2018
  • ChrisDrury6

    Oct. 5, 2018
  • LouiseAmor

    Oct. 1, 2018
  • suzukik

    Oct. 1, 2018
  • saraplus

    Oct. 1, 2018
  • AniaTrzaskowska

    Oct. 1, 2018
  • brentludtke

    Sep. 30, 2018
  • guiogl

    Sep. 29, 2018
  • YeisonLapaixAngomas1

    Sep. 29, 2018
  • Younangrace

    Sep. 28, 2018
  • markuskobel3

    Sep. 28, 2018
  • shado88

    Sep. 28, 2018
  • nitman

    Sep. 28, 2018

Managing Director of iPullRank, Mike King, talks about how to leverage automated testing to ensure that developers engaged in Continuous Integration don't end up accidentally breaking the optimizations in place for SEO

Views

Total views

44,634

On Slideshare

0

From embeds

0

Number of embeds

33,124

Actions

Downloads

170

Shares

0

Comments

0

Likes

26

×