Automatic vs manual testing Torbjørn Helland Solhaug [email protected] @solhell.

64
Automatic vs manual testing Torbjørn Helland Solhaug [email protected] @solhell

Transcript of Automatic vs manual testing Torbjørn Helland Solhaug [email protected] @solhell.

Page 1: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Automatic vs manual testing

Torbjørn Helland [email protected]@solhell

Page 2: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Is automation a tool or a solution?

Page 3: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Why did we look into this?• Reasonable to try to make

assessment more efficient• Frequently asked if there are

any good automatic methods• Most legislation points to

WCAG• Part of the EU methodology

project

Page 4: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Selecting robots

Page 5: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Objective: coverage• Should assess CSS and HTML in

parallell• Cover at least WCAG 2.0 AA• Option for AAA would be

benefitial• Assessing outside of WCAG

would be benefitial

DIDN´T REACH UP

• PEAT – only checks against epilepsia

• AccessLint – to few criteria

• HTML Validator – only HTML quality

• EvalAccess – checks against WCAG 1.0

Page 6: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Objective: easy to run• Limited setup time• Limited input• Intuitive interface• Partially due to project scope

DIDN´T REACH UP

• UCDmanager – too demanding setup

• TestPage – run by command line

Page 7: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Objective: easy to interpret• English, Scandinavian or Google

Translate• Understandable findings• Specific references

DIDN´T REACH UP

• Examinator – Spanish and no translation

• HERA-FFX – doesn´t show actual findings

• Accessibility Valet – too demanding interpretation

Page 8: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Chosen robots 1/2• AccessMonitor • Achecker • A-tester • AInspector• HiSoftware Compliance

Sheriff• Magenta • Siteimprove

Page 9: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Chosen robots 2/2• Sortsite • Tanaguru • TAW • Tenon • Tingtun HTML (eAccessibility)• TotalValidator • WAVE • Web-me

Page 10: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Robots assess (mostly) just quantity, but also more than accessibility and universal design

Page 11: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Selecting test criterias

Page 12: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Objective: Identify detectable error types• Phase 1 – 38 hypotheses• Phase 2 – testing• Phase 3 – evaluation• 34 error types which at

least 1 robot could identify

• Slight editorial focus

Page 13: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Objective: comparing robots• Headings and structure: 6 tests• Links: 12 tests• Contrast: 1 test• Images: 5 tests• Forms: 6 tests• Tables: 4 tests

CODE EXAMPLES<h1> - <h6><a href=”…”CSS color<img alt=”…”<label>, <input><th scope=”…”>

Page 14: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Errors that wasn´t discovered• Typography vs hierarchy• More than color to

identify links• Text on image• Image of text• Focus effect

Page 15: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Headings

Page 16: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Headings – what is important? • Using headings increases

readability• Correct code for headings• Correct heading hierarchy• Relevant content

Page 17: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Headings – Achecker • Do check for headings• Assesses the hierarchy,

but doesn´t find all errors• Doesn´t look for potential

headings• Doesn´t check for

content

Page 18: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Headings – A-Tester• Does check for content• Requires that headings are

placed within main, header, section or article

FINDINGS

<h2> with only CSS content (correct finding)

HTML5 DO-element missing(wrong finding)

Page 19: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Headings – eAccessibility PDF• Doesn´t register the tags

Page 20: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Links

Page 21: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Links – what is important? • Visual appearance• Understandble target• Consistent behaviour• Focus highlight• That they work!

Page 22: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Links – eAccessibility• eAccessibility HTML

check: incorrect error on inconsistent HREF method

Page 23: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Links – AccessMonitor • Checks for skip link• Identifies adjacent links to

same target • Doesn´t check for

external links or new windows

Page 24: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Links– Total Validator• Checks for content• Checks if identical link

texts leads to same URL• Checks if href is valid• Follows every link to

identify removed pages and retired domains

Page 25: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Contrast

Page 26: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Contrast – requirement• Light contrast, measured

between background and text colour

• Scale goes to 21:1• Small text requirement

4.5:1 (AA) – 7.0:1 (AAA)• Large text requirement

3.0:1 (AA) – 4.5:1 (AAA)

Page 27: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Contrast – Contrast Checker • Doesn´t always correctly identify

background color• Requires manual check

FINDING

1.03:1

Page 28: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Contrast – HiSoftware• Assesses objects inside <head>• Requires both background and

text color to be specified for each and every object

CONCLUSION

The real errors are lost in the huge amount of false positives

Page 29: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Alt-texts could be a separate lecture, but…

Page 30: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Image categories

• Pure decoration• Icons• Supportive images• Meaningful images• Complex images

Page 31: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Pure decoration

WRONG SOLUTION

<img> withoutalt attribute

BEST SOLUTION

CSS

SOLUTION 1

alt=””

