Presentation on theme: "Automated Unit Test Package For Tcl Procedures March 25, 2017"— Presentation transcript:
1Automated Unit Test Package For Tcl Procedures March 25, 2017 TUnit DemonstrationAutomated Unit Test PackageFor Tcl ProceduresMarch 25, 2017
2Requirements Java runtime level of at least 1.4 tclsh Eclipse IDE Eclipse IDEtclshMake sure to add bin directory to the path
3Installation Extract the zipped file to the eclipse home directory Usually C:\Program Files\eclipse
4Verifying Installation If eclipse is being started for the first time, a welcome screen will appear.If an error occurs, this is usually a result of the Java runtime engine not being installed properly.
5Verifying Installation Continued From the Window menu, set the TUnit Preferences.This means the installation was a success.
6TUnit PerspectiveA perspective determines the visible actions and views within a window. The TUnitperspective has 4 views: Navigator, Namespace Explorer, Tasks, and Console. TheTUnit perspective can be opened from the upper right corner, the window menu, orby creating a new Tcl Project.
7New Tcl ProjectCreate a new Tcl Project and choose the Project name and location
8Tcl Project ContinuedThe Tcl Project creates the init.tcl and global.tcl files as well as the t-unit package.
9Namespace ExplorerNamespace Explorer looks at the tclIndex file and generates the procedure namesassociated with each package. Double clicking on the procedure name will openthe file where the procedure is defined.
10EditorThe Tcl Editor has the following features: syntax highlighting, auto indentation, andcontent assistance. If other plugins are installed, *.tcl files may not use the TUniteditor. Update the file associations preferences to use the TUnit editor.
11TUnit Menu Within the TUnit perspective, you allowed to create a new Tcl Package and a new Tcl File.
12Tcl Package Create a new package within a project. The package will include the necessary file for package and namespace declarationand init.tcl will automatically be updated.
13Tcl FileThe Tcl File wizard only requires the file name as input. But ProcedureParameters, Version, and Author name are also allowed and will beautomatically put into the comments within the file.
15Using the Test Harness # Put this file at the project level. # Can also run more than one set of# unit tests, i.e. make a call to# t-unit::testHarness more than once.# Below is a sample file; init.tcl is# required.source init.tclt-unit::testHarness t-unit/t-unittestcases.test
16Execute TUnit ScriptRight click on the TUnit Script to execute and run it.
17Results of a TUnit RunOnce the TUnit script finishes executing, a popup window will appearwith the results of the test. In addition, the console window displays thetest results.
18Known IssuesThis plugin has not been tested on Unix or Mac systems. Please report any errors that are seen and they will be fixed accordingly.