Scripting

BurnInTest includes a simple scripting language that allows tests 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 following commands are available in the current version of the software

RUN COMMAND

Syntax:

RUN <Test Name>

Parameters:

<Test Name>See below for a list of all test names.

Examples:

#Run the CD test with the current settings

RUN CD

#Run all the tests in the current configuration simultaneously

RUN CONFIG

LOAD COMMAND

Syntax:

LOAD <File name>

Parameters:

<File name>The full path name to a configuration file. This configuration file must have been previously created from within BurnInTest. A partial path name can be used to load a configuration file from the current directory. A loaded configuration file will over write all preferences currently selected.

Examples:

#Load the low load configuration file that we created earlier

LOAD “C:\ConfigurationFiles\LowLoad.bitcfg”

LOOP

Syntax:

LOOP <number of iterations>

{

<Tasks to repeat>

}

Parameters:

< number of iterations >The number of times the Tasks within brackets will be repeated.

Examples:

LOG "Start"

SETDURATION 1

LOOP 3

{

LOG "CPU Test"

RUN MMX

}

MESSAGE COMMAND

Syntax:

MESSAGE <Message Text>

Parameters:

< Message Text >A single line of text that will be displayed in a window with an OK button. The user must click on the OK button to continue with the script.

Examples:

MESSAGE “Insert the test disc into the DVD drive then click on OK to proceed with the test”

SLEEP COMMAND

Syntax:

SLEEP <Delay period>

Parameters:

< Delay period >An integer that represents the number of milliseconds to pause before continuing with the next command in the script..

Examples:

#Pause 2 seconds

SLEEP 2000

SETDURATION COMMAND

Syntax:

SETDURATION <Duration>

Parameters:

<Duration>Sets the test duration in minutes. Using this command is the same as changing the auto-stop period from the preferences window.

Examples:

#Set the test duration to 90 seconds

SETDURATION 1.5

SETCYCLES COMMAND

Syntax:

SETCYCLES <Number of test cycles>

Parameters:

< Number of test cycles >Sets the number of test cycles that will lead to an automatic stopping of the test runs after all selected tests have reached or exceeded this number of test cycles. Using this command is the same as changing the auto-stop number of cycles from the preferences window.

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 Maths Test”

RUN MATHS

LOG "Run MMX Test”

RUN MMX

Etc…

NOTE: Automatic stopping after a set number of test cycles is only supported in the licensed version of BurnInTest.

SETDUTYCYCLE COMMAND

Syntax:

SETDUTYCYCLE <Test Name> <Duty setting>

Parameters:

<Test Name>See below for a list of all test names.

<Duty setting>Sets the duty cycle for the specified test to the value specified. Values must be between 1 and 100. Using this command is the same as changing the duty cycle value from the Test duty cycle window.

Examples:

#Set the disk test to maximum load

SETDUTYCYCLE DISK 100

#Set the CPU test to medium load

SETDUTYCYCLE DISK 65

SETSERIAL COMMAND

Syntax:

SETSERIAL < Serial Number >

Parameters:

<Serial Number>The serial number string. Must be enclosed in double quotes (“”).

Examples:

#Set the serial number

SETSERIAL "1234-shdfgdhs-GHGHG"

SETMACHINETYPE COMMAND

Syntax:

SETMACHINETYPE < Machine Name>

Parameters:

< Machine Name >The Machine Name. Must be enclosed in double quotes (“”).

Examples:

#Set Machine type

SETMACHINETYPE "Dell XPS800"

SETNOTES COMMAND

Syntax:

SETNOTES <Notes >

Parameters:

< Notes >The Notes. Must be enclosed in double quotes (“”).

Examples:

#Set Notes

SETNOTES "Test notes defined by the external application."

SETLOG COMMAND

Syntax:

SETLOG <Filename>

Parameters:

<Filename>The name of the log file. The file name must be enclosed in double quotes (“”). The file must be an executable.

Examples:

#Set log file with full path

SETLOG "C:\Program Files\Plugin\plugin_log"

#Set log file with path relative to BurnInTest drive

SETLOG "\Program Files\Plugin\plugin_log"

#Set log file with path relative to BurnInTest application path

SETLOG "plugin_log"

SETPLUGIN COMMAND

Sets up the first external test plug-in application executable file name.

Syntax:

SETPLUGIN <Filename>

Parameters:

<Filename>The name of the plugin file. The file name must be enclosed in double quotes (“”). The file must be an executable, and the “.exe” must be included.

Examples:

#Set plug-in test application file with full path

SETPLUGIN "C:\Program Files\Plugin\plugin.exe”

#Set plug-in test application file with path relative to BurnInTest drive

SETPLUGIN "\Program Files\Plugin\plugin.exe”

#Set plug-in test application file with path relative to BurnInTest application path

SETPLUGIN "plugin.exe”

<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

MATHS

MMX

BurnInTest 64bit version specific:

MMX and 3Dnow! have been superseded and are not supported in BurnInTest. The MMX and 3Dnow! Tests have been removed from the 64bit version of BurnInTest.

End 64bit specific

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 MATHS

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

EXECUTE COMMAND

Overview:

Executes an external file and continues processing the script.

Syntax:

EXECUTE <Filename> <Parameters>

Parameters:

FilenameThe name of the file to execute. The file name must be enclosed in double quotes (“”). The file must be an executable.

ParametersAny command line parameters which you wish to pass to your executable. If any of these parameters are filenames, you should enclose them in double quotes (“”)

Examples:

#Start up Notepad with some results before starting tests.

EXECUTE "c:\winnt\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 is must:

After processing the script commands in this file, BurnInTest will delete the file.

Syntax:

EXECUTE <Filename> <Parameters>

Parameters:

FilenameThe name of the file to execute. The file name must be enclosed in double quotes (“”). The file must be an executable.

ParametersAny command line parameters which you wish to pass to your executable. If any of these parameters are filenames, you should enclose them in double quotes (“”)

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

LOG COMMAND

Overview:

Writes text to the detailed error and status log history.

Syntax:

LOG <Text>

Parameters:

TextThe text to be added to the detailed error and status log history.

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"

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” /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.

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.