New post for nothing else than just to post

Written by charley on November 14th, 2009

This is a quick post just to get started in the habit of posting again. My blog as most has fallen into disrepair and I want to correct that by small steps, possibly just a few microblogs to get me started writing again on a regular basis.

I’m headed out to work in SF, Rubyconf and JRubyconf tomorrow for a week and a day. I’m hoping to take some quick notes and write them down here, hopefully they’ll be of use to someone, otherwise, I”m fine with blogging to myself for notes that I want to have. :)

 

ERubycon 2008

Written by charley on August 29th, 2008

This was the 2nd year for the Enterprise Ruby Conference – held at the Microsoft offices in Columbus – twice as big this year as last and likely to grow out of that venue next year.

For a more comprehensive overview on the full 3 days take a look at Josh Holmes’ blog – kudos to Josh for getting the space to hold the conference, blogging and giving a great presentation. Big thanks also to Joe O’Brien for organizing the event, getting great speakers and managing to present as well.

Giles BowkettThe Safety scissors of Meta programming

Giles is an entertaining speaker and the topic itself is very interesting as it’s one of the key features of Ruby, it’s not “magic”, it’s part of a well designed, adaptable language. Every ruby programmer should understand this and not invoke the idea that this is a mystical, mythical, magical feature, this is core to the idea of Ruby and other Java.next languages. Interesting takeaway – he talked about code that generates code – is it cheaper to hire a developer or write one? At his previous job for the LA Times he wrote what he calls a mini-Giles which is still to this day generating code for them. Great book on the topic – Code Generation in Action – which I’ll pick up soon.

Stuart Halloway – Ending Legacy Code in our Lifetime

Stu and Neal Ford talked about Essence vs Ceremony – Ceremony can be irrelevant details in code that doesn’t contribute to the task at hand. Java is full of Ceremony and currently holds a position as the last ‘Next Big Thing’. Ruby is the current ‘Next Big Thing’, typical of the cycle of languages and paradigm changes in the industry ~10 years. Ruby is a low ceremony language which helps tremendously to communicate the essence of the code, more readable and maintainable code. Ruby and other Java.next languages (and language polyglotism in practice) will be the standard, just as Java is today, in about 5 years.

The challenge is that when the Next Big Thing changes according to this talk is that we need a way to not dump everything. As software developers, our goal should be to build this generation’s code so that the Next Big Thing won’t force a complete “do over.” He also mentioned Ola Bini’s pyramid of polyglot programming – multiple languages used for clarity and separating out pieces of the architecture that will change from those that are more static.

Charles Nutter – JRuby

JRuby is an implementation of the Ruby Interpreter in Java that runs on the JVM. Charles talked about JRuby and what it brings to the mix.

Leveraging the JVM allows JRuby to: take advantage of using Ruby simple syntax with Java objects, uses optimizations in HotSpot increasing the performance of Ruby code multiple times over the standard Ruby implementation, allows the use of Native threads, Unicode, all of Java’s existing libraries, and inline Java code along with Ruby code.

One of the side benefits of JRuby is the political gain that can be achieved by leveraging Java’s existing place in the Enterprise. Deployment can also be simplified by creating a war file, deployable on a standard Java app server. One example was in this or another talk, where Infrastructure engineers didn’t even realize they were deploying Ruby code for several weeks after it had been running in production.

Evan LightUnit Testing J2EE from JRuby

Testing java and particularly J2EE – ejbs, etc. is hard. Testing Java with JRuby is easier since the language simplifies things. He gave examples on testing EJBs which is one of the biggest challenges. It’s much simpler in Ruby where you can dynamically add methods to existing Java objects, change method level access and mock out connections. JRuby is a powerful tool for simplifying the unit test creation and a good entry into the Enterprise. Evan’s also created a library – jrsplenda – that has JRuby helpers to simplify testing Java code with a combination of: Java reflection andJRuby metaprogramming. Cool stuff.

