39
Intelligent Testing, Improvement and Assurance Slide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard [email protected] Twitter: @ paul_gerrard Web: gerrardconsulting.com

Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard [email protected]

Embed Size (px)

Citation preview

Page 1: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Intelligent Testing, Improvement and Assurance

Slide 1

Open Source Script Languages and UtilitiesWhat Every Tester Should Know

Paul [email protected]: @paul_gerrardWeb: gerrardconsulting.com

Page 2: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

“I’m a tester, not a techie”

Like saying,“I don’t know how a plane

works”OK if you’re a steward, but

not OK if you’re a professional pilot

Intelligent Testing, Improvement and Assurance

Slide 2

Page 3: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Your team are at a disadvantage if you

don’t have someone who ‘knows how to

code’Increasingly, employers are looking for testers with

programming skills

Intelligent Testing, Improvement and Assurance

Slide 3

Page 4: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Agenda

• My thesis:– You, or at least your team, need

scripting (and open source skills)

• The march of open source• How do I start?• Ten things scripting languages can do

for you

Intelligent Testing, Improvement and Assurance

Slide 4

Page 5: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Some Open Source Research

Courtesy of the Times23 October 2012

Page 6: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Intelligent Testing, Improvement and Assurance

Slide 6

Page 7: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Intelligent Testing, Improvement and Assurance

Slide 7

Page 8: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Open Source is on the march• Clearly, most IT management have

decided that OS is worth pursuing– Reduce or eliminate licensing costs– Take ownership of risk and support or

(preferred) hire professional services to take the burden

• Whichever route your organisation takes, it seems likely we’ll all be working much more with open source products.

Intelligent Testing, Improvement and Assurance

Slide 8

Page 9: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Most Script Languages areOpen Source

Free to download, all platforms, many books,

enthusiastic user communities

Page 10: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

What is a scripting language?• Mostly script languages have a unix/linux

heritage• But because they are open source, they

have ALL been ported to windows, Mac whatever

• Examples:– Python, Perl, PHP, (V)Basic (program)– Bash+others, Windows Cmd prompt, Powershell

• These are not scripting languages:– C, Java, C++, Visual C/Basic

Intelligent Testing, Improvement and Assurance

Slide 10

Page 11: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

“How do I get started with open

source”

Buy a RaspberyPI(Or tear off a DVD from a

Linux magazine and install on an old pc)

Intelligent Testing, Improvement and Assurance

Slide 11

Page 12: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

What is a Raspberry PI?

Intelligent Testing, Improvement and Assurance

Slide 12

Page 13: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

What it is really

• It’s a fully functional computer for $25• Not particularly fast, but all you need is:– A power supply (micro usb)– Connector to TV (poor) or HDMI to monitor– Network cable to your router– SDHC Card - 2Gb works >8Gb better – Keyboard and Mouse

• Case – cases can cost as much as the RPI

Intelligent Testing, Improvement and Assurance

Slide 13

Page 14: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Raspbian OS

• A cut down version of the Debian Linux distribution – the same source as Ubuntu

• Python is the installed language, but you can install any script language in just a few commands (with an internet connection)

• I’ve had the full technology stack for Business Story Manager running on a RPI– Mysql, Web2py, Postfix mail, 100+ DB tables,

170 web screens all on an 8Gb SDHC card– Total cost: £35

Intelligent Testing, Improvement and Assurance

Slide 14

Page 15: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

RaspberryPI in schools

Intelligent Testing, Improvement and Assurance

Slide 15

Page 16: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Manufacturers are shipping 4-5,000 Raspberry PIs per

DAY250,000+ shipped so far

Intelligent Testing, Improvement and Assurance

Slide 16

Page 17: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

But I want a ‘proper

PC/Workstation’

Intelligent Testing, Improvement and Assurance

Slide 17

Page 18: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Want a more powerful option?• No need for $$$ workstations – Linux

uses less than half the resources of Windows

• I buy most of my hardware off eBay nowadays

• A 2nd hand Dell Optiplex small form factor PC sells for £30-35

• I use one of these for all my applications development and a 5 year old server as a test environment (I could use a PI, but don’t).

Intelligent Testing, Improvement and Assurance

Slide 18

Page 19: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Intelligent Testing, Improvement and Assurance

Slide 19

My development PC is a model like this – it cost me £27.50 plus £10 postage in May 2012 – works a treat

Page 20: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

So, it’s easy to get started

What can I actually do with my scripting skills?

Intelligent Testing, Improvement and Assurance

Slide 20

Page 21: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Things a tester can do with a decent

scripting language

Only limited by your imagination

I have done all these (and still do some today)

Intelligent Testing, Improvement and Assurance

Slide 21

Page 22: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Extract text from flat files and

generate test data

Intelligent Testing, Improvement and Assurance

Slide 22

Page 23: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Generate test data combinations from

a table of seed datavalues

Intelligent Testing, Improvement and Assurance

Slide 23

Page 24: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Create an all-pairs table of test

combinations for configuration tests

Intelligent Testing, Improvement and Assurance

Slide 24

Page 25: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Compare the contents of files while masking

columns, rows and selected patterns

of dataIntelligent Testing, Improvement and

AssuranceSlide 25

Page 26: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Drive simple web transactions from the command line to load test data

Intelligent Testing, Improvement and Assurance

Slide 26

Page 27: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Create a test environment

monitoring utility that emails you when your web

servers are downIntelligent Testing, Improvement and

AssuranceSlide 27

Page 28: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Backup your test results files into an

archive

Intelligent Testing, Improvement and Assurance

Slide 28

Page 29: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Generate template test automation code from HTML(Robot, Selenium

etc.)

Intelligent Testing, Improvement and Assurance

Slide 29

Page 30: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Generate a basic HTML web page mockup directly

from story scenarios

Intelligent Testing, Improvement and Assurance

Slide 30

Page 31: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Generate unit test harness code from

your story scenarios

Intelligent Testing, Improvement and Assurance

Slide 31

Page 32: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Create graphical coverage maps from your test records records

Intelligent Testing, Improvement and Assurance

Slide 32

Page 33: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Analyse the text of your requirements

and test documents using a natural language

processorIntelligent Testing, Improvement and

AssuranceSlide 33

Page 34: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Generate a first cut glossary of terms

for your documentation and identify new terms

as they appearIntelligent Testing, Improvement and

AssuranceSlide 34

Page 35: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Create test reports in HTML from plain

text reports or tester notes (and

mail summaries to the team every

day)Intelligent Testing, Improvement and

AssuranceSlide 35

Page 36: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Post incident reports directly to a web based IR tool via the command

line

Intelligent Testing, Improvement and Assurance

Slide 36

Page 37: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

OK that was more than ten

But you get the ideaYou don’t need to be a super

coder to do most of these things.

Intelligent Testing, Improvement and Assurance

Slide 37

Page 38: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Close

Convinced yet?

Intelligent Testing, Improvement and Assurance

Slide 38

Page 39: Intelligent Testing, Improvement and AssuranceSlide 1 Open Source Script Languages and Utilities What Every Tester Should Know Paul Gerrard paul@gerrardconsulting.com

Discussion

• All sounds rosy - what’s stopping you?• Hardware not the issue?– Can’t add uncertified hardware to our network– Can’t install software to our systems

• Our people won’t write code• Our managers won’t let non-techies write

code (Catch 22?)• Developers won’t like it• If developers are legacy/proprietary – they are

in for a shock if they’re resistant/not ready.

Intelligent Testing, Improvement and Assurance

Slide 39