test automation for payment terminal applications€¦ · our test engineers can concentrate on...

44
Test Automation for Payment Terminal Applications Sari Salin-Tuomela Co-Speaker Jani Kytöaho.

Upload: others

Post on 22-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Test Automation for Payment

Terminal Applications

Sari Salin-Tuomela

Co-Speaker – Jani Kytöaho.

Page 2: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Test Automation for Payment Terminal Applications

Case: Robot

Page 3: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Agenda for our presentation

• Short Intro to speakers Sari and Jani, and Nets• Products• Challenges in test automation for the products• Approach• (First)and Second Robot Solution• Technical description of the Robot• Benefits• Video• Future• Questions?

Page 4: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Who We Are

• Sari is Head of QA in IT Merchant Services, based in Finland Helsinki office.

• Long history with testing-related functions; coding and testing, coding test tools, test management, team lead, test training, etc.

[email protected]

• Jani is DevOps Specialist in the POS team, based in Finland Helsinki office.

• Long history with embedded mobile sw development: System Specialist, Release Manager, Tech Lead and Team Lead.

[email protected]

Page 5: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

NETS - INTRODUCTION

Page 6: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

At Nets, we specialise in powering digital payments. We connect banks, businesses and consumers via an international network facilitating digital payments. Spanning across the Nordic region, we provide a broad range of card services, account services, and payment solutions for merchants.

Who we are

Page 7: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Our Full Nordic and Baltic Presence

Page 8: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Key services for customers

BANKING SECTORBANKS, BUSINESSES& PUBLIC SECTOR MERCHANTS

• Card schemes

• Direct debit schemes

• Electronic ID schemes

• E-invoice solutions

• Clearing services

• Card management services

• Acquirer services

• Back-end processing

• Issuer services

• BPO services

• Information services

• Digitisation services

• Mobile solutions

• Payment Terminal solutions

• Financial acquiring

• E- and m-commerce

• Prepaid and vouchers

IT Merchant Services

Page 9: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Testing Payment Terminal Applications

Page 10: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Payment Terminal CategoriesINTEGRATED MOBILE

INTEGRATEDCOUNTERTOPMOBILE UNATTENDED

iPP350(Communication

via ECR)

iWL250B(Bluetooth + ethernet)

iWL250G / 3G(GPRS or 3G)

iSMP(Bluetooth to mobile,

tablet or ECR)

iCT250E(Ethernet, standalone

or integrated)

PIN PAD iUP250

CONTACTLESS READER iUC180B

CARD READER iUR250

CONTACTLESS READER iUC150B

Spire Spg7(3G, GPRS)

Spire Spc5(LAN)

Page 11: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Payment Applications (PA)

• We have 300 000+ terminals on the market.

• We get the terminal HW and Operating System from the vendor and on top of these we build our own payment applications.

• We have currently 6 different payment applications on the market -the goal is to consolidate all these to only one payment application.

Page 12: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Challenges in PA Testing

• In addition to many types of terminal hardware there are also many different configurations of the payment terminal software.

• At one point we ended up with ~50 different configurations.

• We work in agile mode and need fast feedback on the product quality.

Page 13: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Challenges in PA Testing

• To automate testing of payment terminal software there is no commercial off-the-shelf software available.

• Security is top priority and we have no means to access the ”internals of the terminals”.

• We decided to try whether a physical robot simulating real users could solve our test automation challenge.• Proof of Concept.

Page 14: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Proof of Concept

• Relatively low-cost; do market research on available solutions• Open source sw• Able to run 24/7• Low-maintenance• Minimum human intervention• Easy-to-write tests• Start with simple functions like basic chip purchase• Vendor independent solution• Environment agnostic • Expandable (technically) and financially scalable (multiple Robots)

Page 15: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Challenges for the Robot

• How to handle different types and makes of terminals?

• How to press buttons on different terminal types?

• How to read the terminal display?

• How to verify (paper) receipts?

• How to feed the card to the TUT?• Chip card

• Contactless

• Magnetic stripe

• How to be able to use different test cards?

Page 16: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Our Approcah

• We looked into several alternatives, googled, contacted other companies, etc.

• Also looked at commercial solutions, from high-end industry robots to some payment terminal specific solutions.• Too expensive

• Were made to handle only one terminal

• Used proprietary software and didn’t fit into our ambition of using open source software

• Soon found ShapeOko 2.

Page 17: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

First Robot Solution

DIY - assembled Modified for testing

Page 18: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

First Robot Solution

• Ready at the end of 2015.

• ShapeOko 2 is a 3-axis open source CNC (Computerized Numerical Control) milling machine – DIY kit.

• Parts cost ~1500 eur.

