SlideShare a Scribd company logo
1 of 28
Automated Testing DITA
Content and Customizations
Steven Anderson
Information Architect



   @sanderson_sfdc
   steve.anderson@gmail.com
What is testing?

 Testing is the process of validating and verifying that your
  project:
   – meets the requirements that guided its design and development
   – works as expected
What types of testing are there?

 Regression testing
 Acceptance testing
 Alpha and beta testing
How can we meet our test objectives?

 Manual testing
 Automated testing
What is manual testing?

 Visual inspection
 Click that link!
 Expand the table of contents
What is automated testing?

 Use software to run the tests
 Compare actual output to expected output
 Report on the state of the content or output
Let's learn from software development

 Use manual testing only when required
 Depend on automated testing
What are the limitations of manual testing?

 Time consuming
 Error prone
 Is that an error or not?
Why is automated testing a good choice?

 It gives you confidence that you haven't made that mistake
  – again
 It scales
 It finds unintended side-effects
Automated testing and DITA
With DITA there are three things to test

 Content (the input)
 The OT itself
 The output
How can you test your content?

 Schematron
 QA plugin
 XMLUnit
What is schematron?

 A rule based validation language for making assertions
  about the presence or absence of patterns in XML trees
 Many authoring tools use schematron
 http://www.schematron.com/
Demo of schematron in oxygen
What’s the QA plugin?

 Created by D.P. Clark and Patrick Quinlan
 Identifies errors in DITA tagging, element nesting, language
  standards, and common syntax errors
 Default tests based on styles in the Microsoft Manual of
  Style for Technical Publications
 An HTML report is created that includes links to each
  project topic file
 Tests written in XSLT
 http://sourceforge.net/p/qa-plugin-dot/wiki/Home/
Demo of the QA Plugin
What is XMLUnit?

 XMLUnit enables assertions to be made about the content
  and structure of XML
 Based on Junit
 http://xmlunit.sourceforge.net/
Demo of XMLUnit
How can you test the OT?

 OT regression test suite
 JUnit
DITA OT Regression Test

 A large number of sample DITA maps and topics
  representing a wide variety of content, as well as batch files
  to run the content through a build
 The output of the test is compared to the output of the
  previous working set of code to determine if any tests fail or
  if any output changes in a negative way
 Mostly useful when customizing, or when upgrading,
  versions of the OT
 http://dita.xml.org/wiki/regression-testing-in-the-toolkit
Demo of DITA OT Regression
           Test
How can you test the output?

 Link tests
 XMLUnit
 Browser automation - Selenium, Silk, etc.
 Needle and nose
Browser automation

 Automate tests using browsers
 http://seleniumhq.org/ and
  http://www.borland.com/us/products/silk/silktest/
Demo of Selenium
Needle and Nose

 Unit testing using Python
 Nose is the test framework, needle does the comparison
 For testing HTML output
 http://needle.readthedocs.org/en/latest/index.html
Demo of Needle and Nose
Samples and code available at
https://github.com/saanvi
Automated Testing DITA Content and Customizations

More Related Content

What's hot

Automated Testing for Web Applications - Wurbe #36
Automated Testing for Web Applications - Wurbe #36Automated Testing for Web Applications - Wurbe #36
Automated Testing for Web Applications - Wurbe #36Andrei Savu
 
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...TechTalks
 
Software Testing without Requirements: Survival Guide
Software Testing without Requirements: Survival GuideSoftware Testing without Requirements: Survival Guide
Software Testing without Requirements: Survival GuideOleksandr Lutsaievskyi
 
TDD and Unit Testing in Golang
TDD and Unit Testing in GolangTDD and Unit Testing in Golang
TDD and Unit Testing in GolangSofian Hadiwijaya
 
Mock driven development using .NET
Mock driven development using .NETMock driven development using .NET
Mock driven development using .NETPuneet Ghanshani
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit TestingJoe Tremblay
 
Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts pptRathna Priya
 
Software Testing & Debugging
Software Testing & DebuggingSoftware Testing & Debugging
Software Testing & DebuggingComputing Cage
 
