Testing and breaking ASP code using dictionary objects
Was wondering if anybody out there had any interesting ways to destructive (break) test ASP applications/web pages which use dictionary objects to speed data retrieval.
This is my current testing assignment, I haven't found enough bugs really so I`m looking for different ways to attack the software.
Re: Testing and breaking ASP code using dictionary objects
Dictionary objects usually last for the duration of the page usage so you can check that. If the object is stored in a Session object then it should persist beyond the page, which you can also test. Dictionary items can be removed individually and the unique keys that make up the items in the dictionary should readjust for that removal (unlike an array). You could test for that, making sure it is occurring correctly.
Also understand that the Dictionary object is apartment threaded, and apartment threading objects should not be placed in the application scope, because you run into the issue of multiple users who may be trying to simultaneously access a single object instance. Obviously you will know if this problem occurs right at the outset, but it is something to consider, I guess. This also depends on what kind of application type setup you are using or if this is just ASP pages interspersed on a general Web site. Dictionary objects are generally not stable, over a period of time, particularly in application scope but that can apply to Session scope as well.
It might also depend if you are using logic that relates two dictionaries. In that case, of course, you have to test those relations. Other issues might depend upon how you are using the Dictionary objects and what they are being tested for. For example, there is an Exists method you can use to make sure that what should exist in the object at a given time does, in fact, exist.
In a nutshell, Dictionary objects are fairly simple creatures. They expose certain methods and properties. You can use those methods and properties to deal with the specific elements that are stored in your dictionary objects. Remember also that Dictionary objects are basically the equivalent of a Perl associative array and, as such, any thinking about testing what goes into that kind of array can be applied to a Dictionary object.