Utilities - OutSystems

Automated Tests for OutSystems Applications
How to easily create automated tests for any project
using Test Automator and Selenium IDE to ensure
quality and increase development speed.
Topics of Discussion
 Automated Tests in the Agile Process
 Selenium IDE
 Test Automator
 Tips And Tricks
 Wrap Up
©2006 OutSystems – All rights reserved
Automated Tests in the Agile Process
 Testing Jargon
–
–
–
–
Regression/Automated Tests
Unit Tests
Functional Tests (More coverage than Unit/ More refactoring proof)
Test First strategy (Not to be taken religiously)
 Testing coverage allows bolder refactorings
 Bugs don’t resurrect
 Tests should be cheap to build and cheap maintain
– Thus the importance of recorders/regressions
 It’s better to create dumb tests than no tests
©2006 OutSystems – All rights reserved
Automated Tests in the Agile Process
The Wrong and the Right way to fix bugs
Find Bug
Create
Automated Test
Fix Bug
Further
Development
©2006 OutSystems – All rights reserved
Selenium IDE
©2006 OutSystems – All rights reserved
Selenium IDE
http://www.openqa.org/selenium-ide/
 Selenium - JavaScript framework that allows functional
testing on HTML apps
 Selenium IDE – IDE to record, edit and play back
selenium tests (Firefox extension)
©2006 OutSystems – All rights reserved
Test Automator
©2006 OutSystems – All rights reserved
Test Automator
http://solutiontrial.outsystems.net/testautomator/
 Organizes Selenium Tests into Test Suites
 Run Tests Periodically
 Notifies developers when test results change
©2006 OutSystems – All rights reserved
Tips And Tricks I

Selenium commands
–
–
–
–
–
–
–
–
Open only works after interaction
Open needs to be tweaked when there is client-side indirection
Frames SelectWindow is not perfect, circumvent it
JavaScript Confirmations are ok’ed by default- AssertConfimation,
ChooseCancelOnNext
Assert stops, Verify continues
AssertTextNotPresent is Not Present but is a valid command
Try to take advantage of XPath to make better tests
<!-- HTML Comments can be used-->

Can be used as Firefox sidebar View->Sidebar->Selenium IDE

Selenium starts in record mode by default

Advanced syntax: http://release.openqa.org/selenium-core/nightly/reference.html
©2006 OutSystems – All rights reserved
Tips And Tricks II

Installing Test Automator on the server
– Firefox 1.5 is needed
– JRE 1.5 is needed
– Modify privileges for ASP.net in TestAutomator folder

Assume no session state or cookies

You can copy back test scripts into Selenium IDE source tab

Know the limits of testing – only web / no download, no upload, no ActiveX/flash

Set Up / TearDown Strategies (entry point with data cleanup)

Multi server strategies (remove explicit addresses/ good data cleanup or synch)
©2006 OutSystems – All rights reserved
Automated Tests in the Agile Process
1 easy rule of thumb
 You should only interact with the application you are creating in either
– Record Mode
or
– Playback Mode
 Never interact directly
– Speeds up development
– Scripts can be saved as tests
©2006 OutSystems – All rights reserved
Thank you!
©2006 OutSystems – All rights reserved