Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
Fabulous tests on
Spock and Groovy
Yaroslav Pernerovskyy
2017
Yaroslav Pernerovskyy
2005 – Celenia
2010 – Luxoft
2013 – GlobalLogic
Skype: celenia_ype
Pains
UI Automation Hell
Inverted Test Pyramid
People Shortage
Needs
Fast and stable tests
Build the Pyramid
Manual Testers involvement
CI integration and reporting
Java infrastructure
Research
SoapUI/MavenPlugin
Java/RestAssured/JUnit
Groovy/RESTClient/Spock
Solution
Groovy
JVM compatible
Dynamically typed language
Powerful Strings
JSON/XML parsing
Informative Assertions
Syntactic sugar
Spock Framework
Testing
Framework
BDD
Specification
Mocking
Framework
RESTclient
def client = new RESTClient('http://path')
RESTclient
client.get()
RESTclient
client.post(
headers:[cookie: "cookie"],
contentType: JSON,
body: "{value:15, result:false}",
query: [id:15])
RESTclient
return HttpResponseDecorator
Framework?
Test Case Layer (Spock Specification)
Actions Library Test Data Providers
Requests Library Helpers/Utilities
HTTP Client
S...
Show me the Code
Conclusions
Simple
Informative
Powerful
Code https://github.com/ysparrow/groovy-test-for-rest
Video https://youtu.be/5elqH5UNwkk
Groovy http://groovy-lang.org/doc...
Fabulous Tests on Spock and Groovy
Fabulous Tests on Spock and Groovy
Nächste SlideShare
Wird geladen in …5
×

Fabulous Tests on Spock and Groovy

682 Aufrufe

Veröffentlicht am

Yaroslav Pernerovskyy. REST API testing example on Groovy and Spock. Created for Selenium Camp 2017.

Code here: https://github.com/ysparrow/groovy-test-for-rest

Veröffentlicht in: Technologie
  • Als Erste(r) kommentieren

  • Gehören Sie zu den Ersten, denen das gefällt!

Fabulous Tests on Spock and Groovy

  1. 1. Fabulous tests on Spock and Groovy Yaroslav Pernerovskyy 2017
  2. 2. Yaroslav Pernerovskyy 2005 – Celenia 2010 – Luxoft 2013 – GlobalLogic Skype: celenia_ype
  3. 3. Pains
  4. 4. UI Automation Hell Inverted Test Pyramid People Shortage
  5. 5. Needs
  6. 6. Fast and stable tests Build the Pyramid Manual Testers involvement CI integration and reporting Java infrastructure
  7. 7. Research
  8. 8. SoapUI/MavenPlugin Java/RestAssured/JUnit Groovy/RESTClient/Spock
  9. 9. Solution
  10. 10. Groovy JVM compatible Dynamically typed language Powerful Strings JSON/XML parsing Informative Assertions Syntactic sugar
  11. 11. Spock Framework Testing Framework BDD Specification Mocking Framework
  12. 12. RESTclient def client = new RESTClient('http://path')
  13. 13. RESTclient client.get()
  14. 14. RESTclient client.post( headers:[cookie: "cookie"], contentType: JSON, body: "{value:15, result:false}", query: [id:15])
  15. 15. RESTclient return HttpResponseDecorator
  16. 16. Framework?
  17. 17. Test Case Layer (Spock Specification) Actions Library Test Data Providers Requests Library Helpers/Utilities HTTP Client System Under Test
  18. 18. Show me the Code
  19. 19. Conclusions
  20. 20. Simple Informative Powerful
  21. 21. Code https://github.com/ysparrow/groovy-test-for-rest Video https://youtu.be/5elqH5UNwkk Groovy http://groovy-lang.org/documentation.html Spock http://spockframework.org/spock/docs/1.1-rc-2/all_in_one.html RESTClient https://github.com/jgritman/httpbuilder/wiki/RESTClient Allure http://allure.qatools.ru/ SoapUI https://www.soapui.org/downloads/soapui.html RESTfull http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm HTTP RFC https://tools.ietf.org/html/rfc2616#section-5 JSON HAL https://tools.ietf.org/id/draft-kelly-json-hal-03.txt Appendix

×