Date post: | 03-Jul-2015 |
Category: |
Technology |
Upload: | steve-anderson |
View: | 430 times |
Download: | 0 times |
Automated Testing DITA Content and CustomizationsSteven AndersonInformation Architect
@sanderson_sfdc
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 athttps://github.com/saanvik/Automated-Testing-for-DITA-OT