testdriven.com Wrangling quality out of chaos

Archive for the ‘Blogosphere’ Category

Lessons Learned from the October 2013 SF Selenium Meetup

Lesson 1: When creating single-page applications in JS, its really worth it to do a thorough job of unit testing, because the same tests can be used to test the compatibility of your code across various browsers.


Lesson 2: Don’t fall into the pitfall of a slow build. Design your infrastructure and your tests to be parallelizable from day one. This relatively small investment upfront will save you years of anguish in the future trying to fix your Test Technical Debt.



Testing Keys and Values for Distributed Caching

07.23.2011 · Posted in Blogosphere

In distributed caching, cache keys and cached values routinely travel across the network. That’s why it is critical to write proper unit tests for keys and values in order to avoid unpleasant production surprises. This post tells how to test keys and values for distributed caching.

Setting up LiquidTest with Maven

04.15.2010 · Posted in Blogosphere

Given Maven is a popular tool we decided to put together an integration doc for its use with LiquidTest. The integration was planned to go out with our website refresh later this month but given the popularity of Maven, I thought I would share it before then!

To read the entire article visit: http://www.jadeliquid.com/blogs/2010/setting-up-liquidtest-with-maven.php

Simplify creating mock objects with Mockito and the Builder Pattern

09.07.2009 · Posted in Blogosphere

You know that if you do unit testing at some point you will run into mocking. There are many libraries out there like JMock, EasyMock, but my favorite is Mockito. In this post I explore the option of using a Builder Pattern to simplify the creation of a hierarchical mock object that contains nested mock objects itself.

Take a look at the posting:

Wrong About TDD

11.06.2008 · Posted in Blogosphere

Stephen highlights what he missed out on by not adopting TDD earlier and exhorts others to join the mix.


Mocking LINQ Queries, Extension methods and Anonymous Types

12.09.2007 · Posted in Blogosphere

Via Roy Osherove,

One of the things I wanted to show at my Interactive session on unit testing tips and tricks at TechEd this year was how you can "Stub" out results from LINQ Queries, or mock\stub Extension methods in .NET 3.5
TypeMock, is a very powerful mocking framework. much more so than Rhino Mocks or NMock, because it allows isolating static methods, private methods, constructors, and basically anything you can do in IL, because it uses the .NET Profiler APIs to intercept method calls and do whatever it wants with them. In that regard, it is almost too powerful because it rids of of the need to actually design your code for testability, and just test it as is (how you actually write the tests is another matter for another post).

Read the rest of this post here.

Continuous incremental bloat?

10.24.2007 · Posted in Blogosphere

Amr Elssamadisy ponders over pipelined Continuous Integration: "One of the well-known practices of Agile development is Continuous Integration, which entails team members integrating their code regularly into the baseline and running all unit and system tests. In most teams a CI server is used to do this quickly and automatically when code is checked into the baseline. This usually works well in the beginning of a project, but sometimes, when the team and/or code-base get large, the CI server starts to slow down. The cycle between builds grows and the feedback degrades — a build may take an hour or more to respond with a pass/fail, and by that time several people may have checked in their code into an already broken build." (Is Pipelined Continous Integration a Good Idea?)

Nikita Ivanov also wonders about the Dark side of diligent unit testing.Peter Maas blogs on how to do TDD with Grails.

Scott announced that Version 4.1 of TypeMock.NET is now available. (Announcement)

Did you know soapUI has plugins?

Matthew Bass wishes flexmock and unit_record would play nice.

Ben Fulton posts some notes from a "really good session by Gerard Meszaros" on Test Patterns at SD Best Practices 2007 (xUnit Test Patterns and Smells)

Mark Levison knows that working at a Distance is hard, and lists the tools he uses to shorten distances in outsourced Agile teams.

Patterns of Agile Practice Adoption is available as a free download from InfoQ (after registration).

Stelligent will be celebrating Testoween on tuesday, October 30th, from 5:50PM to 7PM in Reston, Virginia. "I often run into teams who attempted to jump skull first into TDD and eventually threw their bones up in frustration when either schedules became scary or they ran into scenarios too frightening to test. Are there areas where test-driven development gives you the spooks? We’re terribly excited to announce that on Tuesday, October 30th, we will be hosting a roundtable discussion on TDD at our lair in Reston, Virginia. Get into the spirit of Halloween by treating us with your horror stories on the trickiest problems when implementing TDD. We’ll be talking about what spells work and what spirits don’t, while mingling over a cauldron of fine wine (courtesy of Savoy-Lee), cheese, and other potions. We’ll also be raffling off a screamingly appropriate iPod shuffle. Registration required, seats limited." (Share your TDD horror stories)

