How do you test an auto-complete function?

How to apply eValid to functional testing of web applications.

How do you test an auto-complete function?

Postby newcity » Tue May 03, 2011 4:01 pm

How do you test an auto-complete function?
newcity
 
Posts: 1
Joined: Tue May 03, 2011 3:05 pm

Re: How do you test an auto-complete function?

Postby eValid » Thu May 05, 2011 7:17 am

newcity wrote:How do you test an auto-complete function?

An auto-complete function basically is a JavaScript program that continually checks what you have just typed, consults suggested completions via interrogations to the underlying web site that supports that feature, and displays suggested alternatives. Once you click on something, that string is the "final" one that is sent to whatever target that field is intended to feed.

As you can see, this isn't simple.

To test it probably the best thing to do is to have a known seed string (what you type into the field) and a predicted response string (what the auto-complete function delivers to the field) in mind. The test then is to type in the seed string and, after the auto-complete finishes updating the field, examine the contents of the field to confirm the content as a particular result.

For a variety of reasons this can't be done directly with the eValid GUI -- you don't have direct control of what is in the field; the server does.

So you need to write DOM interaction steps using a ValuePutElement command combined with a ValidateSelectedObjProperty command that confirms that the auto-complete resonse AFTER the work is done complies with the predicted value.

For thoroughness, in testing this kind of function, you probably would want to try a number of seed/response pairs of varying length and content to make sure the function works as you expect it to.

eValid Technology Support
eValid
 
Posts: 2396
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA


Return to Desktop and Mobile Device Functional Testing

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons