ukstar 2017 london- parasoft

37
Testing anything, any time with containerized service virtualization Leveraging on-demand virtual test environments for earlier, better and faster testing 27-28 February 2017 LONDON Rix Groenboom Parasoft

Upload: chantalwauters

Post on 20-Mar-2017

57 views

Category:

Software


0 download

TRANSCRIPT

Test ing anyth ing, any t ime wi th conta iner ized serv ice v i r tua l izat ion Leveraging on-demand virtual test environments for earlier, better and faster testing

27-28 February 2017 LONDON

Rix Groenboom Parasoft

Paraso&  Proprietary  and  Confiden1al 2

Who  has  an  applica1on  like  calculator  ?

Paraso&  Proprietary  and  Confiden1al 3

Who  has  a  process  like  this  ?  

Paraso&  Proprietary  and  Confiden1al 4

Agenda

§ Modern  (mes  and  need  for  Virtualiza(on  § Virtualiza(on  per  phase  

§ Development  §  Test  § Acceptance  § Pre-­‐produc(on  

§ Requirements  &  implementa(on  §  Func(onality  (Dev)  § Deployment  (Ops)  

§ Wrap  up  

Paraso&  Proprietary  and  Confiden1al 5

Agenda

§ Modern  (mes  and  need  for  Virtualiza(on  § Virtualiza(on  per  phase  

§ Development  §  Test  § Acceptance  § Pre-­‐produc(on  

§ Requirements  &  implementa(on  §  Func(onality  (Dev)  § Deployment  (Ops)  

§ Wrap  up  

Paraso&  Proprietary  and  Confiden1al 6

Once  upon  a  1me  …

Business  Logic  

Data  

Client  A   Client  B  q  Large  applica(ons  q  Few  Development  teams  q  Few  Test  teams  q  Few  Opera(ons  team  q  Few  releases  q  Few  Dependencies  q  Life  was  easy  …  but  slow  

Batch  processes  

Paraso&  Proprietary  and  Confiden1al 7

Modern  1mes

Data  NoSQL  

A  API  

B  API  

C  API  

M  SVC  

N  SVC   P  

SVC  

O  SVC  

X  BA  

Z  BA  

Y  BA  

Data  RDBMS  

Data  Prop  

Third  Party  SVC  

HTTP  

TIBCO  

HTTP   TIBCO  

HTTP  

MQ  

MQ  

PROP  

SOAP  

SOAP  

JSON  

JSON  

SOAP  

PROP  

PROP  

PROP  

Paraso&  Proprietary  and  Confiden1al 8

Components:  Dev  -­‐>  Tst  -­‐>  Acc  -­‐>  Prod

Data  NoSQL  

A  API  

B  API  

C  API  

M  SVC  

N  SVC   P  

SVC  

O  SVC  

X  BA  

Z  BA  

Y  BA  

Data  RDBMS  

Data  Prop  

Third  Party  SVC  

HTTP  

TIBCO  

HTTP   TIBCO  

HTTP  

MQ  

MQ  

PROP  

SOAP  

SOAP  

JSON  

JSON  

SOAP  

PROP  

PROP  

PROP  

D  

T  

A  

P  

D  

T  

A  

P  

D  

T  

A  

P  

D  

T  

A  

P  

D  

T  

A  

P  

D  

T  

A  

P  

D  

T  

A  

P  

D  

T  

A  

P  

D  

T  

A  

P  

D  

T  

A  

P  

Paraso&  Proprietary  and  Confiden1al 9

DevOps  teams

§ Many    teams  § Independent  § Different  cycle  speed    §  Test  oVen  §  Test  early  §  Test  automa(cally    

“Modern  (mes”  

Paraso&  Proprietary  and  Confiden1al 10

Decoupling  by  virtualiza1on

§ Prevent  teams  slowing  down  by  other  teams  § Prevent  skipping  tests  in  early  stages  § Extend  test  cases  

§  Depends  on  stage  in  release  cycle  §  Various  performance  profiles  §  Various  deployment  types  §  Various  transports  (protocols)  §  Various  payloads  (messages-­‐types)    

Paraso&  Proprietary  and  Confiden1al 11

Agenda

§ Modern  (mes  and  need  for  Virtualiza(on  § Virtualiza(on  per  phase  

§ Development  §  Test  § Acceptance  § Pre-­‐produc(on  

§ Requirements  &  implementa(on  §  Func(onality  (Dev)  § Deployment  (Ops)  

§ Wrap  up  

Paraso&  Proprietary  and  Confiden1al 12

Development

Data  NoSQL  

A  API  

B  API  

C  API  

M  SVC  

N  SVC   P  

SVC  

O  SVC  

X  BA  

Z  BA  

Y  BA  

Data  RDBMS  

Data  Prop  

Third  Party  SVC  

HTTP  

TIBCO  

HTTP   TIBCO  

HTTP  

MQ  

MQ  

PROP  

SOAP  

SOAP  

JSON  

JSON  

SOAP  

PROP  

PROP  

PROP  

D  

T  

A  

P  

Paraso&  Proprietary  and  Confiden1al 13

Development

Data  NoSQL  

A  API  

B  API  

C  API  

M  SVC  

N  SVC   P  

SVC  

O  SVC  

X  BA  

Z  BA  

Y  BA  

Data  RDBMS  

Data  Prop  

Third  Party  SVC  

HTTP  

TIBCO  

HTTP   TIBCO  

HTTP  

MQ  

MQ  

PROP  

SOAP  

SOAP  

JSON  

JSON  

SOAP  

PROP  

PROP  

PROP  

D  

T  

A  

P  

Virtualize  N,O  

Paraso&  Proprietary  and  Confiden1al 14

Development

B  API  

HTTP  D  

T  

A  

P  

Virtualize  N,O  

§ Virtualize  on  local  machine  

§ Unit  test  § Func(onal  tests  § Fully  decoupled  § Fully  independent  

Paraso&  Proprietary  and  Confiden1al 15

Test

Data  NoSQL  

A  API  

B  API  

M  SVC  

N  SVC   P  

SVC  

O  SVC  

X  BA  

Z  BA  

Y  BA  

Data  RDBMS  

Data  Prop  

Third  Party  SVC  

HTTP  

TIBCO  

HTTP   TIBCO  

HTTP  

MQ  

MQ  

PROP  

SOAP  

SOAP  

JSON  

JSON  

SOAP  

PROP  

PROP  

PROP  

D  

T  

A  

P  C  API  

Paraso&  Proprietary  and  Confiden1al 16

Test

Data  NoSQL  

A  API  

B  API  

M  SVC  

N  SVC   P  

SVC  

O  SVC  

X  BA  

Z  BA  

Y  BA  

Data  RDBMS  

Data  Prop  

Third  Party  SVC  

HTTP  

TIBCO  

HTTP   TIBCO  

HTTP  

MQ  

MQ  

PROP  

SOAP  

SOAP  

JSON  

JSON  

SOAP  

PROP  

PROP  

PROP  

D  

T  

A  

P  C  API  

Virtualize  P,X,Y,Z,  

Third  Party  

Paraso&  Proprietary  and  Confiden1al 17

Test

Data  NoSQL  

B  API   N  

SVC  

O  SVC  

Y  BA  

TIBCO  

HTTP   TIBCO  

MQ  

PROP  

SOAP  SOAP  

JSON  

PROP  

PROP  

PROP  

D  

T  

A  

P  

Virtualize  P,X,Y,Z,  

Third  Party  

CD  pipeline  

Test  

Paraso&  Proprietary  and  Confiden1al 18

Test

§ Choose  “cut-­‐off”  § Deploy  AUT  § Deploy  Neigbours  § Virtualize    

§ On  Server  § Configured  environment  §  Supports  custom  transport  §  Supports  custom  payload  

§ Func(onal  tests  § Environment  choice  

§  Test  chain  

Data  NoSQL  

B  API   N  

SVC  

O  SVC  

Y  BA  

TIBCO  

HTTP   TIBCO  

MQ  

PROP  

SOAP  SOAP  

JSON  

PROP  

PROP  

PROP  

D  T  

A  P  

Virtualize  P,X,Y,Z,  

Third  Party  

Test  

Paraso&  Proprietary  and  Confiden1al 19

Acceptance

§ Focus  on  non-­‐func(onal  requirements  § Component  central  

§ DevOps  team  responsibility  § Capacity  § Stability  § Performance  § Resilience  

Paraso&  Proprietary  and  Confiden1al 20

Acceptance

Data  NoSQL  

A  API  

B  API  

C  API  

M  SVC  

N  SVC   P  

SVC  

O  SVC  

X  BA  

Z  BA  

Y  BA  

Data  RDBMS  

Data  Prop  

Third  Party  SVC  

HTTP  

TIBCO  

HTTP   TIBCO  

HTTP  

MQ  

MQ  

PROP  

SOAP  

SOAP  

JSON  

JSON  

SOAP  

PROP  

PROP  

PROP  

D  

T  

A  

P  

Paraso&  Proprietary  and  Confiden1al 21

Acceptance

Data  NoSQL  

A  API  

B  API  

C  API  

M  SVC  

N  SVC   P  

SVC  

O  SVC  

X  BA  

Z  BA  

Y  BA  

Data  RDBMS  

Data  Prop  

Third  Party  SVC  

HTTP  

TIBCO  

HTTP   TIBCO  

HTTP  

MQ  

MQ  

PROP  

SOAP  

SOAP  

JSON  

JSON  

SOAP  

PROP  

PROP  

PROP  

D  

T  

A  

P  

Virtualize  N,O  

Test  data  

Paraso&  Proprietary  and  Confiden1al 22

Acceptance

B  API  

TIBCO  

HTTP  SOAP  

JSON  

D  

T  

A  

P  

Virtualize  N,O  

CD  pipeline  

Test  Test  data  

§ Reconfigure  §  Slow  response  § No  response  

§ Virtualize  § Reconfigurable  § Performant  §  Stable  § Representa(ve  data  set  

Paraso&  Proprietary  and  Confiden1al 23

Pre-­‐produc1on

§ Does  not  fit  in  pure  DevOps  § However,  oVen  (s(ll)  mandatory  § AKA  “staging”  § Produc(on  like  as  possible  

§ Sizing  § Configura(on  § Data  

§ “Tomorrows  produc(on”  

Paraso&  Proprietary  and  Confiden1al 24

Pre-­‐produc1on

Data  NoSQL  

A  API  

B  API  

C  API  

M  SVC  

N  SVC   P  

SVC  

O  SVC  

X  BA  

Z  BA  

Y  BA  

Data  RDBMS  

Data  Prop  

Third  Party  SVC  

HTTP  

TIBCO  

HTTP   TIBCO  

HTTP  

MQ  

MQ  

PROP  

SOAP  

SOAP  

JSON  

JSON  

SOAP  

PROP  

PROP  

PROP  

P’  

P  

P  

P  

P  

P  

P  

P   P  

P:  Produc-on  version  P’:  New  version  

P  

Paraso&  Proprietary  and  Confiden1al 25

Pre-­‐produc1on

Data  NoSQL  

A  API  

B  API  

C  API  

M  SVC  

N  SVC   P  

SVC  

O  SVC  

X  BA  

Y  BA  

Data  RDBMS  

Data  Prop  

HTTP  

TIBCO  

HTTP   TIBCO  

HTTP  

MQ  

MQ  

PROP  

SOAP  

SOAP  

JSON  

JSON  

SOAP  

PROP  

PROP  

PROP  

P’  

P  

P  

P  

P  

P  

P   P  

P:  Produc-on  version  P’:  New  version  

Virtualize  Z,  

Third  Party  

Test  

Test  

Test  

P  

Paraso&  Proprietary  and  Confiden1al 26

Agenda

§ Modern  (mes  and  need  for  Virtualiza(on  § Virtualiza(on  per  phase  

§ Development  §  Test  § Acceptance  § Pre-­‐produc(on  

§ Requirements  &  implementa(on  §  Func(onality  (Dev)  § Deployment  (Ops)  

§ Wrap  up  

Paraso&  Proprietary  and  Confiden1al 27

Requirements  gathering  (1)

Based  on  these  user-­‐stories:    § Local  and  Server  deployment  § Mul(ple  Transport  protocols  § Mul(ple  Message  payloads  § Flexible  Data-­‐set  configura(on    § Run-­‐(me  deployment  § Run-­‐(me  data  provisioning  

Let’s  make  a  “Separa(on  of  concerns”  

Paraso&  Proprietary  and  Confiden1al 28

Requirements  gathering  (2)

DEV  (building  Virtualiza(ons):  § Message  responders:    XML,  JSON,  EDI,  SWIFT,  Text…  § Logic:        Synchronous,  Async,  Stateful,  “batch”    § Data:        File,  CSV,  SQL,  NoSQL    OPS  (running  Virtualiza(ons):  § Protocol  listeners:    HTTP,  JMS,  MQ  TCP/IP,  File,  …    § Deployments:      Endpoints,  Queues,  JNDI  § Performance  profiles:    Delay,  Time  Out,  Errors  

§  Some  part  of  the  Logic  (func(onality)  §  Some  part  of  the  Deployment  (transport)  

Paraso&  Proprietary  and  Confiden1al 29

Deployment  strategies  (OPS)

Two  main  deployment  strategies:  § Central:  Client  /  Server  model  

§ Repository  containing  Implementa(ons  (PVA-­‐files)  § Environment  Manager  to  control  provisioning  § Op(onal  Load  Balancing  with  mul(ple  servers  

§ De-­‐central:  Container  or  Cloud  model  § API  driven  launch  of  local  servers    § GIT  based  deployment  of  Implementa(on  (PVA  files)  

 

Towards  Infrastructure  as  code:  Completely  scripted  construc(on    

Paraso&  Proprietary  and  Confiden1al 30

Central  Deployment  (client  /  server)

Virtualize SME

Environment Manager

Stage/Test Server

Production Server(s) Failover Server(s)

Desktop

Application Under Test

Paraso&  Proprietary  and  Confiden1al 31

De-­‐central  Deployment  (container  based)

Paraso&  Environment  Manager

Paraso&  Proprietary  and  Confiden1al 32

Towards  scripted  deployment

§ Infrastructure  as  code  (IaC):  § Docker  &  Java  &  Tomcat  § Set  protocol  jars  &  Deploy  Virtualize  (war)  

§ Sta(c  implementa(on:  § Deploy  PVAs  (model)  from  GIT  § Provision  test-­‐data  from  a  Data  Repository  

§ Dynamic  implementa(on:    § Build  PVA  files  on  the  fly  (using  API)  § Example:  

§ Given  “customer  with  2  credit  cards”  § When  “dele7ng  one  card”  §  Then  “one  card  should  be  le;”  

Paraso&  Proprietary  and  Confiden1al 33

Towards  scripted  deployment

B  API  

TIBCO  

HTTP  SOAP  

JSON  

D  

T  

A  

P  

Virtualize  N,O  

(deployment  descrip(on)  

CD  pipeline  

Test  

Logic&Data  N,O  

§ Pipeline:  § Deploy  SUT  (eg  B  API)  § Deploy  Virtualize  (docker)  § Ini(alize  N,O  placeholders  

§ Test-­‐execu(on:  § Populate  N,  O  (“Given”)  § Execute  (“when/then”)  § (and  repeat)  

Paraso&  Proprietary  and  Confiden1al 34

Deployment  summary § Central  server  and  central  deployment:  

§  “Waterfall”:  Central  “test  data  team”    

§ Central  server  and  de-­‐central  deployment:  §  “Agile”:  teams  have  control  over  Virtual  Assets  

§ De-­‐central  Server  and  central  deployment  §  For  3rd  party  interfaces  /  complex  backends  §  “Cer(fica(on  environment”  

§ De-­‐central  server  and  de-­‐central  deployment  §  “DevOps”:  Deploy  Virtual  Assets  as  part  of  pipeline  §  Sta(c:  “library  of  PVA’s”  and  provisioning      §  Dynamic:  “on  the  fly  crea(on”  (given-­‐when-­‐then)  

Paraso&  Proprietary  and  Confiden1al 35

Agenda

§ Modern  (mes  and  need  for  Virtualiza(on  § Virtualiza(on  per  phase  

§ Development  §  Test  § Acceptance  § Pre-­‐produc(on  

§ Requirements  &  implementa(on  §  Func(onality  (Dev)  § Deployment  (Ops)  

§ Wrap  up  

Paraso&  Proprietary  and  Confiden1al 36

Wrap  up

§ Virtualiza(on  decouples  your  components  § Decoupling  oils  the  DevOps  /  CD  pipeline  § Virtualiza(on  requires:  

§ Various  deployment  models:  Local,  Server,  Docker,  Cloud  § Ready  to  use  transports  and  payloads  § Extensibility  where  needed  § Dynamic  reconfigurable  (provisioning)  § Scalable  to  use  in  performance  test  § Integra(on  in  CD  pipeline  (APIs)  

§ Like  a  Parrot  /  Turing  Test:    

Paraso&  Proprietary  and  Confiden1al 37

Q  &  A