What is Agile Development? An Interview with Venkat Subramaniam.

"An interesting part of the discussion in the After Agile, What Next? session involved the question of omitting certain agile practices when they are impractical or unsupported in a given organization or under a given set of circumstances. The consensus was that people who fully understand how and why agile practices add value and how they interoperate to bolster each other’s strengths and cancel out each other’s weaknesses, and who have actually worked on projects that were ‘fully agile,’ are equipped to find alternatives to compensate for the removal of one or more particular agile practices. Unfortunately, many people who have never fully applied agile practices mistakenly believe they understand how to pick and choose individual practices without losing any of the effectiveness of the agile approach. This sort of thing is often behind the comments we sometimes hear about agile experiments that ‘failed.’" (Dave Nicolette on Agile software development)

Tad Anderson voices his concerns about the Agile buzzword: "You either know how to do the tasks in the process right, or you don’t. Just doing them is not good enough. So this agile attitude of ‘Since process activities don’t work, let’s get rid of them’ does not do anything for the team that didn’t know how to accomplish the tasks right in the first place. It just displaces their lack of skills to different task. I have seen tons overly bloated software out of agile teams because most teams use agile as an excuse to go right to code." (Agile Development != Low Ceremony && The Movement Needs to Die)

And there’s always more on Religion driven industry

Luc Legardeur and Xebia propose a tentative model for Agile Maturity, based on Governance, Technical excellence, Specifications, Simplicity, Collaboration and Leanness (Simple Agility Maturity model, in French).

In August, VersionOne published their second annual survey of Agile Development: "VersionOne, in association with the Agile Project Leadership Network, are pleased to present the results from the second annual "State of Agile Development" survey. The survey has become one of the largest in the Agile Development market; receiving almost seventeen hundred (1,700) responses with a truly global reach of respondents from seventy-one (71) countries." (2nd Annual State of Agile Development Survey)

No design, The testing genes, Sharing thoughts

03.14.2007 · Posted in Blogosphere

"Does Agile imply no design? Can the architecture evolve from doing the simplest thing possible? Is up front design good or bad? These questions, it seems, are still very controversial in the agile community. At the Architect Insight Conference in Newport [March 5], several presentations touched upon the topic of design and architecture in agile development." (Gojko Adzic, Agile Architect – Myth or Reality?)