Neal FordEssence and Ceremony

Neal is a great speaker, I had the fortune of seeing him speak at Agile and then again here on completely different topics. As I mentioned previously, Ceremony and Essence was certainly a big theme from both Neal and Stu at this conference.

Accidental and Essential complexity. Essential complexity involves solving problems that are inherently large vs Accidental complexity where we’re introducing the complexity into the situation. Example: EJBs introduce a lot of Ceremony(Accidental complexity) by having half a dozen configuration and other files to get to the essential function of the code.

The attempt to commoditize software engineering: FAIL. The average developer is not ½ as good as the best developer; they are instead, many times less effective and potentially even a net negative.
“Bad developers will
move heaven and earth
to do the wrong thing.”
Glenn Vanderburg

Java is a language of frameworks, more of that to come in Neal’s next talk. EJBs, JSF and other frameworks all spawned out of Java to handle the inherit flaws in the language to develop tools, vendor buyin, add complexity(Ceremony) to solve difficulties in bending the language to the problem.

“How much of enterprise development does nothing than service accidental complexity?” Enterprise development should be using Essential languages to solve problems with excellent developers. A five week training course that makes a developer 10% more productive will pay for itself in a year.

Neal also hit upon the same idea expressed early about polyglot programming. Ruby and other dynamic languages are much more capable of change and should be used – to refer back to Ola’s pyramid – on the tiers that are apt to change more frequently due to changing business requirements, while Java/C and other languages can be kept at a lower static level which is less likely to change.

It seems that not only is Ruby going to play a large force in the next cycle of software development, but the general sense of the Ruby community will also change the paradigm towards a focus on testing, polyglotism in large scale development – use the right language for the right task – and expression of intent in languages closest to communication with the domain.

Stuart HallowayTesting AntiPatterns: How to fail with 100% test coverage

Stuart talks about coverage tools and metrics and when 100% isn’t enough – coding choices(branching, et al) – and traps you could fall into. Good stuff, go read it.

Neal FordDesign Patterns in Dynamic languages or ‘How to make C++ Suck Less’

A few speakers hit upon the topic of the GOF book which when I was coming up was a bible, right next to ‘Refactoring’ and other seminal books. The book itself is as noted, a split between ideological – a discussion of the ideas – and implementation in SmallTalk and C++. The latter caused a lot of people to view it as a cookbook with recipes in C++ that should be implemented on every project….a large mistake, according to at least one author and the speakers at ERubycon. The patterns themselves, are actually tied to workarounds and deficiencies in the language – C++ at the time and SmallTalk written the way a C++ programmer might approach it, losing a good portion of the value of the language.

As evidenced in Ruby Design Patterns and Neal’s talk, a lot of the patterns rose out of language limitations which dynamic languages don’t have and therefore, they’re either included in the language – e.g. Singletons – or trivial to implement. Factory patterns are prolific in Java and C++ and put a lot of Ceremony around getting a basic Object back from a call, while Ruby makes the same concept easy with no pomp and circumstance.

Jim Weirich
– What the Enterprise can learn from your Mom

The basic gist of the talk was threading using multiple languages to cover the spectrum of how threading and concurrency is or generally isn’t built into the language. Jim gave some great examples working with multiple languages and simple problems that involved threads and concurrency.

While hardware gets faster, and pushs multi-core systems, most programmers and therefore applications aren’t taking advantage of them. Why? Writing a multi-threaded program is hard – there is some essential complexity. Jim gave examples in Ruby, Erlang and Clojure to demonstrate some of the challenges and different languages handling them.


Chris Wanstrath – GitHub, the lean, mean distributed machine

Chris talked about git and several models of development to fit everything from serving individuals to open source projects and using git as a replacement in enterprises, similar to the way that subversion is used now.

