23
www.cfunited.com Automate Like a Automate Like a Rock Star! Rock Star! Marc Esher MXUnit.org (You can download this presentation from MXUnit.org after the show)

Automate Like a Rock Star!

Embed Size (px)

DESCRIPTION

Automate Like a Rock Star!. Marc Esher MXUnit.org (You can download this presentation from MXUnit.org after the show). What this presentation is “ About ”. http://www.swervepictures.com/pics/monkey2.jpg. Are you in the right room ?. - PowerPoint PPT Presentation

Citation preview

Page 1: Automate Like a Rock Star!

www.cfunited.com

Automate Like a Automate Like a Rock Star!Rock Star!

Automate Like a Automate Like a Rock Star!Rock Star!

Marc EsherMXUnit.org

(You can download this presentation from MXUnit.org

after the show)

Page 2: Automate Like a Rock Star!

2www.cfunited.com

What this presentation What this presentation is “is “AboutAbout””

Page 3: Automate Like a Rock Star!

3www.cfunited.com http://www.swervepictures.com/pics/monkey2.jpg

Page 4: Automate Like a Rock Star!

4www.cfunited.com

Are you in the Are you in the right roomright room??

Page 5: Automate Like a Rock Star!

5www.cfunited.com

Given a choice between spending an hour doing a task manually, or spending three hours writing a program to do it automatically... a geek will write the program, every single timeevery single time. And, if not given the choice, if explicitly ordered to do the job manually, we'll disobey and write the program anyway.

--Catherine Devlinhttp://catherinedevlin.blogspot.com/2009/06/how-to-tell-geek.html

Page 6: Automate Like a Rock Star!

6www.cfunited.com

But…But… Why?Why?

We’ll get to that later…

Page 7: Automate Like a Rock Star!

7www.cfunited.com 7www.cfunited.com

PersonalPersonal Productivity ProductivityPersonalPersonal Productivity Productivity

Page 8: Automate Like a Rock Star!

8www.cfunited.com

BatchBatch Files FilesBatchBatch Files Files

Page 9: Automate Like a Rock Star!

9www.cfunited.com

In Windows, these end with “.bat”

They make calls to system commands and other executables

They save time by reducing keystrokes and mouse clicks and by combining multiple commands into a single ‘action’

NET START "Macromedia JRun CFusion Server"NET START "Macromedia JRun Admin Server"

Page 10: Automate Like a Rock Star!

10www.cfunited.com

KeyboardKeyboard Launchers LaunchersKeyboardKeyboard Launchers Launchers

Page 11: Automate Like a Rock Star!

11www.cfunited.com

Keyboard launchers can start programs, bat files, etc

Advanced launchers can simulate mouseclicks and keystrokes

They save time by eliminating mouseclicks and significantly reducing keystrokes

Page 12: Automate Like a Rock Star!

1212www.cfunited.com

This thing is This thing is

killing youkilling you

Page 13: Automate Like a Rock Star!

13www.cfunited.com

CodeCode Snippets SnippetsCodeCode Snippets Snippets

Page 14: Automate Like a Rock Star!

14www.cfunited.com

Most IDEs have a “snippet” or “macro” feature

Pre-recorded snippets of commonly used code

Often can ‘invoke’ with a key sequence

Save time by reducing keystrokes, avoiding mistakes, and contending with ‘the memory problem’

If you type it more than once, put it in a snippet

Page 15: Automate Like a Rock Star!

15www.cfunited.com 15www.cfunited.com

SystemsSystems Automation AutomationSystemsSystems Automation Automation

Page 16: Automate Like a Rock Star!

16www.cfunited.com

Apache ANTApache ANT(for moving, copying, zipping, starting, stopping, svn-ing, (for moving, copying, zipping, starting, stopping, svn-ing,

and lots of other -ings)and lots of other -ings)

Apache ANTApache ANT(for moving, copying, zipping, starting, stopping, svn-ing, (for moving, copying, zipping, starting, stopping, svn-ing,

and lots of other -ings)and lots of other -ings)

Page 17: Automate Like a Rock Star!

17www.cfunited.com

Extremely powerful application for completely automating your build and deployment process

Also very useful for routine file system and system command task automation

You can execute ANT from the command line and bat files, which means you can schedule tasks easily

Limited only by your imagination

Page 18: Automate Like a Rock Star!

18www.cfunited.com

Apache JMeterApache JMeter (for pounding on web pages)(for pounding on web pages)

Apache JMeterApache JMeter (for pounding on web pages)(for pounding on web pages)

Page 19: Automate Like a Rock Star!

19www.cfunited.com

Start it with a bat file

Create Test Plans with “Thread Groups”. These are http requests

Control number of concurrent users and how many times they run

Full-fledged load-testing application, but extremely useful as a simple tool for pounding on things

Perfect for those situations where you wish you had 100 of you to click links

Page 20: Automate Like a Rock Star!

20www.cfunited.com 20www.cfunited.com

Again…Again… Why?Why?

Page 21: Automate Like a Rock Star!

21www.cfunited.com 21www.cfunited.com

Thanks!Thanks!

Marc Esher

@marcesher on Twitter

http://www.mxunit.org

Test Be Happy

Page 22: Automate Like a Rock Star!

22www.cfunited.com 22www.cfunited.com

ResourcesResourcesResourcesResourcesIn the Download of this presentation, you’ll find examples where appropriate.

These are additional links:

Batch Files:

Google it for a gazillion hits, but here are two useful ones:

http://www.computerhope.com/msdos.htm

http://support.microsoft.com/kb/173529

Launchy:

http://www.launchy.net/

http://blog.mxunit.org/search/label/launchy

Other Key Launchers: http://www.autohotkey.com/,

FARR (http://www.donationcoder.com/Software/Mouser/findrun/index.html)

Snippets:

http://blog.mxunit.org/2009/04/timesavers-cfeclipse-snippets.html

http://blog.mxunit.org/2008/08/mxunit-102-now-available.html

Page 23: Automate Like a Rock Star!

23www.cfunited.com 23www.cfunited.com

ResourcesResourcesResourcesResourcesANT

http://ant.apache.org/

http://mxunit.org/doc/zip/DDT218_Automating%20the%20build-deploy%20process%20with%20ANT.zip (a zip file with lots of ANT example files)

http://www.thecrumb.com/wiki/ant

http://www.carehart.org/ugtv/list.cfm?search=ant

http://www.alagad.com/blog/post.cfm/ant4cf-released-andndash-run-build-files-remotely-and-interact-with-coldfusion-services-from-ant-scripts

JMeter

http://jakarta.apache.org/jmeter/

http://alagad.com/blog/post.cfm/site-testing-with-apache-s-jakarta-jmeter

http://alagad.com/blog/post.cfm/apache-s-jmeter-part-ii-recording-a-test-script-with-the-proxy-component

General

http://productiveprogrammer.com/wiki/index.php/Main_Page