*
The moose likes Other Application Frameworks and the fly likes Seam and Test Driven Development Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Seam and Test Driven Development" Watch "Seam and Test Driven Development" New topic
Author

Seam and Test Driven Development

Chris Seifert
Greenhorn

Joined: Aug 09, 2008
Posts: 9
Some xUnit books have argued for Outside-in testing where we we start by modeling tests (somehow) for the customer experience (i.e., integrated and behavioral tests). There are also some third party products, like ThoughtWorks' Selenium, that can help with Outside-in testing.

Does "Seam in Action" cover the best way to implement test driven development testing from the UI? Can Seam improve automated UI testing?

Is there anything new that Seam brings to the table to make TDD easier and more certain? Does your book cover it?
Jason Porter
Ranch Hand

Joined: Apr 26, 2007
Posts: 120
Seam has a base class to extend from for your tests called SeamTest that works with TestNG and Junit (as far as I know). This allows you to use all of the features of the container while only having to have the embeddable EJB container (and related config) on the classpath. You can run JSF UI tests this way as well.

You may also want to take a look at the JSFUnit project on labs.jboss.org.
Dan Allen
Author
Ranch Hand

Joined: Mar 05, 2003
Posts: 164
Seam in Action has a fairly sparse discussion of testing because frankly, I was out of space (Seam is a huge topic to try to cover and Manning already yelled at me for writing as much as I did). Additionally, Selenium is way out of scope of a Seam book because Selenium could care less what framework or language your application is written in. Honestly, you are going to get the best advice from a book on testing.

One of the coolest parts about Seam is that it can bootstrap an environment using SeamTest where you can test your components as they will run in a container. In fact, they are running in a container because SeamTest + Embedded JBoss is an application server turned inside out, where the application runs the container to suit its needs. This is a great tool because you skip the deploy step, but you don't have to mess with mocking tools. The only downside is that it takes a couple of seconds to start Embedded JBoss. Until the startup time of that tool improves, my advice is to spend the money on the fattest machine you can buy because it is a waste of time and money if you cap out your RAM, and dumb because computers are so cheap (eve in a crappy economy).


Dan Allen | http://mojavelinux.com | Author of Seam in Action - http://mojavelinux.com/seaminaction
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by Dan Allen:
This is a great tool because you skip the deploy step, but you don't have to mess with mocking tools.


Do you really mean we don't need something like Easymock?
Dan Allen
Author
Ranch Hand

Joined: Mar 05, 2003
Posts: 164
Do you really mean we don't need something like Easymock?


I'm saying yes, you can get away without using it. If I tell you that you have the ability to test your code without moving it anywhere, then you are pretty much getting the same value add as EasyMock. The reason mocking tools exist is because the application cannot run "in place". SeamTest lets you run the application in place, so there you go. Of course, you *can* use it if you want. But some folks are going to like not having to.
 
 
subject: Seam and Test Driven Development
 
Similar Threads
Testing Framework
Teaching Test Driven Development
Grails 1.0 Web Application Development - TOC
testing GUIs and multithreading
Facade and Delegate