SuiteTester Beta, a SimpleTest add-on
Posted: Thu Jul 06, 2006 3:07 pm
I've scratched together SuiteTester over the last several days to solve a specific problem: conveniently testing an entire application, and yet quickly testing a single unit too.
With SimpleTest, you can do something like "if not group test, then run unit test" in each unit's test file, but that means you have to upload every test case to a publicly accessible directory. I keep my tests and classes outside a public directory, which means I usually end up using a single GroupTest for almost everything.
Thus was born SuiteTester: an add-on for SimpleTest that uses AJAX to quickly download each test case's results and update the green (or red, as the case may be) test bar.
It's still in beta, has some bugs, and the javascript needs to be reworked, but I wanted to see what the community thought of it. So here is a page about it, or you can see the suite in action, or you can download the source code.
Known bugs:
- It sometimes doesn't delete all of the messages (fails, exceptions, etc) when you click "refresh test case."
- In IE6 SP2, clicking a test case to refresh it does nothing.
Future features:
A PHP error handler that spits out error codes in XML format, so XMLHttpRequest doesn't just alert() an error.
Suggestions, criticisms, or new code is all welcome. I've tested it in Firefox 1.5, IE 6 SP2, and Opera 9. Also, I licensed it under the same license as SimpleTest has.
- Nathaniel
With SimpleTest, you can do something like "if not group test, then run unit test" in each unit's test file, but that means you have to upload every test case to a publicly accessible directory. I keep my tests and classes outside a public directory, which means I usually end up using a single GroupTest for almost everything.
Thus was born SuiteTester: an add-on for SimpleTest that uses AJAX to quickly download each test case's results and update the green (or red, as the case may be) test bar.
It's still in beta, has some bugs, and the javascript needs to be reworked, but I wanted to see what the community thought of it. So here is a page about it, or you can see the suite in action, or you can download the source code.
Known bugs:
- It sometimes doesn't delete all of the messages (fails, exceptions, etc) when you click "refresh test case."
- In IE6 SP2, clicking a test case to refresh it does nothing.
Future features:
A PHP error handler that spits out error codes in XML format, so XMLHttpRequest doesn't just alert() an error.
Suggestions, criticisms, or new code is all welcome. I've tested it in Firefox 1.5, IE 6 SP2, and Opera 9. Also, I licensed it under the same license as SimpleTest has.
- Nathaniel