Github is obviously used extensively now for many open source projects, forking and merging are standard practice. We’re looking at moving Watir over to Github as a replacement for our svn repository on openqa.org, and using the git svn bridge for some of the code I’m working on at our company.


There were a lot of other interesting talks, that I didn’t get a chance to mention. This was definitely a great conference and one that I’d recommend attending. Next year is bound to be fun and I’m hoping to attend. Note to self, take copious notes on the topics instead of trying to remember and recap the entire conference.

I also think that next year could benefit from a change in format as attending 3 full days of talks is informative, but the brain tends to turn off after a while.

 

Notes on Selenium and Watir

Written by charley on June 22nd, 2008

This is my short response on an interesting post to the watir-general mailing list.

The aha moment from the Selenium meetup in February was that we’re both solving the same problems albeit with some variations. In the open source functional testing area, there are two tools that reign in the top tier for web application testing – Watir and Selenium.


On Sun, Jun 22, 2008 at 11:29 AM, aidy wrote:

Hi,

I asked Jason Huggins (the Selenium inventor) what he considered the
differences to be between Selenium and Firewatir\Watir: Below is his
reply.

Aidy

———- Forwarded message ———-
….


Jason Huggins has left a new comment on the post “Selenium’s Inventor”:

Regarding Firewatir\Watir vs Selenium — Selenium supports more
languages (Ruby, Perl, Python, Java, C#, PHP, and a FIT-inspired HTML
syntax for simple cases) while Firewatir\Watir only supports Ruby.

Selenium does have multiple language support, which has worked well in some cases. One of the top functional automation testers I worked with is now at Oracle consumed BEA, and does some great work for their functional testing team in Java.

There may be benefits to programming in the same language as your developers: easier reuse of objects and code, closer tie ins to the system under test, speaking the same language (literally) and if you’re a developer testing your own code then you don’t have to learn a new programming language.

In practice, I’ve seen that of dubious value. The QA field is, in my opinion, undergoing a change towards being test developers with a much more technical . This isn’t meant to undermine the importance of base QA skills and exploratory testing as part of the process, but there are some caveats.

Why Ruby?
I’ve found Ruby to be the best language to introduce people new to programming concepts, having done that now for several years and has been simple for our Java developers to get started with, teaching a quick crash course – 4hours over 2 days.

As we’ve moved more into a Service oriented architecture, we’ve levaraged Soap4r, to populate data, retrieve data, and test as an api. Using Ruby as the client instead of the Java with the same libraries we’re using internally has lead us to several bugs that we wouldn’t have found otherwise.

Extending Selenium means understanding the pieces, extending Javascript or the base java implementation. Adding more features onto Watir, means opening up the class – IE or container, or whatever, and extending or replacing it with your own features.

External DSLs can be easily created using most programming languages, Internal DSLs can’t easily be written using every language but are very simple to create in Ruby. This simplifies our test code, making the underlying code accessible but opaque to most test writers.

The html FIT style tables that Selenium uses, may have initial success, but will lead into hard to maintain and challenging to extend tests. I haven’t used that style of test writing extensively, but I find it limiting in some cases and don’t care for it much, it would be trivial to implement a similar framework and use Watir as the driver.


Ruby is cool
Same thing happened to Java 10+ years ago, it was a language dismissed by a lot of programmers, that had a long road to map out. J2EE now has a huge feature set though it’s become horribly complicated and challenging to understand.

It sounds like a trivial issue, but Ruby’s status as the “it” language and it’s relative simplicity have made it a great language to use for both less technical testers and generated a lot of interest from our developers.



Some people prefer Watir’s object oriented API style over Selenium’s
functional/procedural style. Selenium’s API feels a bit more simple
for simple cases. Some people (even I!) would argue that Watir’s API
is more elegant and polished than Selenium’s. But I think this is a
matter of preference, and not a critical difference in either case.

