Ruby Performance Testing with Watir

A reader of mine asked me how they should go about performance testing some front end performance.  This is a good question, because tools such as JMeter are pretty good at getting performance metrics for load – but you must keep in mind that JMeter isn’t a browser and doesn’t always find front end performance issues. For example, if a user had a AJAX call on a web page, and they... »

Ruby Basis: Instance Method vs. Class Method

The difference between a class method and a instance method is that instance method is created when the object is created.  However a class method can be called without class instantiation. Example Instance Method In the class example we have a class like this: class User   attr_accessor :name, :email def initialize(name,email) @name = name @email = email end   def run p "te... »

Ruby: Querying a MySQL database

This is a short and easy little post regarding Ruby and using it to query a MySQL database… This came up for one of my students.  I wanted him to get used to finding solutions to problems. I gave him a problem of validating some activity by automating a SQL call to a database.  Any language could be used, but since we were working with Web Automation I picked Ruby. there’s a variety of... »

Web Automation with CSV Imports

I had a real life request at work the other day.  My boss had a goal of migrating some phone numbers to different POPs.  In fact he had a large list – 4,000+ numbers.  The carrier in question only had a web interface for this task (no API) and the web interface would only take one number at a time.  The carrier’s website was slow, taking about 10 seconds for time to find a number in th... »

Automating SEO, Link and Page Validation

Note #1: make sure you have the right to test or crawl the site you are obtaining links from or testing the title and meta data of.  To fire off a test like this against a random site could result in your IP being banned by the admin.  It could also be deemed an attack by some. Note #2: If you have permission and the site you are testing is hosted by GoDaddy, you will have to work with Tier 2 supp... »

Ruby: attr_reader, writer and accessor

The attr_reader and attr_writer (as well as attr_accessor) really confused me, until I read this post: He makes an analogy of accr’s us sages to that of public and private methods in a class.  Here we have instance variables that can be set to be re-readable/writable. So as an example he gave, the following code: class Person... »

Page 1 of 6123»