SerTi

Susanna Blomqvist
Antti Korhonen
Heikki Mylläri
Pekka Pakari

Testing Plan 0.1
							13.05.2003

University of Jyväskylä
Department of Mathematical Information Technology

Authors:	Susanna Blomqvist (SBl), Antti Korhonen (AKo), Heikki Mylläri (HMy), Pekka Pakari (PPa)
Title:	Testing plan for the SerTi Project
Abstract:	The SerTi project designs and develops the SerialTester software for Stresstech Ltd. This testing plan describes the testing cases for the software.
Version history:

Table of Contents

1.	Introduction
2.	Terms, Acronyms and Abbreviations
3.	Notation of a Test Case
4.	Test Cases
4.1.	Log and Terminal
4.2.	Parameter Dialog
4.3.	Communication Port
4.4.	Motor Controls
4.5.	Polling
5.	Reporting

 
1.	 Introduction

SerTi is a student software project that shall be carried out in the University of Jyväskylä during spring 2003, under the authority of the Department of Mathematical Information Technology. The project will design and develop SerialTester, a Windows-based application suitable for testing and/or monitoring equipment controlled via RS-232 bus, as per requests of the client, Stresstech Ltd.

This document describes the testing cases for the SerialTester software. Chapter 3 describes the notation used in the test cases. Chapter 4 contains the test cases and chapter 5 tells how the tests should be reported.

2.	Terms, Acronyms and Abbreviations
The following terms are used in the document:

SL	(StressLogic) is a motor driver and an I/O board manufactured by StressTech Oy.	
ST	(SerialTester) is the testing/monitoring software for StressLogic that will be developed by the SerTi project.	
RS-232	is a PC serial communication standard.	
I/O	is the abbreviation for Input/Output.	
SpyCable	is a special 3 headed cable used to monitor RS232 communication between two systems. Third end is connected to the PC that logs the traffic between the monitored systems.	
GUI	is the abbreviation for graphical user interface.	
View/Model	is a design paradigm where model (the core of the software) is separated from view (GUI). In other words, no part of the actual software functionality resides within the GUI classes.	
STL	(Standard Template Library) is a C++ library that provides a set of easily composable C++ container classes and generic algorithms (template functions).	
MFC	(Microsoft Foundation Class) is Microsoft’s class library for Windows based software.	

3.	
 Notation of a Test Case

The next table describes the notation of a test case:

CASE 1.1.1 The name of the case.	
Precondition:	The status of the program before performing the test case and all the things that must be done before starting to perform the test case are described in this cell.	
Description:	The list of the steps that te tester has to perform is described here.	
Post condition:	The status of the program after the test case is carried out.	
Remarks:	These things the testes should notice while performing the test case.	

4.	 Test Cases

This chapter describes the test cases.

4.1.	Log and Terminal

CASE 1.1 Saving log	
Precondition:	SerialTester is running. 	
Description:	1.	Press the Save button below Log.
2.	Choose the file in Save File dialog. 
3.	Press the Save button in Save File dialog.	
Post condition:	The file is created and there is all information from Log. 	
Remarks:	Perform the tests with different amounts of text in Log.	

CASE 1.2 Saving command queue.	
Precondition:	SerialTester is running.	
Description:	1.	Press Save button below terminal.
2.	Choose file name in which to save the information.	
Post condition:	Commands are saved in file.	
Remarks:	Perform the tests with different amounts of text in Terminal.	

CASE 1.3 Running command queue. 	
Precondition:	Target system is powered, operational and initialized. Serial tester is running and communication port is opened. Command queue file exists. 	
Description:	1.	Press Load button below terminal.
2.	Choose the file name to be opened. 
3.	Manually send commands by pressing Enter with the cursor pointing command you want to send. 
4.	Press Run all button to run all commands in Terminal. 	
Post condition:	Commands are sent to StressLogic and are written to Log. 	
Remarks:		

CASE 1.4 Sending commands consecutively.	
Precondition:	The program has been started and communication port is open.	
Description:	1.	Write command to terminal.
2.	Press enter in terminal cursor pointing command you wrote so that commands are sent consecutively.	
Post condition:	Commands are sent consecutively and StressLogic has answered all of them. 	
Remarks:		

