The Artima Developer Community
Sponsored Link

Programming in Scala Forum
Could we have a chapter on unit testing please?

4 replies on 1 page. Most recent reply: Feb 17, 2008 4:36 AM by Ravi Mohan

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 4 replies on 1 page
Ravi Mohan

Posts: 11
Nickname: ravim
Registered: Jan, 2003

Could we have a chapter on unit testing please? Posted: Dec 22, 2007 7:26 PM
Reply to this message Reply
Advertisement
Hello,

I understand that a port of the xunit libraries is included in the scala distribution. A brief chapter on how to use that library would be a worthy addition, I think. (Programming Ruby from the Pragmatic folks had such a chapter and it was well received. Dive into Python by Mark Pilgrim has such a chapter as well.).

Regards,
Ravi


Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: Could we have a chapter on unit testing please? Posted: Dec 24, 2007 4:23 PM
Reply to this message Reply
Thanks Ravi for the suggestion. We've talked about it, but there isn't a de facto standard unit testing library for Scala yet. But this is the second request about a unit testing chapter that we've received.

Justin Forder

Posts: 9
Nickname: jufo
Registered: May, 2007

Re: Could we have a chapter on unit testing please? Posted: Jan 1, 2008 5:12 AM
Reply to this message Reply
Please add my vote in favour - for testing in general, not necessarily just unit testing.

I felt that the absence of discussion of automated testing was a big omission in Programming Erlang.

It is good that there is already some advice in Programming in Scala about using JUnit, but readers may be puzzled to discover that there is a small SUnit framework in the Scala library, which is not mentioned in the book.

I've seen some information on using jMock with Scala here:

http://lalitpant.blogspot.com/2007/12/using-jmock-with-scala.html

and a framework for BDD with Scala here (with its own mock capability):

http://code.google.com/p/specs/

and a Scala implementation of QuickCheck, ScalaCheck, here:

http://code.google.com/p/scalacheck/

ScalaCheck looks (at first glance) much more promising than the Java QuickCheck implementation at http://wiki.java.net/bin/view/Projects/QuickCheck. For people with existing Java code who want to use property-based testing this might be a good reason to start using Scala.

Some authoritative advice on the tools available, their maturity and whether they can be expected to stay around in future would be welcome.

Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: Could we have a chapter on unit testing please? Posted: Feb 11, 2008 3:54 PM
Reply to this message Reply
Hi Justin, Ravi,

I released ScalaTest about a month ago. It will be integrated with many other tools--TestNT, JUnit, JUnit4, jMock, ScalaCheck. etc. The idea is to help people use whatever testing tools they currently like, but write test code in Scala.

http://www.artima.com/scalatest

Ravi Mohan

Posts: 11
Nickname: ravim
Registered: Jan, 2003

Re: Could we have a chapter on unit testing please? Posted: Feb 17, 2008 4:36 AM
Reply to this message Reply
Bill,

I've downloaded this.

This is very neat! I still think the book should have a chapter on unit testing (and I also think - fwiw - that your framework should be integrated into the Scala standard libs).

Regards,
Ravi

Flat View: This topic has 4 replies on 1 page
Topic: Bug in section 8.4 Previous Topic   Next Topic Topic: Suggestion for Chapter 10

Sponsored Links



Google
  Web Artima.com   

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