Java Forum / General / October 2005
Announcing TestNG 4.0
Cedric Beust - 11 Oct 2005 22:05 GMT The TestNG team is happy to announce the immediate availability of TestNG 4.0, with a lot of improvements and new features.
The announcement, along with a few examples and summary of the new features, can be found here:
http://tinyurl.com/dxlbh
 Signature Cédric http://testng.org
Roedy Green - 11 Oct 2005 22:58 GMT >The TestNG team is happy to announce the immediate availability of >TestNG 4.0, with a lot of improvements and new features. [quoted text clipped - 3 lines] > > http://tinyurl.com/dxlbh Your announcement and your webpage suffer from what I called "SourceForge Syndrome" You assume everyone already knows what your product is for.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Again taking new Java programming contracts.
Andrew McDonagh - 11 Oct 2005 23:11 GMT >>The TestNG team is happy to announce the immediate availability of >>TestNG 4.0, with a lot of improvements and new features. [quoted text clipped - 7 lines] > "SourceForge Syndrome" You assume everyone already knows what your > product is for. As a software developer - surely you have come across Unit testing or Test Driven Development?
TestNG is another unit testing framework for these - much like JUnit
If you haven't - I'd seriously recommend reading up on TDD - making use of JUnit, TestNG, JTiger or any of the other frameworks.
The frameworks:
http://testng.org/doc/ http://www.junit.org/index.htm http://www.jtiger.org/
The Design methodology (TDD):
http://www.testdriven.com/ http://en.wikipedia.org/wiki/Test_driven_development http://www.agiledata.org/essays/tdd.html http://www.artima.com/intv/testdriven.html http://www.objectmentor.com/writeUps/TestDrivenDevelopment
Roedy Green - 12 Oct 2005 00:55 GMT >As a software developer - surely you have come across Unit testing or >Test Driven Development? [quoted text clipped - 3 lines] >If you haven't - I'd seriously recommend reading up on TDD - making use >of JUnit, TestNG, JTiger or any of the other frameworks. I don't recall seeing any text like that in the announcement or the web page. All you have is the word "test" which has many meanings including that the web page is under construction.
And further it does not matter if *I* am familiar with JUNIT. A public announcement should be sufficiently self explanatory that someone can tell if the product is something they might want to pursue.
What I think they should have said is something like this to open:
TestingNG is an opensource pure Java program to aid in testing Java programs similar to JUNIT. Automated testing helps assure programs are bug free. TestingNG is useful in test situations where JUNIT cannot create sufficiently complex test objects and logic. (or whatever its justification for existence is).
It is infuriating how few sourceforge projects begin with a simple explanation of what the product is for. They usually leap into the details of the latest microfeature.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Again taking new Java programming contracts.
Cedric Beust - 11 Oct 2005 23:51 GMT Fair enough, Roedy. I just try to keep these announcements short, but I did assume everybody knew TestNG (or at least, they would get an idea from its name that it's a testing product, and then they would click on the link to find out more).
Here is the short introduction, from http://testng.org :
TestNG is a testing framework inspired from JUnit and NUnit but introducing some new functionalities that make it more powerful and easier to use, such as:
* JDK 5 Annotations (JDK 1.4 is also supported with JavaDoc annotations). * Flexible test configuration. * Powerful execution model (no more TestSuite). * Dependent methods. * Supported by a variety of tools and plug-ins (Eclipse, IDEA, Maven, etc...). * Embeds BeanShell for further flexibility. * Default JDK functions for runtime and logging (no dependencies).
Here is a very simple test:
import org.testng.annotations.*;
public class SimpleTest {
@Configuration(beforeTestClass = true) public void setUp() { // code that will be invoked when this test is instantiated }
@Test(groups = { "functest" }) public void testItWorks() { // your test code } }
 Signature Cedric
Roedy Green - 12 Oct 2005 01:02 GMT >Fair enough, Roedy. I just try to keep these announcements short, but >I did assume everybody knew TestNG (or at least, they would get an idea >from its name that it's a testing product, and then they would click on >the link to find out more). I don't see that at all. You put the letters NG in the name which conjure up "newsgroup" and "relaxNG".
Test could also mean that you considering this a prototype of something to come.
This will always me utterly obvious to the authors. That is why they have to bend over backwards to presume ignorance on the part of the reader.
The first two sentences cost you nothing, and they are the only two sentences most visitors will read. If you put up gobblegook there, you will lose potential customers who don't have the patience to read your entire manual just to find out if it is relevant to their problem. If you post technobabble in the first two sentences it is an indication you despise your users and that all the documenation will be similarly obtuse.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Again taking new Java programming contracts.
Andrew Thompson - 12 Oct 2005 04:17 GMT >>Fair enough, Roedy. I just try to keep these announcements short, but >>I did assume everybody knew TestNG (or at least, they would get an idea [quoted text clipped - 5 lines] > I don't see that at all. You put the letters NG in the name which > conjure up "newsgroup" and "relaxNG". The second is what I guessed, from the name.. (I did not follow the link itself)
Roedy Green - 12 Oct 2005 01:14 GMT >Fair enough, Roedy. I just try to keep these announcements short, but >I did assume everybody knew TestNG (or at least, they would get an idea >from its name that it's a testing product, and then they would click on >the link to find out more). Here is another tiny motivator to put birds'-eye view intro pages onto sourceforge projects.
Every month or so, sourceforge sends me an email telling me about the hottest projects. I go visit them and put entries in the Java glossary telling people about interesting projects.
Often I can't figure out what the f.ck the project is for. I can't help but detest that project ever after for screwing me around that way. I am not going there because I had a problem and somebody recommend it. I am going there cold to find out what it is, and perhaps note to myself if this might come in useful some day. I am not prepared to download the package to find out, just read 4 or 5 web pages.
I just cringe at the writing that my grade 4 English teacher would have failed.
Somehow there has to be a way of teaming up people who can write with people who can code.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Again taking new Java programming contracts.
Andrew Thompson - 12 Oct 2005 04:26 GMT > Often I can't figure out what the f.ck the project is for. I both know the feeling, and am guilty of making pages that provoke that sort of response.
The problem is that the intro. page is written by the developer after a long and close association with the software. The stuff that is 'intuitively obvious' to the developer is 'gobble-de-gook' to everyone else.
Perhaps a single page on your site explaining the situation 'page written by someone too close to the software' -> 'could be linked in the Java Glossary if clear', with a single email to the project owner (linking to the page) might fix the situation.
> ...I can't > help but detest that project ever after for screwing me around that > way. Of course, the above is assuming that you do not detest them too much to do that for them. ;-)
Thomas Weidenfeller - 12 Oct 2005 08:32 GMT > Somehow there has to be a way of teaming up people who can write with > people who can code. For whatever reasons people who can write don't work for free software projects. The whole FOSS movement is hindered by the fact that documentation isn't that great.
/Thomas
 Signature The comp.lang.java.gui FAQ: ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
Ross Bamford - 12 Oct 2005 14:28 GMT >> Somehow there has to be a way of teaming up people who can write with >> people who can code. [quoted text clipped - 4 lines] > > /Thomas IMHO it's definitely true that it holds a lot of OSS stuff back, especially the lack of coherent developer documentation and properly-commented examples.
I think it's a symptom of the mindset with a lot of people who devote time to OSS, which is basically (and quite rightly) that, since they're giving their time they're going to spend it on the interesting stuff. In the projects I participate in, as well as those I run, I consistently find it most difficult to get people to document even the features they add, let alone help document existing stuff. So you get gems like:
/** * get the register * * @param registerIndex the register index * * @return The register * * @throws SomeException on error */ public Register getRegister(registerIndex) throws SomeException { return registers.get(registerIndex); }
It's like the whole 'start at 1.0' thing, when writing the software doesn't even get you halfway there in the real world. I'm fortunate I suppose in that I find it very easy to document, but generally the fashion is to do the interesting stuff, leave the tweening to someone else, and declare anything you don't have time or inclination to provide as 'useless' or 'retarded', or (more common than you think) invent a new AntiPatternWikiWord to describe it (as in ProvideUserDocumentation, AssumeUserIsNotClairvoyant, and ExpectConsistentUseOfCollectionsOrArrays).
In my own stuff, once past the drastic-changes phase, I always try to make sure theres plenty of documentation, but more importantly that it's clear, relevant documentation (e.g. Javadoc for contracts, the most general usage information at most one click on the website, etc) but it can be a losing battle sometimes. Believe it or not, some FOSS projects don't even _want_ documentation, and many of those that do don't understand the difference between documentation and advertising.
 Signature Ross Bamford - rosco@roscopeco.remove.co.uk
Roedy Green - 12 Oct 2005 01:18 GMT > I just try to keep these announcements short, but >I did assume everybody knew TestNG (or at least, they would get an idea >from its name that it's a testing product, and then they would click on >the link to find out more) The little joke about Junit could have other interpretations -- e.g. that you are using the word "testing" in some other sense and the JUNIT people might think they have a lock on it.
You can't go wrong spending the first two sentences of a product description describing what the product is FOR. Think of it as google spider bait if you must.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Again taking new Java programming contracts.
Thomas Weidenfeller - 12 Oct 2005 08:28 GMT > Fair enough, Roedy. I just try to keep these announcements short, We have a separate announcement group. That alone should be reason not to post any advertising here.
/Thomas
 Signature The comp.lang.java.gui FAQ: ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
Roedy Green - 22 Oct 2005 04:31 GMT >We have a separate announcement group. That alone should be reason not >to post any advertising here. I think it is pretty much defunct.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Again taking new Java programming contracts.
Chris Smith - 22 Oct 2005 16:31 GMT > >We have a separate announcement group. That alone should be reason not > >to post any advertising here.
> I think it is pretty much defunct. No, it's not. It used to be, but it was revived by Jon Skeet, Brian Palmer, and myself several years ago. Jon still puts a lot of effort into making sure that announcements get through. I check over there whenever I can. Additional volunteers for moderators would be greatly appreciated, and can be emailed to:
announce-discuss@mail.javamoderator.org
The other thing that's helpful is to post announcements of interesting things to the newsgroup. A majority of announcements currently come from the development teams of certain (both free and commercial) Java libraries and products. It would be nice to see more community-oriented announcements as well.
I've been exploring possibilities for writing a screen-scraper to post announcements when JSRs are started, enter a public review, or release a final spec. Any other suggestions?
 Signature www.designacourse.com The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation
Chris Uppal - 24 Oct 2005 09:44 GMT > I've been exploring possibilities for writing a screen-scraper to post > announcements when JSRs are started, enter a public review, or release a > final spec. Any other suggestions? RSS gateway perhaps ?
Closed bugs from the bug parade ?
(Not that I, personally, care -- I don't read .announce and have no plans to start)
-- chris
Thomas Hawtin - 12 Oct 2005 09:55 GMT > import org.testng.annotations.*; > [quoted text clipped - 10 lines] > } > } Which in JUnit (unless I misunderstand what beforeTestClass means) would be:
public class SimpleTest extends junit.framework.TestCase {
@Override public void setUp() { // code that will be invoked when this test is instantiated }
public void testItWorks() { // your test code } }
My, we have come a long way.
Tom Hawtin
 Signature Unemployed English Java programmer http://jroller.com/page/tackline/
Ross Bamford - 12 Oct 2005 11:22 GMT >> import org.testng.annotations.*; >> public class SimpleTest { [quoted text clipped - 26 lines] > > Tom Hawtin
:) I made some similar observations a bit back:
http://roscopeco.blogspot.com/2005/08/testing-times.html
I particularly like this new version, that's got so many new features they skipped over a whole version. How many? Well, four (and nine bugfixes).
I think it's more about keeping up with the Junitses.
 Signature Ross Bamford - rosco@roscopeco.remove.co.uk
Cedric Beust - 12 Oct 2005 17:04 GMT Actually, you don't even need the @Override in JUnit.
More seriously, JUnit doesn't support groups and it only allows setUp/tearDown around test methods, and not
- Around suites - Around tests - Around classes
This is all this example illustrates, in four lines of code. Please spend some time reading through the documentation, there is a lot more to it than I showed here.
 Signature Cedric http://testng.org
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|