
Signature
This signature intentionally left blank.
>>> Is there a more dynamic way of setting up tests? We have legacy test
>>> code that we are trying to convert to junit.
[quoted text clipped - 32 lines]
>
> I hate that "not applicable to JUnit" crap. (No offense Andrew.)
None taken
I was merely trying to point out that JUnit isn't designed for that
scenario (in fact I think the OP has seen this by the remark that the
'test failure message was boring'). But you are right, a custom
TestRunner might be able to do what the OP wants.
> It
> just bothers me that people try to push you into using the tool only one
> way. What if I want an automated integration test? JUnit is able to do
> this, even if it goes against the philosophy of its creator.
Sure any of the xUnit frameworks can be used for integration, System,
UAT, SAT, etc tests - it usually comes down to how the test is described
that makes one tool more appropriate than another.
Personally, I would use any of the xUnit frameworks for any testing
other that unit testing. The other tests will (in my situation) has to
be readable by my customers - they don't know Java. But they can read
something like....
Start IE
Browse to http://www.google.com
Enter 'Watir' into searchBox
Click Search button
Check Page contains 'Watir: Web Application Testing in Ruby'
Now in JUnit this test would not be anywhere near as short nor readable
to a non-programmer (be they Customer or tester).
Its Horses-for-courses rather than 'that-aint-what-I-created-it-for'
Andrew
> This is especially true when you've inherited an "engine" that doesn't
> already have unit tests. You only really care about the external
> interface; you do not have time to reverse engineer every class to
> create unit tests.
Agreed, in fact I'd recommend that we don't retrofit unit tests. I
would add a few integration/acceptance tests if possible, using a DSL
something like above.
> Automated integration tests based on the macro,
> known desired behavior of the system is useful here.
>
> The OP might want to look into creating a custom TestRunner.
>
> Ray