Learn Bug Reporting Techniques
Learn Bug Reporting TechniquesLearn Bug Reporting Techniques
Learn Bug Reporting TechniquesQA InfoTech
 
Benefit From Unit Testing In The Real World
Benefit From Unit Testing In The Real WorldBenefit From Unit Testing In The Real World
Benefit From Unit Testing In The Real WorldDror Helper
 
Unit testing (workshop)
Unit testing (workshop)Unit testing (workshop)
Unit testing (workshop)Foyzul Karim
 
Unit vs. Integration Tests
Unit vs. Integration TestsUnit vs. Integration Tests
Unit vs. Integration TestsDavid Völkel
 

What's hot (18)

Automated Testing for Web Applications - Wurbe #36
Automated Testing for Web Applications - Wurbe #36Automated Testing for Web Applications - Wurbe #36
Automated Testing for Web Applications - Wurbe #36
 
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
 
Software Testing without Requirements: Survival Guide
Software Testing without Requirements: Survival GuideSoftware Testing without Requirements: Survival Guide
Software Testing without Requirements: Survival Guide
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Unit Testing (C#)
Unit Testing (C#)Unit Testing (C#)
Unit Testing (C#)
 
TDD and Unit Testing in Golang
TDD and Unit Testing in GolangTDD and Unit Testing in Golang
TDD and Unit Testing in Golang
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Mock driven development using .NET
Mock driven development using .NETMock driven development using .NET
Mock driven development using .NET
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit Testing
 
Unit testing
Unit testing Unit testing
Unit testing
 
Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts ppt
 
Software Testing & Debugging
Software Testing & DebuggingSoftware Testing & Debugging
Software Testing & Debugging
 
Unit testing
Unit testingUnit testing
Unit testing
 
Learn Bug Reporting Techniques
Learn Bug Reporting TechniquesLearn Bug Reporting Techniques
Learn Bug Reporting Techniques
 
Benefit From Unit Testing In The Real World
Benefit From Unit Testing In The Real WorldBenefit From Unit Testing In The Real World
Benefit From Unit Testing In The Real World
 
Unit testing (workshop)
Unit testing (workshop)Unit testing (workshop)
Unit testing (workshop)
 
Unit vs. Integration Tests
Unit vs. Integration TestsUnit vs. Integration Tests
Unit vs. Integration Tests
 
Unit testing
Unit testingUnit testing
Unit testing
 

Similar to Automated Testing DITA Content and Customizations

Agile Testing Pasadena JUG Aug2009
Agile Testing Pasadena JUG Aug2009Agile Testing Pasadena JUG Aug2009
Agile Testing Pasadena JUG Aug2009Grig Gheorghiu
 
Finance & Testing 2009 Highspeed Testautomation
Finance & Testing 2009 Highspeed TestautomationFinance & Testing 2009 Highspeed Testautomation
Finance & Testing 2009 Highspeed Testautomationguesta64aefc
 
FT 2009 Highspeed Test Automation
FT 2009 Highspeed Test AutomationFT 2009 Highspeed Test Automation
FT 2009 Highspeed Test AutomationMichel Löhr
 
Improving ROI with Scriptless Test Automation
Improving ROI with Scriptless Test AutomationImproving ROI with Scriptless Test Automation
Improving ROI with Scriptless Test AutomationMindfire LLC
 
Lightning Talks by Globant - Automation (This app runs by itself )
Lightning Talks by Globant -  Automation (This app runs by itself ) Lightning Talks by Globant -  Automation (This app runs by itself )
Lightning Talks by Globant - Automation (This app runs by itself ) Globant
 
Orcanos medical-common-validation-errors
Orcanos medical-common-validation-errorsOrcanos medical-common-validation-errors
Orcanos medical-common-validation-errorsEcommmax
 
Choosing right-automation-tool
Choosing right-automation-toolChoosing right-automation-tool
Choosing right-automation-toolBabuDevanandam
 
Automating The Process For Building Reliable Software
Automating The Process For Building Reliable SoftwareAutomating The Process For Building Reliable Software
Automating The Process For Building Reliable Softwareguest8861ff
 
Automation testing
Automation testingAutomation testing
Automation testingTomy Rhymond
 
Creating a successful continuous testing environment by Eran Kinsbruner
Creating a successful continuous testing environment by Eran KinsbrunerCreating a successful continuous testing environment by Eran Kinsbruner
Creating a successful continuous testing environment by Eran KinsbrunerQA or the Highway
 
03 test specification and execution
03   test specification and execution03   test specification and execution
03 test specification and executionClemens Reijnen
 
The Importance of Performance Testing Theory and Practice - QueBIT Consulting...
The Importance of Performance Testing Theory and Practice - QueBIT Consulting...The Importance of Performance Testing Theory and Practice - QueBIT Consulting...
The Importance of Performance Testing Theory and Practice - QueBIT Consulting...QueBIT Consulting
 
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...Applitools
 
Planning & building scalable test infrastructure
Planning  & building scalable test infrastructurePlanning  & building scalable test infrastructure
Planning & building scalable test infrastructureVijayan Reddy
 
04 test controlling and tracking
04   test controlling and tracking04   test controlling and tracking
04 test controlling and trackingClemens Reijnen
 
12 Rational Solo Pruebas 2009
12 Rational Solo Pruebas 200912 Rational Solo Pruebas 2009
12 Rational Solo Pruebas 2009Pepe
 
Software Quality and Test Strategies for Ruby and Rails Applications
Software Quality and Test Strategies for Ruby and Rails ApplicationsSoftware Quality and Test Strategies for Ruby and Rails Applications
Software Quality and Test Strategies for Ruby and Rails ApplicationsBhavin Javia
 
Automation testing
Automation testingAutomation testing
Automation testingArta Doci
 
07 Outsource To India Independent Testing
07 Outsource To India Independent Testing07 Outsource To India Independent Testing
07 Outsource To India Independent TestingoutsourceToIndia
 

Similar to Automated Testing DITA Content and Customizations (20)

Agile Testing Pasadena JUG Aug2009
Agile Testing Pasadena JUG Aug2009Agile Testing Pasadena JUG Aug2009
Agile Testing Pasadena JUG Aug2009
 
Finance & Testing 2009 Highspeed Testautomation
Finance & Testing 2009 Highspeed TestautomationFinance & Testing 2009 Highspeed Testautomation
Finance & Testing 2009 Highspeed Testautomation
 
FT 2009 Highspeed Test Automation
FT 2009 Highspeed Test AutomationFT 2009 Highspeed Test Automation
FT 2009 Highspeed Test Automation
 
Improving ROI with Scriptless Test Automation
Improving ROI with Scriptless Test AutomationImproving ROI with Scriptless Test Automation
Improving ROI with Scriptless Test Automation
 
Lightning Talks by Globant - Automation (This app runs by itself )
Lightning Talks by Globant -  Automation (This app runs by itself ) Lightning Talks by Globant -  Automation (This app runs by itself )
Lightning Talks by Globant - Automation (This app runs by itself )
 
Orcanos medical-common-validation-errors
Orcanos medical-common-validation-errorsOrcanos medical-common-validation-errors
Orcanos medical-common-validation-errors
 
Choosing right-automation-tool
Choosing right-automation-toolChoosing right-automation-tool
Choosing right-automation-tool
 
Gcs day1
Gcs day1Gcs day1
Gcs day1
 
Automating The Process For Building Reliable Software
Automating The Process For Building Reliable SoftwareAutomating The Process For Building Reliable Software
Automating The Process For Building Reliable Software
 
Automation testing
Automation testingAutomation testing
Automation testing
 
Creating a successful continuous testing environment by Eran Kinsbruner
Creating a successful continuous testing environment by Eran KinsbrunerCreating a successful continuous testing environment by Eran Kinsbruner
Creating a successful continuous testing environment by Eran Kinsbruner
 
03 test specification and execution
03   test specification and execution03   test specification and execution
03 test specification and execution
 
The Importance of Performance Testing Theory and Practice - QueBIT Consulting...
The Importance of Performance Testing Theory and Practice - QueBIT Consulting...The Importance of Performance Testing Theory and Practice - QueBIT Consulting...
The Importance of Performance Testing Theory and Practice - QueBIT Consulting...
 
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
 
Planning & building scalable test infrastructure
Planning  & building scalable test infrastructurePlanning  & building scalable test infrastructure
Planning & building scalable test infrastructure
 
04 test controlling and tracking
04   test controlling and tracking04   test controlling and tracking
04 test controlling and tracking
 
12 Rational Solo Pruebas 2009
12 Rational Solo Pruebas 200912 Rational Solo Pruebas 2009
12 Rational Solo Pruebas 2009
 
Software Quality and Test Strategies for Ruby and Rails Applications
Software Quality and Test Strategies for Ruby and Rails ApplicationsSoftware Quality and Test Strategies for Ruby and Rails Applications
Software Quality and Test Strategies for Ruby and Rails Applications
 
Automation testing
Automation testingAutomation testing
Automation testing
 
07 Outsource To India Independent Testing
07 Outsource To India Independent Testing07 Outsource To India Independent Testing
07 Outsource To India Independent Testing
 

Recently uploaded

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 

Recently uploaded (20)

Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 

Automated Testing DITA Content and Customizations

  • 1. Automated Testing DITA Content and Customizations Steven Anderson Information Architect @sanderson_sfdc steve.anderson@gmail.com
  • 2. What is testing?  Testing is the process of validating and verifying that your project: – meets the requirements that guided its design and development – works as expected
  • 3. What types of testing are there?  Regression testing  Acceptance testing  Alpha and beta testing
  • 4. How can we meet our test objectives?  Manual testing  Automated testing
  • 5. What is manual testing?  Visual inspection  Click that link!  Expand the table of contents
  • 6. What is automated testing?  Use software to run the tests  Compare actual output to expected output  Report on the state of the content or output
  • 7. Let's learn from software development  Use manual testing only when required  Depend on automated testing
  • 8. What are the limitations of manual testing?  Time consuming  Error prone  Is that an error or not?
  • 9. Why is automated testing a good choice?  It gives you confidence that you haven't made that mistake – again  It scales  It finds unintended side-effects
  • 11. With DITA there are three things to test  Content (the input)  The OT itself  The output
  • 12. How can you test your content?  Schematron  QA plugin  XMLUnit
  • 13. What is schematron?  A rule based validation language for making assertions about the presence or absence of patterns in XML trees  Many authoring tools use schematron  http://www.schematron.com/
  • 14. Demo of schematron in oxygen
  • 15. What’s the QA plugin?  Created by D.P. Clark and Patrick Quinlan  Identifies errors in DITA tagging, element nesting, language standards, and common syntax errors  Default tests based on styles in the Microsoft Manual of Style for Technical Publications  An HTML report is created that includes links to each project topic file  Tests written in XSLT  http://sourceforge.net/p/qa-plugin-dot/wiki/Home/
  • 16. Demo of the QA Plugin
  • 17. What is XMLUnit?  XMLUnit enables assertions to be made about the content and structure of XML  Based on Junit  http://xmlunit.sourceforge.net/
  • 19. How can you test the OT?  OT regression test suite  JUnit
  • 20. DITA OT Regression Test  A large number of sample DITA maps and topics representing a wide variety of content, as well as batch files to run the content through a build  The output of the test is compared to the output of the previous working set of code to determine if any tests fail or if any output changes in a negative way  Mostly useful when customizing, or when upgrading, versions of the OT  http://dita.xml.org/wiki/regression-testing-in-the-toolkit
  • 21. Demo of DITA OT Regression Test
  • 22. How can you test the output?  Link tests  XMLUnit  Browser automation - Selenium, Silk, etc.  Needle and nose
  • 23. Browser automation  Automate tests using browsers  http://seleniumhq.org/ and http://www.borland.com/us/products/silk/silktest/
  • 25. Needle and Nose  Unit testing using Python  Nose is the test framework, needle does the comparison  For testing HTML output  http://needle.readthedocs.org/en/latest/index.html
  • 26. Demo of Needle and Nose
  • 27. Samples and code available at https://github.com/saanvi

Editor's Notes

  1. * Abstract When publishing DITA content, customization is a given. The format you need for your HTML/PDF/epub, etc., is special, and the default output doesn't work for you. But customization is tricky. What happens when you override a template? Are you sure you know all the side-effects? For anything but the simplest customizations, we need help to be sure the latest tweak doesn't cause a nasty side-effect somewhere else. Anderson explains how automated testing is used in programming, and how he uses automated testing in salesforce.com DITA processes. The same is also true of content. What happens when you remove some content from a topic that is used in multiple deliverables? Do you know the side-effects? How about upgrading from one version of DITA to another? How do you verify that your process will still work? Automated testing can help with all of these issues. Anderson explains how automated testing is used in programming, and how he uses automated testing in salesforce.com DITA processes.
  2. Making this more specific for us, as DITA users, we test to ensure that our readers and users are getting usable content. No matter what your process is, you are already testing. Every time your review the output of your content, you are visually testing it to make sure it's okay. Yes, that's pretty obvious, right? For me, though, testing is also a way to manage my fear. Did that change cause anything to break? A little fear can be a good thing, it helps you avoid stupid mistakes, but when fear hurts your productivity, or keeps you from upgrading to a new version of the OT that would really help you and your customers, that's not good fear. Testing helps up manage our fear, allowing us to be more agile and more productive.
  3. There are different ways that testing can be categorized. For DITA, the most logical method we've found is to categorize our tests using test objectives. Regression testing asks the question – did my change break something that was working? Ever run a build in the morning and everything works, then you change something simple, like you add a period, and then rebuild and everything blows up? You pull out your hair trying to figure out what changed. Usually it's not what you did, it's what that *other* writer did, or something the tools guy changed, or cosmic rays. Regression testing helps you avoid situations like that. It tells you, “Hey, this change broke it” or “If you make this change, you’ll break this part of the workflow”. The latter is actually what you want to hear. You want to do your regression testing *before* you add your changes to the workflow of your team. When you do that, you ensure that you aren’t causing anyone else problems. Acceptance testing asks the question - does it work the way we want it to? This assumes your build works. But even if the build worked, things could still be wrong. You want to make sure that you've resolved all of these things before letting your reader get a hold of it. Are there any broken links? Missing images? Empty elements? Topics with no content except a title? Completely empty topics? Topics that still contain boiler-plate text from the template you use? Alpha and beta tests are where people actually are using your project. That’s when you are really getting a chance to verify – does it work the way they expect it to work?
  4. TODO: Is this the best way to introduce automated testing?
  5. This probably seems obvious, but every time you edit a file, or review the output of a build, you are doing manual testing. We technical communicators are picky people. I've had bugs filed against me for a half-point different in a type-face. The writer found that by looking at the output. But we’ve also found bugs in links, functionality of the site (such as a table of contents that did not expand), etc.
  6. The biggest difference between manual testing and automated testing is that the only time a person needs to get involved is if there’s a test failure. You can schedule your tests, or start them manually, and, if there are failures, communicate them appropriately. Most automated tests are created based on manual tests. Rather than clicking the link, run an automated test to verify it works.
  7. TODO: Beef this section up. What is the history of testing in software development. Sometimes manual testing is required, but it’s limited
  8. Show sample XML, schematron file, then run the test. Explain how schematron, while automated, is scheduled not based on time, but based on user action (say, at time of save).
  9. Show sample content, a sample test XSLT file, and the output of the test
  10. TODO: Add simple info about what Junit is
  11. TODO: Show example XMLUnit, sample XML content, and a test report. Compare and contrast to QA plugin
  12. Show sample content, and an error report
  13. I’m not going to go in-depth about link tests. There are many tools for doing it, both online and command-line based. There is only one PDF link checker that I’m aware of. TODO: Get URL. You can use XMLUnit for your output the same way you do for the input, so I won’t cover that again. You can use it both for XHTML and PDF by validating the FO, before the PDF conversion.
  14. These tools use web browsers to verify the output. They can do all kinds of interesting things, including checking links, validating behavior (does the search button work?). One of the great things about these tools is that they experience your output the way your users do.
  15. Simple selenium test run. Show the browser actually running, and the result.
  16. TODO: Should I fold these into selenium/silk? It’s a different way of writing the tests, and needle does the comparison in a way that selenium cannot.