API example:
Watir:
browser.button(:id,’submit’).click
Selenium:
browser.click(‘id=submit’)
Watir’s API has been a good reason for it’s success and has spawned several implementations. The above example is pretty trivial. Watir has always taken pains to consider it’s core audience – QA engineers – leading to other design differences between the two projects. Internally waiting for the browser to finish, for example. Selenium, in my opinion, is more geared towards developers as the primary end users.


Also, Selenium’s IDE for Firefox is very simple to use for newcomers,
while Selenium RC and Grid “scales up” and provides more sophisticated
features to parallelize test runs over many machines.

Selenium’s IDE is certainly the most popular project in the Selenium family. There are are debates around record/playback tools, so I won’t rehash those here. Popularity itself and leading testers to the project, might in and of itself be justification. It is one of the more lightweight interesting tools I’ve seen in that area.

Grid is a great feature to have, both Watir and Selenium have additional products coming out contributing to a family of tools, built on or around the base frameworks. It’s been fun to see the developments in the past few years on both projects.

Setting up Selenium is a pain in the neck: the website is not so good and hard to figure out what to download. There are still major challenges if you want to run sites on SSL. Getting started writing tests in Watir is simple process, in the Watir class that Bret Pettichord and I taught last year at Agile 2007, testers of varying skill levels were writing code within the first hour.


These issues were deal breakers for me: Selenium offers no suport for browser generated dialogs and modal_dialogs in ie. The secure support is unreliable as best through ssl and proxy support for external sites is weak.


Traditionally, Watir has been an IE-only tool, but that is changing
with better FireWatir integration. Meanwhile, Selenium has had better
support for Firefox, but lacked some of Watir’s features for testing
IE. Over time, I expect the cross-browser differences between Selenium
and Watir to converge capability-wise. But at the moment, Watir is a
better tool for IE, and Selenium is a better tool for Firefox. Both
tools have many “opportunities for improvement” for testing Safari.

Selenium seems to be headed into the browser plugin space to solve the difficulties in at least SSL issues cross site scripting and other frame related issues. Both projects have come a long way since I initially scoped them out almost 3 years ago and still remain at the top of the pack for web automation.

There are uses for both tools and each has their strength. There’s a lot I find interesting in Selenium and have found that, given we’re in the same testing space, there’s a lot to learn from each other as we discover and solve many of the same issues in sometimes similar ways. In no means do I intend this as a Selenium flogging, :) I’d use Selenium if I found it the approriate tool to use for the job and may leverage parts of it in the future.





 

Thoughts on the Selenium meetup in SF

Written by charley on March 28th, 2008

I went to the Selenium meetup when was back in San Francisco at the end of February. It happened to coincide with a trip back to the bay area and announced on the agile-testing list a few days prior.

It was a strong turnout, limited to 100, and in typical Google style, some decent snacks/food, sodas and heavy security.

The basic presentation was lightening talks, with the core development team, additional future developer and others walking through Powerpoint slides on the current state of the union and a future roadmap.

There are plans to push forward to what I’d call a more Watir approach. Selenium hasn’t been able to handle ssl connections or dialogs well and still can’t reliably. As part of the effort to solve some of those deficiencies, they’re working with Simon Stewart and Webdriver to implement browser specific drivers(plugins/extensions).

While it seems Selenium has been somewhat stalled for a while – one release last year for each of the projects vs. 5 or 6 in previous years and that due to heavy involvement of Dan Fabulich in the forums, development, bug fixing/reporting – this event was less of a meetup and more of a kickoff or kickstart.

Google certainly has some say in the growth of Selenium as a viable testing platform as they’re heavily invested in it, so it should be interesting. It certainly doesn’t work for me for several reasons, some of which they’re looking to address, though I still have major reservations about their purpose and intended audience and the api for Selenium.

There at least seems to be some momentum behind it, and some concerns addressed, though not all. Jason Huggins is working on a Selenium book, has released a pdf with some information, and made a call out to anyone who wants to write a Selenium book.

