blob: 3bf5d9af0ef6b18405be84b52cf24fe4c483e54a [file] [log] [blame]
cbeust336f0ef2006-08-01 22:50:26 +00001 TODO for TestNG
2
the.mindstormc2938f82007-09-07 22:40:00 +00003* Add timeout to @Before/@After
cbeustda6c8032007-07-19 15:22:29 +00004* Pass parameters from ant
cbeuste77b4592007-06-18 19:48:08 +00005* Make it possible to specify groups on command line and classes in testng.xml
6(and any combinations thereof: command line, ant, testng.xml)
cbeust844df782007-05-30 15:18:11 +00007* DataProvider index in testng.xml
cbeustdb567612006-09-14 16:59:33 +00008* Create a servlet for remote driving
cbeust336f0ef2006-08-01 22:50:26 +00009* Add time-outs at the testng.xml. Also: test and suite time-outs? http://tinyurl.com/kbwxq
10* Add working dir to the ant task
11* Add a servlet so TestNG can be invoked from a web browser
12* Make it possible to add listeners from the Eclipse plug-in
13
cbeustb1be8312008-01-22 16:51:04 +000014Doc:
15
16* Document the fact that @Test methods with return values are ignored.
17
cbeust336f0ef2006-08-01 22:50:26 +000018===========================================================================
cbeuste145a052006-09-16 19:37:09 +000019Older TODO's:
cbeust336f0ef2006-08-01 22:50:26 +000020
21* Show enabled=false methods in the reports, as well as methods
22in groups that were not run
23* Multi-threading for invocationCount and maybe for <test> too
24* Annotation to specify that a method should be called concurrently by n threads
25(on second thought, we should do that for an entire group)
26* more thread ideas: http://www.theserverside.com/news/thread.tss?thread_id=38922
27* package support for command line and ant
28* Parameters for classes (to be passed as parameters to constructors)
29* testng-dist.zip should contain a top-level directory
30* For dependent methods, if the user is trying to run an incomplete graph
31(A depends on B but B is being excluded from the run), what to do? Ignore
32the exclusion on B and run it anyway, or abort with an exception explaining
33what's happening?)
34* Make timeOut() work with milliseconds (but keep seconds for backward
35compatibility)
36* Improve the plug-in API so people can add listeners without having to
37modify TestRunner
38* Use factories for the programmatic API.
39* Add dynamic generation of tests
40* Make Javadoc comments over methods appear in the final report
41
42Documentation:
43* IHookable
44* List<IReporter>
45
46
47DONE
48
cbeust4baba502007-09-16 00:45:35 +000049* Retry patch
50* If a method with invocationCount fails, don't run the others
cbeust125d2472006-09-16 19:49:12 +000051* Allow multiple listeners in ant task
cbeust336f0ef2006-08-01 22:50:26 +000052* Add working dir to the ant task
53* Introduce "test" and "suite" parameters to @Test at the class level to
54avoid having to use testng.xml
55* Remove TestNG stack traces from the report
56* When 0 tests were run, exit with an error http://tinyurl.com/ftng6
57* Show all the extra output for all methods in a single
58dedicated page
59* report API
60* Show parameters used to invoke a specific test
61* show skipped groups/methods in HTML report
62* beforeTestGroups
63* <testng classfileset> doesn't add to classpath
64* threadPoolSize
65* Parameter logging
66* JavaDoc for org.testng.TestNG
67* org.testng.Reporter in the HTML report (screenshot ready)
68* Document @Parameters only works for @Test (should mention @Factory and @Configuration)
69* Document: <testng classfileset> doesn't add to classpath
70* Document org.testng.Reporter in the HTML report (screenshot ready)
71* Document parameter logging
72* JavaDoc for org.testng.TestNG
73* Document threadPoolSize
74* Make sure it can run several times in the same JVM
75* Implement invocationCount and successPercentage
76* Support multiple testng.xml (TestNG allows it but not the reporters
77yet)
78* The HTML reporter collapses all the suites into one report, we should
79create one HTML report per suite
80* testng-failed.xml should contain the parameters of testng.xml (if any)
81* Create a testng-failed.xml that includes dependent methods
82* Generic reported with compare(ITestResult, ITestResult) for
83easier reporter for "slowest method first" or generate testng-failed.xml
84* Iterator factories
85* configuration methods don't respect inheritance
86- build.xml should issue a clear error message if trying to build with JDK1.4
87- Implement <tasdkdef resource="testnganttasks"> so we can define
88ant tasks for TestNG and JUnitConverter automatically
89- Write documentation to declare ant task in section 3.2.8
90- Documentation for alwaysRun
91- Allow to specify packages or prefix in the <classes> tag:
92 <classes prefix="com.beust.testng"><class name="A"><class name="B"> />
93- New assert classes
94- New ways to launch
95- JUnitConverter documentation
96- new beforeSuite/afterSuite
97
98* in testng-failures.xml include the beforeSuite/afterSuite methods (very tricky)
99* Provide log.properties configuration (not using log any more)
100* Make @ExpectedExceptions fail if no exception is thrown
101* Make timeOut() work in non-parallel mode (the default mode needs to become
102parallel=true thread-count=1
103* The exception thrown when a test passes with a @ExpectedExceptions is not
104available via the TestNG API: ITestResult.getThrowable().
105* Add assert API for arrays and collections (undecided yet: partial asserting)
106* dependsOnMethods
107Allow to specify <groups> at the <suite> level
108Make TestNG run on class files and not just on testng.xml
109Make TestNG run on a jar file that has a testng.xml file in its root or just on all
110 the classes inside that jar file.
111
112Implement parameter passing of tests: define a property in the properties
113file and pass it to the test method:
114
115@Test(params = { "${fn}", "${ln}" }
116public void testNames(String firstName, String lastName) {
117}
118
119Run groups of groups
120List all tests that will be run, or show methods per group
121HTML generation
122Make test and class methods discoverable
123 JUnit adapter
124Multiple ExpectedException
125Inheritance
126Test listeners
127Group regexps for launching
128
129====
130
131A new comment has been posted on your blog Otaku, Cedric's weblog, on entry
132#149 (The poor shape of Unit Testing).
133http://beust.com/weblog/archives/000149.html
134
135IP Address: 68.72.49.189
136Name: Curt Cox
137Email Address: curtcox@gmail.com
138URL:
139
140Comments:
141
142For whatever its worth, here are my problems with JUnit. I've largely developed work-arounds.
143
1441. Interface-based testing is awkward.
1452. Only fast-fail tests are supported.
1463. The design is brittle, poorly documented, and thus hard to extend.
147
148How should interface-based testing be handled in TestNG? A nice feature would be bundled tests for interfaces in the java* namespace that are automatically applied. In other words:
149- all classes will fail a (supressible) test if they violate the contract for equals() and hashCode()
150- classes that implement Comparable will fail a test if they fail to implement Comparable
151- and likewise for java.io.Serializable, java.util.Map, java.util.List, etc...
152
153When I say all tests are fast-fail in JUnit, what I mean is that the first failed assertion in a method causes the test to exit. While this is usually desirable, a more conversational style of tests can sometimes be much easier to read and write. Such a conversational test doesn't generate a simple failure, but rather a score. The score could be either x of y passed or x percent passed. The important part is that the first failure doesn't terminate the test.
154
155As I said, I've largely developed work-arounds for doing these in JUnit, but developing tools for conversational tests that play nice with the various JUnit runners was a real challenge. The exact contract that Eclipse expects of JUnit tests turns out to be different than what either of the bundled runners or the Ant task expect. Anyone who considers either the JUnit code or interfaces well-documented has a much different concept of well-documented than I do.
156
157