Model-Based Testing @ Spotify. Kristian Karl



Similar documents
Agile Testing Overview

Mobile Test Automation Framework

Microsoft Modern ALM. Gilad Levy Baruch Frei

Sandesh Prasanna Kumar

Continuous Integration (CI) for Mobile Applications

Simple Mobile Application & Browser Testing

Increase Your Mobile Test Automation ROI

Introduction to Agile Software Development Process. Software Development Life Cycles

Automated Model Based Testing for an Web Applications

Web Application Testing. Web Performance Testing

Your Information Technology Partner. Company Overview. Copyright Mantra IS LLC. All rights reserved.

Scaling Spotify

Continuous Integration Processes and SCM To Support Test Automation

Introduction to Automated Testing

QEx Whitepaper. Automation Testing Pillar: Selenium. Naveen Saxena. AuthOr:

Model Based Testing (MBT) J u n e

Exploratory Testing An Agile Approach STC Aman Arora. Xebia IT Architects India Pvt. Ltd. Sec-30, Gurgaon , Haryana

ONLINE ACCOUNTABILITY FOR EVERY DEVICE. Quick Reference Guide V1.0

SPECIFICATION BY EXAMPLE. Gojko Adzic. How successful teams deliver the right software. MANNING Shelter Island

How do I start a meeting?

ZenQ Quality Assurance (QA) Process

Cross Platform Mobile. -Vinod Doshi

A Comprehensive Review of Web-based Automation Testing Tools

Faronics Products SYSTEM REQUIREMENTS Last modified: October 2014

D Test Strategy

Click below for details about which Operating Systems work with UMT Plus and UMT Audit :

Fast Feedback: Jenkins + Functional and Non-Functional Mobile App Testing Without Pulling Your Hair

About metrics and reporting in model-based robot assisted functional testing

Design Report: Resource Management Software CS400 Senior Design I

Testing in Scrum Projects

Hosted Desktop for Business

Viewpoint. Choosing the right automation tool and framework is critical to project success. - Harsh Bajaj, Technical Test Lead ECSIVS, Infosys

Conducting Virtual Meetings

Maintaining Quality in Agile Environment

Latest Trends in Testing. Ajay K Chhokra

Industrial Adoption of Automatically Extracted GUI Models for Testing

Access Your Cisco Smart Storage Remotely Via WebDAV

Hardware and Software Requirements. Release 7.5.x PowerSchool Student Information System

The Best Treatment For Your MedSpa

NetSupport Manager v11

The next step in test automation: computer-generated tests

Making the Right Choice

farmerswife Contents Hourline Display Lists 1.1 Server Application 1.2 Client Application farmerswife.com

Building Robust Applications l Optimizing Performance l Transforming Business

RTI Quick Start Guide for JBoss Operations Network Users

Platform Guide. SA Supported Platforms. Service Package Version 7.4R1

Agile Software Development. Stefan Balbo / Patrick Dolemieux

Basic Testing Concepts and Terminology

So#ware Development. Overview. Hans- Pe4er Halvorsen, M.Sc. h4p://home.hit.no/~hansha/?page=so#ware_development

Enterprise Solution for Remote Desktop Services System Administration Server Management Server Management (Continued)...

Test Automation Tool comparison HP UFT/QTP vs. Selenium - Prashant Malhotra

Platform Guide. SA Supported Platforms. Service Package Version 7.3R1

Simple. Smart. Powerful.

Computers, Smartphones & Tablets Sales:

Availability of the Program A free version is available of each (see individual programs for links).

How to Avoid an Attack - Security Testing as Part of Your Software Testing Process

Model based testing tools. Olli Pekka Puolitaival

White paper: Developing agile project task and team management practices

Agile QA Process. Anand Bagmar Version 1.

DESIGN OF AUTOMATION SCRIPTS EXECUTION APPLICATION FOR SELENIUM WEBDRIVER AND TestNG FRAMEWORK

Personal Cloud. Support Guide for Mobile Apple Devices

Back it up. Get it back. Simple.Secure.Affordable.

Load DynamiX Storage Performance Validation: Fundamental to your Change Management Process

More details >>> HERE <<<

RTI Quick Start Guide

Organising Massive Test bol.com. Jeroen Ruijgers and Viktor Clerc

COVERAGE You re going to have to edit your film later. How do you make sure you get enough footage for that to work?

Introduction. AppDynamics for Databases Version Page 1

The DIY Guide to Dazzling Data. It s never been easier to delight colleagues, dazzle bosses, and boost your value in the workplace.

