testing web services

39
Business ValueAchieved Tes$ng Web Services Steinn ‘Stan’ Jónsson QSI Tech Lunch September 19, 2013

Upload: steinn-arnar-jonsson

Post on 16-Nov-2014

591 views

Category:

Technology


0 download

DESCRIPTION

Slides from a talk I gave on Testing Web Services at QSI Tech Lunch on September 19, and will be repeating at the 2013 Columbus Code Camp.

TRANSCRIPT

Page 1: Testing Web Services

Business Value…Achieved

Tes$ng  Web  Services  Steinn  ‘Stan’  Jónsson  QSI  Tech  Lunch  September  19,  2013  

Page 2: Testing Web Services

Business Value…Achieved

whoami  

•  Senior  Consultant  at  Quick  Solu$ons  

Page 3: Testing Web Services

Business Value…Achieved

whoami  -­‐  cont.  

•  Agility  

   

Page 4: Testing Web Services

Business Value…Achieved

Agenda  

Page 5: Testing Web Services

Business Value…Achieved

Agenda  -­‐  cont.  

• Will  also  briefly  show  two  Chrome  plugins  

Advanced  REST  client  

ModHeader  

Page 6: Testing Web Services

Business Value…Achieved

SoapUI  

•  Open  source  cross-­‐plaSorm  func$onal  tes$ng  solu$on  – SOAP  – REST  – JDBC  – JMS  – HTML  

Page 7: Testing Web Services

Business Value…Achieved

What  do  I  use  SoapUI  for?  

Probing          Mocking    (not  like  that)  

Page 8: Testing Web Services

Business Value…Achieved

Demo  Time  

(Screenshots  of  some  of  what  I  walked  through)  

Page 9: Testing Web Services
Page 10: Testing Web Services
Page 11: Testing Web Services
Page 12: Testing Web Services
Page 13: Testing Web Services
Page 14: Testing Web Services
Page 15: Testing Web Services

Business Value…Achieved

What  do  I  probe  for?  

•  Can  I  get  to  the  web  service?  – No  access  issues  or  proprietory  security  protocol  

•  Does  the  input/output  XML/JSON  look  ok?  

•  Does  the  service  return  valid  respones?  •  Does  the  service  handle  errors  in  a  meaningful  way?  

Page 16: Testing Web Services

Business Value…Achieved

JMeter  

•  Open  source  applica$on  designed  to  load  test  func$onal  behavior  and  measure  performance  – Web  -­‐  HTTP,  HTTPS  – SOAP  – JDBC  – LDAP  – JMS  – Mail  -­‐  SMTP(S),  POP3(S)  and  IMAP(S)  – Na$ve  commands  or  shell  scripts  

Page 17: Testing Web Services

Business Value…Achieved

What  do  I  use  JMeter  for?  

Smoke  tes$ng   Load  tes$ng   Performance  tes$ng  

Page 18: Testing Web Services

Business Value…Achieved

Demo  Time  

(Screenshots  of  some  of  what  I  walked  through)  

Page 19: Testing Web Services
Page 20: Testing Web Services
Page 21: Testing Web Services
Page 22: Testing Web Services
Page 23: Testing Web Services
Page 24: Testing Web Services
Page 25: Testing Web Services
Page 26: Testing Web Services
Page 27: Testing Web Services
Page 28: Testing Web Services
Page 29: Testing Web Services

Business Value…Achieved

JMeter  -­‐  Tips  

• When  running  load  tests:  – Make  sure  to  allocate  sufficient  memory  to  JMeter  

– Log/display  only  errors  •  Trust,  but  verify  – Have  seen  JMeter  report  faster  response  $mes  than  measured  in  web  service  

Page 30: Testing Web Services

Business Value…Achieved

REST-assured  

•  Java  DSL  for  easy  tes$ng  of  REST  services  – POST,  GET,  PUT,  DELETE,  HEAD  – Easy  to  validate  and  verify  response  

Page 31: Testing Web Services

Business Value…Achieved

What  do  I  use  REST-assured  for?  

Web  Service  Acceptance  Tes$ng   Run  frequently  as  part  of  CI  

Page 32: Testing Web Services

Business Value…Achieved

Demo  Time  

(Screenshots  of  some  of  what  I  walked  through)  

Page 33: Testing Web Services
Page 34: Testing Web Services
Page 35: Testing Web Services
Page 36: Testing Web Services
Page 37: Testing Web Services

Business Value…Achieved

Test  Automa$on  

•  Good  – Tests  read  in  test  data  from  external  configura$on  

•  Beder  – Tests  search  for  test  data  in  db  before  run  

•  Best  – Tests  populate  db  before  run  &  clean  up  aferwards  

Page 38: Testing Web Services

Business Value…Achieved

Summary  

•  Looked  at  3  free  tools  for  Web  Service  tes$ng  •  Showed  how  they  can  cover  most  of  your  Web  Service  tes$ng  needs  

Page 39: Testing Web Services

Business Value…Achieved

Ques$ons?  

@sjonsson  www.sjonsson.com    sjonsson@quicksolu$ons.com  

Web  Service  Related  Blog  Posts:  www.sjonsson.com/search/label/web  services