DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ T V ┃
Length: 19343 (0x4b8f) Types: TextFile Names: »V«
└─⟦db1c56801⟧ Bits:30000748 8mm tape, Rational 1000, TESTMATE 2_2_0 └─ ⟦866d14df1⟧ »DATA« └─⟦97c804b2f⟧ └─⟦this⟧
package Testmate_Tools is type Switch_Type is (Session_Switch, Library_Switch); procedure Initialize (Library_Name : String := "$$"; Using_Model : String := "!Model.TestMate"; Response : String := "<PROFILE>"); -- -- Initializes the TestMate user's environment by: -- -- * Creating a TestMate directory structure from a model world, -- copying any files from within that model world into the new -- library -- -- * Setting the newly-created TestMate library's Test_Context, -- Script_Construction_Control, and Execution_Control switches to -- point to context, construction control, and execution control -- files if they are set in the model world. -- -- -- TestMate supplies a model world ("!Model.TestMate") that will be -- used if a user-created model world is not supplied. This world -- has a separate directory for each of the locations that can be -- specified in the test context file. This model world also has -- test context, construction control, and execution control files, -- with appropriate library switches pointing to each. -- -- You can construct your own model world to reflect your desired -- testing directory structure; individual test setups can then be -- rapidly created from this model using Testmate_Tools.Initialize. -- -- Library_Name: -- -- Library which is initialized for TestMate use. -- -- Using_Model: -- -- This parameter is used to specify the "model" world--the world -- who's directory structure, contents, and switches are replicated -- by the Initialize command. The default model world, -- "!Model.Testmate", is supplied as part of TestMate and is set up -- as specified in the TestMate Process Paper. -- -- Response: -- -- Specifies how to respond to errors, where to send log messages, -- and what activity to use during the execution of this command. By -- default, this command uses the response characteristics specified -- in the job response profile for the current job. For other values -- accepted by this parameter, see Parameter-Value Conventions in -- the Reference Summary (RS) of the Rational Environment Reference -- Manual. -- procedure Set_Context (To : String := "<SELECTION>"; Response : String := "<PROFILE>"); -- -- Sets the TestMate.Test_Context library switch to the name of the -- context file specified by the To parameter. The switch file for -- the enclosing library (from which the Set_Context command is run) -- is modified. -- -- The context file can be identified using either an absolute or -- relative pathname. -- -- To: -- -- The file name of a context file. Set_Context does not verify that -- the specified file is a valid test context file. If it is not, -- warnings will be generated by each Testmate command that attempts -- to reference the specified file. -- -- Response: -- -- Specifies how to respond to errors, where to send log messages, -- and what activity to use during the execution of this command. By -- default, this command uses the response characteristics specified -- in the job response profile for the current job. For other values -- accepted by this parameter, see Parameter-Value Conventions in -- the Reference Summary (RS) of the Rational Environment Reference -- Manual. -- procedure Set_Controls (To : String := "<SELECTION>"; For_Switch_Type : Switch_Type := Testmate_Tools.Session_Switch; Response : String := "<PROFILE>"); -- -- Sets the Testmate.Script_Construction_Control or the -- Testmate.Script_Execution_Control switch, as appropriate, to -- the file specified in the To parameter. Set_Controls checks the -- control file's contents to determine the type of control file. -- These control files are used to specify how the generated test -- script is to be constructed and executed. -- -- The control file switches can be set either at the library or the -- session level. The session-level switches, if set, override the -- library-level switches. Set_Controls allows you to specify -- whether you wish session (the default) or library switches to be -- updated. When updating library switch values, the library switch -- file for the enclosing library (from which the Set_Controls -- command is executed) is updated. -- -- Control files can be identified using either absolute or relative -- pathnames in the switches. -- -- To: -- -- The file name of a script construction control or script -- execution control file. This filename is resolved relative to the -- current Environment context. -- -- For_Switch_Type: -- -- This parameter can either be: -- -- * Session: (the default) sets the appropriate session switch -- value -- -- * Library: sets the appropriate library switch value in the -- library switch file for the enclosing library (from which the -- Set_Controls command is executed). -- -- Response: -- -- Specifies how to respond to errors, where to send log messages, -- and what activity to use during the execution of this command. By -- default, this command uses the response characteristics specified -- in the job response profile for the current job. For other values -- accepted by this parameter, see Parameter-Value Conventions in -- the Reference Summary (RS) of the Rational Environment Reference -- Manual. -- procedure Run (Test_Cases_Or_A_Set : String := "<SELECTION>"; Test_Set_Name : String := "<AUTO_GENERATE>"; Coverage_Analysis : Boolean := False; Response : String := "<PROFILE>"); -- -- Given a naming expression that resolves to one or more test cases -- or a single test set, Testmate_Tools.Run does all the setup -- needed to execute a test and then runs the test. All objects -- needed to run the test are created--a test set (if test cases -- were specified as input) and a script. -- -- The file specified by the Testmate.Script_Construction_Control -- library (or session, if one has been specified) switch will be -- used as a guide when the test script is constructed. Similarly, -- the file specified by the Testmate.Execution_Control library (or -- session) switch will be used as a guide when the test script is -- executed. -- -- Test_Cases_or_a_Set: -- -- A naming expression that resolves to one or more test cases, or a -- single test set, in the current Environment context. -- -- Test_Set_Name: -- -- This parameter is only used if the Test_Cases_Or_A_Set parameter -- resolves to one or more test cases. The default, -- "<AUTO_GENERATE>", causes the test set name to be constructed by -- appending the string "_Test_Set" to first object in the resolved -- list of test cases. If a particular name is desired for the test -- set, specify it using this parameter. -- -- The Test_Set_Name parameter is resolved relative to the -- Test_Set_Loc entry in the test context file. If this location is -- not present in the test context file, or no test context file is -- specified in the Testmate.Test_Context switch, the generated test -- set is placed in the subject program's directory. -- -- The generated test script name is automatically generated by -- appending "_Script" to the name of the test set as determined -- above. The name of the test run results file is similarly -- constructed by appending "_Script_Run" to the test set name. The -- test script is stored relative to the Test_Script_Loc entry in -- the test context file. The test run results file is stored -- relative the Test_Run_Loc entry. If either location is not -- present in the test context file, or no test context file is -- specified by the Testmate.Test_Context switch, the affected file -- is stored relative to the current Environment context. -- -- Coverage_Analysis: -- -- If True, the script is run with coverage analysis enabled. If -- False, the default, coverage analysis is not enabled. -- -- Response: -- -- Specifies how to respond to errors, where to send log messages, -- and what activity to use during the execution of this command. By -- default, this command uses the response characteristics specified -- in the job response profile for the current job. For other values -- accepted by this parameter, see Parameter-Value Conventions in -- the Reference Summary (RS) of the Rational Environment Reference -- Manual. -- procedure Create_Scc_File (Script_Construction_Control_File_Name : String := ">>FILE NAME<<"; Response : String := "<PROFILE>"); -- -- Creates a Script Construction Control file, setting all -- components of the file to their TestMate defaults. -- -- The script construction control file specifies how the test -- script is to be constructed. Specifically, it indicates: -- -- * Whether the test is to be run on the R1000 server or a remote -- host -- -- * What test case conditions should cause test case termination -- -- * What test case conditions should cause test script termination -- -- * Prolog and Epilog routines that should be run at the beginning -- and end of test script execution, respectively -- -- * Whether or not (and how) version information is to be gathered -- for each unit in the subject program's closure -- -- TestMate needs to know the name of the script construction -- control file it is to use; this is done by specifying the -- construction control file during test script construction. A -- "default" construction control file can be named with the -- Testmate.Script_Construction_Control library switch. -- -- Script_Construction_Control_File_Name: -- -- This parameter is used to specify the desired construction -- control file name. This name will be resolved relative to the -- current Environment context. -- -- Response: -- -- Specifies how to respond to errors, where to send log messages, -- and what activity to use during the execution of this command. By -- default, this command uses the response characteristics specified -- in the job response profile for the current job. For other values -- accepted by this parameter, see Parameter-Value Conventions in -- the Reference Summary (RS) of the Rational Environment Reference -- Manual. -- procedure Create_Sec_File (Script_Execution_Control_File_Name : String := ">>FILE NAME<<"; Response : String := "<PROFILE>"); -- -- Creates a Script Execution Control file, setting all components -- of the file to their TestMate defaults. -- -- The script execution control file specifies how the test script -- is to be executed. Specifically, it indicates: -- -- * Whether the test description is to be copied to the test log -- file when the test case is invoked -- -- * The units for which coverage information should be gathered -- (the decision as to whether or not coverage information is -- gathered is specified by a parameter to the test script) -- -- * Specific values for those test case conditions that cause test -- script termination -- -- * The value of a string that is passed verbatim to user -- routines--this is used to pass execution-specific data to test -- drivers and other such user-written routines -- -- TestMate needs to know the name of the script execution control -- file it is to use; this is done by specifying the execution -- control file during test script execution. A "default" execution -- control file can be named with the Testmate.Execution_Control -- library switch. -- -- Script_Execution_Control_File_Name: -- -- This parameter is used to specify the desired execution control -- file name. This name will be resolved relative to the current -- Environment context. -- -- Response: -- -- Specifies how to respond to errors, where to send log messages, -- and what activity to use during the execution of this command. By -- default, this command uses the response characteristics specified -- in the job response profile for the current job. For other values -- accepted by this parameter, see Parameter-Value Conventions in -- the Reference Summary (RS) of the Rational Environment Reference -- Manual. -- procedure Create_Context_File (Context_File_Name : String := ">>FILE NAME<<"; Driver_Location : String := "<NULL>"; Subject_Program_Location : String := "<NULL>"; Test_Case_Location : String := "<NULL>"; Test_Set_Location : String := "<NULL>"; Input_Location : String := "<NULL>"; Output_Location : String := "<NULL>"; Expected_Output_Location : String := "<NULL>"; Script_Location : String := "<NULL>"; Log_Location : String := "<NULL>"; Run_Location : String := "<NULL>"; Response : String := "<PROFILE>"); -- -- This procedure creates a test context file. The context file is -- used to specify the locations of the various files used during -- test creation and execution; TestMate commands that generate -- output files place those files in the appropriate locations as -- specified in the test context file. -- -- Whenever you issue a command that contains a parameter resolved -- relative to a context location, you can instead specify a full -- pathname for the parameter. This allows you to override the -- context locations on an individual basis. -- -- All parameters that are left defaulted will be left blank in the -- test context file. Subsequently, any filenames that are resolved -- relative to one of these "blank" locations will instead be -- resolved relative to the current Environment context. -- -- TestMate needs to know the name of the context file it is to use. -- This can be done explicitly during test script construction and -- execution. A default is typically set by indicating the default -- context file's name in the Testmate.Test_Context library switch. -- -- Context_File_Name: -- -- This parameter is used to specify the desired context file name. -- This name will be resolved relative to the current Environment -- context. -- -- xxx_Location: -- -- The name of the library that will hold xxx. This parameter can be -- an absolute or a relative pathname; if relative, it will be -- resolved relative to the current Environment context at the time -- the command that references this location is invoked. Test case -- files specify xxx relative to this location. -- -- Response: -- -- Specifies how to respond to errors, where to send log messages, -- and what activity to use during the execution of this command. By -- default, this command uses the response characteristics specified -- in the job response profile for the current job. For other values -- accepted by this parameter, see Parameter-Value Conventions in -- the Reference Summary (RS) of the Rational Environment Reference -- Manual. -- procedure Create_Test_Cases (From_Drivers : String := "<CURSOR>"; Test_Case_Template : String := "<REGION>"; Test_Case_Name : String := "<AUTO_GENERATE>"; Replace : Boolean := True; Response : String := "<PROFILE>"); -- -- This command is used to rapidly create one or more test cases -- from a list of drivers (one test case for each driver). Test -- cases are deposited in the Test_Case_Loc specified in the test -- context file. If Test_Case_Loc is not specified in the test -- context file, the test cases are deposited in the subject program -- location. -- -- Each test case is fashioned after the template specified by the -- Test_Case_Template parameter with the Test_Driver component -- replaced by the appropriate test driver. Test case names are -- generated from the Test_Case_Name parameter, or, if a -- Test_Case_Name is not supplied, from the name of the test driver. -- -- From_Drivers: -- -- Fully qualified or relative naming expression (relative to the -- current Environment context) that resolves to one or more test -- drivers. One test case is created for every driver. If -- From_Drivers resolves to an object that is not an Ada subprogram, -- an error is reported and the operation terminates without -- generating any test cases. -- -- Test_Case_Template: -- -- A fully qualified or relative name of a template test case. The -- component values (all except the test driver) of that test case -- are used as a template for creating each new test case. If no -- template is specified (a null string), each test case component -- is set to its TestMate default value -- -- Test_Case_Name: -- -- Specifies the names of the test cases to be created. "<DEFAULT>" -- results in the test case name being generated by appending the -- string "_Test_Case" to the correspond ing driver name. If a name -- is specified, the test case names are constructed by appending -- "_n" to the name, where 1 >= n >= N, N being the number of -- drivers. If Test_Case_Name resolves to an existing test case, the -- existing test case may be over written (see the Replace -- parameter, below). -- -- Replace: -- -- If this parameter is set to True and a generated test case name -- corresponds to an existing test case, that test case is -- overwritten. Setting this parameter to False will prevent -- existing test cases from being overwritten. -- -- Response: -- -- Specifies how to respond to errors, where to send log messages, -- and what activity to use during the execution of this command. By -- default, this command uses the response characteristics specified -- in the job response profile for the current job. For other values -- accepted by this parameter, see Parameter-Value Conventions in -- the Reference Summary (RS) of the Rational Environment Reference -- Manual. -- end Testmate_Tools;