DanielBullimore / OOmutiny

OO Javascript frontend
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Testing Plan 0.0.Mutiny #9

Closed DanielBullimore closed 4 years ago

DanielBullimore commented 5 years ago

Link to Feature List: #8

Testing Method:

Manual / User Testing:

The master class is invisible to users thus manual testing is not possible.

Programmatic Testing:

Testing will be conducted using two html files: OOSingleInstance.html, OOMultiInstance.html; Each testing page will link the OO class file into its header.

a. Single instance testing:

Open OOSingleInstance.html in each browser being tested.

b. Multi Instance Testing

b.a. Pretest Setup:

  1. Check the class exists in namespace.
  2. Declare three instances of the class
  3. Check the instances exist
  4. Output pretest state in text. .

b.b Testing:

  1. Call Initialize for all three test instances
  2. Give two instances unique names with funSetName() then attempt to rename one of the two with funSetName()
  3. Attempt to name the unnamed instance as a duplicate name from the named instances
  4. Use calls funStr_GetName() method to confirm name changes out put results
  5. Call 'Destroy()' for one instance
  6. Check one test instance is destroyed then output results
  7. Check for rayOO and rayOOi existence output results
  8. Call Destroy() for remaining instances
  9. Check for rayOO and rayOOi existence output results
  10. Check OO class name still exists output results
  11. Compile and output test mark (%) into human readable format .

[Attach / Upload testing program and link it]

Pass Criteria

1. Security, Accessibility & Visibility:

1.1. Pretest state:

1.1.1. Class name exists in global namespace.

1.2. Post testing state:

1.2.1. Class name still exists in global namespace.

Other/Notes:

-

2. Interface & display:

2.1. Pretest state:

-

2.2. Post testing state:

-

Other/Notes:

displays no output.

3. Persistent Memory:

(what does the system know about this feature?)

3.1. Pretest state:

3.1.1. Again the class OO() exists in global namespace. 3.1.2. After declaring a new instance of the class:

3.2.1. After calling funInitialise() method:

3.2.2. after calling funGetByName("") the method has returned the test instances javascript object handle.

3.2.3. calling funSetName("test") then funGetByName("test") did returm the test instances javascript object handle. Set name only works once per instance and must be unique per OO object type.

3.2.4. After calling Destroy() when a single initilised instance of OO exists:

3.2.5. after calling Destroy() when multiple instances of OO are initialised:

This class has broken from the coding standard naming convention but its OK, its the master class. It needs not even initialize in script yet its decedents will inherit its form while retaining the standard. Many of the properties and methods exist solely to provide structure for descendant classes.

4. Restrictions:

4.1. OO does not need to be initialized as an object for its decedents to initialize. However should a developer initialize two or more instances, destroying one instances must leave the other instance fully functional. Its just good programming.

5. Exceptions:

5.1. funSetName() method must return false when a object of given type already has that name or when the name has already been set, then name wont be set.

DanielBullimore commented 5 years ago

I know this is the draft, but... Although the master class can be nameless, in multi instance situations being able to name the instances would be good programming. Becuase strName is a private property, developers can't name a class instance, not even decendent classes can. I recommend ether a protected method which sets strName so long as strName is null. Or Passing the instances name as declaration parameter example test = new OO("strName)