+ All Categories
Home > Technology > Automated Testing DITA Content and Customizations

Automated Testing DITA Content and Customizations

Date post: 03-Jul-2015
Category:
Upload: steve-anderson
View: 430 times
Download: 0 times
Share this document with a friend
28
Automated Testing DITA Content and Customizations Steven Anderson Information Architect @sanderson_sfdc [email protected]
Transcript
Page 1: Automated Testing DITA Content and Customizations

Automated Testing DITA Content and CustomizationsSteven AndersonInformation Architect

@sanderson_sfdc

[email protected]

Page 2: Automated Testing DITA Content and Customizations

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

Page 3: Automated Testing DITA Content and Customizations

What types of testing are there?

Regression testing

Acceptance testing

Alpha and beta testing

Page 4: Automated Testing DITA Content and Customizations

How can we meet our test objectives?

Manual testing

Automated testing

Page 5: Automated Testing DITA Content and Customizations

What is manual testing?

Visual inspection

Click that link!

Expand the table of contents

Page 6: Automated Testing DITA Content and Customizations

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

Page 7: Automated Testing DITA Content and Customizations

Let's learn from software development

Use manual testing only when required

Depend on automated testing

Page 8: Automated Testing DITA Content and Customizations

What are the limitations of manual testing?

Time consuming

Error prone

Is that an error or not?

Page 9: Automated Testing DITA Content and Customizations

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

Page 10: Automated Testing DITA Content and Customizations

Automated testing and DITA

Page 11: Automated Testing DITA Content and Customizations

With DITA there are three things to test

Content (the input)

The OT itself

The output

Page 12: Automated Testing DITA Content and Customizations

How can you test your content?

Schematron

QA plugin

XMLUnit

Page 13: Automated Testing DITA Content and Customizations

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/

Page 14: Automated Testing DITA Content and Customizations

Demo of schematron in oxygen

Page 15: Automated Testing DITA Content and Customizations

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/

Page 16: Automated Testing DITA Content and Customizations

Demo of the QA Plugin

Page 17: Automated Testing DITA Content and Customizations

What is XMLUnit?

XMLUnit enables assertions to be made about the content

and structure of XML

Based on Junit

http://xmlunit.sourceforge.net/

Page 18: Automated Testing DITA Content and Customizations

Demo of XMLUnit

Page 19: Automated Testing DITA Content and Customizations

How can you test the OT?

OT regression test suite

JUnit

Page 20: Automated Testing DITA Content and Customizations

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

Page 21: Automated Testing DITA Content and Customizations

Demo of DITA OT Regression Test

Page 22: Automated Testing DITA Content and Customizations

How can you test the output?

Link tests

XMLUnit

Browser automation - Selenium, Silk, etc.

Needle and nose

Page 23: Automated Testing DITA Content and Customizations

Browser automation

Automate tests using browsers

http://seleniumhq.org/ and

http://www.borland.com/us/products/silk/silktest/

Page 24: Automated Testing DITA Content and Customizations

Demo of Selenium

Page 25: Automated Testing DITA Content and Customizations

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

Page 26: Automated Testing DITA Content and Customizations

Demo of Needle and Nose

Page 27: Automated Testing DITA Content and Customizations

Samples and code available athttps://github.com/saanvik/Automated-Testing-for-DITA-OT

Page 28: Automated Testing DITA Content and Customizations

Recommended