Alberto Savoia identifies the genetics of testing. "I am rooting, of course, for the major victory [where developer testing becomes a standard software development practice], but I am starting to have my doubts, and wondering why progress is so slow. Below is my analysis of what I believe is happening and I’d be very interested in your opinion." ([url=http://www.developertesting.com/archives/month200701/20070126-developer%20testing%20test-infected%20gene.html]Testing Genes, Test Infection, and the Future of Developer Testing[/url])

Srinivas Ramgopal shares his company’s experience with XP and TDD: "We evaluated XP and TDD for 8 months with a new developer (with good previous experience in them) added to the team. The team is a group of seasoned developers but new to agile development. I thought I would share with you the team evaluation with the main intent to know your input based on your experiences with TDD." ([url=http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=42&t=000820]JavaRanch Big Moose Saloon: TDD/XP – sharing thoughts[/url])Karfai Wusan uses rspec to experiment with Behaviour-Driven Development, and details the step-by-step process of creating a story-editing application (Beyond the Edge of Forever: ruby and behaviour-driven development).

"Working with scaffolding makes it nigh impossible to do test-driven development, whereas working from a UI makes it very, very easy. With scaffolding, what tests would you write first? What is the behavior your want your final product to have? That’s not a very easy question to answer when all you know is the set of models you think your application needs." (Scaffolding’s place)

"Setting up expectations in a mock framework like EasyMock is usually straightforward when dealing with simple types like integers or strings. But from time to time I run into situations when things become more complicated. Consider the following example." (Complex expectations in EasyMock made easy using JSP EL)

Ben Monrog has been thinking of a new agile methodology he calls [url=http://www.benmonro.com/Blog/PermaLink,guid,fe63b91b-48a3-4dc3-95ab-f43eb40c9518.aspx]Demo Driven Development[/url].

Andrew Binstock presents a small review of Agile Java by Jeff Langr, which shows why TDD is a good way to teach Java.

James Carr has matured as a pair programmer: "I’ve been able to first hand experience some of the ways to be a bad partner and a good partner when pair programming. One of my major problems was I had a tendency to either hog the keyboard, or I would do what I like to call Backseat Driving: you let your partner drive, but you dictate exactly what they need to type." (Backseat Driving in Pair Programming)

Agile is on sale, Old geeks keep going, Code quality matters

01.24.2007 · Posted in Blogosphere

Reginald Braithwaite explains what he’s learned from sales, and how it applies to selling agile development techniques.

David J. Anderson thinks we need New Rules for Old Geeks.

Levent Gurses discusses Code Quality in Eclipse and adds two tools, Simian and CAP, to the list of Eclipse Code Quality plugins described in Paul Duvall’s developerWorks article.Joey Beninghove posts a short list of TDD Resources for .Net.

"When it comes to automated tests the first impression everyone (including myself) thinks that that would certainly increase the amount of time a certain feature is developed in. However as I started to practice TDD, Test First Programming, increasing the number of tests I came to the conclusion that automated tests actually allow you and the team to develop faster than without." (How TDD improves development speed and is very cost effective, Dan Bunea)

Danny Lesnadrini reviews SQL Refactor.

The first product release of AgileTrack is available. "AgileTrack is a development tool which assists in managing projects, tasks, and techniques leading to their completion." (AgileTrack: Agile/Extreme Programming Project Management, Iteration Planning, and Task Tracking Tool)

Levent Gurses addresses transparency in agile development: "Transparency is a major dynamic associated with agile development. At the roots of the people-centric model advocated by agile development is a philosophy of collaborative, non-punitive accountability that can be defined as transparency. Thanks to their social methodology, agile projects offer better transparency to clients, business partners and corporate decision makers. When broken down, this concept consists of management components such as individual responsibility, commitment, and accountability." (On the Way to Agile Transparency: Climbing the Big Wall)

"Agile software development requires input from all team members, and such collaboration is most effective when everyone participates." (Online Collaboration and Agile Software Development, Dr. Dobb’s)

Revenge of the Anti-test, Developer optimism, Nullity defined

01.10.2007 · Posted in Blogosphere

Charles Miller finds an interesting class of bugs: the ones that fix themselves spontaneously from one build to another. Well then, are those tests really green? (Revenge of the Anti-Test!)

Laurent Ploix has advice for optimistic developers. "We tend to under-estimate the development charges, we like to forget about some tasks (debug, documentation…), and we tend to believe that a code that works on one machine works everywhere. Almost everybody knows that this is nonsense:" (But it works on my machine!)

James Carr has been encountering tests that only contain assertNull and assertNotNull (TDD Anti-Pattern: The Nullifier).Alex Ruiz has released version 0.2 of his testng-abbot tool. It provides flexible assertions and component Fixtures. (Alex Ruiz’s weblog)

Shane O’Sullivan releases the first beta of his build tool for the Dojo javascript toolkit.

Folks on JavaRanch attempt to [url=http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=42&t=000814]explain Agile to management in 30 secs[/url].

Following in the bytesteps of the Ambient Orb Ant Task, the Eclipse XPS plug-in shows the results of JUnit test runs using the built-in LEDs on Dell XPS (eclipse-xps – Google Code). Some screenshots.

Jeremy Rainer found a few "excellent" presentations on Selenium (Jason Huggins), Building testable AJAX applications (Adam Conners and Joe Walnes), Behaviour Driven Development (Dave Astels), Scrum Et Al (Ken Schwaber), Doubling the value of automated tests (Rick Mugridge), Using open source tools for performance testing (Goranka Bjedov). See the list here.

Hudson 1.72 is out: "Hudson now uses a ‘slave agent’ program on the slave machine, which maintains a single bi-directional stream with the master." (Hudson 1.72 and new remoting infrastructure)

Settling the score, Raking Java, Grand integration

12.23.2006 · Posted in Blogosphere

Jay Flowers finds ways to promote the growth of unit tests in Playing for Real, More Than a Scoreboard.

While Apache has just released version 1.7 of Ant, JRake is starting to earn attention: "JRake is the latest entry in build tools for Java that is based on a scripting language. JRake leverages JRuby and the Rake build tool for Ruby to make building, running tests, and deploying web applications quick and easy." (JRake: Build, Test, and Deploy Java applications without XML, InfoQ)

Rick Hightower writes the steps to setting up [url=http://www.thearcmind.com/confluence/display/SHJFT/TestNG%2C JMock and Spring integration tests]TestNG, JMock and Spring integration tests[/url].Jee Wartac has also been blogging about Shale Mock Objects.

"I believe that the agile community is at a crossroads: It has reached the chasm point in Geoffry Moore’s technology adoption curve and is looking over the precipice. Although some techniques, such as test-first design, refactoring, and daily stand-up meetings seem to have crossed the chasm it is not clear yet whether agile methodologies — or even the concept of agile software development in general — is going to succeed in the long term. Clearly a critical success factor will be our ability to attract traditionalists to our way of thinking. From what I’ve seen over the past few months, I believe that we are struggling if not out-right failing to do so. One of our problems is that traditionalists see that many self-declared agilists only seem to talk about being agile but they don’t actually live up to their lofty ideals." (Dr. Dobb’s, An Agile New Year’s Resolution for All of Us)

"Previous criticisms of Agile by Steve Yegge and Joel Spolsky have been discussed previously on InfoQ, and such criticisms aren’t new. What is new is the extent to which the agile community itself is questioning the current direction of Agile." (Reflections on the Growth of Agile, InfoQ)

Trail Ridge Consulting conducted an independent global survey of the agile software development community to determine the project management tooling that companies are using to support their agile processes. The report is here.

Gary Pollice wrote a review of Organizational Patterns of Agile Software Development.

Unit test enthusiasts, Painful critters, Retirement plans

12.13.2006 · Posted in Blogosphere

"You’d think that life was good and code was well tested. You might think so — I know that I did — but reality shows a jarring disconnect between all of the enthusiasm for unit testing and the amount, and quality, of test code actually written. Why do I say this?" (simonpeter.org)

"Many developers seem to look upon software build tools with disdain. They see them as painful creatures put on the earth to gnaw at their patience. The developer just wants to get on with Real Work (coding), and not have to deal with such annoying details. This attitude arises for a few reasons" (Learn Your Build Tool. Well.)

Does the rise of "Agile religion" signal that the moment has arrived to retire the "Agile" label? (Debating Agility at ThoughtWorks)Jay Flowers follows up on his earlier article, A Tune-Up for TDD? in Refinements, Clarifications, and Simplifications of a Tune-Up.

"I have been working for some time on getting my organization to adopt TDD. I began with manipulation." (Tipping TDD, Jay Flowers)

"Current SOA processes and guidance generally encourage a phase-based approach to SOA implementation, fully understanding the problem and defining the solution before implementation begins. Digital Focus, an east-coast firm specializing in Agile software development and integration, is convinced that Agile development practices are equally suited to implementing SOA." (InfoQ Interview: Using Agile for SOA)

George Malamidis simplifies his mocking: "Up until recently (a few hours ago, that is…), I lived with the notion that Mock Objects are a necessary evil. You don’t exactly like them, but you can’t really do without them. They have obvious advantages, but something about them never felt quite right." (From Mocks to Expando)

Mockrunner 0.3.8 is out.

Dave walks through the installation of Continuous Integration with Hudson on Glassfish.

"The best way to use multiple versions of IE on one machine is via virtualization. Microsoft has recently made Virtual PC 2004 a free download; we’ve taken advantage of that by releasing a VPC virtual machine image containing a pre-activated Windows XP SP2, IE6 and the IE7 Readiness Toolkit to help facilitate your testing and development." (IE6 and IE7 Running on a Single Machine, IEBlog)

IntelliJ IDEA announces that the Early Access Program for TeamCity 1.2 and Agra (1.5) is open.

TDD Anti-Patterns, Two hours can waste two weeks, The Boss

11.29.2006 · Posted in Blogosphere

James Carr has started a community-driven list of TDD Anti-Patterns: "Recently I began to write a paper on TDD Anti-Patterns, and decided to first quickly jot down some of the most common ones that others or myself have encountered ‘in the wild.’ I then posted what I had on the testdrivendevelopment on yahoogroups mailing list, and got an excellent bit of feedback! As a side note, keep in mind this is merely a catalog at the moment, hopefully to be expanded in full down the road."

"Your developers have just planned a two week iteration. The next day Sarah continues her work on the completion of an important New Project. And here it comes: Urgent Stuff…" (How Two Hours Can Waste Two Weeks, Mishkin Berteig)

[url=http://www.eweek.com/article2/0,1759,2052258,00.asp?kc=EWRSS03129TX1K0000612]The Boss Wants Us All to Get Agile[/url]: "Is it good news or bad news when nontechnical management gets enthused about a software development meme such as agile development methods?" (Peter Coffee)soapUI – soapUI 1.6: "soapUI 1.6 final introduces a large number of fixes and many minor improvements which have been accumulated during the snapshot releases during the last months."

There is now Unit Testing for the .Net Compact Framework.

If you’ve ever wondered about Agile Game Development, Noel Llopis has a few links.

"Neither unit tests nor functional tests are enough, I propose other test layers and I explain how to set them up to enhance the software development process." (Create test layers for developers’ efficiency, Laurent Ploix)

Debasis Pradhan lists the Pros and cons of Black Box and White Box Testing.

Dave Nicolette continues his walkthrough on the hard value of agile: "During weeks 9-12 the traditional team is in the Design Phase of the waterfall. After a quick review of the requirements document, the customer signs off the requirements document, which then becomes the contract for software development." (agile software development). Dave has also made nice posts on introducing software developers to TDD on the job, talking to project managers about agile development, and, uh, dancing with trolls. Materials from Dave’s presentation at XP Days Germany are here.

If you’re in Paris december 5th, Valtech will hold a free seminar on agility, themed: Méthodes Agiles, Adoption à l’échelle d’une organisation.

Bad agile, Annotation transformers, Continuous distribution

11.02.2006 · Posted in Blogosphere

Chuck Hoffman has made two fine posts on "Bad Agile" and Critique of Extreme Programming: part 1, part 2.

Cédric Beust introduces the rationale behind TestNG’s Annotation transformers in Java. And, oh, TestNG 5.3 is out.

Paul Stovell posts on extending Continuous Integration to Continuous Distribution: TrialBalance Build System.Phil Haacked writes on Using Rhino Mocks To Unit Test Events on Interfaces: "I am working on some code using the Model View Presenter pattern for an article I am writing. I am using an event based approach based on the work that Fowler did. For the sake of this discussion, here is an example of a simplified view interface."

Keith Ray warns against Over-using Mock Objects: "Mock Objects used in Test-Driven-Development are "fake" objects that return specific values, and assert that calls are made with correct arguments and in the correct order. Avoid them. Mocks make your tests more fragile and more tightly-coupled. And at the same time, they reduce the integration-test aspects of TDD. They make your tests larger and more complicated and less readable."

Gunjan Doshi posts his "Good Agile Karma" Reminders: "Agile teams crank out lot of code in short time. I have seen that if teams are not reminded they tend to slip back to their old habits. I created a list for our teams to keep their agile karma good."

Ayende Rahien posts on how to go about Building Applications Using Castle RC2, in test-driven fashion.

Jason Gorman is Modeling Unit Tests in UML.

Andrew Glover has found a few useful widgets for CruiseControl.

Martin Fowler addresses some Pair Programming Misconceptions.

Agile Backlash, Iteration pipelining, Time sensitivity

10.27.2006 · Posted in Blogosphere

Jonathan Kohl posts on The Agile Backlash: "Now that the Agile movement is making it into the mainstream, and gaining popularity, it is facing a backlash. Aside from the mainstream pro-Agile trend we hear so much about, I see three reactive trends: rejection by non-practitioners, a mandated reversal in corporate methodology focus, and an adaptive reaction that builds on good software development ideas and practices."

Matt Albrecht posts on Unit-testing sensitive code: "One big headache in unit tests involves time-sensitive code. By their very nature, these tests become machine dependent and thus brittle. I’m going to spend a few blog entries reviewing some types of code and possible solutions to testing them. In this entry, I’ll go over a particularly interesting one I came across in the CruiseControl code."

Azad Bolour has made good posts on process, including this one on Iteration Pipelining: "The practice of pipelining functional design and development is not uncommon in [Iterative and Incremental Development] projects. But there is concern that pipelining can lead to disruptive cross-iteration interruptions. For example, while the functional designers are busy designing the functions of the next iteration, the developers need bandwidth from them for the clarification of the functions of this iteration. In our experience, interruptions in this direction, while frequent, were welcomed."James Avery probes how to go about Facilitating Multiple Assertions: "The main drawback to having multiple asserts in a test is that all of the unit testing frameworks I have used fail the test on the first assert that fails. [..] My idea is that we should have an attribute we could use to tell the framework that we want it to run all the asserts." See also Roy’s response: Avoid multiple asserts in a single unit test: revisited.

Michael Mahemoff’s final installment of podcasts on Ajax Patterns covers Diagnosis And Testing Patterns.

Matt Berther asks Who needs Fitnesse? "We’ve been diligently using Fitnesse for the past year or so to document and automate our acceptance tests. For the most part, this has been an inefficient process. Let me clarify a little…"

Buck Hodges posts on A checkin policy to detect that the build is broken in a CI environment.

John posts 10 reasons why he believe[s] in agile approaches to software development.