Previous Topic: Create a File I/O Test to Write to the FileNext Topic: Create File I/O Test to Compare the Contents of Two Files


Create a File I/O Test to Read and Write to the File

This example reads the C:\sysedge\bin\saFileIOTest.bin file, writes the contents to F:\Test\RWTest.bin, and then reads F:\Test\WTest.bin.

Follow these steps:

  1. Click + (New) on the Test Monitors toolbar.

    The New test pane appears.

  2. Enter suitable values in the following fields.
    Test Name

    Specifies a valid test name

    Example: fileio

    Description

    Specifies the description of the test

    Example: Performing a read/write operation for RWTest.bin.

    Test Class

    (Optional) Specifies a valid test class

    Example: File IO RW

    Test Interval

    Specifies the interval period of the test

    Default: 30

    Test Timeout

    Specifies the interval period of the test

    Default: 10

    Test Type

    Specifies the test type

    Example: File I/O

    File Operations

    Specifies the available operations for the test

    Example: Read/Write

    Source Filename

    Specifies the path of source filename

    Example: C:\sysedge\bin\saFileIOTest.bin

    Destination Filename

    Specifies the path of destination filename

    Example: F:\Test\RWTest.bin

    User Name

    Specifies the user name

    Example: FIOTestUser

  3. Accept defaults for the other values.
  4. Click Save Test
    The test is saved and appears in the Available Policies page.

When you commit your changes, SRM adds an entry similar to the following to the svcrsp.cf file:

{ 
index=33 
type=fileio
desc="Performing a read/write operation for RWTest.bin." 
destination=F:\Test\RWTest.bin
args="op=rw&local=C:\sysedge\bin\saFileIOTest.bin" 
interval=30 
samples=1 
timeout=10 
window=120 
tos=0 
status=active 
name="Read-Write Operation"
class=""
context=""
flags="1"
loglevel=3
}

When you apply the File I/O test, the svcrsp.cf file is executed.

For information about the errors returned by File I/O tests, see File I/O Test Error Codes.