paris qa meetup #6 kevin roulleau

31
Zenly

Upload: kevinroulleau

Post on 15-Apr-2017

120 views

Category:

Internet


0 download

TRANSCRIPT

Page 1: Paris QA Meetup #6 Kevin Roulleau

Zenly

Page 2: Paris QA Meetup #6 Kevin Roulleau

Testing analytics

Page 3: Paris QA Meetup #6 Kevin Roulleau

Let’s start with a bit of context

Webedia Mobile department, 30 ppl, provides native apps for all the brands (Allociné, JeuxVideo, 750g, Purepeople ..)

Each app uses several analytics SDK (GA, Loca, Krux) and advertisement SDK (SmartAddServer, Yahoo, Facebook, Mopub ..)

Apps are rather big in terms of number of screens and features

Page 4: Paris QA Meetup #6 Kevin Roulleau

Analytics implementation is causing pain and time loss for many people

Estimated 7d on dev side150 * 2 * 2 = 600 tags to implement and verifyAbout 20-25% of tests were marked as fail on 1st verification

This means following impact on ressources1.5 man-days implementing buggy code3 man-days spent detecting errors2 to 3 man-days to fix and verify

Google Analytics full implementation for one of the major apps

Page 5: Paris QA Meetup #6 Kevin Roulleau

Furthermore, product managers do not trust their analytics and often ask for investigations

Product managers do not have ways to verify analytics implementation in the appWhen data looks bad or inconsistent, they ask QA / Project managers / Devs to investigatePast fails made them not fully trustworthy of the data

Page 6: Paris QA Meetup #6 Kevin Roulleau

To tackle this problem, we developed a new tool « analytics fwd »

Page 7: Paris QA Meetup #6 Kevin Roulleau

We chose this solution because it simply does a much better job than the previous ones

Back Office Proxy Analytics FWD

+ Easily accessible to project & product managers

+ Good precision. You see exactly what’s being sent or not

+ Easily accessible to everyone + Good precision

+ No delay + Clear, easy to understand display

+ Opens up a test automation opportunity

- Very inaccurate. You do some actions in the app and hope to see them appear in

the BO. It can take up to 24h.

- Setup hard, fastidious and error prone - We don’t know when the SDK will send

the data. There is often a delay - 5 to 10 clics required to extract the data - Data is hard to read, especially for non

tech people

- Only available on dev builds- Uses code that we don’t ship

- Doesn’t offer a guarantee that data really ends up in the BO

Page 8: Paris QA Meetup #6 Kevin Roulleau

More importantly it copes with the two main aspects of this problem

Human aspect Technical aspect

Project and product managers do not have the time and skills to go deep and read logs in the console, or intercept in a proxy

We don’t have control over the various analytics providers and don’t have easy ways to stream back the data from a set of specific devices

Page 9: Paris QA Meetup #6 Kevin Roulleau

And opens up a great automation opportunity

Page 10: Paris QA Meetup #6 Kevin Roulleau

Implementation

Page 11: Paris QA Meetup #6 Kevin Roulleau

Stack

Techno: nodejsFrameworks & libs

expresssocket.ioreact

Other toolsnpmapidocPM2 / keymetrics

Page 12: Paris QA Meetup #6 Kevin Roulleau

Coupling express.js & socket.ioapp.js bin/www

Page 13: Paris QA Meetup #6 Kevin Roulleau

Express.js - Routes

Page 14: Paris QA Meetup #6 Kevin Roulleau

Express.js - Routes - Middlewares

Page 15: Paris QA Meetup #6 Kevin Roulleau

Front end

Serving files is easily done in express

Page 16: Paris QA Meetup #6 Kevin Roulleau

Front end Structure

Page 17: Paris QA Meetup #6 Kevin Roulleau

Front end Structure

Page 18: Paris QA Meetup #6 Kevin Roulleau

Front end Structure

Page 19: Paris QA Meetup #6 Kevin Roulleau

Front end Structure

Page 20: Paris QA Meetup #6 Kevin Roulleau

Front end

index.html

Page 21: Paris QA Meetup #6 Kevin Roulleau

Front end

main.jsx

Page 22: Paris QA Meetup #6 Kevin Roulleau

Front end

main.jsx

Page 23: Paris QA Meetup #6 Kevin Roulleau

Front end

css: FlexBox

Page 24: Paris QA Meetup #6 Kevin Roulleau

Tools - Apidoc Doc generated from comments in code

Page 25: Paris QA Meetup #6 Kevin Roulleau

Tools - Apidoc Doc generated from comments in code

Page 26: Paris QA Meetup #6 Kevin Roulleau

Tools - NPM scripts

Page 27: Paris QA Meetup #6 Kevin Roulleau

PM2 / keymetrics

Deploy in prod with 1 command line: « pm2 deploy prod »Full monitoring dashboard with keymetricsCustom probes to enhance monitoring

Page 28: Paris QA Meetup #6 Kevin Roulleau

PM2 / keymetricsecosystem.json

Deploy in prod with 1 command line: « pm2 deploy prod »Full monitoring dashboard with keymetricsCustom probes to enhance monitoring

Page 29: Paris QA Meetup #6 Kevin Roulleau

PM2 / keymetrics Deploy in prod with 1 command line: « pm2 deploy prod »Full monitoring dashboard with keymetricsCustom probes to enhance monitoring

Page 30: Paris QA Meetup #6 Kevin Roulleau

PM2 / keymetrics Deploy in prod with 1 command line: « pm2 deploy prod »Full monitoring dashboard with keymetricsCustom probes to enhance monitoring

Page 31: Paris QA Meetup #6 Kevin Roulleau

Thanks

Demo + questions