page-object 0.5.4 released


*** DEPRECATION WARNING
*** You are calling a method named table.
*** This method does not exist in page-object so it is being passed to the driver.
*** This feature will be removed in the near future.
*** Please change your code to call the correct page-object method.
*** If you are using functionality that does not exist in page-object please request it be added.

You might see a warning similar to this one when you use the new page-object release. I am planning on removing something that current exists in the gem. This post will explain what and why.

Continue reading

Posted in PageObject, Ruby, Uncategorized | 7 Comments

Default Data Revisited

I just released a new version of the page-object gem today and it contains a nice new feature. This new feature will make it very easy to apply a set of data to a screen and have it populate all of the fields. This feature, when combined with a new gem I plan to announce soon, will allow for dynamic default data that can be used to drive a web application. This data can be managed within the pages or externally.

This post is an actual section from chapter 5 of my book. It introduces the concept of Default Data and also shows how to use this new feature.

Continue reading

Posted in Cucumber, PageObject, Ruby, Testing | Leave a comment

Playing the waiting game

One difficulty testers run into when they are new to driving browsers with cucumber is knowing how to handle sites that contain a lot of ajax calls. They write scripts that assume the elements on the page exist and are shocked when the tests fails because it was trying to access something that wasn’t on the page yet.

In this post I’ll write a simple scenario that demos the async handling capabilities in the page-object gem. I’ll also briefly introduce you to a new gem that I use to generate my new projects. I’ll do all of this by writing a scenario that uses one of the examples google has provided to demo the GWT libraries. For those of you who have taken one of my classes you will already be familiar with this example but perhaps there are still a few things here for you to learn. Let’s get started writing the code!

Continue reading

Posted in Cucumber, PageObject, Testing | 3 Comments

Running your Cukes in Jenkins

One question that I am often asked is “How do you run your cucumber scripts?”. This question usually leads to a discussion about what process and software I use to run my features in a regression-like fashion in a team setting. The questioners are usually not interested in how a developer might use autotest (my local tool of choice) to run the cuke/spec loop. They’re not interested in how a developer might run a feature on their local machine to verify they have completed a card. They’re also not interested in how a developer or tester might run the entire suite of features to verify everything still works. They want to know how to schedule the execution of the entire suite of features.

The truth is that I don’t run them. Instead I have a server process run the features for me. I am a strong advocate of having the continuous integration server run the acceptance tests continuously. This post will explain how I do it and hopefully provide you the information you need to do it as well.

Continue reading

Posted in Cucumber, Ruby, Testing | 6 Comments

Those pesky frames and iframes

Wouldn’t it be sweet if all of the web pages in the world were nicely formed with easy to identify elements. If you work in an environment like this, I am envious. I often find myself working with a team where the sites are not pristine (I’m being nice here).

One thing I have found difficult to work with is pages that have frames and iframes. It gets worse when the elements you are trying to work with are nested within multiple frames/iframes. To address this complexity I decided to add simple frames handling to page-object.

Continue reading

Posted in Cucumber, Ruby, Testing | 19 Comments

Introducing page-object gem

page-object is a simple ruby gem that assists in creating flexible page objects for testing browser based applications. To understand the inspiration for this gem please read this blog post.

This post will walk you through some of the core features of the gem. Most of the materials in this post are also on the project wiki. Please refer to the wiki for updated documentation.

Continue reading

Posted in Cucumber, Ruby, Testing | 12 Comments

Transforming My Cukes

This past week on the cucumber list Aslak asked if people knew about and where using Transforms. Based on the response I would have to say that not many know about it. I have to put myself in this category. I decided to dig in and here is what I’ve learned.

Continue reading

Posted in Cucumber, Ruby | 1 Comment

Using the database in our tests

I’m releasing another chapter of my book. It is the chapter we focus on using a database in our tests. The chapter uses ActiveRecord and several additional gems. Please give it a read and let me know what you think.

Continue reading

Posted in Book, Cucumber, Ruby, Testing | 1 Comment

My Book

For the past two of years I have had a string of successes and a lot of fun helping teams adopt Acceptance Test Driven Development with Cucumber. I was never brought in to do this specifically. You see, I am an agile coach and I help team adopt agile and lean practices. And yet due to these successes with Cucumber I started thinking about how I might share these experiences.

I initially decided I would write a blog series. When I outlined it I quickly determined it would take nearly thirty entries to share all I wanted to share. That was when I came up with the crazy idea of writing a book. I had no idea what I was getting myself into. For the past several months I have spent a fair amount of my free time (do I really have free time?) working on this book. With this post I am releasing the first two chapters of that book.

Continue reading

Posted in Book, Cucumber, Ruby, Testing | 13 Comments

Bowling Game in C++

Last year was a blast. I started the year coaching a team that was developing a grails web application. Next was a batch application written in perl and pl-sql. Next I moved on to objective-c and then on to php and flash. I finished the year in java. I used ruby for testing with all of the teams. The variety has been fantastic and I have enjoyed each assignment. One thing that was really encouraging was that I found good unit testing framework in each language.

Last Thursday I attended the Cleveland Ruby Brigade meeting. It was nice to see a some old friends. I mentioned a few times that I had just started working with a team that was using C++. Each time the reaction was negative. People said things like “I’m sorry for you”. Actually, there is nothing to be sorry about. C++ is a strong language that has continued to evolve over the years and will have a place in software development for the foreseeable future.

The negative reaction to C++ encouraged me to create this screencast (my first ever). I had some time Monday morning before work so I turned on the recorder. I am using Google Test to drive the design. I hope you enjoy.

Posted in C++, Test Driven Development | 2 Comments