Archive for September, 2009

JMeter: Simple Data Writer + Current Date

September 15, 2009 5 comments

My first time to use Simple Data Writer, I have no idea how it works. So I figured it’s time to learn a new JMeter report (wink)

1. Add Simple Data Writer listener to my Google search script

2. Define its filename(where the generated result file will be saved) to:


3. Under “Log/Display” tick “Successes”

4. Run the test

I then opened google.log.txt in Open Office which is a comma delimited file and got this data:

simple data writer report

Looks helpful right? Except for the timeStamp which I can’t decipher the format… yet ūüôā

Anyway, rerunning my test scripts updates the log file and appends the new results at the end of the file. But what if you’d like to parameterized your report and include the current time in your log file everytime you execute your test?

JMeter can absolutely do this… since it supports certain Functions and Variables

One of which is the __time function which returns the current time in various formats:

  • YMD = yyyyMMdd
  • HMS = HHmmss
  • YMDHMS = yyyyMMdd-HHmmss
  • USER1 = whatever is in the Jmeter property time.USER1
  • USER2 = whatever is in the Jmeter property time.USER2

From my current simple data writer listener, I edited its filename to:


With this configuration, Jmeter generates a new log file with the current date and time in yyyyMMdd-HHmmss format, everytime I run the test. With regards to the timeStamp details, I’m still on my way to find it.

Bumper Stickers for Software QA

September 11, 2009 2 comments

Here’s my personal favorite:

* Software Testing: Where failure is always an option.
* Improving the world one bug at a time.
* Software Testing: You make it, we break it.
* Software Testers don’t break software; it’s broken when we get it.
* Software Testers: We break it because we care.
* If developers are so smart, why do testers have such job security?
* Life is too short for manual testing.
* Trust, But Verify.
* The Definition of an Upgrade: Take old bugs out, put new ones in.
* We break software so you don’t have to.
* I used to build software…now I break it! Its a lot more fun!!
* All code is guilty, until proven innocent.
* It’s Automation, Not Automagic!
* Quality Assurance, we take the blame so you don’t have to.
* In God we trust, and for everything else we test.

Pick yours in the list. =)

Bumper Stickers for Software QA

Categories: quality assurance Tags: , ,

Run your RC server via Rakefile

September 8, 2009 1 comment

Gone tired of starting your selenium server by typing,

java -jar selenium-server.jar"

from your console or if you’re luckier create a batch file then run it to start your server...

Here’s a more powerful tool to do it. Utilizing the selenium-client ruby gem, first you need to create a rakefile and define the tasks that you want to do. For instance we want to tell our rake to do the following tasks:

1. Start selenium server,

2. Stop selenium server, and

3. Restart selenium server

require ‘rubygems’
require ‘selenium/rake/tasks’ # use selenium rc rake tasks that are bundled with the selenium-client gem

SELENIUM_RC_JAR = Dir[File.dirname(__FILE__) + “/selenium-server*.jar”].first

# Start selenium server task’rc:start’) do |rc|
rc.port = 4444
rc.timeout_in_seconds = 3 * 60
rc.background = true
rc.wait_until_up_and_running = true
rc.jar_file = SELENIUM_RC_JAR
rc.additional_args << " -multiWindow -firefoxProfileTemplate FirefoxProfile" end # Stop selenium server task'rc:stop') do |rc| = "localhost" rc.port = 4444 rc.timeout_in_seconds = 3 * 60 end # Restart selenium server task desc "Restart Selenium Remote Control" task :'rc:restart' do Rake::Task[:"rc:stop"].execute [] rescue nil Rake::Task[:"rc:start"].execute [] end [/sourcecode] In your console go to the root folder where your rake file is saved, type "rake -T" or "rake --task"

D:\Projects>rake -T

Console will list all available tasks defined in the rake:

(in D:/Projects)
rake rc:restart  # Restart Selenium Remote Control
rake rc:start    # Launch Selenium Remote Control
rake rc:stop     # Stop Selenium Remote Control running

From this list you can restart/start/close the server by simply invoking the commands  e.g. rake rc:start

Categories: selenium Tags: ,

Selenium and Ruby setup in Windows

September 4, 2009 2 comments

Newbie in Ruby? Never heard Selenium? Had a reformat?
No sweat! Here’s a list of requirements to set up Selenium and Ruby in your Windows machine.

SELENIUM Remote-Control (RC )

–> is a test tool that allows you to write automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser.

  • extract the file anywhere in you local machine


–> Requirement to run the selenium server, should be 1.5 or later version

  • install Java and configure your PATH environment variable correctly.
  • from the console, you can verify the installation by typing:¬† java -version


  • requires Ruby


  • get the latest rubygem distribution as tgz or zip from here
  • extract the archive to your desired directory
  • 2 ways to install ruby:

from the console, go to the extracted directory then type:  ruby setup.rb

from your explorer, go to the extracted directory and double click setup.rb file

  • install the ruby client driver as a rubygem by typing:¬† gem install <ruby gem>

gem install selenium-client

  • install other gems that will be useful in your testing:

gem install rspec -v=1.2.6

gem install syntax

gem install faker

BDoc documentation

–> guide for all your rubygems documentations

  • from the console type: gem install aptinio-bdoc
  • then save the doc to your local, from the console¬† type:¬† bdoc //[path]

To get scripts or file from a repository through Git

  1. from the console, install github, bash or gui
  2. generate an SSH rsa, type: $ ssh-keygen -t rsa
  3. copy the generated id_rsa pub
  4. paste it on the personal settings of ur public_key
  5. then clone
Categories: ruby, selenium Tags: , , ,