This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Seam and Test Driven Development

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Author
Posts: 130
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Author
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
Hot dog! An advertiser loves us THIS much:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!