Home > selenium > Running my Testlink Selenium scripts in IRB

Running my Testlink Selenium scripts in IRB

Here’s a simple documentation on how I execute my Testlink scripts via IRB:

1. Install the following in my local box:

  • Ruby and RubyGems
  • XAMPP
  • Testlink

2. Created the following ruby files located in the specified folder

..\project_folder\lib\testlink.rb –> An instance of selenium client driver for Testlink session

..\project_folder\lib\user.rb –> User class where methods pertaining to user is defined

..\project_folder\rakefile.rb –> File containing my rake tasks

3. Go To XAMPP Control Panel, start Apache  and MySql services

4. Launch Console and do the following

go to distribution file (d:\qa-training\gmangalo\lib)
run rake tasks (type rake –tasks OR rake -T)
start your server (type selenium:rc:start)
load your irb (type irb)
require your file (type require ‘user’)
create an instance of your session (type session_name = Session_class.new)

e.g. session = Testlink.new

create an instance of your user passing the created session (type user_name = User_class.new(session_name))

e.g. user = User.new(session)

start your session (type session_name.start)

e.g. session.start

go to URL’s login page (type session_name.open “URL PAGE”)

e.g. session.open “/testlink/login.php”

At this point I can now play around with the application via console using the methods defined.

Advertisements
Categories: selenium Tags: , , ,
  1. zacktan
    May 10, 2010 at 2:38 pm

    hi, anyidea how to run testlink selenium scripts in eclipse java?
    email me. im a student doing automated testing.

  1. No trackbacks yet.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

%d bloggers like this: