SerTi

Susanna Blomqvist
Antti Korhonen
Heikki Mylläri
Pekka Pakari

Testing Plan 0.3
							16.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.	Testing Environment
4.	Notation of a Test Case
5.	Test Cases
5.1.	The Basic Functions
5.2.	Log and Commands
5.3.	Parameter Dialog
5.4.	Communication Port
5.5.	Motor Controls
5.6.	Polling
6.	Reporting
7.	Conclusion

 
1.	Introduction

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

The test cases are based on the requirements and the use cases of the software which are presented in the Requirement Specification document. After the test cases have been performed, project group writes a Testing Report document that contains information about the results of the test cases.

The document describes the testing cases for the SerialTester software. In Chapter 2 are explained some terms, acronyms and abbreviations that are used in this document. Chapter 3 describes the testing environment and Chapter 4 the notation used in the test cases. Chapter 5 contains the test cases and Chapter 6 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.	
Spy cable	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.	
Testing Environment

All tests described in the document will be carried out with the computers in the project group’s room. The operating system is Windows 2000, processors varies from Celeron 700MHz to AMD Athlon XP 1600+ with 256 MB RAM memory. The hard drives and the graphic adapters have sufficiently memory.

The other equipments that project group has are XY-table, remote controller and StressLogic, which is connected with serial cable to the computer. To the executable software in addition to SerialTester.exe, the files that are needed are commands.ini, mfc42.dll, msvcp60d.dll and msvcrt.dll.

4.	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 is described. Also all the things that must be done before starting to perform the test case are described in this cell.	
Description	The steps that the tester has to perform is are listed here.	
Post condition	The presumed status of the program after the test case is carried out.	
Remarks	These things the tester should notice while performing the test case.	

5.	
Test Cases

The chapter describes the test cases. First there are the tests for the most common use cases, while the next subchapter contains the tests for Log view and Commands ‘terminal’. There are also test cases for changing and saving the motor parameters and the communication settings, motor controls and for reading status automatically (polling).

5.1.	The Basic Functions

CASE 1.1 Initialization [Requirement Specification, use case 5.1]	
Precondition	The target system is powered and operational. SerialTester is running.	
Description	1.	Select Connect from the Connection menu.
2.	Select Initialize SL from the Connection menu or send command IN from the Commands view.	
Post condition	The target system is initialized. The initialization command response is shown in the Log view.	
Remarks		

CASE 1.2 Set and send configuration [Requirement Specification, use case 5.2]	
Precondition	The target system is powered, operational and initialized. SerialTester is running.	
Description	1.	Select the Param button for desired motor or from Setup menu the command Parameters/Motor…
2.	Give new values or edit existing values on each field and select Send.	
Post condition	New parameters are sent to the target system. If the given values are not numerical, an error message is shown.	
Remarks	The sent parameters and the response should also appear in the Log view.	

CASE 1.3 Retrieving the status of the motor [Requirement Specification, use case 5.3]	
Precondition	The target system is powered, operational and initialized. SerialTester is running.	
Description	1.	Press the Read button for the desired motor.
2.	Press the Read button for the I/Os.	
Post condition	The program has read the status of the motor and the system’s I/Os.	
Remarks		

CASE 1.4 Running the motors to the target position [Requirement Specification, use case 5.4]	
Precondition	The target system is powered, operational and initialized. SerialTester is running. The motor parameters are set and sent.	
Description	1.	Set the Target value for a motor.
2.	Press button Cal or Start for the motor.	
Post condition	The motor has been run toward the given target position and stopped when the position or a limit reached.	
Remarks	Test all motors.	

5.2.	Log and Commands

CASE 2.1 Saving Log	
Precondition	The target system is powered, operational and initialized. SerialTester is running.	
Description	1.	Press Save button below Log.
2.	Choose the file in Save File dialog. 
3.	Press Save button in Save File dialog.	
Post condition	The file is created and it contains all information from the Log. 	
Remarks	Perform the test with different amounts of text in Log including when it’s empty.	

CASE 2.2 Saving a command file.	
Precondition	Target system is powered, operational and initialized. SerialTester is running.	
Description	1.	Press Save button below Commands.
2.	Choose the file name to save the information.	
Post condition	The commands are saved in the file and there is all information from the Commands field.	
Remarks	Perform the test with different amounts of text in Commands including when it’s empty.	

CASE 2.3 Running a command file. 	
Precondition	The target system is powered, operational and initialized. SerialTester is running and the communication port is open. The command file exists.	
Description	1.	Press Load button below Commands.
2.	Choose the file name to be opened. 
3.	Manually send commands by pressing Enter with the cursor pointing the command you want to send. 
4.	Press Run all button to run all commands in Commands. 	
Post condition	The commands are sent to the system and are written to the Log. 	
Remarks		

CASE 2.4 Sending commands consecutively.	
Precondition	The target system is powered, operational and initialized. The program has been started and the communication port is open.	
Description	1.	Write a command to Commands.
2.	Press enter in Commands cursor pointing the command you wrote so that commands are sent consecutively.	
Post condition	The commands are sent consecutively and the system has answered all of them. 	
Remarks	Test with all commands.	

