... or more precisely, I/we patented one of the key technologies JSFUnit uses. About the same time I was starting the JSFUnit project, Red Hat's lawyers announced a push to get us to file software patents. I did so reluctantly because I think that in the end, software patents are a game that only the lawyers can win. But Red Hat has a good strategy when it comes to patents that I think ultimately benefits everyone. Read below for more on that.
So it took over three years to get it done. You can view the patent here if you want the gory details.
What does the patent say?
Basically, it just says that we keep the FacesContext alive after the request is done. Without JSFUnit, the JSF Lifecycle would throw it away. That lets us do assertions on the state of the system after each JSF request. If you've been using JSFUnit then you probably know all about that. It's what makes JSFUnit unique among testing tools.
What does the patent mean for JSFUnit users?
Nothing. The software is still open source. We're not looking to make money off of the patent.
Why did Red Hat want to patent this in the first place? Doesn't this go against Red Hat's philosophy of openness and freedom?
Yes and no. Red Hat doesn't really like software patents either. But we see them as a necessary evil until some laws are changed. As I understand it, the Red Hat Patent Promise says that anyone can use our patents for free as long as you don't file a patent case against us.
So long and thanks for all the fish,
Stan
*Disclaimer: I'm not an attorney. The above is my own understanding of this stuff. I'm not even qualified to write this disclaimer.
Tuesday, March 16, 2010
Wednesday, March 3, 2010
JSFUnit 1.2 Goes Final
We just put out a new release of JSFUnit. This time besides bug fixes, we have few new features to talk about:
As always, thanks to everyone who contributed to this release with patches and feedback.
So long and thanks for all the fish,
Stan
- JSF Static Analysis Returns - A big thank-you goes to our newest committer, Alexander Jesse. He has updated some of the old JSF static analysis code and made it really easy to test your JSF configuration for common errors. Some of the old static analysis stuff is still there but his ConfigFilesTestSuite looks awesome. Click here to check out the documentation.
- New API for working with RichTree components - Of all components, developers using JSFUnit seem to have the most difficulty with RichTree. That's understandable because it is a very complex component. In JSFUnit 1.2.0 the RichFacesClient has new methods for working with RichTree. You can read about that here.
- Easier Configuration for Servlet 3.0 - If you are lucky enough to be using a Servlet 3.0 container such as JBoss AS6, you no longer need to change your web.xml. JSFUnit will add the needed servlets and filters at deploy time.
- JSFUnit Console - This is one of the cooler new features, but it also requires Servlet 3.0. JSFUnit now provides a browser-based console for launching your tests. You don't have to do anything extra. You just need to deploy your app and type http://locahost/myjsfapp/jsfunit into the browser. You can read all about it here.
- htmlunit-2.7.jar
- htmlunit-core-js-2.7.jar
- nekohtml-1.9.14.jar
- commons-codec-1.4.jar
As always, thanks to everyone who contributed to this release with patches and feedback.
So long and thanks for all the fish,
Stan
Wednesday, December 23, 2009
What's a WARlet ???
JSFSpy Progress
Today I uploaded a new snapshot of JSFSpy. BTW, I'm keeping the name JSFSpy. Even though I don't like it that much, it's short and to the point. Thanks to those who had other suggestions earlier this year. JSFSpy is super-easy to install. Just drop the JSFSpy core jar into your WEB-INF/lib and you are ready to go. Click here for details.
What's a WARlet ???
In short, a WARlet is a WAR plug-in. It provides one or more Facelet views via a WARlet container and some Servlet 3/JSF 2 magic. A WARlet is neatly packaged in its own jar. The jar contains any xhtml, css, images, and classes that it needs. This provides a module of UI and processing logic that you can add to your WAR with zero configuration.
If you happened to catch my JSFSpy presentation at JSF Summit a couple of weeks ago, you saw a WARlet in action. I'll re-create that demo here. Notice the JSFSpy menu buttons at the top:

I took JSFSpy and bundled the WARlet container along with it. Then I took my EL_Evaluator WARlet jar and dropped that into WEB-INF/lib. Redeploy and Viola!! Now an EL Evaluator button appears in my application on the far right.

The button can launch the EL Evaluator functionality. Here is the EL Evaluator:

So how does the button get added? JSFSpy doesn't know anything about EL Evaluator. It only knows that one or more WARlets might be present. So the button menu has this markup to display a launch button for any WARlets that happen to be there:

