As of May 2nd I will no longer be employed at Source Allies. My blog has a new home at http://blog.sudr.info. Feel free to follow me there.
Rethinking the DAO-Service layer relationship
April 8th, 2011 by Tim Bierbaum 1 comment »Lately I have been thinking that the standard service-calling-the-dao-layer architecture hasn’t been working out as well as I would hope. The applications I have been working on have been using Spring and Hibernate with a dao object per model object. While this does provide a good separation between the two, I have been finding it increasingly difficult to write good tests for the service layer as the project matures. Past experience has shown that if writing tests is difficult, then it just isn’t done. Follow along as I think about possible ways to address this issue.
» Read more: Rethinking the DAO-Service layer relationship
Selenium IDE – Part II
April 1st, 2011 by David Kessler No comments »In Part I we covered
- Setting Up
- Recording Tests
- Playing Back Tests
- Saving Test Cases
- Resuming Recording
- Saving Test Suites
All examples will use the sample site https://sites.google.com/site/example4selenium/.
Store Value
- There are two ways to store values.
- First, you can define custom variables
- Second you can use the drop-down ’storeText’ option.
Pair Programming 101
March 9th, 2011 by David Kessler No comments »Overview
Pair programming is a technique where two programmers work at a single work station. One person “drives” or has control of the mouse and keyboard. The other person “navigates” or keeps track of where they are and where they are headed. This is a perfect environment for teaching and learning to occur.
» Read more: Pair Programming 101
Selenium IDE – Part I
March 1st, 2011 by David Kessler 4 comments »Selenium IDE is a free Firefox plugin that leverages javascript to record automated test scripts. In this first tutorial we will install Selenium IDE and create a basic test script. The next tutorial will cover more advanced topics.
I primarily use Selenium IDE in three areas:
- Defect – I ask testers to record their steps and attach the script to their defects. This is a simple way to communicate exactly how they found an issue. This technique significantly cuts down on communication overhead.
- Acceptance Testing – While I prefer writing tests before I write the code, this is a simple way to record tests on existing web applications. In part II I will show you how to export these recordings into Java. By exporting these scripts you can easily add them to your existing automated test suite.
- Demo Setup – I’ve found it handy to run small Selenium test cases to setup a demo. For example you may want to demonstrate the functionality on the tenth page that requires a log-in and multiple data entry steps. This approach can reduce demo setup time and enable you to focus on demonstrating new functionality.
Setup
- Install the Selenium IDE Firefox plugin (http://seleniumhq.org/projects/ide/)
- Navigate to https://sites.google.com/site/example4selenium/ in Firefox
- Tools -> Selenium IDE
Greasemonkey
February 18th, 2011 by David Kessler 1 comment »Greasemonkey is an extension for Firefox that leverages javascript to modify the look and functionality of a page. At first glance this tool looks like a neat toy. However, this tool came in quite handy at one of our clients recently.
Our client was tracking their daily status on a whiteboard in a conference room. A corporate memo was sent out banning the exclusive use of whiteboards for teams. As a result we turned to our web-based tracking tool. Unfortunately their whiteboard equivalent was clunky and inadequate. I spent a few hours putting together a Greasemonkey script that altered the look of this page to mimic our old whiteboard. These changes helped ease this transition.
» Read more: Greasemonkey
Transactions Our Invisible Allies
January 28th, 2011 by David Kessler No comments »Transactions are an essential component in enterprise software development. When your application works properly you rarely think about transactions. However, when things go wrong debugging transactions can be quite challenging. Instead of being reactive we need to proactively test our transactions.
When I first got into the software industry I was a manual tester. Those years of repetition and tedium drove me to the world of coding and automation. As a software developer I am committed to automated testing. If a feature is worth coding it is worth testing. Automated tests have positioned me to be proactive instead of reactive. Nevertheless, transactions are quite challenging to test.
» Read more: Transactions Our Invisible Allies
Javascript functions for creating a read-only view
December 15th, 2010 by Tim Bierbaum No comments »I’m sure you’ve all been there before. After months of creating page after page of crud screens, you’re now asked to create a read-only view of everything. I usually see this implemented with setting the readOnly attribute on every field to a variable that indicates whether or not the screen is editable. While this works, I don’t like it for three reasons:
- I would not be confident that the readOnly value will be correctly added to every field that is later added to the application.
- I would not trust the person originally implementing this change to modify every input the first time around. Chances are a couple will be missed.
- I would hate to have this task assigned to me and I would hate even more giving it to someone else. “Here, go add this flag to every input on these forty screens…”
Below is my latest attempt at a general solution to this problem. Caveat Emptor – I’ve never deployed this code to a production app and I fully expect to be bit by some huge limitation when/if I ever do. Consider it food for thought…
» Read more: Javascript functions for creating a read-only view
Exploring Design Patterns in the JDK
November 8th, 2010 by Sudhakar Ramasamy No comments »Design Patterns are software design solutions that can be applied in our daily software development to help us develop code that is flexible, resilient to change and easily understood (when you are familiar with the pattern). The JDK APIs employ patterns in several areas. So even if you aren’t familiar with patterns if you’ve programmed in Java, you’ve been developing against APIs that have been built using patterns.
Aggregate MyBatis.NET SqlMaps from Multiple C# Projects
October 6th, 2010 by Matt Vincent 3 comments »Summary
This blog post describes an approach for integrating Spring.NET and MyBatis.NET in a way that lets iBATIS aggregate SqlMap config files from multiple assemblies (a.k.a. assembly scanning) prior to handing out ISqlMapper instances. Teams setting up new MyBatis.NET/Spring.NET tech stacks might find this useful.
» Read more: Aggregate MyBatis.NET SqlMaps from Multiple C# Projects