CASE 1.5 Pasteing to command field	
Precondition:	The program has been started.	
Description:	1.	Copy some text.
2.	Paste to command field.	
Post condition:	Text is pasted to Terminal.	
Remarks:		

CASE 1.6 Copy from log screen	
Precondition:	The program has been started.	
Description:	1.	Highlight text from log screen. 
2.	Press Ctrl + c or click the mouses right ear and choose copy.  	
Post condition:	Text is copied to clipboard.	
Remarks:		

CASE 1.7 Setting mark	
Precondition:	The program has been started and communication port is open. Some text is already in log. 	
Description:	1.	Push Mark button below log view.	
Post condition:	Last line of Log says “-------------- MARK n -------- where n is running number of marks. 	
Remarks:		

CASE 1.8 All messages sent and received going to log when communication port is open.	
Precondition:	The program has been started.	
Description:	1.	Open communication port by choosing Connect from the Connection menu.
2.	Use SerialTester normally, send text from Terminal and use also some buttons.	
Post condition:	All messages sent and received in Log view. 	
Remarks:		

CASE 1.9 All messages sent and received not going to log when communication port is close.	
Precondition:	The program has been started. Communication port is close.	
Description:	1.	Use SerialTester normally, send text from terminal and use also some buttons. 	
Post condition:	No text should be written to Log. Communication port is closed.	
Remarks:		

CASE 1.10 Rotating log buffer.	
Precondition:	The program has been started and communcation port is open.	
Description:	1.	Select Preferences…from setup menu.
2.	Choose a small log buffer size and select OK.
3.	Send to the log more text than the buffer size You chose.	
Post condition:	All text are sent to the Log, but after the limit reached old lines will disapear.	
Remarks:		

CASE 1.11 Choosing earlier sent commands.	
Precondition:	The program has been started.	
Description:	1.	Send several commands to the SL.
2.	Select an earlier sent command from the Terminal and push Enter or Send button.	
Post condition:	All commands are sent to the Log.	
Remarks:	Earlier sent command won’t appear again to the Terminal.	

CASE 1.12 Sending commands from terminal when communication port is closed.	
Precondition:	The program has been started. Communication port is close.	
Description:	1.	Use SerialTester normally, send text from Terminal and use also some buttons.	
Post condition:	No text should be written to Log.	
Remarks:		

4.2.	Parameter Dialog

CASE 2.1 Changing the parameter values.	
Precondition:	The program has been started, communication port is open and StressLogic has been initialized.	
Description:	1.	Select the Param button for desired motor or from Setup menu Parameters/Motor…
2.	Give new values to each field and select Send.	
Post condition:	New parameter values are sent to the SL.	
Remarks:	You should also see sent parameters in the Log.	

CASE 2.2 Saving parameters.	
Precondition:	The program has been started.	
Description:	1.	Select the Param button for desired motor or from Setup menu Parameters/Motor…
2.	Select Save and give a name for the file and select Save.	
Post condition:	All parameters are written in the file.	
Remarks:	This command saves parameters for all motors.	

CASE 2.3 Loading parameters.	
Precondition:	The program has been started.	
Description:	1.	Select the Param button for desired motor or from Setup menu Parameters/Motor…
2.	Select Load and choose the desired file and select Open.	
Post condition:	The parameters in the chosen file are in the fields of the dialog.	
Remarks:		

CASE 2.4 Sending parameters.	
Precondition:	The program has been started, communication port is open and StressLogic has been initialized.	
Description:	1.	Select the Param button for desired motor or from Setup menu Parameters/Motor…
2.	Give new values or load from a file and select Send.	
Post condition:	SerialTester sends parameters and does not check the validity of the values.	
Remarks:	Perform test with irrational parameters. Parameters are written to the Log.	

CASE 2.5 Running motors if motor parameters have not been sent.	
Precondition:	The program has been started and communication port is open.	
Description:	1.	Press any motor control button.	
Post condition:	Motor parameter dialog will appear.	
Remarks:		

4.3.	Communication Port

CASE 3.1 Changing port settings when port is close.	
Precondition:	The program has been started and communication port is close.	
Description:	1.	Select Connection Settings… from the Connection menu.
2.	Change port settings in dialog.
3.	Select the OK.	
Post condition:	Port settings are changed without restarting.	
Remarks:		

