Search Blog Archive

Blog Archives

Blog Categories

SugarCRM Developers on Twitter

New SODA ruby gem HowTo

After opening the SODA testing framework: www.github.com/sugarcrm/SODA 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 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 www.github.com/sugarcrm/SODA, 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: http://rubygems.org/gems/soda 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.