He had a good point in talking to him after the event. He’s close enough to Selenium that there are a lot of changes he’d like to implement before writing a book, it’s much easier to write a book when your connection to the project isn’t so personal.

Selenium developers are paying close attention to Watir, since we’re both in the same space and I’ve been paying attention to Selenium though it’s been a while.

 

Ruby shared library hell

Written by charley on March 27th, 2008

One of the tasks I’ve been meaning to do is upgrade from Ruby 1.8.2 to 1.85 given the number of libraries that now require and work with more recent versions of Ruby. Hpricot crashes on 1.8.2 parsing through large xml structures, recent profiling and debugging libraries only work with 1.8.4 or above, so it was time to upgrade.

The only reason we’ve been sticking with 1.8.2 is a custom version of win32ole.so that is compiled against that version of Ruby to deal with IE’s crummy showModalDialog which is handled by Watir with the modified library. Unfortunately this method is called by 3rd party applications, one in particular, so my sphere of influence is limited to dealing with it for now.

To deal with the modals for Ruby 1.8.5 was not a major challenge…or so I thought. It’s certainly a bit hacky and a longer term solution needs to be developed rather than updating the library for different versions of Ruby, but this is my “short term” solution and lessons learned.

It turns out the library was compiled with some version of Visual Studio(most likely VS03) which is where Microsoft is resolving the dll hell with additional dll hell. A few engineers and our CI vms complained when adding the Watir specific version of the shared library to the requires in ruby: require ‘watir/win32ole’ getting a runtime error where certain dlls are not found.

Hey guess what, you also need to run the manifest tool to include dependencies on your dlls into your own dll, specifically c runtime dependencies. As well as the standard c runtime dependencies that are included as core up to xp, there are now additional dependencies on version specific c runtimes, depending on the compiler and system. Here’s the general breakdown:

  • MSVCRT.DLL, almost standard in Windows NT/2000/XP OS, default up to version 6.0
  • MSVCR71.DLL, introduced in Visual Studio 2003, part of VC7 compiler, version 7.1
  • MSVCR80.DLL, part of Visual Studio/Express 2005 and Windows SDK for Vista, version 8.0
  • MSVCR90.DLL, part of Visual Studio/Express 2008.

Aside from compiling the libraries, we’re dealing with different versions of the c runtime libraries. That’s not fun, and in the case of the ruby wmq library I compiled with 1.8.2 caused major crashes and was unusable.

Digging further, I got to some blogs and posts. Among others these two proved useful.
http://blog.mmediasys.com/2008/03/06/is-windows-a-supported-platform-for-ruby-i-guess-not/
http://blog.mmediasys.com/2008/01/17/ruby-for-windows-part-1/

I tried to set up a MinGW compiler and system locally not having MSVC6 handy, but it was going to take far more time than I was prepared for, I just needed this to work. I went through the horrible MinGW site and some instructions – base MinGW, msys, dtk and got errors.

Fortunately we used to be a MS shop and so I pulled a shared copy of MSVC6, compiled and everything has worked.

As for the future, JRuby is trying to incorporate a lot of the current c extensions for some of the core libraries.

 

Building a functional CI server

Written by charley on January 2nd, 2008

Introduction

This is a basic guide on getting started running a Continuous Integration server with Watir functional tests. The instructions are very basic with links to additional information, but should be a good starting ground for a combination of Apache, Subversion, CruiseControl.rb.

In the attempt to cover a lot of ground very quickly, there aren’t a lot of details on the various components, nor troubleshooting instructions. I’ll try to update this guide based on feedback.

Install Apache

Install apache 2.2.4 for Windows:

This installer includes apache with support for ssl through the openssl libraries. I chose to use the defaults for the install.

Install Subversion

Install or download a recent version of subversion.

I’m working with the latest binary release for Windows – 1.4.6, which doesn’t have an installer yet.

