Scripting a series of tests |
![]() ![]() ![]() |
BurnInTest includes a simple scripting language that allows a series of tests with different configurations to be executed in a sequence. A PASS/FAIL indication for all of the tests included in the script can be displayed at the end of the scripted test run. To achieve this you should select “Accumulate logs until manually cleared” from the Logging Preferences and results should be cleared before or at the start of the scripted test run. Script files are ASCII text files that you can create with a text editor (e.g. notepad). The file name must end with the extension ‘.bits’. To start a script use the ‘Test / Execute script’ menu item. Each script command must appear on its own line in the text file and the entire command must appear on a single line. (i.e. a single command can not be split across multiple lines). The command and its parameters must be separated by one or more spaces. Comments can be included by starting the line with the ‘#’ character.
The main scripting commands are shown below. Scripting commands to configure test preferences are shown here.
EXECUTE COMMAND Overview: Executes an external file and continues processing the script. Syntax: EXECUTE <Filename> <Parameters> Parameters:
Examples: #Start up Notepad with some results before starting tests. EXECUTE "c:\windows\system32\notepad.exe" "c:\MyResults\Results.txt" RUN CONFIG
EXECUTEWAIT COMMAND Overview: Runs an executable file and waits for that process to finish before continuing to process the script.
Passing configuration information from an external program to BurnInTest. The executable file may produce a file of scripting commands that are to be run by BurnInTest once the executable file has closed. As an example, this may be used to set the Machine type, serial number, test notes etc at the start of a script file.. The only script commands that will be processed by BurnInTest are the SET… commands. All other commands will be ignored. If this file, called a Sub-Script file, is created it must:
After processing the script commands in this file, BurnInTest will delete the file.
See STARTLOGGING.
Syntax: EXECUTE <Filename> <Parameters> Parameters:
Examples: #Start PassMark’s Sleeper application with user defined parameters. EXECUTEWAIT "sleeper.exe" -S1000 -R 30 -N 1 –E
#Start up Notepad with some results before starting tests. EXECUTEWAIT "c:\winnt\system32\notepad.exe" "c:\MyResults\Results.txt" RUN CONFIG
EXIT COMMAND Syntax: EXIT Parameters:
Note: BurnInTest will exit with a return code indicating whether the tests run during the script passed or failed. An exit code of 0 means SUCCESS, while and exit code of 1 means FAILURE. Examples: RUN CONFIG #Exit BurnInTest and return an exit code to the batch file EXIT
LOAD COMMAND Syntax: LOAD <File name> Parameters:
Examples: #Load the low load configuration file that we created earlier LOAD “C:\ConfigurationFiles\LowLoad.bitcfg”
LOG COMMAND Overview: Writes text to the detailed error and status log history. Syntax: LOG <Text> Parameters:
Examples: #Start an S1 sleep and log the start and stop times LOG "Sleep S1 Duration 60 seconds starting" EXECUTEWAIT SLEEPER -S1 -D 60 LOG "Sleep S1 Duration 60seconds complete"
LOOP Syntax: LOOP <number of iterations>
<Tasks to repeat> } Parameters:
Examples: LOG "Start" SETDURATION 1 LOOP 3
LOG "CPU Test" RUN CPU }
MESSAGE COMMAND Syntax: MESSAGE <Message Text> Parameters:
Examples: MESSAGE “Insert the test disc into the DVD drive then click on OK to proceed with the test”
SETCUSTOMER COMMAND Syntax: SETCUSTOMER < Customer name > Parameters:
Examples: #Set the customer name SETCUSTOMER "The big PC store" NOTE: SETSERIAL, SETMACHINETYPE, SETNOTES, SETCUSTOMER, SETTECHNICIAN commands should be included as the first commands in a script so that the report settings are included in any log file System Information.
SETCYCLES COMMAND Syntax: SETCYCLES <Number of test cycles> Parameters:
Example 1: #Set the number of test cycles to 1 SETCYCLES 1
Example : Run each test one cycle in series. SETCYCLES 1 SETDURATION 0 LOG "Run CPU Test” RUN CPU Etc… NOTE: Automatic stopping after a set number of test cycles is only supported in the licensed version of BurnInTest.
SETDURATION COMMAND Syntax: SETDURATION <Duration> Parameters:
Examples: #Set the test duration to 90 seconds SETDURATION 1.5
SETDUTYCYCLE COMMAND Syntax: SETDUTYCYCLE <Test Name> <Duty setting> Parameters:
Examples: #Set the disk test to maximum load SETDUTYCYCLE DISK 100 #Set the CPU test to medium load SETDUTYCYCLE DISK 65
SETMACHINETYPE COMMAND Syntax: SETMACHINETYPE < Machine Name> Parameters:
Examples: #Set Machine type SETMACHINETYPE "Dell XPS800" NOTE: SETSERIAL, SETMACHINETYPE, SETNOTES, SETCUSTOMER, SETTECHNICIAN commands should be included as the first commands in a script so that the report settings are included in any log file System Information.
SETNOTES COMMAND Syntax: SETNOTES <Notes > Parameters:
Examples: #Set Notes SETNOTES "Test notes defined by the external application." NOTE: SETSERIAL, SETMACHINETYPE, SETNOTES, SETCUSTOMER, SETTECHNICIAN commands should be included as the first commands in a script so that the report settings are included in any log file System Information.
SETSERIAL COMMAND Syntax: SETSERIAL < Serial Number > Parameters:
Examples: #Set the serial number SETSERIAL "1234-shdfgdhs-GHGHG" NOTE: SETSERIAL, SETMACHINETYPE, SETNOTES, SETCUSTOMER, SETTECHNICIAN commands should be included as the first commands in a script so that the report settings are included in any log file System Information.
SETTECHNICIAN COMMAND Syntax: SETTECHNICIAN < Technician name > Parameters:
Examples: #Set the technician name SETTECHNICIAN "Bill Smith" NOTE: SETSERIAL, SETMACHINETYPE, SETNOTES, SETCUSTOMER, SETTECHNICIAN commands should be included as the first commands in a script so that the report settings are included in any log file System Information.
SLEEP COMMAND Syntax: SLEEP <Delay period> Parameters:
Examples: #Pause 2 seconds SLEEP 2000
STARTLOGGING COMMAND To set report items like serial number in the report (log file) a script command, STARTLOGGING, is used to turn logging on and create a log file (start logging). The intent of this is to allow any test script reporting items to be configured before the log file is created. Syntax: STARTLOGGING Parameters: None. Examples: #Run an external application to set the report configuration subscript and pass this to BurnInTest via the bit-script-input.txt file EXECUTEWAIT ".\bitsetup.exe" #Start logging using current settings with the SETXXX commands in the resulting bit-script-input.txt file STARTLOGGING #Set first test duration time for 1 minute SETDURATION 1 #Run the test RUN CONFIG
REBOOT and REBOOTEND COMMAND Note: These commands should only be used where multiple reboots within one script are required. The commands are designed in such a way that they ONLY make sense in the following context… BurnInTest must be launched automatically at start up using a shortcut to bit.exe in the Start-Up directory. The shortcut must use the /s command line parameter to automatically run the script, which contains the REBOOT command. So if, for example the script file containing the REBOOT command was called ‘Reboot.bits’, then the command line ‘Target’ of the shortcut would look something like “C:\Program Files\BurnInTest\bit.exe” /r /s Reboot.bits These commands require that the Rebooter application is present in the BurnInTest application directory. Any reboots occurring as a result of these commands will use the current Rebooter settings. BurnInTest must have write access to the directory that the script is located in. Overview: REBOOT reboots the computer. After the computer boots up, and BurnInTest restarts, the script will continue to execute at the line following the REBOOT command. REBOOTEND reboots the computer. After the computer boots up, BurnInTest will restart, but the script will no longer continue to execute. Example: MESSAGE “Run some 3D tests” RUN 3D MESSAGE “Reboot for the first time” REBOOT MESSAGE “Run some 2D tests” RUN 2D MESSAGE “Reboot for the second time” REBOOT MESSAGE “And now one final reboot” REBOOTEND MESSAGE “This message will never be displayed”
Note: It is recommended to use “Accumulate logs” when using REBOOT and REBOOTEND.
RUN COMMAND Syntax: RUN <Test Name> Parameters:
Examples: #Run the CD test with the current settings RUN CD #Run all the tests in the current configuration simultaneously RUN CONFIG
<Test Name> Parameter The test name parameter can takes the following values. The first value “CONFIG” is special because it does not refer to the name of an individual test. When used with the RUN command it causes all tests in the current configuration file to be started simultaneously. CONFIG CPU (or MATHS) CD DISK MEMORY NETWORK PARALLEL PRINTER SERIAL SOUND TAPE USB 2D 3D VIDEO PLUGIN Example #Load my preferred test configuration LOAD "MyConfiguration1.bitcfg" #Override the test duration for all tests SETDURATION 60 MESSAGE "Click on OK to start test run" RUN CPU MESSAGE "Insert test discs into both the CD and DVD drive" RUN CD #Load my preferred test configuration for disk testing LOAD "MyDiskConfig.bitcfg" RUN CONFIG |