Laserfiche WebLink
TSTool Documentation Quality Control <br />The following example command file illu strates how to create a test suite: <br /> <br /># <br /># Create the regression test runner for the <br /># TSTool/test/regression/TestSuites/commands_general files. <br /># <br /># Only command files that start with Test_ are included in the output. <br /># Don't append the generated commands, in order to force the old file to be <br /># overwritten. <br /># <br />CreateRegressionTestCommandFile(SearchFolder="..\..\..\commands\general", <br /> OutputFile="..\run\RunRegressionTest_commands_general_IncludeOS=Windows.TSTool", <br /> Append=False,IncludeTestSuite="*",IncludeOS="Windows") <br /> <br />When the command file is run, it searches the indicat ed search folder for files matching the pattern <br />Test_*.TSTool . It then uses this list to create a command file with contents similar to the following <br />example (its contents are truncated in the following fi gure due to length). This file will be listed as an <br />output file after running the above command file. The IncludeTestSuite and IncludeOS <br />parameters are described in Section 9 .3.3 . <br /> <br /># File generated by... <br /># program: TSTool 9.00.04 (2009-01-20) <br /># user: sam <br /># date: Tue Jan 20 22:56:17 MST 2009 <br /># host: SOPRIS <br /># directory: C:\Develop\TSTool_SourceBuild\TSTool\test\regression\TestSuites\commands_general\create <br /># command line: TSTool -home test/operational/RTi <br /># <br /># The following 287 test cases will be run to compare results with expected results. <br /># Individual log files are generally created for each test. <br /># The following test suites from @testSuite comments are included: * <br /># Test cases for @os comments are included: Windows <br />StartRegressionTestResultsReport( <br /> OutputFile="RunRegressionTest_commands_general_IncludeOS=Windows.TSTool.out.txt") <br />RunCommands(InputFile="..\..\..\commands\general\Add\Test_Add_1.TSTool") <br />RunCommands(InputFile="..\..\..\commands\general\Add\Test_Add_Ensemble_1.TSTool") <br />RunCommands(InputFile="..\..\..\commands\general\AddConstant\Test_AddConstant_1.TSTool") <br />RunCommands(InputFile="..\..\..\commands\general\AddConstant\Test_AddConstant_Legacy_Ast.TSTool") <br />RunCommands(InputFile="..\..\..\commands\general\AddConstant\Test_AddConstant_Legacy_NoAst.TSTool") <br />…omitted… <br />RunCommands(InputFile="..\..\..\commands\general\WriteSummary\Test_WriteSummary_1.TSTool") <br /> <br /> <br />The above command file can then be opened and run. Each RunCommands() command will run a <br />single test case command file. Warning and failure statuses from each test case command file are <br />propagated to the test suite RunCommands() command. The output from running the test suite will be <br />all of the output from individual test cases (in the appropriate Results folders) plus the regression test <br />report provided in the TSTool Results list in the main window. An example of the TSTool main window <br />after running the test suite is shown in the following figure. Note the warnings and errors, which should <br />be addressed before releasing the software (in so me cases commands are difficult to test and more <br />development on the test framework is needed). <br /> <br /> Quality Control - 5 121