Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
C# Cookware
Manuel Pais
CukeUp! London
3rd Apr 2014
Agenda
Prelude
An Ancient World
Forget Physical Laws
Layered World
Parallel Worlds
Prelude
Test .NET Code with Specflow
Test .NET Code with Specflow
Drive aWindows App UsingWhite
Test .NET Code with Specflow
Drive aWindows App UsingWhite
TestWindows GUIs with AutoIt
An Ancient World
Not for everyone
For some many of us
this is more accurate…
Our context
Do desktop applications still make sense?
IF you have to integrate with low-level SDKs
And…
IF client app requires low latency
IF you have to integrate with low-level SDKs
And…
AND your stress tests look like this…
Forget Physical Laws
Test automation
with
physical devices ?!
Not great to maintain…
char[] start_scan()
char[] capture()
char[] scan_finger()
Plain Old Interfaces
byte[] start_scan();
byte[] start_scan();
Decoupled Development
x. Device Integration
y. Application Biometric Logic
Decoupled Development
x. Device Integration
y. Application Biometric Logic
Decoupled Development
x. Device Integration
y. Application Biometric Logic
byte[] start_scan();
byte[] start_scan();
byte[] start_scan();
byte[] start_scan();
Requires: Categorized Test Data
Supports: Randomization
Requires: Categorized Test Data
Supports: Randomization
byte[] start_scan();
Virtual Fingerprint Scanner
Given a complete Visa application
When I capture 4 valid fingerprints
Then application is sent for approval
Virtual Finger...
Given a complete Visa application
When I capture 4 valid fingerprints
Then application is sent for approval
Virtual Finger...
Given a complete Visa application
When I capture 4 valid fingerprints
Then application is sent for approval
Virtual Finger...
Given a complete Visa application
When I capture 4 valid fingerprints
Then application is sent for approval
Virtual Finger...
Given a complete Visa application
When I capture 4 valid fingerprints
Then application is sent for approval
Virtual Finger...
Given a traveler leaving the country
When 1 finger is missing
Then emigration supervisor is called
Virtual Fingerprint Sca...
Forget Physical Laws
Problem
Automate testing of applications using physical devices
Ingredients
• Common interface for si...
Layered World
Reusable core modules
but
Many customizations
and
Specific client requirements ?
Reusable core modules
but
Many customizations
and
Specific client requirements ?
Reusable core modules
but
Many customizations
and
Specific customer requirements ?
Plain Old Layers
Low level UI
automation
across all apps
Low level UI
automation
across all apps
Low level UI
automation
across all apps
Module
“object”
automation
Low level UI
automation
across all apps
Module
“object”
automation
Low level UI
automation
across all apps
Module
“object”
automation
Application
logic
automation
Low level UI
automation
across all apps
Module
“object”
automation
Application
logic
automation
Low level UI
automation
across all apps
Module
“object”
automation
Application
logic
automation
Application Driver DSL
Given a traveler entering the country
When I capture all biometric data
And no alarms are raised
Then travel is allowed
Ap...
Given a traveler entering the country
When I capture all biometric data
And no alarms are raised
Then travel is allowed
Ap...
Given a traveler entering the country
When I capture all biometric data
And no alarms are raised
Then travel is allowed
Ap...
Layered World
Problem
Automate testing of reusable client modules with project
customizations and specific requirements
In...
Parallel Worlds
Multiple
public-facing interfaces
GUI vs API
Multiple
public-facing interfaces
GUI vs API
OR
Multiple
execution alternatives
GUI objects vs Keyboard shortcuts
Multiple
execution alternatives
GUI objects vs Keyboard shortcuts
Plain old
Dependency Injection
FingerprintsUI
FingerprintsUI
FingerprintsUI FingerprintsShortcuts …
IFingerprints
FingerprintsShortcuts
IFingerprints
Given a complete Visa application
When I capture 4 valid fingerprints
Then application...
FingerprintsShortcuts
IFingerprints
Given a complete Visa application
When I capture 4 valid fingerprints
Then application...
FingerprintsShortcuts
IFingerprints
Given a complete Visa application
When I capture 4 valid fingerprints
Then application...
FingerprintsShortcuts
IFingerprints
Given a complete Visa application
When I capture 4 valid fingerprints
Then application...
FingerprintsShortcuts
IFingerprints
Given a complete Visa application
When I capture 4 valid fingerprints
Then application...
Parallel Worlds
Problem
Automate testing of multiple interfaces/executions for same
scenario
Ingredients
• A single test i...
Image credits
Ancient world map: http://ancientworldmaps.blogspot.com.es/2010/06/world-map-17th-century_12.html
Fingerprin...
Thanks!
Francisco Cerrudo
Francisco Garcia
Javier Perez
José Cruz
Thank you!
Q & A
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
C# Cookware - presented at CukeUp! 2014
Upcoming SlideShare
Loading in …5
×

