Hi Raghavan,
Originally posted by Raghavan Muthu:
Hi C�dric Beust and Hani Suleiman,
I am just curious about the line in the preface which speaks about testing XML files and the advance features like factories, remote invocation, cluster-based test farms etc.,
I am sure that they will NOT be yet another application client to invoke and test. Are you addressing some new tools for the same like JUnit which provides a TestSuite?
Will they help in measuring the performance, memory usage etc also?
Thank you.
While we do mention JUnit 3 and JUnit 4 in the book, our techniques and descriptions are mostly centered around
TestNG's features, most of which are not available in JUnit. For example, JUnit doesn't support test groups, so unless you implement your own runner that parses these extra annotations and somehow have JUnit understand them, you won't be able to reuse some of the testing design
patterns that use groups.
Just to clarify and in case you're not familiar with test groups, TestNG lets you put your test methods in various groups:
@Test(groups = { "functional", "database", "fast" }
public void test1() { ... }
@Test(groups = { "functional", "database", "slow" }
public void test2() { ... }
So that once you have compiled them, you can ask TestNG to only invoke methods that belong to the group "fast" or "database" without recompiling anything.
As for your second question, yes, we do show a few way you can test performance and scalability of a given piece of code (and as far as I know, nobody has ever tried to explain how you can write a test that verifies that a certain piece of code is O(log(n), a technique we cover in a section of our book).
Please let me know if I didn't answer your questions...
--
Cedric