tag:blogger.com,1999:blog-34927953.post5946712505582564238..comments2023-07-09T02:39:33.734-07:00Comments on Jack Cough on Software: What JVM Language Do You Write Tests In?Josh Coughhttp://www.blogger.com/profile/04509343962912103631noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-34927953.post-38657361814554289392009-08-14T06:45:04.524-07:002009-08-14T06:45:04.524-07:00This comment has been removed by a blog administrator.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-34927953.post-21196787519573138872009-07-23T17:13:18.506-07:002009-07-23T17:13:18.506-07:00Hi Josh,
I was actually about the same thing at m...Hi Josh,<br /><br />I was actually about the same thing at my day job.<br /><br />Should I promote Scala or something else for testing? As much as I would love to promote Scala (and specs of course) for that, there are clearly high barriers on an existing project:<br /><br />-new language, which may please you but maybe not other developers. As tests needs to be a team culture, it is decisive that everyone buys in the language.<br /><br />-an evolving language (see scala 2.8 which may break existing code or have compiler bugs, things you don't meet very often in Java ;-)<br /><br />-new tools (you got to install a new plugin, or a new dev. environment). But I must say that the integration with the existing Java infrastructure really shouldn't be a big deal<br /><br />-some interoperability issues to solve (especially with some java code predating generics, you might have to write a few collection conversion classes)<br /><br />On the other hand, I realized that a great deal of the work to do (on my specific project) was to build:<br /><br />- more setup functionalities to be able to create "business" objects with less lines of code<br /><br />- more mocking functionalities, to be able to do as if the objects really lived on a server<br /><br />- more business matchers<br /><br />All this can be done more elegantly in Scala than in Java, but the bulk of the work is just creating and organizing all that stuff.<br /><br />That being said, once this is done, I think that another testing language really enhance your ability to write tests which are both readable and easy to write. *And* you get access to testing goodies such as ScalaCheck (and MultiThreadedSuite ;-) ).<br /><br />So eventually I would say that it really comes down to a cultural issue:<br /><br />- the team should like writing tests<br />- the team should like picking up the best tools for what they do<br /><br />Eric.Erichttps://www.blogger.com/profile/16484514586929815703noreply@blogger.com