New SODA ruby gem HowTo

sugarcrmdevelopers —  November 15, 2010 — 1 Comment

After opening the SODA testing framework: we found that there were lots of setup issues, and just some general ease of use issues which made the barrier to entry on using SODA a bit hard. In order to make setting up SODA easier I have created a Ruby Gem called “soda”.

The soda gem is located here:

The current released version of the soda gem is: 0.0.7 as of the time this post was written.

Currently this gem is based on the SODA source code from, off of the “watir-1.6.7” branch of the SODA project. This new gem is currently being tested internally at SugarCRM, and is not as of yet “stable”. When we have determined that the gem is stable enough the code from the “watir-1.6.7” branch will be merged into the “master” branch and the gem version will be changed to a full point release: “1.x.x”.

Currently the gem update process is as follows:
1.) Changes are checked in the SODA “watir-1.6.7” branch.
2.) The gem is rebuilt from he updated sources in github.
3.) The gem is installed on and run through a simple sanity test.
4.) The gem is pushed to: for public use.

HowTo Install: the “soda” gem:
Installing the gem is very simple for all OS’s, and the same for all as will except if you are intending to use IE on the windows platform.

From your current OS’s console type the following commands:
Note: Depending on your current OS you my need “root” or “administrator” access to install the soda gem.

1.) gem update –system
2.) gem install soda

That’s it! Soda should now installed!

For installing IE support for soda there is one last step, and this step can only be performed on the Windows platform:
3.) gem install watir

HowTo Use the soda gem:
Once the gem is installed you can now call the command SodaSuite as the gem install should have installed the Ruby script into your system PATH. Notice that SodaSuite no longer has the “.rb” file extension. The file by default is install with execute permissions set. I have tested using SodaSuite once installed from the gem on: Windows(XP/7), Linux, and OSX, all of which were able to execute and function correctly.

Now that the gem is installed open a command console and test that the gem is functioning by the following command:

1.) SodaSuite –help

You should see the SodaSuite help text printed to your current console.

HowTo Build your own soda gem:
If you want to make changes to the soda gem and install them locally this process is also very simple. In the “watit-1.6.7” SODA branch there is a utility called: “MakeSodaGem.rb”. This script has only been desgined and tested to run on the Linux platform.

The following steps show how to build and install a new gem from the checked out SODA “watir-1.6.7″ branch.

1.) ruby MakeSodaGem.rb –version=”0.0.1”, really you can give it any 3 digit number you’d like.
2.) cd /tmp/Soda
3.) gem build soda.gemspec
4.) gem uninstall soda (you only need this if the soda gem was already installed).
5.) gem install soda-0.0.1.gem (This installs the local gem file)

And you are done!

One response to New SODA ruby gem HowTo


    How does SODA gem help me in test automation? What will it enable me to do?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s