navigation
 Monday, April 07, 2008
My name is Angelo Martinez and I am new here at Falafel Software. I have known Lino Tadros for a long time and I can assure you that this is a great place to be! My hope is to start blogging on new ideas/tools/technologies that I discover along the way. With that in mind... I had a requirement to build a generic MRU (Most Recently Used) class based on a Key/Value pair. Among other things, the class contains methods such as Add(), Find() and a Count property that reports the number of items currently in the list. It would be nice to be able to build a set of unit tests to verify the functionality of the new class. For this, Visual Studio 2008 comes to the rescue!
posted on April 7, 2008  #    by Angelo Martinez  Comments [0]
 Monday, March 17, 2008
Santa Cruz, CA March 16th 2008 — Falafel Software Inc, a Microsoft Gold Certified Partner providing consulting, training, and software development for enterprise and small business customers, today announced the world wide release of the official training material for AutomatedQA's TestComplete product.
posted on March 17, 2008  #    by Lino Tadros  Comments [0]
 Thursday, February 28, 2008
The dotNet object in TestComplete (requires the .NET Classes Support plug-in) allows you to access .Net objects in your TestComplete script code. For example
posted on February 28, 2008  #    by Falafel Author  Comments [0]
 Thursday, February 21, 2008
I was designing a load test against Active Focus the other day using TestComplete. I kept getting the error "Connection 0 of the task assigned to the virtual user VirtualUser1 was simulated partially. Only 3 of 41 requests were completed." in the test log.
posted on February 21, 2008  #    by Falafel Author  Comments [1]
 Tuesday, February 12, 2008
There are many times when looking over the Test Log after an unsuccessful test it would be useful to know the state of the machine at the time of the error. In particular, it would be nice to see a picture of the desktop (or your application under test) at the time of error being posted to the log. Now, if you are doing the error posting from you script, it is easy as one of the parameters for Log.Error allows for posting a picture. But if, TestComplete posts the error it is harder. The best method I have found is to use the OnLogError event of TestComplete and post a message just before the error with the picture.
posted on February 12, 2008  #    by Falafel Author  Comments [0]
 Thursday, August 16, 2007

One of the problems we've encountered while using Selenium to execute automated tests feels like it's related to timing, and that's when we use the "IsElementPresent" method followed immediately by a command to get the contents in that element. The results are very intermittent - sometimes, even when we KNOW that there should be something there, we're unable to find it, almost like the element started getting rendered, but didn't get populated yet.

The problem, then, is that when you expect that there's going to be data there, it would be nice to make sure that there actually is before you read it, try to convert it or match it, and throw an error. That's where WaitForCondition comes in. Basically, this is a javascript call that returns a true/false value. THe references to it in the documentation are tantalizing, but not very specific. After some research, I found how to make it work for me. Here's the relevant code:

1
2
3
4
5
6
7
    public class Utilities
{
static public void WaitForCondition(string script, string timeout)
{
selenium.WaitForCondition(script, timeout);
}
}
And then in the test code:

1
2
const string ELEMENT_HAS_LENGTH = "var value = selenium.getText('{0}'); value.length > 0;";
Utilities.WaitForCondition(String.Format(ELEMENT_HAS_LENGTH, "ctl00_cphContents_ode_ddlPrices"), "10000");
 
The way this works is that the id of the control we want to be checked is passed in to the constant string containing the script, and formatted with the control's id. Next, the little snippet of javascript gets executed. The control is located on the page (if it's not there, it gets assigned a null), and then gets evaluated to see if the length of the text associated with the control is longer than zero. If it's not, the result is false, and (I assume) the selenium engine waits for some predetermined length of time before the script snippet executes again. This continues until either the condition evaluates as true, or the timeout (expressed in milliseconds) expires.

Pretty easy, once you understand the necessary format of the javascript snippet.

posted on August 16, 2007  #    by Rick Miller  Comments [1]
 Friday, August 03, 2007

I spent some time banging my head trying to get Selenium to select an item from a Telerik RadCombobox for ASP.NET. It turns out I was very close but missing one small detail and that was to call mouseOver on the item I was trying to select before calling Click. I evetnually found the answer on the Teleik forums here. Falafel Software is a big fan of Telerik and it's nice to know their using Selenium to test their controls.

posted on August 3, 2007  #    by Steve Trefethen  Comments [0]
 Thursday, July 19, 2007

While setting up a CruiseControl.NET server for a project here at Falafel I ran into this error:

svn: Working copy '.' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)

After executing svn cleanup from the command line numerous times to no avail I finally realized the problem was a missing <workingDirectory> node for the project in the ccnet.config file. Well, I won't be making that mistake again.

posted on July 19, 2007  #    by Steve Trefethen  Comments [0]