24
Unit Testing for User Interfaces Adam Davis - Senior Software Developer, RedEye @webmull

Unit testing for User Interfaces

  • Upload
    webmull

  • View
    143

  • Download
    1

Embed Size (px)

Citation preview

Unit Testing for User Interfaces

Adam Davis - Senior Software Developer, RedEye

@webmull

– softwaretestingtricks.com

“Unit tests are written from a programmer's perspective. They ensure that a particular

method of a class successfully performs a set of specific tasks. Each test confirms that a method

produces the expected output when given a known input.”

“Functional tests are written from a user's perspective. These tests confirm that the system

does what users are expecting it to..”

Selenium, Sikuli, Java Robot’s Class, Ghost Inspector

QUnit, Karma, Jasmine, QUnit, PhantomJS, CasperJS, Mocha, Protractor

Headless Browsers

PhantomJS - Webkit

SlimerJS - Gecko

TrifleJS - IE

PhantomJS

Low computational cost webkit browser

Ability to capture screen shots

Programmable with JavaScript

PhantomJS

It’s just a web browser

Webkit only

No testing framework out of the box

PhantomJS

Node.js

npm install phantomjs

CasperJSCasperJS is an open source navigation scripting &

testing utility for Phantom & SlimerJS

PhantomJS - RedEye

• Vanilla PS Install, Bespoke test harness setup with a view to using other tools like Karma / Jasmine in the future.

• We utilise multiple Phantom workers to process ‘test’ runs from Jenkins deploy, or manual tests be executed by devs, testers, PM. Jobs, and results are held in a database with a simple UI.

In Summary…

Any QuestionsThanks for Listening!