• Cooperated with a Finnish company Eficode to build the Robot and the first version of the control library.

• Used for functional and non-functional testing.

• Can handle only chip cards.

Page 19: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Second Robot Solution

• Second Robot solution with ShapeOko 3 was ready last spring 2017.• Easier to assemble.

• Faster than first solution.

• More sophisticated card feeder and now also contactless arm included.

Page 20: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Benefits

• We can make the Robot execute the simplest tests. Our Test Engineers can concentrate on more creative and difficult scenarios.

• We can execute tests anytime, e.g. during the night and get results in the morning (from Jenkins).

• We can easily do long-period testing to see whether there are memory leaks or e.g. sw crashes.

• We improve test coverage, and overall quality.

Page 21: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Technical Description of the Robot

Page 22: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Brief Introduction of Robot Framework

• Default test automation framework in Nets

• Initially developed by Nokia Networks and is nowadays sponsored by Robot Framework Foundation

• Uses keyword-driven testing approach

• Can be extended by test libraries implemented either with Python or Java

• 0perating system and application independent

Page 23: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during
Page 24: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during
Page 25: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Problem 1: How to control the robot?

• Robot is controlled by sending serial data over USB port

• Most computers are able to do that

• Our selection was Raspberry Pi 3

Page 26: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Problem 2: How to move the robot?

• Robot is moved by sending commands with G-Code language

G01 F5000 X120.0 Y193.0 Z0.0

Movement type Speed X-coordinate Y-coordinate Z-coordinate

Page 27: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Problem 3: How to send coordinates?

• There are many software that can stream G-Code to the robot but none could be used with Robot Framework

• We wrote custom Robot Framework library to move the robot

Page 28: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Problem 4: How to make it easy?

• Button coordinates are predefined

• Testers don’t have to know how robot is moved. They should concentrate on writing test cases.

Page 29: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Problem 5: How to physically press buttons?

• Robot is originally made to cut materials like aluminum, wood or plastic

• We had to replace drill withfingerlike mechanism

• Best option was to design the finger by ourselves

Page 30: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

3D-designing and printing

• We studied 3D-modelling and printing and experimented different solutions for the finger

• After few iterations we had a solution that was robust and accurate

Page 31: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Problem 6: How to read terminal screen?

• We didn’t have any software interface to read terminal screen

• Only option was to use camera to capture screen image

• Requirements for camera• Fast

• High resolution (HD or better)

• API to control image capturing

• The best option was to use camera module for Raspberry Pi

Page 32: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Problem 7: How to detect text from the image?

• We use optical character recognition (OCR) to detect if captured image has any text on it

• Tesseract was best option to do the OCR• Open source engine with wide OS support

• Good API

• Supports a wide variety of languages

• Highly configurable and can be trained to detect also text with custom font

Page 33: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during
Page 34: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Problem 8: How to make it easier?

• Testers should not worry about image capturing, processing and OCR

Page 35: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Problem 9: How to insert cards?

• Robot electronics is a 3-axis motion control system • There was no way to add 4th axis and coordinate the motion with rest of the

system

• Chip card is inserted by using belt driven linear actuator

• Contactless card is tapped by using servo based solution

• Arduino Uno with motor shield is used to control motors used in above solutions

Page 36: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Chip CardInsertion

Page 37: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Contactless Card Insertion

Page 38: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Card Control Board

Page 39: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during
Page 40: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Robot VideoTest case: Chip - Purchase - Amount field displayed in PIN entry

Page 41: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Future Development

• Use of a card probe (from UL) to be able to change the card used in testing.

• Add magnetic stripe card probe (from UL).

• Tune the Robot to make it faster.

• Make OCR faster.

• To be able to handle touch screen.

• Unattended and Integrated terminals not in the near term scope.

• Preparing the Robot to be able to handle mobile acceptance (e.g. Dankort).

Page 42: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

References• GRBL Wiki: https://github.com/gnea/grbl/wiki

• G-Code: https://en.wikipedia.org/wiki/G-code

• ShapeOko3: https://www.shapeoko.com/wiki/index.php/Shapeoko_3

• Arduino: https://www.arduino.cc/en/Guide/Introduction

• Tesseract: https://github.com/tesseract-ocr/tesseract/wiki

• Raspberry Pi: https://www.raspberrypi.org/

• Sketchup: https://www.sketchup.com/

• Ultimaker: https://ultimaker.com/

• RFW CNC library: https://github.com/Eficode/robotframework-cnclibrary

Page 43: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during

Thank you!

Sari Salin-Tuomela&

Jani Kytöaho

Page 44: Test Automation for Payment Terminal Applications€¦ · Our Test Engineers can concentrate on more creative and difficult scenarios. •We can execute tests anytime, e.g. during