gr dev day presentation, march 21 2015
TRANSCRIPT
Automating Myself Out of a JobTore Franzen
GR Dev Day
March 21, 2015
Real World Example
Why Automation?
*Warning: Graph not based on real data
Overview•Auto Code Generators
•Test Automation
•Continuous Integration/Deployment
•Automating Your Life
•Real World Cases
•Practical Advice
SCADESafety Critical Application Development Environment
C Code Generated from SCADE
Code OptimizationIt's just like compiler optimization!
Control Logic and State Machine Example
Control Logic and State Machine Example (If Block)
Control Logic and State Machine Example (State Machine)
Debugging with SCADE
Other SCADE Features• TCL API
• Simulation We don't need hardware to start prototyping and testing
• Model Coverage
• Design Verifier Prove that certain requirements are met
• Rapid Prototyper Wire IO to a GUI
UML To Code Generators
Winform Example
Template Tools
Whoa, Code Generators are Everywhere
Yes, They Are Everywhere•Win Forms/WPF (almost any drag and drop GUI creator)
•Entity Framework
•Matlab/Simulink
•Wolfram
• LabVIEW
•Template Processors
Pitfalls•Memory Management
•Less ControlNo OO in SCADE
Limited Interfaces
•Metrics
Continuous Integration/Deployment• Jenkins
• Team Foundation Server
• CruiseControl[.NET]
Testing Automation•Mock Frameworks
•VS UI Test Framework (Coded UI Test Project)
•Randoop Uses Fuzzing to generate unit tests
•PexCodeDigger
Pex/Code Digger
Testing with Specialized Hardware• Always try to find hardware that can do it for you (NI)
• Control Power
• If it doesn't exist, make it (or find someone who can)
• It is usually more expensive for someone to sit there flipping switches manually
Testing Remotely•Don't make your testers be next to the machine
•Don't make the tester hit more than one button
•Do allow time sharingOr write a program that does
•Do provide feedback
Other Automation Tools•Windows Task scheduler
•Batch File
•Visual Basic Script (VBS)
•Visual Basic for Applications (VBA)
•Windows Power Shell
•AutoIt
AutoIt
The Power of Automation
If This Then That (ifttt.com)
If This Then That (ifttt.com)
Tasker (Android App)
Yahoo Pipes
This is Why I Automate
Step By Step Guide
Enovia
What A Document Update Looks Like• Create a "Engineering Change Order" (ECO) Document
• Promote "Change Document" to "working"
• Create a Route/Signature loop
• Create an Engineering Order
• THEN the real work can begin
• Once finished, we kick off the Route
Where Do I Start?• Login
•Find the Document
•Change the view to "Change Management"
•Create and add the ECO
•And on and on and on....
Search and Select Document
Switch View in Document
Change Management View
Create Change Document
Selenium to the Rescue!Its not just for testing!
Selenium Setup
Low Level Functions
Low Level Functions
Navigating Frames
Turning Pages into Classes
Although Selenium Was Great, I Did Have Problems…
Things That Didn't Work So Well•Hovering
• IFrames (not Seleniums fault)
•Timeouts
•Personal reservations about using xpaths
This is How I Set it and....Forget it
WAS/IS Creation• Problem: Had to create a WAS/IS for every Problem Report (Change Request)
What to Do?•Open DOORS programmatically
•Run a DXL script to filter on PR and Print using WAS/IS view
•Upload PDF print out to PR System (MKS)
Open DOORS Programmatically
Print to PDF
Send to Change Request System
Practical Advice•Use the Right Tools for the Right Job
•New Languages
•OS Native
•Personal History
Practical Advice•Consider Configuration Debt
•100+ options
•Are you the only one that can run it?
•Without a batch/script file?
Practical Advice
•Embrace the CLI
•Customize
•Pass data using redirected pipes/IO, environment variables, shared memory or shared file
Practical Advice
•Don't go Shaving Yaks
•Keep the focus on what you're trying to automate
•Don't get lost in the forums
Practical Advice•Don't Ask for Permission, Just Do It
•Politics
•Share the wealth
Practical Advice•What to Look For...
•Someone connects the dots
•Something that has to be done on a recurring basis
•You find yourself saying "anyone can do this"
Bonus Productivity Tips• Shortcut (Hot Key) Frequently used items Ctrl + Alt + C => Calculator
Ctrl + Alt + S => Snipping Tool
Ctrl + Alt + I => Internet Explorer
• Get familiar with keyboard shortcuts within programs Visual Studio
Notepad++
Vim/Vi/Emacs
Microsoft Office Products
etc...
You Stay Lazy, Grand Rapids Programmers
Thank You•Questions?
•My NameTore Franzen
•Twitter@ToreFranzen
Further Reading•The Productive Programmer - Neal Ford
•The Pragmatic Programmer -Andrew Hunt & Dave Thomas
• Images retrieved from the following sources:
• http://www.engineersgotblued.com/wp-content/uploads/2014/03/rube-goldberg-machine-from-getty-images.jpg
• https://i.imgur.com/7j15tXU.jpg
• https://i.ytimg.com/vi/uqVqYFvzgoY/maxresdefault.jpg
• https://upload.wikimedia.org/wikipedia/commons/f/fa/Billy_Mays_Portrait_Cropped.jpg
• http://www.quickmeme.com/img/7a/7ac6c18b1bca53b88bbd8cd25a68a327396adce14cb999a7d7130cf76b07a4c6.jpg
• http://ockhamsbungalow.com/blog25/gnome.jpg
• http://thelistlove.com.gridhosted.co.uk/wp-content/uploads/2014/06/162.jpg
• http://www.seleniumhq.org/images/big-logo.png
• http://c3e308.medialib.glogster.com/media/4a/4a6332fa6761c5e093ffb54d036c69594d8d6e06e2c1890d857f23cc6f0e73f5/selenium-meds.jpg
• http://www.gameshowgarbage.com/Pictures/DAOTW/DAOTW%201-28-2012%20Pic%2013.png
• https://ionari.files.wordpress.com/2011/05/ionari365-0521.jpg?w=590&h=590
• https://s-media-cache-ak0.pinimg.com/236x/5b/d3/0e/5bd30e9ece87c56a7d263866ece0b3b2.jpg
• http://th05.deviantart.net/fs70/PRE/i/2011/186/2/2/bestest_friend_hugs_ftw_by_megbeth-d3l33q7.jpg
• https://xkcd.com/979/
• http://sonsonthepyre.com/wp-content/uploads/2014/01/Arnold-do-it-now.jpg
• http://selfdefense4newbies.com/wp-content/uploads/2014/08/WTF-binoculars.jpg
• https://i.imgur.com/FFmFzxJ.jpg
• http://www.coachoflove.com/wp-content/uploads/2013/05/ron-burgundy-2.jpg