C# Cookware - presented at CukeUp! 2014

324 views

Published on

Recipes for BDD with C# and legacy environment (including hardware!)

Published in: Technology
  • Be the first to comment

C# Cookware - presented at CukeUp! 2014

  1. 1. C# Cookware Manuel Pais CukeUp! London 3rd Apr 2014
  2. 2. Agenda Prelude An Ancient World Forget Physical Laws Layered World Parallel Worlds
  3. 3. Prelude
  4. 4. Test .NET Code with Specflow
  5. 5. Test .NET Code with Specflow Drive aWindows App UsingWhite
  6. 6. Test .NET Code with Specflow Drive aWindows App UsingWhite TestWindows GUIs with AutoIt
  7. 7. An Ancient World
  8. 8. Not for everyone
  9. 9. For some many of us this is more accurate…
  10. 10. Our context
  11. 11. Do desktop applications still make sense?
  12. 12. IF you have to integrate with low-level SDKs And…
  13. 13. IF client app requires low latency IF you have to integrate with low-level SDKs And…
  14. 14. AND your stress tests look like this…
  15. 15. Forget Physical Laws
  16. 16. Test automation with physical devices ?!
  17. 17. Not great to maintain…
  18. 18. char[] start_scan() char[] capture() char[] scan_finger()
  19. 19. Plain Old Interfaces
  20. 20. byte[] start_scan();
  21. 21. byte[] start_scan();
  22. 22. Decoupled Development x. Device Integration y. Application Biometric Logic
  23. 23. Decoupled Development x. Device Integration y. Application Biometric Logic
  24. 24. Decoupled Development x. Device Integration y. Application Biometric Logic
  25. 25. byte[] start_scan();
  26. 26. byte[] start_scan();
  27. 27. byte[] start_scan();
  28. 28. byte[] start_scan();
  29. 29. Requires: Categorized Test Data Supports: Randomization
  30. 30. Requires: Categorized Test Data Supports: Randomization
  31. 31. byte[] start_scan();
  32. 32. Virtual Fingerprint Scanner
  33. 33. Given a complete Visa application When I capture 4 valid fingerprints Then application is sent for approval Virtual Fingerprint Scanner
  34. 34. Given a complete Visa application When I capture 4 valid fingerprints Then application is sent for approval Virtual Fingerprint Scanner
  35. 35. Given a complete Visa application When I capture 4 valid fingerprints Then application is sent for approval Virtual Fingerprint Scanner
  36. 36. Given a complete Visa application When I capture 4 valid fingerprints Then application is sent for approval Virtual Fingerprint Scanner
  37. 37. Given a complete Visa application When I capture 4 valid fingerprints Then application is sent for approval Virtual Fingerprint Scanner
  38. 38. Given a traveler leaving the country When 1 finger is missing Then emigration supervisor is called Virtual Fingerprint Scanner
  39. 39. Forget Physical Laws Problem Automate testing of applications using physical devices Ingredients • Common interface for similar devices • Virtual device implementation for that interface • Categorized test data repository • Test data sampler
  40. 40. Layered World
  41. 41. Reusable core modules but Many customizations and Specific client requirements ?
  42. 42. Reusable core modules but Many customizations and Specific client requirements ?
  43. 43. Reusable core modules but Many customizations and Specific customer requirements ?
  44. 44. Plain Old Layers
  45. 45. Low level UI automation across all apps
  46. 46. Low level UI automation across all apps
  47. 47. Low level UI automation across all apps Module “object” automation
  48. 48. Low level UI automation across all apps Module “object” automation
  49. 49. Low level UI automation across all apps Module “object” automation Application logic automation
  50. 50. Low level UI automation across all apps Module “object” automation Application logic automation
  51. 51. Low level UI automation across all apps Module “object” automation Application logic automation
  52. 52. Application Driver DSL
  53. 53. Given a traveler entering the country When I capture all biometric data And no alarms are raised Then travel is allowed Application Driver DSL
  54. 54. Given a traveler entering the country When I capture all biometric data And no alarms are raised Then travel is allowed Application Driver DSL
  55. 55. Given a traveler entering the country When I capture all biometric data And no alarms are raised Then travel is allowed Application Driver DSL
  56. 56. Layered World Problem Automate testing of reusable client modules with project customizations and specific requirements Ingredients • Specflow (Cucumber family) • White (GUI automation) • Layered test code: pure UI + module + application DSL
  57. 57. Parallel Worlds
  58. 58. Multiple public-facing interfaces GUI vs API
  59. 59. Multiple public-facing interfaces GUI vs API
  60. 60. OR
  61. 61. Multiple execution alternatives GUI objects vs Keyboard shortcuts
  62. 62. Multiple execution alternatives GUI objects vs Keyboard shortcuts
  63. 63. Plain old Dependency Injection
  64. 64. FingerprintsUI
  65. 65. FingerprintsUI
  66. 66. FingerprintsUI FingerprintsShortcuts … IFingerprints
  67. 67. FingerprintsShortcuts IFingerprints Given a complete Visa application When I capture 4 valid fingerprints Then application is sent for approval FingerprintsUI
  68. 68. FingerprintsShortcuts IFingerprints Given a complete Visa application When I capture 4 valid fingerprints Then application is sent for approval FingerprintsUI Fingerprint.IFingerprints = Fingerprint.FingerprintsUI
  69. 69. FingerprintsShortcuts IFingerprints Given a complete Visa application When I capture 4 valid fingerprints Then application is sent for approval FingerprintsUI Fingerprint.IFingerprints = Fingerprint.FingerprintsUI
  70. 70. FingerprintsShortcuts IFingerprints Given a complete Visa application When I capture 4 valid fingerprints Then application is sent for approval FingerprintsUI Fingerprint.IFingerprints = Fingerprint.FingerprintsShortcuts
  71. 71. FingerprintsShortcuts IFingerprints Given a complete Visa application When I capture 4 valid fingerprints Then application is sent for approval FingerprintsUI Fingerprint.IFingerprints = Fingerprint.FingerprintsShortcuts
  72. 72. Parallel Worlds Problem Automate testing of multiple interfaces/executions for same scenario Ingredients • A single test interface for the exposed functionality • Two or more implementations of that interface • (Basic) dependency injection mechanism
  73. 73. Image credits Ancient world map: http://ancientworldmaps.blogspot.com.es/2010/06/world-map-17th-century_12.html Fingerprint scanners: http://www.bayometric.com/lumidigm-venus-v302.html http://www.biometricsintegrated.com/passport-seva.html http://www.indiamart.com/bayometric-mumbai/fingerprint-scanners.html Signature pads: http://www.ez-tech.com.mx/store/STU-500-LCD-Signature-Tablet-Large-STU-500.html http://www.reusetek.com/topaz-t-lbk766se-bhsb-r-4x5-lcd-usb-signature-pad/ http://www.alphacard.com/siglite-signature-capture-terminal Document readers: http://www.access-is.com/ocr640-desktop-full-page-passport-id-reader.php http://www.access-is.com/ocr601_kiosk_desktop_airport_mrz_passport_reader.php http://www.assuretec.com/product/passport-readers Cameras: http://www.ephotozine.com/article/canon-eos-1100d-digital-slr-review-16085 http://www.lawyersandsettlements.com/blog/tag/webcam http://www.hdrphotographypro.org/best-tools/ A4 scanner: http://www.printerland.co.uk/Xerox-7600i-P13571.aspx Workstation: http://www.channelregister.co.uk/2011/04/12/hp_workstations/ Web technologies: http://www.smartechworldweb.com/smartech_web_technology.html Building blocks: http://www.getfilecloud.com/blog/2014/01/the-fundamental-building-blocks-of-cloud- computing/#.Uzf2RfmSySo Unfinished building: http://www.panoramio.com/photo/26507136 UK border control: http://www.theguardian.com/uk/2011/nov/08/border-control-row-targeted-checks Veridoc: http://www.marpless.co.za/Secure-Document.html Biometric enrolment: http://www.zimbio.com/pictures/JV59KukDbmF/Home+Office+Minister+Demonstrates+New+Biometr ic/tA8g2BhKmD9/Phil+Woolas Border control queue: http://www.dailymail.co.uk/travel/article-2133883/Passport-checks-cut-Olympic- official-complains-hour-delay-Heathrow.html Recipe template: http://www.vertex42.com/WordTemplates/recipe-card-template.html
  74. 74. Thanks! Francisco Cerrudo Francisco Garcia Javier Perez José Cruz
  75. 75. Thank you!
  76. 76. Q & A

×