Scheduler Unit Testing

Scheduler Unit Testing
SchemeStation documentation

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:

3 Individual function tests

Individual functions are tested against:

Test cases (first part: (D)one, (U)ndone, (I)ncomplete, second part: (S)uccess, (U)nsuccess, (I)ncomplete):
#TestResult
1Illegal pointer arguments (NULL)D/S
2Scheduler initializationD/S
3Inserting an item to the schedulerD/S
4Removing an item from the schedulerD/S
5Cycle count from the schedulerD/S
6500 successive insertsD/S
7500 successive removesD/S
8500 successive (insert, insert, remove, remove)D/S
9Scheduler disposeD/S
10Scheduling two itemsD/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
1List initializationD/S
2Remove non-existing itemD/S
3Add items to the listD/S
4Remove items to the listD/S
5Remove the same item twiceD/S
6List iterationD/S
7Ring iteration modeD/S
8Stress testD/S
Total Done8
Total Successful8