Scheduler Unit Testing

Scheduler Unit Testing


Document formatted by vherva at Fri Apr 24 11:23:50 1998 on the host schemestation. This document is produced by the SchemeStation project during the Tik-76.115 course.

1 Purpose

This document describes the unit testing of the SCHEMESTATION scheduler. The purpose of the unit testing is to show that the basic functionality of the scheduler is implemented and that there are sufficient amount of checks for illegal instructions and other malicious use of this unit. Also the behaviour of the scheduler under high load is to be observed.

2 Scheduling tests

Scheduling is tested as follows:

  • Basic functionality (adding, removing of items, item execution)
  • Accounting (the execution time of items)
  • Stress test (inserting, removing and executing items many times)

3 Individual function tests

Individual functions are tested against:

  • Illegal arguments
  • Invalid arguments
  • Functionality (to verify correct semantics)
  • Erraneous behaviour (e.g. removal of an item that has already been removed)

Test cases (first part: (D)one, (U)ndone, (I)ncomplete, second part: (S)uccess, (U)nsuccess, (I)ncomplete):
#TestResult
Illegal pointer arguments (NULL) D/S
Scheduler initialization D/S
Inserting an item to the scheduler D/S
Removing an item from the scheduler D/S
Cycle count from the scheduler D/S
500 successive inserts D/S
500 successive removes D/S
500 successive (insert, insert, remove, remove) D/S
Scheduler dispose D/S
10 Scheduling two items D/S
 Total Done10
 Total Successful10

For details, see the files ./src/libsrc/scheduler/new_tests.c and ./src/libsrc/scheduler/sch_test.c.

4 List package testing

The scheduler uses a separate list package, which is tested separately. The list package tester consists of logic testing, that is the list functions are used both like they are supposed to and like they are not supposed to be used. See ./src/libsrc/scheduler/list_tests.c for further details.

Test cases (first part: (D)one, (U)ndone, (I)ncomplete, second part: (S)uccess, (U)nsuccess, (I)ncomplete):
#TestResult
List initialization D/S
Remove non-existing item D/S 
Add items to the list D/S 
Remove items to the list D/S 
Remove the same item twice D/S 
List iteration D/S 
Ring iteration mode D/S 
Stress test D/S 
 Total Done8
 Total Successful8


© SchemeStation project 1997-1998 [Back to the document index]