Data driven approach?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Data driven approach?

siva sakthi ganesh
Hi,

As far as i understand htmlunit uses junit to write test cases.....

And test case written with junit are not data driven...........

you provide the data to a method and u assert whether it is equal to  a particular value or not.......

Is there an approach by which u specific the list of data in xml and read that xml and send it to htmlunit...to execute the test cases......

And using ant i know we can format the output into html ............


Rgds,
Siva
Reply | Threaded
Open this post in threaded view
|

RE: Data driven approach?

Erskine, Chris

The way to handle this is to allow your JUnit test to read the values that in needs from a file.  There is nothing about JUnit or HTMLunit that requires the values be coded in the file.  I just developed an integration test that is executed under JUnit.  It reads from a CSV file and uses the first like to send to the server and the second line to determine what the response from the server should look like.

 

Chris Erskine

 

EDS Consulting Services

Colorado Springs, CO 

 

Phone: 719-265-5962

Cell: 719-640-6488


From: [hidden email] [mailto:[hidden email]] On Behalf Of siva sakthi ganesh
Sent: Wednesday, October 19, 2005 8:34 PM
To: [hidden email]
Subject: [Htmlunit-user] Data driven approach?

 

Hi,

As far as i understand htmlunit uses junit to write test cases.....

And test case written with junit are not data driven...........

you provide the data to a method and u assert whether it is equal to  a particular value or not.......

Is there an approach by which u specific the list of data in xml and read that xml and send it to htmlunit...to execute the test cases......


And using ant i know we can format the output into html ............


Rgds,
Siva