Announcing TestNG 4.0

C

Cedric Beust

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
 
R

Roedy Green

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

Your announcement and your webpage suffer from what I called
"SourceForge Syndrome" You assume everyone already knows what your
product is for.
 
A

Andrew McDonagh

Roedy said:
Your announcement and your webpage suffer from what I called
"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
 
C

Cedric Beust

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
}
}
 
R

Roedy Green

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.

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.
 
R

Roedy Green

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.
 
R

Roedy Green

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 **** 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.
 
R

Roedy Green

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.
 
A

Andrew Thompson

Roedy said:
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)
 
A

Andrew Thompson

Roedy said:
Often I can't figure out what the **** 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. ;-)
 
T

Thomas Weidenfeller

Cedric said:
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
 
T

Thomas Weidenfeller

Roedy said:
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
 
T

Thomas Hawtin

Cedric said:
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
}
}

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
 
R

Ross Bamford

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

:)

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.
 
R

Ross Bamford

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

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.
 
C

Cedric Beust

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.
 
C

Chris Smith

Roedy said:
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:

(e-mail address removed)

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?

--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
C

Chris Uppal

Chris said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top