- Tapa blanda: 275 páginas
- Editor: Manning Publications; Edición: 1 (31 de diciembre de 2015)
- Idioma: Inglés
- ISBN-10: 1617292532
- ISBN-13: 978-1617292538
- Valoración media de los clientes: 1 opinión de cliente
- Clasificación en los más vendidos de Amazon: nº240.778 en Libros en idiomas extranjeros (Ver el Top 100 en Libros en idiomas extranjeros)
Compara Precios en Amazon
+ Envío GRATIS
Java Testing with Spock (Inglés) Tapa blanda – 31 dic 2015
|Nuevo desde||Usado desde|
"Vuelva a intentarlo"
Los clientes que compraron este producto también compraron
Descripción del producto
Reseña del editor
While Java has changed a lot recently, the tools and techniques most Java developers use to test code are starting to show their age. Spock is a modern testing framework that combines the features of JUnit, Mockito, and JBehave into a single powerful testing library. With Spock, developers can use Groovy to write more readable and concise tests, and built-in mocking means they no longer need an external framework. Spock enables seamless integration testing and, with the intuitive Geb library, users can even handle functional testing of web applications.
Java Testing with Spock shows how to use Spock for a wide range of testing use cases in Java. It starts with a quick overview of Spock, and works through writing unit tests using the Groovy language, and discusses the best practices for test design as readers explore the Spock framework. Along the way, readers will learn to write mocks, implement integration tests, use Spock's built-in BDD testing tools, and do functional web testing using Geb. Readers new to Groovy will appreciate the succinct language tutorial that'll give just enough Groovy to use Spock effectively.
Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.
Biografía del autor
Konstantinos Kapelonis is a software engineer with 10+ years of programming experience ranging from writing bare metal C for the PlayStation 3 to Scheme code that mimics human reasoning. He works daily with Java and has a soft spot for code quality and build pipelines.
No es necesario ningún dispositivo Kindle. Descárgate una de las apps de Kindle gratuitas para comenzar a leer libros Kindle en tu smartphone, tablet u ordenador.
Obtén la app gratuita:
Detalles del producto
Si eres el vendedor de este producto, ¿te gustaría sugerir ciertos cambios a través del servicio de atención al vendedor?
Opiniones de clientes
Principales opiniones de clientes
Ha surgido un problema al filtrar las opiniones justo en este momento. Vuelva a intentarlo en otro momento.
Es perfecto para desarrolladores que ya hicieran unit test con Java y quieran empezar a escribir tests con este framework ya que es 100% compatible con el ecosistema Java.
Opiniones de clientes más útiles en Amazon.com
Here's the great thing about Konstantinos Kapelonis' book Java Testing with Spock. He gives you a concise roadmap to start from ground zero and work your way up to enterprise level tests. Spock is actually a framework that is targeted for tests written in Groovy (if you want to learn more about the full power of this language, I highly recommend Groovy in Action, 2nd Edition). However, what if the term groovy only conjures up images of bad 70's clothes and disco music for you? Kapelonis gives you a crash course in the language that assumes you know Java. It's good enough for testing purposes, but you might also want to check out Making Java Groovy by Ken Kousen (that's three must of books when you include this one).
I've been reading this book as a part of Manning's MEAP program for about a year now, and my print book just showed up on Tuesday. This is the first book to be published on the Spock framework, but it is a very strong offering. The code examples by and large work, and I think that they strike the balance with having enough substance to translate to the real world without being overly long and complex. It takes a special talent to find this balance and produce a book that bridges the gap between theory and practice.
Here's what you need to do. Buy one copy of this for yourself and a second copy for your testers. I'm dead serious about this. This book will show you how to bring structure and elegance to your unit tests using a framework that is still powerful enough for QA testing. Right framework; right book. What are you waiting for?
What is Spock’s main advantage in test scenarios? “When things go wrong,” the author notes, “Spock gives as much detail as possible on the inner workings of the code at the time of the failure.”
Just mentioning Groovy may give heartburn to some hardcore Java developers who don’t want to learn it. But others find Groovy refreshingly efficient and the Gradle build tool easy to use. In any case, using Groovy (and Gradle) with this book is “optional,” the author emphasizes. As noted in Appendix A, “It’s perfectly possible to use Spock in your Java project without installing Groovy itself.” He shows how to use Spock with the Maven build tool first, before he explains how to use Spock with the Gradle build tool.
The book is divided into three major parts: (1) Foundations and brief tour of Spock; (2) Structuring Spock tests; and (3) Spock in the Enterprise. Two appendices deal with installing and using Spock, plus getting your IDE set up, and using the book’s example files.
This book is a comprehensive guide to learning how to do Java (and Groovy) testing with Spock and is generally well written and adequately illustrated. I chose the Groovy/Gradle approach, using the Eclipse IDE. I did run into some awkward moments trying to get Eclipse Mars.2 to play correctly. The Groovy-Gradle plug-in on the Eclipse Marketplace was for earlier versions of Eclipse, and so was the Spock plug-in. After some tinkering and reconfiguring, I was able to get things working together and do some Java and Groovy tests. But, when I have time, I intend to go back and try the Maven approach to see if it is easier to get running. In fairness to the author, it had been a while since I last used Eclipse. And I was working with a somewhat aging PC running Windows 10--not exactly a development powerhouse. Bottom line, I definitely recommend this book to anyone (except Java newcomers) who want to know more about how to put the Spock testing framework to good use.
(My thanks to Manning for providing a review copy.)
Differences between Spock and jUnit are nicely shown on, among others on listings. Author also fosters good practises about testing in general way. Even now I know seasoned developers who are not willing to write unit tests. Of course this is investment but it pays back in short time. Spock apart from legibility provides power of Groovy language. And this can be particularly useful, when we would like to mock or test with xml, json and so on. Cleanness of Spock test result eases debugging. Parametrised tests are extremely clear. The book shows it and much more. I enjoy style, topics. All this stuff you can mix with existing jUnit code base. I would recommend it to every who wants gain mentioned knowledge.