So what this all means is that anyone in open-source land can create their own WARlet that plugs into JSFSpy. I'll be posting more about how to create a WARlet in the near future. If you just can't wait to write your own you can browse the JSFSpy source, example code, and WARlet container source.
The only catch is that all this requires Servlet 3.0 and JSF 2.0. Nothing wrong with the bleeding edge, eh?
So long, thanks for all the fish, and have a great holiday!
Stan
Today I uploaded a new snapshot of JSFSpy. BTW, I'm keeping the name JSFSpy. Even though I don't like it that much, it's short and to the point. Thanks to those who had other suggestions earlier this year. JSFSpy is super-easy to install. Just drop the JSFSpy core jar into your WEB-INF/lib and you are ready to go. Click here for details.
What's a WARlet ???
In short, a WARlet is a WAR plug-in. It provides one or more Facelet views via a WARlet container and some Servlet 3/JSF 2 magic. A WARlet is neatly packaged in its own jar. The jar contains any xhtml, css, images, and classes that it needs. This provides a module of UI and processing logic that you can add to your WAR with zero configuration.
If you happened to catch my JSFSpy presentation at JSF Summit a couple of weeks ago, you saw a WARlet in action. I'll re-create that demo here. Notice the JSFSpy menu buttons at the top:

I took JSFSpy and bundled the WARlet container along with it. Then I took my EL_Evaluator WARlet jar and dropped that into WEB-INF/lib. Redeploy and Viola!! Now an EL Evaluator button appears in my application on the far right.

The button can launch the EL Evaluator functionality. Here is the EL Evaluator:

So how does the button get added? JSFSpy doesn't know anything about EL Evaluator. It only knows that one or more WARlets might be present. So the button menu has this markup to display a launch button for any WARlets that happen to be there:

So what this all means is that anyone in open-source land can create their own WARlet that plugs into JSFSpy. I'll be posting more about how to create a WARlet in the near future. If you just can't wait to write your own you can browse the JSFSpy source, example code, and WARlet container source.
The only catch is that all this requires Servlet 3.0 and JSF 2.0. Nothing wrong with the bleeding edge, eh?
So long, thanks for all the fish, and have a great holiday!
Stan
Saturday, August 29, 2009
JSFUnit Podcast on JSFCentral
Kito Mann just posted a podcast of yours truly on JSFCentral. It was recorded at a JSF Conference almost a year ago when JSFUnit was still in beta. But you might still find it interesting:
http://www.jsfcentral.com/articles/silvert-08-09.html
I'll be speaking at the conference again this year in Orlando. Hope to see you there.
http://www.jsfsummit.com
So long and thanks for all the fish,
Stan
http://www.jsfcentral.com/articles/silvert-08-09.html
I'll be speaking at the conference again this year in Orlando. Hope to see you there.
http://www.jsfsummit.com
So long and thanks for all the fish,
Stan
Thursday, July 16, 2009
JSFUnit 1.1.0.GA is released
The latest JSFUnit release is now out. This is primarily a bug-fix release, with several of these fixes related to Seam. The only significant new feature is the ability to parameterize your tests.
We now recommend using HtmlUnit 2.5 instead of 2.4. Also, everything is updated to the latest beta version of JSF 2. So now you can use JSFUnit with JSF 1.1, JSF 1.2, and JSF 2.0 Beta 2.
As for JSF Spy (JSF Eye?), this is not ready for a release. It will probably become its own separate project soon.
So long, and thanks for all the fish,
Stan
We now recommend using HtmlUnit 2.5 instead of 2.4. Also, everything is updated to the latest beta version of JSF 2. So now you can use JSFUnit with JSF 1.1, JSF 1.2, and JSF 2.0 Beta 2.
As for JSF Spy (JSF Eye?), this is not ready for a release. It will probably become its own separate project soon.
So long, and thanks for all the fish,
Stan
Friday, June 5, 2009
Help Me Name My Baby
I've got a new baby and I don't know what to name it. It's a new JSF debug/trace/performance tool. If you've ever seen the Facelets or Seam debug page then you've got an idea of what it is. However, this tool goes beyond those to take "state snaps" before and after each phase. And, it keeps all the info from every request and every session, even expired sessions.
Pre-alpha documentation and download is here.
So now you can debug those nasty AJAX components that do four or five JSF requests with every mouse click. You see all the HttpServletRequest data like params, headers, and cookies. And, you can look at the performance data for each request and each phase.
For now, we store this info in memory for you to peruse at your leisure. Later, I'll probably look at other options like saving to a database. That way, it might be a fit tool for production auditing.
So right now you are either thinking this is really cool or really nuts. Judge for yourself, and let me know. And if you have a good name for it please let me know that too. Right now I'm calling it JSFSpy, but I really don't like that name.
There is no dependency on JSFUnit. Installation just requires dropping a single jar into the WEB-INF/lib of your application. But you can do assertions on the collected data from JSFUnit or you can just browse it with the UI. If you want to use the UI, you'll need to put some xhtml files in your web app. Instructions are here.
Here are the screen shots that should tell you exactly what it does. There's more stuff to add like Seam scopes, JSF2 scopes, component tree, and FacesMessages. What do you think so far?