a new generation software test automation framework - CIVIM

Additional information >>> HERE <<<

Collaborating for Quality in Agile Application Development From Beginning to End

SOFTWARE OUTSOURCING

Your guide to building great apps. Upgrade your skills and update your tools to create the next great app

Sisense. Product Highlights.

Testing. Chapter. A Fresh Graduate s Guide to Software Development Tools and Technologies. CHAPTER AUTHORS Michael Atmadja Zhang Shuai Richard

OpenLoad - Rapid Performance Optimization Tools & Techniques for CF Developers

Technology Services Group Procedures. IH Anywhere guide. 0 P a g e

How$Spotify$builds$products$

Exploratory Testing in an Agile Context

Telecommunications Mobility Options

Additional information >>> HERE <<<

KAIST SSL VPN USER MANUAL

Additional information >>> HERE <<< Get Learn About The Web :: articles on online marketing strategies

Introducing Databackup.com Cloud Backup. File Locker File Sharing & Collaboration EndGaurd EndPoint Protection & Device Management

Introduction. Installation of SE S AM E BARCODE virtual machine distribution. (Windows / Mac / Linux)

Mobile Application Testing

Software Testing in the Cloud. Tauhida Parveen, PhD

Transcription:

Model-Based Testing @ Spotify Kristian Karl

How we use Model-Based Testing for test automation at Spotify In the world of agile development cycle, it's ever more challenging for QA to cope with both new feature testing and regression testing. At Spotify, we try to automate as much of the regression tests a s possible. But test automation in itself is a challenging and daunting task. To say the least. The separation of test design from test code implementation using the concept of Model-Based Testing simplifies the QA process in an agile team. Other important factors: - Use developers as coders when automating. - Random walks through the state charts. - Dynamic and random test data, or test data on-demand. - Continuously test execution. - Very simple dashboards. How manual exploratory testing approaches can benefit from Model-Based test automation. What tools to use? There are some really good Open Source/Free tools out there.