The version of svn binaries that you use needs to match your version of Apache, the zip file above is compiled against Apache 2.2.x, there are also precompiled binaries for Apache 2.0.x on the Subversion site.

At the time of this writing there is no windows installer for svn 1.4.6, that will likely change soon.

If you are going to use the zip file, you’ll have to add the subversion bin directory to your Windows Path environment variable.

Copy the apache modules from the svn\bin directory to your apache directory, the default for a standard Apache 2.2 installation being: C:\Program Files\Apache Software Foundation\Apache2.2\modules

Create your local repository

Open a command line and type:
svnadmin create /path/to/repos
e.g. svnadmin create c:\local_repo

Edit the Apache configuration file – httpd.conf – which should be located in the Apache 2.2 directory under /conf.
The svn mod_dav modules needs to be added so that Subversion libraries will be used to access the repository. Add this line to enable the module, this line needs to precede any Subversion related configuration and logically belongs at the end of the existing LoadModule directives:
LoadModule dav_svn_module modules/mod_dav_svn.so

Note: You may also need to add the base dav module if it was compiled as a shared object. The Apache installer I’ve used in this example should already have this line.
LoadModule dav_module modules/mod_dav.so


In order to add one project without any authorization credentials add the following lines:

<Location>
DAV svn
SVNPath C:/local_repo
</Location>

If you plan to support multiple Subversion repositories that will reside in the same parent directory on your local disk, you can use an alternative directive, the SVNParentPath directive, to indicate that common parent directory. For example, if you know you will be creating multiple Subversion repositories in a directory /usr/local/svn that would be accessed via URLs like http://my.server.com/svn/repos1, http://my.server.com/svn/repos2, and so on, you could use the httpd.conf configuration syntax in the following example:

<Location>
DAV svn
# any “/svn/foo” URL will map to a repository c:/svn/foo
SVNParentPath c:/svn
</Location>

The svn redbook has additional information on configuring Apache to use Basic Authentication and SSL support.


You should have a tray icon for the Apache Monitor. Right click on the icon, open the Apache Monitor where you can start the Apache2 service.

Local Repository Base Setup

Create the basic skeleton svn structure. Make a parent directory, for this example I’ll create it at c:\svn_import
Underneath this directory create the following directories:
trunk
branches
tags

Import the new directory structure into svn. Open a command line:
svn import -m “Initial repository setup” c:\svn_import http://localhost/svn/work

After importing data, note that the original tree is not under version control. To start working, you still need to svn checkout a fresh working copy of the tree.
Checkout your new project into a local directory – c:\work
svn co http://localhost/svn/work c:\work


Continuous Integration

This requires a recent version of Ruby – 1.8.4 or greater to work with CruiseControl.rb.
Note: There are some problems with Ruby 1.8.6 not reporting exit codes correctly, so it’s currently not recommended.

Install the watir gem if you haven’t already.
gem install watir

Note: If you’re working with Vista and a recent Ruby One Click installer then you should also install updated versions of the windows-pr gem.
gem uninstall windows-pr
gem install windows-pr

Install the ci_reporter gem if not already installed.

gem install ci_reporter

Create a rake file that will be used to run the tests and report the results to the dashboard using CruiseControl.rb

In the trunk directory of c:\work, create a new file named Rakefile.

For this example I’ll be using Ruby’s Test::Unit.

