Upgrade to Pro — share decks privately, control downloads, hide ads and more …

C# Cookware

C# Cookware

Applying recipes from the Cucumber Recipes book in a .Net environment. How to automate tests in the ancient world of desktop apps depending on cameras, fingerprint readers and other physical devices.

Presented at CukeUp! 2014 London.

Manuel Pais

April 03, 2014
Tweet

More Decks by Manuel Pais

Other Decks in Programming

Transcript

  1. Test .NET Code with Specflow Drive a Windows App Using

    White Test Windows GUIs with AutoIt
  2. IF client app requires low latency IF you have to

    integrate with low-level SDKs And…
  3. Given a complete Visa application When I capture 4 valid

    fingerprints Then application is sent for approval Virtual Fingerprint Scanner
  4. Given a complete Visa application When I capture 4 valid

    fingerprints Then application is sent for approval Virtual Fingerprint Scanner
  5. Given a complete Visa application When I capture 4 valid

    fingerprints Then application is sent for approval Virtual Fingerprint Scanner
  6. Given a complete Visa application When I capture 4 valid

    fingerprints Then application is sent for approval Virtual Fingerprint Scanner
  7. Given a complete Visa application When I capture 4 valid

    fingerprints Then application is sent for approval Virtual Fingerprint Scanner
  8. Given a traveler leaving the country When 1 finger is

    missing Then emigration supervisor is called Virtual Fingerprint Scanner
  9. 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
  10. Given a traveler entering the country When I capture all

    biometric data And no alarms are raised Then travel is allowed Application Driver DSL
  11. Given a traveler entering the country When I capture all

    biometric data And no alarms are raised Then travel is allowed Application Driver DSL
  12. Given a traveler entering the country When I capture all

    biometric data And no alarms are raised Then travel is allowed Application Driver DSL
  13. 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
  14. OR

  15. FingerprintsShortcuts IFingerprints Given a complete Visa application When I capture

    4 valid fingerprints Then application is sent for approval FingerprintsUI
  16. FingerprintsShortcuts IFingerprints Given a complete Visa application When I capture

    4 valid fingerprints Then application is sent for approval FingerprintsUI Fingerprint.IFingerprints = Fingerprint.FingerprintsUI
  17. FingerprintsShortcuts IFingerprints Given a complete Visa application When I capture

    4 valid fingerprints Then application is sent for approval FingerprintsUI Fingerprint.IFingerprints = Fingerprint.FingerprintsUI
  18. FingerprintsShortcuts IFingerprints Given a complete Visa application When I capture

    4 valid fingerprints Then application is sent for approval FingerprintsUI Fingerprint.IFingerprints = Fingerprint.FingerprintsShortcuts
  19. FingerprintsShortcuts IFingerprints Given a complete Visa application When I capture

    4 valid fingerprints Then application is sent for approval FingerprintsUI Fingerprint.IFingerprints = Fingerprint.FingerprintsShortcuts
  20. 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
  21. 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