Evermore, one of my WordPress plugins, has been around for a year or so. It’s worked very well, but occasionally I did receive reports of mysterious failures. In an effort to fix it once and for all, I decided to take a new approach. So for the last couple of updates I have used a […]
You can install several different versions of Microsoft Internet Explorer concurrently on Windows. Finally I could see how awful my site looked in IE5 — and the truth wasn’t pretty.
When a TestCase runs, it should either succeed or fail: there should be no side effects. For example, Testcases should not write to the console or to a log file, or save anything to a database. There are two reasons for this.
31 August 2004
|
By Bennett
|
Topics: JUnit
|
Structure your JUnit test suites to simplify unit testing — you can easily run all your tests with one command.
25 August 2004
|
By Bennett
|
Topics: JUnit
|
This may seem obvious, but many JUnit tests are written that don’t really test anything useful.
Don’t write tests cases for code that’s too simple to fail on its own: that would be a waste of time. You’re supposed to write tests that test your application code, not the test framework or the compiler.
11 August 2004
|
By Bennett
|
Topics: JUnit, Java
|
Profiling is an excellent way to find resource bottlenecks in a program. Java has built-in profiling tools that you can use to easily view a profile of a program’s runtime execution.
Often in Java program stack trace, you will see some stack frames include a source line number, while some only say “compiled code”. This is because the stack frames without line numbers have been compiled by the JIT compiler, and the JIT compiler obliterates line number information when it compiles code.
11 February 2004
|
By Bennett
|
Topics: Testing, Java
|
While a Java program is running in a console window, you can can get a stack dump of the program at any time, while it is running. This is very useful for debugging, especially for heavily multithreaded programs.
25 November 2003
|
By Bennett
|
Topics: Testing, Java
|
This feature is a hack intended for testing, but it’s built in to every Oracle installation.
DUAL is a table automatically created by Oracle and accessible to all users. It has one column, DUMMY, containing one row. It’s useful for selecting a constant or expression, because the table always exists (so the query will succeed) and […]
2 September 2003
|
By Bennett
|
Topics: Testing, SQL
|