From the ci_reporter documentation (http://caldersphere.rubyforge.org/ci_reporter/)
# To use CI::Reporter, simply add the following lines to your Rakefile:

require ‘rubygems’
require ‘rake/testtask’
gem ‘ci_reporter’
require ‘ci/reporter/rake/test_unit’ # use this if you’re using Test::Unit

Rake::TestTask.new(:test) do |t| # Add a testtask called test
t.pattern = ‘test/**/*_test.rb’ # Include everything in the test directory with the suffix _test.rb
t.verbose = true
end

task :test => ['ci:setup:testunit']

Create a \test directory under c:\work\trunk and add a simple test – google_test.rb

require ‘test/unit’
require “watir”

class GoogleTest < browser =” Watir::IE.start(‘http://www.google.com’)”>rake test

If your test passes successfully, add the Rakefile to svn
c:\work\trunk>svn add Rakefile

Now add the test directory to svn which will also add the google test by default and then commit your changes to the repository.
c:\work\trunk>svn add test
c:\work\trunk>svn ci -m “Checking in Rakefile, test directory and a simple test.” .

You should get notice that the files were tranmitted and the revision of the repository has been updated.

CruiseControl.rb – A ruby version of Cruise Control to use for Continous Integration

CruiseControl has a dashboard for reports and a builder to build projects watching your svn repository for changes.

Basic setup is simple, these instructions are modified and pulled from the Getting Started page:

1. Download and unpack CruiseControl.rb
Note: I had problems running the latest version of Cruise 1.2.1 which complained that method deprecate is undefined and haven’t had a chance to look into it. As a result, I’m using Cruise version 1.1.0.

(below, we will refer to the place where you unpack it as [cruise])

2. From [cruise], run cruise add your_project –url [URL of your_project Subversion trunk].

In this case, we’re referring to http://localhost/svn/work/trunk

Optionally, you can specify username and password by adding –username [your_user] –password [your_password] to the command

This creates a directory for your_project’s builds at [cruise]/projects/your_project/, and checks out your_project from subversion URL specified to [cruise]/projects/your_project/work/.

3. From [cruise], run cruise start.

Hint: This starts CruiseControl.rb dashboard and builder(s). By default, the dashboard is bound to port 3333, if you want to run your server on a different port, just type ./cruise start -p [port]

4. Browse to http://localhost:3333.

All going well, weather permitting, you will see a page with CruiseControl.rb logo. This is the dashboard, and it should display your project. If it’s passing, you’re done – though you should double check that it’s doing what it should be by clicking on the project name and looking at the build log for the last build. If it’s failing or otherwise misbehaving, go on to step 5.

This should list your tests in the build log section with assertions, passed and failed. Ideally it should report 1 test, 1 assertions, 0 failures, 0 errors

5. Go to [cruise]/projects/your_project/work/ and make the build pass.

6. Press the “build now” button on the Dashboard to rebuild your project

This should build your_project and place build outputs into [cruise]/projects/your_project/build-[revision-number]/

 

Apres le deluge

Written by charley on August 24th, 2007

Going to Agile has been a great experience, I come back energized and full of new ideas and information. It was great to meet a lot of people from last year and see a lot of new faces as well. I’d meant to get off the tester/developer track, but I found myself mostly glued to it.

Some brief takeaways(some of which I will expand upon):

  • The Scripting Web Tests with Watir class with new material went over well. I’m excited about the new format and it presented extremely well. It was good to be a presenter this year and I plan to present something next year. It gave me more of a feeling of involvement.
  • Quality and the testing aspect of Agile, both the conference and practice, is a core principle. While I’ve known that, it was good to get a solid reminder.
  • Test tools: Selenium, Fit, Fitnesse, Watir, xUnit and extensions onto these frameworks or additional toolsets. There was a lot of focus on this area and tools I really need to investigate. It’s clear everyone’s moving to open source testing tools, but there are some deficiencies that need to be addressed, and to that degree, there is no silver bullet. Some of the development struck me as wasteful with new projects not really aware of what is currently available, case in point – anyone who’s working to extend selenium should know about selenium rc.
  • Most people this year seemed to be well versed in the basics of Agile and Lean practices and were looking for specifics, and advanced sessions. Although there were a lot of people who didn’t understand the terms, xp vs scrum vs agile vs crystal and Lean? It seems to be getting a bit confusing, while everyone in their camp understands the base concepts and we can all speak the same language, it still struck me as odd.

That’s it for now. More to come.

 

On the way to agile

Written by charley on August 8th, 2007

It’s been a busy week with trying to get my Mac in working order for the conference, reviewing docs, releasing a Watir gem and trying to stay on top of the day to day activities.

I’m a Mac Newbie

I started out with a Mac (bought stock in Apple when I was in 4th grade which I still have) and was a diehard mac fanatic until my job at the time pushed me into concentrating on Windows, that was about the time when I found Linux (‘95), dual booting on my home machine.

This year I bought a Macbook Pro which I’ve used as a glorified im/web browser until now. I am indeed a newbie on the Mac.

Over the past week or so I’ve installed the Safari3 beta, FireWatir, SafariWatir, updated multiple apps – Subversion, some ruby gems, MySql, Locomotive, some with more success than others, part of the problem is likely mine.

There are multiple sites on getting rails working with Mac OS X, several of them quite old, and none seemed to work well for me.

I followed the instructions on Pascal’s site Which were good, a bit of overkill for what I’m trying to do which was just to get a sample app working with rails – the depot application. I didn’t build everything from DarwinPorts as I already had Ruby, Apache2 and some other applications he has listed.

When I went to take a look at depot, I got an error connecting to the local mysql instance. Rails was looking for /tmp/mysql.sock to connect to, the ports had the mysql.sock inside /opt/…
Uninstalled the darwin port version and installed a binary build of mysql from mysql.com. Set up the database, and now I can run the app either through Locomotive or by command line by starting the server.

I’m starting to learn the Mac again.

 

Agile 2007 and RSpec

Written by charley on July 12th, 2007

Well, it’s been a while since my last post, a couple of months ago looking at the last date. I’ve not been a prolific blogger thus far. I finally have a few moments and figured it is time for an update.

As Bret Pettichord mentioned in his last blog, we’ll be teaching a new improved railified version of the Watir tutorial at this year’s Agile conference in DC. I’m pretty excited to teach the tutorial with Bret and Steven. I’ve done some internal training in Ruby programming but have never done something on this scale before, I briefly stopped by last year when Chris McMahon and Owen Rogers were running the show and it was a packed house. I’m also thrilled about the updated tutorial as the timeclock application was starting to show it’s age. :)

RSpec

I’ve been wanting to look more deeply into rspec for quite some time, it’s one of the many projects that I’ve come across and briefly looked at, but not had any time to play with. This morning I actually had some time to tinker briefly with it and come up with a trivial example.

I’ll add more thoughts as I get more time to play with it, so far I like the basic philosophy and language constructs as they seem a more natural fit than ruby’s test::unit.


require 'watir'

describe "GoogleSearch" do
before(:all) do
@ie = Watir::IE.start('http://www.google.com')
end

it "should enter text in the text field" do
@ie.text_field(:name, 'q').set('watir')
end

it "should click the search button" do
@ie.button(:name, 'btnG').click
end

it "should find a link with openqa in the href" do
@ie.link(:href, /openqa/).exists?.should == true
end

it "should find a link with flying_monkeys in the href" do
@ie.link(:href, /flying_monkeys/).exists? .should == true
end

after(:all) do
@ie.close
end
end

 

Ajax testing using Watir

Written by charley on April 25th, 2007

I’ve just posted an example to the Watir wiki that uses the scriptaculous autocomplete text field as a proof of concept for Ajax testing using Watir. It’s simply scripting the rendered DOM while polling for fields to exist. Everyone seems to think that Ajaxy interaction is hard to accomplish with some of the automated test tools, so far I have yet to see that.

Admittedly, I’m new to Web 2.0, and quickly getting a crash course, so my opinion may change as I get more familiar with it and likely spike out some quick examples. It’s been a while since I did any real web development and I need to get back to grinding out my own web code so that I don’t lose touch with the domain space and development on that versus test development.

This being my first blog, I’m keeping it short to just get started. I’ve put it off for far too long.