< Home

ftp-filesize

Function

The ftp-filesize command sets the size of the file used in the FTP test.

The undo ftp-filesize command restores the default setting.

By default, the size of the file used in the FTP test is 1000 KB.

Format

ftp-filesize size

undo ftp-filesize

Parameters

Parameter Description Value

size

Specifies the size of the file used in the FTP test.

The value is an integer that ranges from 1 KB to 10000 KB.

Views

NQA view

Default Level

2: Configuration level

Usage Guidelines

Prerequisites

Before using the ftp-filesize command, run the test-type command to specify the type of the test instance as ftp.

Configuration Impact

For FTP upload tests, the uploaded files may have the following conditions according to different file names (configured by using the ftp-filename command) and file sizes (configured by using the ftp-filesize command):

  • The file size is configured but the file name is not specified.
    • If the specified file is a local file, upload the local file to the FTP server.
    • If the specified file is not a local file, construct a 1000 KB file based on the file name specified by ftp-filesize.
  • The file size is configured but the file name is not specified.

    On the NQA client, construct a file named NQA-ftp-client.txt, with a size specified by ftp-filesize, and upload the file to the server.

  • Both the file name and the file size are configured.
    • If the specified file is a local file, upload the local file to the FTP server. If the size of the local file is larger than the value of ftp-filesize, only part of the data in the local file is uploaded, and the size of the uploaded file is specified by the ftp-filesize. If the size of the local file is smaller than the value of ftp-filesize, the local file is directly uploaded.

    • If the specified file is not a local file, construct a file based on the file name specified by ftp-filesize, and the size of the uploaded local file is specified by ftp-filesize.

For FTP download tests, if the size of a to-be-downloaded file is not specified, the entire file is downloaded by default. If the value of ftp-filesize is larger than the actual size of a file on the FTP server, the entire file is downloaded. If the value of ftp-filesize is smaller than the actual size of a file on the FTP server, only a part of the file is downloaded.

Precautions

You cannot change the configured size of the file when the test is configured.

Example

# Set the size of the file to 1024 KB in the FTP upload test named admin ftp.

<sysname> system-view
[sysname] nqa test-instance admin ftp
[sysname-nqa-admin-ftp] test-type ftp
[sysname-nqa-admin-ftp] ftp-operation get
[sysname-nqa-admin-ftp] ftp-filesize 1024
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >