Next Generation Java Testing: TestNG and Advanced Concepts

  Author:    Cédric Beust, Hani Suleiman
  ISBN:    0321503104
  Sales Rank:    257743
  Published:    2007-10-12
  Publisher:    Addison-Wesley Professional
  # Pages:    512
  Binding:    Paperback
  Avg. Rating:    4.0 based on 7 reviews
  Used Offers:    9 from $35.70
  Amazon Price:    $41.17
  (Data above last updated:  2008-11-29 05:25:25 EST)
  
  
Sort customer reviews by:
  
Show All Reviews on Page      Hide All Reviews on Page
   
  
Next Generation Java Testing: TestNG and Advanced Concepts
  

Enterprise Java developers must achieve broader, deeper test coverage, going beyond unit testing to implement functional and integration testing with systematic acceptance. Next Generation Java Testing introduces breakthrough Java testing techniques and TestNG, a powerful open source Java testing platform.

Cédric Beust, TestNG's creator, and leading Java developer Hani Suleiman, present powerful, flexible testing patterns that will work with virtually any testing tool, framework, or language. They show how to leverage key Java platform improvements designed to facilitate effective testing, such as dependency injection and mock objects. They also thoroughly introduce TestNG, demonstrating how it overcomes the limitations of older frameworks and enables new techniques, making it far easier to test today's complex software systems.

Pragmatic and results-focused, Next Generation Java Testing will help Java developers build more robust code for today's mission-critical environments.

This book

  • Illuminates the tradeoffs associated with testing, so you can make better decisions about what and how to test
  • Introduces TestNG, explains its goals and features, and shows how to apply them in real-world environments
  • Shows how to integrate TestNG with your existing code, development frameworks, and software libraries
  • Demonstrates how to test crucial code features, such as encapsulation, state sharing, scopes, and thread safety
  • Shows how to test application elements, including JavaEE APIs, databases, Web pages, and XML files
  • Presents advanced techniques: testing partial failures, factories, dependent testing, remote invocation, cluster-based test farms, and more
  • Walks through installing and using TestNG plug-ins for Eclipse, and IDEA
  • Contains extensive code examples

Whether you use TestNG, JUnit, or another testing framework, the testing design patterns presented in this book will show you how to improve your tests by giving you concrete advice on how to make your code and your design more testable.

                  Reader Reviews 1 - 7 of 7                 
  
  
Review
Date
Review
Rating(5 High)
Review
Helpful
to:
Customer Review Reviewer
Info
Permanent
Link
Reader Reviews Below Sorted by Newest First
09-30-08 3 3\3
(Hide Review...)  Pragmatic Java Testing: TestNG and Author's Rants
Reviewer Permalink
This book does a great job of introducing TestNG, showing how to use its features to set up tests for code that (inevitably) depends on various JEE APIs, and how to perform different kinds of testing (browser, database, performance etc).

There are some claims that I found hard to follow: For example, the authors advise against using mock objects to stub out external classes, then later state that servlets are hard to test outside of a container because they depend on a few external classes -- never mind that these are simple to mock out, and that the Spring testing library (which they mention elsewhere) even provides mock implementations for these classes. There are also some minor factual errors that should have been caught in the reviewing process (e.g. contrary to what is claimed, annotations can be inherited).

Then there is the "Digressions" chapter, which, as others have pointed out, should have been posted as a series of blog posts. Instead, there are some areas where more detail could have been provided. e.g. on how groups work in TestNG, or the exact semantics of the parallel test execution options. Now that TestNG has been out for a while and gained a lot of popularity, I'm sure there is also a lot more information on common problems that could be included in a future 2nd edition!
(Review Data Last Updated: 2008-11-30 06:26:31 EST)
08-10-08 3 1\3
(Hide Review...)  so when am I going to learn testng?
Reviewer Permalink
This book is not really about testng. it's more about the author's opinions about testing, which are for the most part valid, but I bought this book mostly for the testng part, and I guess I'll have to wait to find something more targeted towards teaching just testng.
(Review Data Last Updated: 2008-10-01 05:30:28 EST)
03-23-08 4 0\6
(Hide Review...)  Very informative and nicely written
Reviewer Permalink
Very nicely written keeping real world requirements in mind. Could have had some more examples.
(Review Data Last Updated: 2008-08-10 05:25:14 EST)
02-01-08 5 2\2
(Hide Review...)  Practical Testing with a very good framework
Reviewer Permalink
At last a book that deals with testing applications (in java) that seems to be written by author's who have worked with real life, non trivial projects(TDD with adding two money objects together, anyone?).
This book describes using TestNG along with some advanced TestNG concepts and goes on to show how to use the framework to test out JEE projects. There are also chapters showing the developer how to integrate TestNG with other frameworks (like spring, DBUnit, jwebunit etc) which is useful as this is perhaps the only place where JUnit is better than TestNG. Inspite of the fact that TestNG documentation is pretty good, this book is worthwile buying (even if you use JUnit as your testing tool of choice).
There is useful coding and refactoring advice along the way(also a commentary on TDD), and a miscellaneous chapter of sorts which seems to have been written by Hani and edited by Cedric to remove all profanities!.
I do hope the author's expand the testing enterprise application bits to cover more testing scenarios and examples in later additions.
(Review Data Last Updated: 2008-03-22 18:35:50 EST)
01-09-08 5 0\1
(Hide Review...)  A top recommendation.
Reviewer Permalink
College-level libraries strong in Java programming guides need NEXT GENERATION JAVA TESTING: unlike many Java programmer's guides, it provides a pragmatic discussion for Java developers interested in building stronger code for applications, and packs in chapters discussing testing methods, tradeoffs associated with testing, applications of testing theory and rules, analysis of partial failures and remote invocation, and more. In-depth and extensive code examples throughout also differentiate NEXT GENERATION JAVA TESTING from competitors, making it a top recommendation.

Diane C. Donovan
California Bookwatch
(Review Data Last Updated: 2008-02-02 21:24:13 EST)
12-09-07 3 5\7
(Hide Review...)  testng & rants
Reviewer Permalink
"Next Generation Java Testing" has a subtitle: "TestNG and Advanced Concepts." This isn't surprising given the creator of TestNG is an author, but is important to realize. It starts with 6.5 pages on why TestNG is better than JUnit 3.8. Then only two paragraphs on JUnit 4. This has been a pet peeve of mine for some time. It's like comparing the current version of C# to Java 1.3 and then saying Java is worse because it doesn't have generics.

I liked the code snippets in the TestNG sections as they focused on relevant pieces. The examples were to the point. Especially the performance and J2EE sections. I liked the concepts described in chapter 2 (over 100 pages.)

The authors describe open source libraries that integrate with TestNG. I liked this coverage although JMock could have used a code example for comparison (easyMock had one.) Ant targets were provided for the code coverage examples.

Chapter seven is titled "digressions." Some quotes from the text on this: "pet peeves, rants, annoyances and musings", "much ... very tangentially relevant", "some ... outright irrelavant." I agree with some and disagree with some. I think this chapter would have been better as a series of blog posts than a chapter in a book.

If you are using/planning to use TestNG and can ignore the rants, this is a good book.
(Review Data Last Updated: 2008-01-09 23:52:44 EST)
11-28-07 5 3\4
(Hide Review...)  5 with a Few Qualms
Reviewer Permalink
This was not the book I expected, but it makes a lot of sense that it turned out this way. Cedric is like the Martin Luther of the testing world. I ranted about a lot of the same things in JUnit, especially for instance, the whole crazy TestDecorator business, but Cedric just blew the house down. TestNG, after JUnit, was like getting out of jail.

So it makes sense that this book is a kind of exhaustive compendium of testing approaches, and as such, it succeeds, in most ways. There are a few things that don't show up, for instance, there is discussion of container testing, but Shale is not mentioned (unit testing JSF is made much better by it, and JSF is part of JEE5 so it deserves attention). The section on testing XML was good, considering dom4j, XMLUnit, etc., but it ends too quickly. For instance, what about using XPath statements? or some schema tools?

Given that Cedric's partner in crime, of Bileblog fame, was aboard for this outing, rants were bound to ensue, and they are mostly useful and add value, if they are rather tame. The one about logging left me just totally perplexed. Logging is not good? It's made out to be even possibly harmful? Say what? On the other hand, the rants about JUnit are on target. Their rant about using test coverage as a badge of honor is right on the money.

They even go into Spring's test mechanisms, and do a good job with it. Then they skate through Guice to discuss some of the advantages of preventing the spread into XML. Now, the lead argument here is that not only does the metadata produce bloat, but it puts logic out of the grasp of refactoring tools (an argument Cedric has used v. dynamic languages).

In an age where computer books are usually long articles, this book goes through a dizzying range of subjects, and does so without resorting to the bland repetition of documentation that is already out there. I could only have wished for a greater emphasis on innovation. The reason is that this book I am afraid will scare people who really need to be brought into the fold. It's pathetic, really, but most teams are still either not testing or doing crazy things like writing a few tests after delivering the code. For people who have dug around trying to get a lot of the right things into their test diet, this is the best guide available right now.
(Review Data Last Updated: 2007-12-09 16:16:58 EST)
  
                  Reader Reviews 1 - 7 of 7                 
  
  
  
  
  
  

Because the data used to generate this site come from outside sources, VeryWellSaid.com cannot guarantee the completeness or accuracy of the data.
Search VeryWellSaid™
Google
Web VeryWellSaid™
New subjects are added every week.
View Subjects Below by:
* Top Selling
 (click category name, left)
* Top-Rated Top Sellers
 (click 'Top Rated', right)
In the news...  
Dubai\UAE Top Rated
Influenza\Bird Flu Top Rated
Iraq Top Rated
Supreme Court Top Rated
All Books Top Rated
Arts Top Rated
Photography Top Rated
Digital Photography Top Rated
Digital Cameras Top Rated
Biography Top Rated
Business Top Rated
Management Top Rated
Marketing Top Rated
Sales Top Rated
Stocks Top Rated
Bonds Top Rated
Real Estate Top Rated
Trading Top Rated
Commodities Trading Top Rated
Time Management Top Rated
Starting A Business Top Rated
Children's Top Rated
Comics Top Rated
Computers Top Rated
PC Top Rated
Mac Top Rated
Programming Top Rated
Design Patterns Top Rated
.Net Top Rated
C# Top Rated
Vb.Net Top Rated
Asp.Net Top Rated
Java Top Rated
Python Top Rated
PHP Top Rated
Perl Top Rated
Javascript Top Rated
Ajax Top Rated
CSS Top Rated
Open Source Top Rated
SQL Top Rated
Databases Top Rated
Oracle Top Rated
MySql Top Rated
Sql Server Top Rated
IIS Top Rated
Apache Top Rated
Linux Top Rated
Windows Server Top Rated
Project Management Top Rated
HTML Top Rated
UML Top Rated
IT Certifications Top Rated
Cisco Certifications Top Rated
MCSE Top Rated
MCSD Top Rated
Cooking Top Rated
Italian Cooking Top Rated
Vegetarian Cooking Top Rated
Wine Top Rated
Engineering Top Rated
Entertainment Top Rated
Health Top Rated
Nutrition Top Rated
Dieting Top Rated
Sex Top Rated
History Top Rated
Military History Top Rated
British History Top Rated
Middle East History Top Rated
Land Battles Top Rated
Naval Warfare Top Rated
Air Warfare Top Rated
9/11 Top Rated
Terrorism Top Rated
Home Top Rated
Mortgage\Home Equity Loan Top Rated
Cars Top Rated
Car Buying Top Rated
Sports Cars Top Rated
Cat Top Rated
Humor Top Rated
Horror Top Rated
Law Top Rated
IP Law Top Rated
Legal History Top Rated
Fiction Top Rated
Oprah's Book Club Top Rated
Medicine Top Rated
Cancer Top Rated
Stroke Top Rated
Heart Disease Top Rated
Fertility Top Rated
Diabetes Top Rated
Pharmacology Top Rated
Back Problems Top Rated
Menopause Top Rated
Thyroid Top Rated
Pain Top Rated
Organic Chemistry Top Rated
Immune System Top Rated
Mystery Top Rated
Nonfiction Top Rated
Outdoors Top Rated
Running Top Rated
Radio Control Models Top Rated
Guns Top Rated
Parenting Top Rated
Divorce Top Rated
Professional Top Rated
Reference Top Rated
Religion Top Rated
Romance Top Rated
Science Top Rated
Physics Top Rated
Chemistry Top Rated
Astronomy Top Rated
Psychology Top Rated
Science Fiction Top Rated
Sports Top Rated
Teens Top Rated
Travel Top Rated
USA Top Rated
Europe Top Rated
France Top Rated
Italy Top Rated
England Top Rated
China Top Rated
All Books Arts Biography Click Here For An A-Z Index Of All 213 Best-Seller Subjects Business Children's Comics
Computers Cooking Engineering Entertainment Health History Home Horror Humor Law Fiction Medicine Mystery
Nonfiction Outdoors Parenting Professional Reference Religion Romance Science Sci-Fi Sports Teens Travel
In Association with Amazon.com

Cache miss
(not cached)