bookmark_bordertesting rails application

Have been busy recently comparing Rails 1.1’s integration testing and WATIR and selenium for end-to-end testing a rails application.

The testing scenario is that the webserver is running on a remote Linux box in US, to which we have ssh access.
And we are testing the application from India. So we cannot run the browser on that machine.

We are writing test cases for various parts of the application using each of these tools and then we would compare notes.

A few things however are clear rightaway.

WATIR will test only for IE on windows. Firefox support for watir called firewatir is being built, and is not robust as of now. Also we might need different sets of test scripts for firefox and IE.

Selenium is the easiest to get started in the BrowseBot FITRunner mode; haven’t tried the “driven” mode yet. FIT mode would not allow us to verify values on the screen against those in the db… but then probably those tests should go into the “controller testing”(functional testing) and not be at this level. When we want to test against db for multiple controllers then rails’ integration testing is the probably the best way.

Running selenium in “driven” mode will take some research, for which i have not been able to spare time.

WATIR requires ruby and watir gems to be installed on the client computer. Hence if we want to share UI tests with our non-technical client, Selenium is better since it requires no installation.

From the aspect of writing test cases, WATIR is better than selenium’s FIT mode. Selenium test cases need to be written in html. And there is no control flow in the selenium core, though there is a user contributed library for this.

For certain kind of testing, such as against db values and checking values in session, Rails functional tests and integration tests are great.

Will share more experiences on this when we are through with the exercise.

How has your experience with these tools been?

***********************************
Received this profound quotation in my email today.

“The greatest good you can do for another is not just to share your riches, but to reveal to him his own.”
Benjamin Disraeli
1804-1881, Former British Prime Minister
***********************************

bookmark_borderBarCampDelhi: my experience

Finally, I have managed to find some time to share my barcamp experience.

My Session

I made a presentation on “Agile web development with Ruby on Rails” and I know that it sucked big time. Being first up on stage, did not give me any chance to make changes, not that I had any intentions of changing the presentation .. Heheh ..just a lame alibi ;-).
I would have loved to do a demo, something like writing a blog-application in 15 minutes. The reason for not doing a demo was, that I do all my rails development on linux, my laptop, a five year old toshiba sattelite runs windows, and does not have wi-fi. So with ssh ruled out, i decided to do a ppt, with embedded ruby code to show.
And secondly, I did not time my presentation well, so inspite of skipping a couple of slides I was out of breath when i finished.
I would have loved to have a more interactive session instead of the stand and deliver model.

Other sessions

My views on some sessions that i attended.

Jon’s presentation on “Making AJAX applications faster” was great. He used methaphors from daily life to make the whole thing seem so simple.

Apart from the technical aspect, it was a great session to learn about “making an effective presentation” too.

Manish Jethani’s presentation on “Rich Internet Applications and Flex” was the geekiest presentation of the barcamp.

He created a live flex application that downloaded and ran popular videos from youtube. And he used vi on his windows laptop for live coding.
Does it get geekier than this. whatsayu?

Gaurav Bhatnagar made a very very insightful presentation on “Bootstrapping a software startup in 7 difficult steps”.

He shared his learnings and experiences on starting Tekriti Software . It’s always great to get it direct from the horse’s mouth.
Since I find myself, grappling with the same issues at vinsol , I learnt a lot from him.

After the camp

Some of us barcampers had a nice camp in a bar in Noida.

Made many new friends at the barcamp, found some great blogs to read, met some ruby enthusiasts. I can see a delhi geek/tech community in the making.

Thanks to Adobe for the venue and every barcamper for making the barcampDelhi the huge success that it was.
And a special thanks for Amit Ranjan for orchestrating the whole thing on the D-day.

bookmark_borderJapanese Self Study

Ever since i blogged about my JLPT result, I have received more than a few queries about how I managed to do it without going to a language school.

Here I have bookmarked some sites I found useful.

And here are a few Kanji books, which are very useful for self study

  • Basic Kanji Book vol.1 (@amazon)
  • Basic Kanji Book vol.2 (@amazon)
  • Intermediate Kanji book vol.1 (@amazon)
  • Intermediate Kanji book vol.2 (couldn’t find it at amazon)

bookmark_borderRuby library for Paypal Website Payments Pro

At vinsol, we did a rails project recently which uses Paypal Website Payments Pro web api for financial settlement. We wrote the code that integrates with paypal in a separate module for reusability.

We have released the module at Rubyforge under a project named vPaypal. It is available as a gem, so you can install it directly using ruby-gems.

We are highly indebted to Pranav Bihari for this blog post which helped us getting started on using Paypal api with ruby.

Also thank to Ritu, our lead Rails programmer who wrote the complete module.

bookmark_border10 Ways to Identify an Onna Otaku

Great points to identify or be a she-nerd in Tokyo. Read it at wired.com

Another addition to the categories. The shibuya girls (the tanned and blond ones with the Hawaian look), The harajuku girls (those witches dressed in black, near the Harajuku station) and now the Onna Otaku near the Ikebukuro station [she-nerd] ha ha ha.

Here is a good photo gallery of the Shibuya girls.

I am looking for a good Harajuku girls photo gallery. Will post when i find it. In case you know of some, share the link with me.

And I am definitely checking out the Onna Otaku “she-nerd” on my next trip to Tokyo.

bookmark_borderJLPT results are out.

I got my Japanese Language Proficiency Test (JLPT) result today.
I have passed the level 2.
I am now only 1 level away from being as good as a native Japanese speaker.
I have no plans to try Level 1. Not for a couple of years atleast.

Looking back, I had put in a lot of effort last year into studying Japanese. And it coincided with my opening a new office for vinsol and hiring my first employees. And then i took up some projects, which i would have never done, had it not been for the money I needed to sustain the new office.

Those were really gruelling times.

But all that hardwork has finally paid off. And what surprises a lot of people is that I have never been to a Japanese language school.
For me the internet, more than makes up for the lack of a teacher.

Zehi, Kore kara mo gambarimasu 🙂