Main screen shows all HttpSessions ever created.

Request view shows all Http/JSF requests for the selected session.

Scoped Data view shows toString() value of each scoped attribute before and after each phase.

HttpServletRequest view shows incoming URL, headers, request params, cookies, etc.

Perf Data View shows which phases completed and how long each one took.
Pre-alpha documentation and download is here.
So now you can debug those nasty AJAX components that do four or five JSF requests with every mouse click. You see all the HttpServletRequest data like params, headers, and cookies. And, you can look at the performance data for each request and each phase.
For now, we store this info in memory for you to peruse at your leisure. Later, I'll probably look at other options like saving to a database. That way, it might be a fit tool for production auditing.
So right now you are either thinking this is really cool or really nuts. Judge for yourself, and let me know. And if you have a good name for it please let me know that too. Right now I'm calling it JSFSpy, but I really don't like that name.
There is no dependency on JSFUnit. Installation just requires dropping a single jar into the WEB-INF/lib of your application. But you can do assertions on the collected data from JSFUnit or you can just browse it with the UI. If you want to use the UI, you'll need to put some xhtml files in your web app. Instructions are here.
Here are the screen shots that should tell you exactly what it does. There's more stuff to add like Seam scopes, JSF2 scopes, component tree, and FacesMessages. What do you think so far?

Main screen shows all HttpSessions ever created.

Request view shows all Http/JSF requests for the selected session.

Scoped Data view shows toString() value of each scoped attribute before and after each phase.

HttpServletRequest view shows incoming URL, headers, request params, cookies, etc.

Perf Data View shows which phases completed and how long each one took.
Tuesday, February 24, 2009
JSFUnit goes GA
I'm very happy to report that the JSFUnit 1.0.0.GA release is now out!
JSFUnit is the only end-to-end BlackBox/WhiteBox testing solution for JSF. Your tests run in-container and out-container at the same time. That is, JSFUnit lets your tests submit real HTTP requests using a headless browser. Then it lets you examine all the artifacts inside the container including the FacesContext, Managed Beans, UIComponent tree, FacesMessages, and much more. And since you are running inside the real container you never need a mock object or stub. You never have to worry about constructing a fake test environment.
Most of you reading this blog have heard all that stuff before, so I'll just talk a bit about the GA release. Here are the main changes from the Beta 3 release.
So long, and thanks for all the fish,
Stan
JSFUnit is the only end-to-end BlackBox/WhiteBox testing solution for JSF. Your tests run in-container and out-container at the same time. That is, JSFUnit lets your tests submit real HTTP requests using a headless browser. Then it lets you examine all the artifacts inside the container including the FacesContext, Managed Beans, UIComponent tree, FacesMessages, and much more. And since you are running inside the real container you never need a mock object or stub. You never have to worry about constructing a fake test environment.
Most of you reading this blog have heard all that stuff before, so I'll just talk a bit about the GA release. Here are the main changes from the Beta 3 release.
- The conversion to HtmlUnit is now complete. The old client side API based on HttpUnit is completely gone. Since HtmlUnit is far better at handling javascript, this means that most JSF AJAX libraries will work right out of the box. The notable exception is ICEfaces, and I've been working with ICEfaces team to get support for that as soon as possible.
- We now have a JSFUnit deployer for JBoss AS5. I blogged about this earlier. This deployer lets you run your JSFUnit tests without making a single change to your WAR. Click here for details.
- JSF 2.0 support. I know you are wanting to play around with JSF 2.0, right? Now you don't have to give up test-first development while you explore.
- The last change is a bit of sad news. The two developers who were working on the JSFUnit static analysis tool have moved on to new jobs where they are no longer using JSF. I versioned the code to 1.0 along with everything else, but I do want everyone to be aware that new features and bug fixes for static analysis won't happen until someone else steps up. If you are interested in taking this on let me know. JSF static analysis is really cool stuff and it's a very useful tool.
So long, and thanks for all the fish,
Stan
Subscribe to:
Posts (Atom)