Open Source and Free Tools
Workshop
Gerrard Consulting Limited
PO Box 347 Maidenhead Berkshire SL6 2GU UK Tel: +44 (0) 1628 639173 Fax: +44 (0) 1628 630398 Web: gerrardconsulting.com Assessment Training Mentoring 1 1 © Copyright 2010 Gerrard Consulting
Agenda
• An introduction to free/open source tools
– VMWare Player – Linux
– OpenOffice
– Some open source test tools – Playtime
• Discussion
Introductions
• Who are you?
• Who do you work for?
• Are you a 'techie' by background?
What I'm using today
Microsoft Windows 7 VMWare Player Ubuntu Linux v9.10 By the way, I wrote this presentation using Impress on this machine as I used the tools. Exported as a PDF and printed on Windows.VMWare Player
• A free to use utility used to run virtual
machines created in the VMWare format
• New machines can be created in, for
example VMWare workstation ($189)
• VMWare datacentre, management and cloud
products also available
• VMWare player is simple to use as I'll now
Virtual machines
• Grow your own if you want to
• Or download pre-built 'appliances'
– Mostly free and work 'out of the box' but need some configuration
– JEOS (just enough OS) + Apache + DB + Script
language and the application code pre-configured – LAMP (Linux, Apache, MySQL, Perl/Python/PHP etc) – Fee-based (e.g. JumpBox) – usually simpler to
configure, better documentation etc.
• But, if you are happy to learn a little Linux and configure yourself the world's your oyster
• Needless to say, you can create Windows or Mac, workstation or server virtual machines.
Now, show
the group
the desktop
Ubuntu desktop
• Uses the Gnome desktop interface (KDE is another example)
• Applications
• Usual 'start' menu with all apps and utilities • Places
• File system, home folder, network etc. • System
• Preferences – customisation of my desktop
The task bar Date/time panel Mail/Messaging button User/logoff/switch user shutdown/restart
Ubuntu desktop 2
• If you look along the bottom of the screen
• Show desktop/restore hidden windows
• Click to show the desktop or resore the windows
• Trash – the wastebasket
• Similar to Windows
• Workspace icons
• Windows can be moved to another workspace
Ubuntu is a distribution of
Linux
• Linux is a 'kernel' and a core set of utilities that run on Intel x86 and 64 bit architectures
• There are many Linux 'distributions' e.g.
• Ubuntu
• Red Hat
• OpenSUSE
• Dozens of others
• A distribution = kernel + selected utilities and apps and desktop configuration
• Where to get it? All Linux magazines (c. #5) have DVDs for or download from one of the distribution websites.
What comes with Linux?
• Set of OS drivers and utilities to manage disks, files, users, networking, software installation
• OpenOffice (usually) • Graphics (e.g. Gimp)
• Internet (Firefox, Evolution mail etc.)
• Selected programming tools (C, C++, Java, Perl, PHP, Python, Ruby... countless others)
• Infrastructure – Webservers (Apache), databases (MySQL)
• Music, video players
• Games We'll look closer at
OpenOffice (cf. Office 97-2000)
●Writer
●Calc
●Impress
●Draw
●Base
The terminal, command line or
shell
• The command line is usually accessed using the terminal utility and runs a 'shell'
• Comparable to command or DOS prompt in Windows
• A shell is a program that gives you command line access to the operating system
• Bash (Bourne again shell is most common)
• Commands are terse, unintuitive, very flexible, powerful and sometimes dangerous
Some shell commands
cd {dir} – change directory (same as DOS) ls – list files gedit filename – edit file using gedit GUI editor ifconfig – display network configuration cat filename – display file cat filename > more – page by page cat filename | sort > sorted.dat Output filename, sort it and store in sorted.dat cp file1 file2 – copy file1 to file2 rm file2 – delete file2Installation process
● Ubuntu uses a tool called apt (command
line) or Synaptic Package Manager (GUI)
● Software can be downloaded from the
Ubuntu servers
● Other sources can be defined
● Apt maintains a register of available and
installed software
● Need an internet connection or a source
Description of selected package Green indicated installed To install, search for packages, check them and click apply.
Edit a new file called hello.py (a Python script) By the way, an & means: release the terminal to me while you execute the command Run the script: python hello.py
Another Python program
● Try running primes.py
● Try and break the script – easy to do ;-) ● Try changing the script and re-running
Script languages – in general, script languages all work the same way:
● perl primes.pl ● php primes.php ● ruby primes.rb
● Note the file endings indicate the language
Local apache webserver uses /var/www as its home directory. Lests edit the home page index.html source code
Using open source applications
- requirements
● LAMP ● Linux ● Apache ● MySQL ● Perl/PHP/Python ● LAMP on Windows ● Windows● IIS (or Apache) ● MySQL
● Perl/PHP/Python
● Some variations e.g. alternative Dbs
● Installation process: download, copy and
Installing Bugzilla
● Installation sequence:
i. Have IIS or Apache up and running
ii.Have a local mail server running SMTP
iii.Download and install perl and required perl modules
iv.Install MySQL
v.Download Bugzilla, unzip into the web server directory
vi.Create Bugzilla database and user
vii.Configure webserver
viii.Run checksetup.pl in the root directory
ix.Edit localconfig file in root directory
Click on “log in” Username: [email protected]
Password:
NB: there is an unconfigured Postfix email server on your machine. Bugzilla uses email extensively but it is turned off in this installation. This is a completely uncustomised version of Bugzilla for you to experiment with. (There are few options set up). You are an administrator so you can completely reconfigure the installation.
Bugzilla - things to play with
● Custom fields: add your own fields to the
bug database
● Field values: add values to existing
codebooks and your custom fields
● Products: things to test!
● Mailserver and state-transitions: send
notifications to interested parties when bug status changes
Selenium – script capture and
editing
● Selenium started as a relatively simple
Firefox plug-in to do basic capture/replay (IDE)
● Now supports a host of script languages
(java, C#, perl, PHP, python, ruby et al.)
● Use Firefox and Selenium to capture
scripts and export into your preferred language
Selenium script playback
● Replay, or edit and replay with
● Selenium IDE
● Selenium Remote Control – multiple OS platforms and browsers ● Selenium Grid – replay on multiple machines – or an EC Cloud!
● Integrate with a Selenium Test Suite
● Integrated with popular test frameworks: Bromine, Junit,
Nunit, RSPec (Ruby), Test::Unit (Ruby), TestNG (Java), unittest (Python)
● February 2008: Google are committed to Selenium as their
Installing Selenium IDE
● Using Firefox:
● Download the IDE and install the plug-in ● Restart Firefox
The Grinder
● Java-based performance test tool
● Uses Python as its script language (java
implementation of python is jython)
● Has a script recording facility
● Simply replay using one load injector ● Large scale replay
● Users = threads x worker processes x machines
● Website: grinder.sourceforge.net makes an
The Grinder v LoadRunner (etc.)
● The Grinder is lightweight in comparison
● A “Programmers load tester” - it helps if you understand
HTTP and Python!
● Cf LR scripting and HTTP – no different
● Fast to install (it's java) and fast to record, configure and
replay tests
● Flexibility is only limited by your ability to program (a good
and bad thing)
● Can only generate load
● Can't drive workstations
● Can't monitor systems under test
We don't use Linux
● Everything we've looked at in this workshop runs on
Windows (and Macs too – but I haven't checked that)
● VMWare (and equivalent VM products) ● Perl, python, java, jython, php
● Apache, MySQL, Firefox
● Bugzilla, Selenium, Watir, The Grinder
● The heritage of nearly all this is Linux/Unix
● There are some installation and configuration quirks here
and there
● Text-based configuration files, not GUI ● Command line operation
What have you learnt about
using open source so far?
● What have you noticed about how to install
and use OS products?
● What skills do you think you need?
● If you can't call technical support, what do
you need to take ownership of?
● What compromises do you need to make?
● How do you find other tools that might help?
● How do you upgrade? Do you bother?
No support? Getting better...
● Companies offering paid support are emerging
● Hosting companies take on server based products
● Some offer setup/config, backup etc. ● Some offer support services (for a fee)
● Perhaps you need to invest a little more and give your
people more time to become expert
● Here's the trade-off
● Free software GREAT ↔ investment in skills HMMM? ● Is investing in skills a bad thing?
© 2010 Gerrard Consulting
Skills availability
● Skills are still thin on the ground
● Training will emerge as contractors and companies
exploit their skills and opportunities
● Skills in the marketplace will proliferate driven by cost
and the power of technically skilled testers
● Public training is becoming available
● Some enthusiasts offering free informal training to promote
their own skills and to 'spread the word'
● But, as time goes on, expect more professional, integrated
and expensive courses
● Most popular tools initially (mainly dev-oriented), but the
Poor documentation?
● Getting better all the time, but much of it
is written by programmers – for programmers
● The test tools seem to be better than the
developer tools in this respect
● Tools like Watir, Selenium, The Grinder
have working examples
Getting into open source
● Most contributors to the open source movement
are individuals
● Contractors or independent practitioners ● FTEs with the approval of their employer
● OS projects always need documentation
● Why not contribute?
● Your name/email is credited
● Users contact you directly - develop a valuable network ● Promote your own skills and use of the tool
Open Source and Free Tools
Workshop
Gerrard Consulting Limited
PO Box 347 Maidenhead Berkshire SL6 2GU UK Tel: +44 (0) 1628 639173 Fax: +44 (0) 1628 630398 Web: gerrardconsulting.com Assessment Training Mentoring 46 46 © Copyright 2010 Gerrard Consulting