CASE 3.2 Changing port settings when port is open.	
Precondition:	The program has been started and communication port is open.	
Description:	1.	Select Disconnect from the Connection menu.
2.	Select Connection Settings… from the Connection menu.
3.	Change port settings in the dialog.
4.	Press OK button. 	
Post condition:	Port settings are changed without restarting.	
Remarks:		

CASE 3.3 Storing port settings for next use.	
Precondition:	The program has been started and communication port is open.	
Description:	1.	Change port settings like described above.
2.	Select Disconnect from the Connection menu.
3.	Close the program.	
Post condition:	When You next time start the program, last given settings are shown in the Port Settings.	
Remarks:	You can also check the ‘comm.cfg’ file where the settings are saved.	

CASE 3.4 Opening communication port when port is already open.	
Precondition:	The program has been started and communication port is open. 	
Description:	1.	Select Connect from the Connection menu.	
Post condition:	The port still open.	
Remarks:	No error messages are shown.	

4.4.	Motor Controls

CASE 4.1 Running motors with Start button. 	
Precondition:	The program has been started and communication port is open. StressLogic and motor power is on. User has sent motor parameters.	
Description:	1.	Set Target.
2.	Press Start button.	
Post condition:	Motor will be run to target position or to its negative or positive limit. Then it stops automatically.	
Remarks:		

CASE 4.2 Stopping motors with Stop button.	
Precondition:	The program has been started and communication port is open. StressLogic and motor power is on. User has sent motor parameters. Motor is running.	
Description:	1. Press Stop button.	
Post condition:	Motor is stopped.	
Remarks:		

CASE 4.3 Running motors with control buttons.	
Precondition:	The program has been started and communication port is open. StressLogic and motor power is on. User has sent motor parameters.	
Description:	1.	Push down the ‘<’ or ‘>’ button for the desired motor.
2.	Release the button.	
Post condition:	The motor was run to the selected direction as long as the button was pushed down or the limit was reached.	
Remarks:		

CASE 4.4 Running motors with shortcut keys.	
Precondition:	The program has been started and communication port is open. StressLogic and motor power is on. User has sent motor parameters.	
Description:	1.	Push down the shortcut key for the desired motor.
2.	Release the key.	
Post condition:	The motor was run to the selected direction as long as the key was pushed down or the limit was reached.	
Remarks:		

CASE 4.5 Calibrating.	
Precondition:	The program has been started and communication port is open. StressLogic and motor power is on. User has sent motor parameters.	
Description:	1.	Give a non-zero Target value for the desired motor.
2.	Select the Cal button for the motor.	
Post condition:	The motor is run toward the target position and will stop when the limit or the target is reached.	
Remarks:		

4.5.	Polling

CASE 5.1 Retrieving motor status.	
Precondition:	The program has been started and communication port is open. StressLogic is on.	
Description:	1.	Press the Read button for the desired motor.	
Post condition:	The program has read the status of the motor.	
Remarks:		

CASE 5.2 Retrieving I/O status of the StressLogic.	
Precondition:	The program has been started and communication port is open. StressLogic is on. 	
Description:	1.	Press the Read button for the inputs and outputs.	
Post condition:	The program has read the status of the inputs and outputs.	
Remarks:		

CASE 5.3 Autopolling	
Precondition:	The program has been started and communication port is open. StressLogic is on. 	
Description:	1.	Select the AutoStatus from the Setup menu.	
Post condition:	The program will automatically read the status of the motors and the inputs and outputs. All information is written to the Log.	
Remarks:		

CASE 5.4 Setting autopolling interval.	
Precondition:	The program has been started and communication port is open. StressLogic is on. 	
Description:	1.	Select Preferences… from the Setup menu.
2.	Set the value of Autostatus interval.
3.	Select the OK.	
Post condition:	When the Autostatus is on the program will read the status’ with the given interval.	
Remarks:	The interval value must be between 100 and 60 000.	

5.	 Reporting

This example describes how the tests are reported.

Date:	15.5.2003-16.5.2003	
Tester:	Susanna Blomqvist	
	
Test cases:	DATE:	PASS/FAIL:	Remarks:	
	
1. Log and Terminal	
1.1 Saving log	15.5.2003	PASS		
1.2 Command files	16.5.2003	FAIL	Some notifications.