Page 32: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Icons

Share on Facebook

FULL LINK TEXT

Solutions• alt=”” • Preferably CSS background

image

MEANING DEPEND ON CONTEXTSolutions:• alt=”Follow us on Twitter”• CSS background image +

visually hidden ”Share on Twitter”

Page 33: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Supportive images

CORRECT SOLUTION

alt=”Woman sleeping on keyboard and books. Photo.”

EXAMPLE

WRONG SOLUTION

alt=”Illustration photo. Colourbox.”CSS background image

Page 34: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Meaningful images

CORRECT SOLUTION<figure> <figcaption>EEA registrations, the seven biggest countries, 2012 </figcaption> <img alt=”Poland 15 600, Lithuania 7 500, Romania 2 600, Germany 1 900, Latvia 1 900, Great Britain 1 700, Bulgaria 1 300.”></figure>

EXAMPLE

Page 35: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Complex images

CORRECT SOLUTION

alt=”Who´s suing who in telecom. Infographics. Text description follows after the image.”

EXAMPLE

Illustrasjon: David McCandless

WRONG SOLUTION

Very detailed description in alt or longdesc

Page 36: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

The only conclusive automated check:if the alt-attribute is present

Page 37: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

WCAG, robots and assessment

Page 38: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Automation ≈ WCAG• Within most error categories there

errors inside and outside WCAG• In all categories, the errors outside

WCAG had significantly lower identification rate

• On average almost three errors inside WCAG was identified for each error identified outside WCAG

Page 39: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Automation ≈ WCAG

Design

TechContent

Page 40: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Automation ≈ WCAG

Design

TechContent

Page 41: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Automation ≈ WCAG

Design

TechContent

Page 42: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Automation ≈ WCAG

Design

TechContent

Page 43: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Robots and JavaScript • Many robots only checks source

code • JavaScript can alter the HTML

code after loading the page

ERGO

Reports on errors removed by JavaScript

Doesn´t report on errors caused by JavaScript

Page 44: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

A lot of important stuff outside WCAG • Size of clickable areas• Understandable navigation• Menu structure• Search functionality• Reading support• Prefilled information• Typography• …

Page 45: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Manual assessment is growing• Post- og Telestyrelsen in Sweden• Difi in Norway• Meac in the European Union

Page 46: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Results

Page 47: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

• Clearly identifies a definite error

CONCLUSIVEPoints • Conclusive finding = 3 points• Potential finding = 2 points• Unclear finding = 1 point• Doesn´t check = 0 points• Misreports = -1 point

POTENTIAL• Identifies objects in need of

manual check

MISREPORTS• Doesn´t identify all error

instances• False positives

UNCLEAR• Poor descriptions• Identifies without stating

error

Page 48: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Top 3 Robots

TanaguruConclusive: 10Potential: 3Unclear: 3Doesn´t check: 22Fails: 0

TotalValidatorConclusive: 11Potential: 3Unclear: 3Doesn´t check: 20Fails: 1

AccessMonitorConclusive: 12Potential: 2Unclear: 1Doesn´t check: 21Fails: 2

Page 49: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Scores from 14 % to 41 %

Page 50: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

9 robots required to cover all 34 confirmed tests

Page 51: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Error types most frequently identified• Links without content• Headings without content• Alt attribute is not

present• Input elements without

correctly attached labels• Iframe without title

attribute

Page 52: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

BUT: several examples of inconsistent robot behaviour

Page 53: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Error type rarely identified• The need for input fields

when there are identical labels

• Suspected headings• External links without

indication• Identical alt text and

image text

Page 54: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Achecker and dnb.no

Page 55: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Some of the ignored errors• No top level heading• Missing label• Weak contrast• Only color to identify links• Poor tab sequence• Poor focus highlight• External links without indication

Page 56: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

So, how to use robots?

Page 57: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Create a proper foundation• Navigation concept• Zoom and responsive• Facilitate text structure• Colors and contrast• Typography• …• Evalutate manually!

Page 58: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Use robots to evaluate content• With a solid foundation,

editorial content will be the reason for errors

• Common editorial errors are use of headings, tables and alt texts

Page 59: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Use the strengths• SiteImprove does a pretty good job

on headings• AccessMonitor and Web-me is

doing quite well on tables• eAccessibility is the best for forms• WAVE is good on images

TIP

Usability is key to make use of the robot

Page 60: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.
Page 61: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.
Page 62: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.
Page 63: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Summary• Automation should primarily be used to

locate editorial errors• Existing robots does not exploit the

possibilities of automation• Manual check is needed to cover WCAG• A lot of important stuff outside WCAG

which is hardly covered by any robot

Page 64: Automatic vs manual testing Torbjørn Helland Solhaug torbjorn.helland.solhaug@funka.com @solhell.

Everything we recommend is tested