QA or Test? @ Spotify we use the term QA, meaning Quality Assistance Dear Programmer, my job is to help you look good. My job is to support you as you create quality; to ease that burden instead of adding to it. In that spirit, I make the following commitments to you. o I provide a service. You are an important client of that service. I am not satisfied unless you are satisfied. o o o o o o o o o I am not the gatekeeper of quality. I don t own quality. Shipping a good product is a goal shared by all of us. I will test your code as soon as I can after you deliver it to me. I know that you need my test results quickly (especially for fixes and new features). I will strive to test in a way that allows you to be fully productive. I will not be a bottleneck. I ll make every reasonable effort to test, even if I have only partial information about the product. I will learn the product quickly, and make use of that knowledge to test more cleverly. I will test important things first, and try to find important problems. (I will also report things you might consider unimportant, just in case they turn out to be important after all, but I will spend less time on those.) I will strive to test in the interests of everyone whose opinions matter, including you, so that you can make better decisions about the product. I will write clear, concise, thoughtful, and respectful problem reports. (I may make suggestions about design, but I will never presume to be the designer.) I will let you know how I m testing, and invite your comments. And I will confer with you about little things you can do to make the product much easier to test. o I invite your special requests, such as if you need me to spot check something for you, help you document something, or run a special kind of test. o I will not carelessly waste your time. Or if I do, I will learn from that mistake. Sincerely, Tester (The above from James Bach: http://www.satisfice.com/blog/archives/652) Why "Quality Assistance"? http://www.developsense.com/blog/2010/05/testers-get-out-of-the-quality-assurance-business/

Why test automation is so important in the agile dev. cycle If QA does to much feature testing, we take the risk of not regression test already released features. If QA does to much regression testing, we may release untested and buggy new features. And time is precious! What if: The team could deliver automated regression tests, as a criteria of definition of done? Automated tests executed all of the time? More time for feature testing!

What do we test automate? Desktop - Windows - XP - Vista, x84, amd64-7, x84, amd64 - Mac OSX - 10.5, 10.6, 10.7

What do we test automate? Mobile - ios - ipad, iphone, ipod - Android - a lot of devices...

Model-Based Testing Separation of design and code MBT as DSL - Domain Specific Language QA uses MBT to design what to test Coders uses MBT as a spec and driver for the implemtation

Model-Based Testing State Diagrams Describes the expected bevaiour of the system under test, from the QA perspective. Classifications Trees Describes interesting inputs, classifies them, and generates test cases.

Model-Based Testing State Diagrams Used when the QA wants to describe: - flows of events - user stories Generates online (and offline) test sequences (walks) using different strategies: - random, A* or a combination of both - different stop conditions

public interface SimpleLogin { public void e_close(); public void e_exit(); public void e_init(); public void e_invalidcredentials(); public void e_logout(); public void e_startclient(); public void e_togglerememberme(); public void e_validpremiumcredentials(); public void v_clientnotrunning(); public void v_loginprompted(); public void v_whatsnew(); }

The tools when using State Charts yed - Graph editor - License: Free - http://www.yworks.com/en/products_yed_about.html GraphWalker - Generating offline and online test sequences - License: Open source - http://graphwalker.org/ Sikuli - Visual technology to automate and test GUI using images - License: Open source - http://sikuli.org/ Java, TestNG and Python - Implementing the test automation

Model-Based Testing Classifications Trees Used when the QA wants to describe: - combinatorial type of tests Reduces the number of test cases - All-pairs, pairwise or twowise (even three-wise!) Generates the test cases

The tools when using Classification Trees CTL XL - Classification tree editor and test case generator - License: Free - http://www.berner-mattner.com/en/berner-mattnerhome/products/cte/index.html Sikuli - Visual technology to automate and test GUI using images - License: Open source - http://sikuli.org/ Java, TestNG and Python - Implementing the test automation

Random test data on-demand Housekeeping test data is often a waste of time. Also, rolling back databases, and put a SUT to a predefined state is challenging. Instead, a Test Data Service supplies the tests with data when required. Test data is specified by properties or traits, and sometimes locked for other tests. For example: The Test: I m running on test environment XYZ. I need a premium user with an account from Finland, which is not connected to Facebook. The Test data Service: I found 34 matches, and returns by random one of those. The data is locked for other tests until the caller is done (or a time out has occurred)

The tools for the Test data Service Apache Tomcat - Servlet container - License: Open source - http://tomcat.apache.org/ MySQL - Relational database - License: Open source - http://www.mysql.com/ Java and Python

Continuous test execution We run all tests continuously. The GUI tests takes too long to execute. Nobody wants to wait hours for the results in a build server. Therefore our tests run separately and independently from our build server. Spin-off effects using random walks and test data Since we use random walks when generating sequences through the models, and using random on-demand test data, we: verify the features and functionalities every time, but we do it a bit differently each time. Thus creating a wider test coverage of the SUT.

The tools when running continuous test execution Jenkins - Building/testing software projects continuously - License: Open source - http://jenkins-ci.org/ VirtualBox - Virtualization software package - License: Open source - https://www.virtualbox.org/ GraphWalker - Generating online test sequences - License: Open source - http://graphwalker.org/ TestNG - Testing framework - License: Open source - http://testng.org/doc/index.html

Test results - Dashboards Running tests continuously creates a lot of test results. Most of those results are only interesting for the test automator. For all others, very simple dashboards are used. 1 dashboard per team. OSX 10.5.7 OSX 10.6.2 XP Vista 32 Vista 64 Win 7, 32 Win 7, 64 Ubuntu 12.04 Album Login Player Radio Search Playlist

The tools for our test results and dashboard Apache2 - Web server - License: Open source - http://tomcat.apache.org/ MySQL - Relational database - License: Open source - http://www.mysql.com/ Java and Python

Interesting observations Developers, QA and test automators sitting together (as strongly encouraged by SCRUM), will help and aid each other. As a spin-off, the developers has made our clients more testable. A test interface is being actively developed that more effectively helps test automation to verify different states. Developers loves getting their stuff tested around the clock!

Interesting observations Using visual models that depict the actual design of the tests, facilitates the communication within the team. It s an awesome discussion platform between QA and test automators. Also, the models can be used for manual testing, as charts or maps, when QA manually explores the features, as a part of the Testing Playbook* * http://sqa.stackexchange.com/questions/1594/what-goes-in-a-testing-playbook

Interesting observations The simple dashboards, exposes in an efficient way, not only to the team how the SUT is doing, but also to management and stakeholders. Dashboards alone does not tell the whole story. That needs to be communicated time after time. Test automation is not a replacement for manual testing, but becoming a necessity.

Interesting observations Why licenses matters for tools The choice of tools, and the licenses they have, are important. Running GUI tests are slow. So executing in parallel on a lot of machines can be one solution. But, be sure that they scale economy wise.

Kristian Karl, krikar@spotify.com