CASE 2.5 Copying/Pasting from/to Commands field	
Precondition	The program has been started.	
Description	1.	Copy some text.
2.	Paste to Commands field.
3.	Select some text from the Commands field.
4.	Copy it to the clipboard.
5.	Paste the clipboard contents to somewhere else.	
Post condition	Text is pasted to Commands. Text copied from Commands field is copied and pasted.	
Remarks		

CASE 2.6 Copy from Log screen	
Precondition	The target system is powered, operational and initialized. The program has been started and the communication port is open.	
Description	1.	Highlight text from Log screen. 
2.	Press Ctrl + c or click the right button of the mouse and choose Copy.	
Post condition	Text is copied to the clipboard.	
Remarks		

CASE 2.7 Setting a mark	
Precondition	The program has been started and the 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 the running number of the marks.	
Remarks		

CASE 2.8 All messages sent and received are going to Log when the port is open.	
Precondition	The program has been started.	
Description	1.	Open the communication port by choosing Connect from Connection menu.
2.	Use SerialTester normally, send text from Commands and use also some buttons.	
Post condition	All messages sent and received can be seen in the Log view. 	
Remarks	All commands and buttons must be tested and used also ‘illegal’ values.	

CASE 2.9 No messages sent and received should go to the Log when the port is closed.	
Precondition	The program has been started. The communication port is closed.	
Description	1.	Use SerialTester normally, send text from Commands and use also some buttons. 	
Post condition	No text should be written to Log. The communication port is closed.	
Remarks	See case 2.8.	

CASE 2.10 Rotating Log buffer.	
Precondition	The target system is powered, operational and initialized. The program has been started and the communication 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 chosen buffer size.	
Post condition	All text is sent to the Log, but after the limit is reached the old lines will disappear.	
Remarks		

CASE 2.11 Choosing earlier sent commands.	
Precondition	The target system is powered, operational and initialized. The program has been started and communication port is open.	
Description	1.	Send several commands to the SL.
2.	Select an earlier sent command from the Commands and push Enter or Send button.	
Post condition	All commands can be seen in the Log.	
Remarks	Earlier sent command won’t appear again to the Commands.	

5.3.	
Parameter Dialog

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

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

CASE 3.3 Running the motors if the motor parameters have not been sent.	
Precondition	Target system is powered, operational and initialized. The program has been started and communication port is open.	
Description	1.	Press any motor control button.	
Post condition	The motor parameter dialog will appear.	
Remarks		

5.4.	Communication Port

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

CASE 4.2 Changing the port settings when the port is open.	
Precondition	The program has been started and the 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	The port settings are changed without restarting.	
Remarks	The port settings shouldn’t be able to be changed when the connection is open, so check that also.	

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

CASE 4.4 Opening the communication port when port is already open.	
Precondition	The program has been started and the communication port is open.	
Description	1.	Select Connect from the Connection menu.	
Post condition	The port is still open.	
Remarks	The status bar tells that the port is already open.	

5.5.	Motor Controls

CASE 5.1 Running a motor with Start button. 	
Precondition	The program has been started and the communication port is open. StressLogic is initialized and the motor power is on. User has sent the motor parameters.	
Description	1.	Set Target.
2.	Press Start button.	
Post condition	The chosen motor will be run to the target position. Then it stops automatically.	
Remarks	If the motor reaches the negative or the positive limit it will stop there. Test all motors.	

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

CASE 5.3 Running the motors manually with the control buttons.	
Precondition	The program has been started and the communication port is open. StressLogic is initialized and the motor power is on. User has sent the motor parameters.	
Description	1.	Press down the button ‘<’ or ‘>’ 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	Test all motors. See also the case 1.4.	

CASE 5.4 Running the motors with the shortcut keys.	
Precondition	The program has been started and the communication port is open. StressLogic is initialized and the 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	Test all motors, other motor driving buttons and all other shortcuts too. See the cases 5.3 and 1.4.	

CASE 5.5 Calibrating.	
Precondition	The program has been started and the communication port is open. StressLogic is initialized and the motor power is on. User has sent the motor parameters.	
Description	1.	Give a non-zero Target value for the desired motor.
2.	Select the Cal button for the motor.
3.	Press the Zero button for the motor.
4.	Press the Read 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. Position is set as zero.	
Remarks		

5.6.	Polling

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

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

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

CASE 6.4 Autopolling	
Precondition	The program has been started and the communication port is open. StressLogic is on and initialized.	
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 the outputs on the interval specified. All information is written to the Log.	
Remarks		
6.	
Reporting

The results of the tests will be documented in a Testing Report when they are carried out. The following example describes how the tests are reported. The names of the test cases may be abbreviated.

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.	
				
Remarks:	

7.	Conclusion

SerialTester software is used to test and monitor devices through RS232 line. The software is developed for Stresstech Ltd. This document describes the test cases that the project group will  carry out for the software. The testing environment that is used in the test cases is also described.

If any of the test cases will be failed, the fault will be fixed and all the test cases will be carried out again. After carrying out the tests, the project group will write a Testing Report where is listed implemented tests and remarks, as specified in the Chapter 6.