The Artima Developer Community
Sponsored Link

Java Buzz Forum
Howto: using files in unit tests

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
News Manager

Posts: 47623
Nickname: newsman
Registered: Apr, 2003

News Manager is the force behind the news at Artima.com.
Howto: using files in unit tests Posted: Aug 7, 2006 4:03 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by News Manager.
Original Post: Howto: using files in unit tests
Feed Title: testdriven.com
Feed URL: http://feeds.feedburner.com/testdrivennewslinks?news=10&links=10
Feed Description: Your test-driven development community
Latest Java Buzz Posts
Latest Java Buzz Posts by News Manager
Latest Posts From testdriven.com

Advertisement
When we write unit tests for our functions, we usually initialize some input data, call our function and then "assert" on the output data. But some functions take files as input or return their output in files. Where do you place these files so that tests will run on the integration server as well as all developer machines?

This was a problem we faced on our current project, and we solved it by putting the files inside the unit tests.

See how we did it on BestBrains.

Read: Howto: using files in unit tests

Topic: Flickr: Auggie Sitting Like a Lady Previous Topic   Next Topic Topic: Flickr: Auggie in the Kitchen

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use