I followed a similar approach by reading a list of values using Junit test setup method from a file. I tried to used those set of values as the input to a method....
In the method i looped through the input values and tried to assert the values.....But the big problem with junit test method is once an assert fails it quits from that method and does not continue further execution of that method...So you cant use assert for a set of values as input ....
Is there a better way to execute a set of test methods for different inputs....?
From: Erskine, Chris <chris@ed...>
RE: Data driven approach?
This is why they talk about building many tests with each test testing one thing. If you are trying to build a script that you want to report multiple errors from a single procedure, the JUnit is not the platform that you want to work with although you could adapt it and change the model that you are working with to use it. You can also use it to start your test but then as you know, you do not want to use asserts. You could also use the asserts and trap them yourself to log the message and then continue processing. This is something you will have to decide on.
The other thing that you can do is to build your own framework that works the way that you want it to.
The starting premise that you have to use JUnit to use HTMLunit is false. HTMLunit does not require you to use JUnit.
EDS Consulting Services
|Free forum by Nabble||Edit this page|