Quality Testing

Quality is delighting customers

I am using selenium .rb files to write script. I want to generate my result in html format. Can u please help me out. Currently i am using rake -f ./selenium_test.rake test --trace command to execute my all files.

Views: 123

Reply to This

Replies to This Discussion

You need to tell us a little more about your scripts.  Are the RSpec or Cucumber scripts or just plain old Ruby files?

My rake file contain:

require 'selenium/rake/tasks'
require 'rake/testtask'
require "rubygems"
require "selenium/client"

Rake::TestTask.new do |t|
  t.libs "test"
  t.pattern = 'C:\\Documents and Settings\\user\\My Documents\\NetBeansProjects\\Depot\\test\\functional\\Selenium/*_ftest.rb'
  t.verbose = true
end

My registration.rb ruby file contain:

def test_registration_home_page
    #Open Home page
    @selenium.open "/"
    @selenium.click "link=join", :wait_for => :element, :element => "id=firstname"

    hr = @selenium.get_eval("new Date().getHours()")
    minutes = @selenium.get_eval("new Date().getMinutes()")
    date = @selenium.get_eval("new Date().getDate()")
    month = @selenium.get_eval("new Date().getMonth()")
    cas = month + date + minutes + hr
    email = "XYZ" + cas + "@mailinator.com"

    # Input provided for first name, last name, email address and password
    @selenium.type "id=firstname", "PP"
    @selenium.type "id=lastname", "MM"
    @selenium.type "id=email_address", email
    @selenium.type "id=password", "test1"
    @selenium.type "id=confirmation", "test1"

    @selenium.click "//div[@class='account-create']/form/div/button[@class='button']",:wait_for => :text, :text => "Thank you for registering...."
  end

Now u can tell me how can i get my result in the form of html.

And If i need to use RSpec then wht coding i should use in my rake file.

RSS

TTWT Magazine

Advertisement

You Can


Call for Articles

Advertisement

Videos

  • Add Videos
  • View All

Badge

Loading…

© 2012   Created by Quality Testing.

Badges  |  Report an Issue  |  Terms of Service