< Home

ftp-filename

Function

The ftp-filename command configures the name of the file used in the FTP test.

The undo ftp-filename command deletes the file name configuration.

Format

ftp-filename file-name

undo ftp-filename

Parameters

Parameter Description Value
file-name Specifies the file path and file name for the operation file of the FTP test instances.

The value is a string of 1 to 230 characters.

Views

NQA view

Default Level

3: Management 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 name is configured but the file size 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-filename, and the size of the uploaded local file is specified by ftp-filename.

For FTP download test, the file name configured by using the ftp-filename command must be the name of a file that exists on the FTP server. Otherwise, the test fails.

Precautions

You cannot change the file name and file path of the currently performed test.

Various FTP servers may support files with the file name in different length ranges. Before you configure this command, ensure that the target FTP server supports the length of the specified file name. Otherwise, NQA test results may fail to be transmitted using FTP.

Example

# Set the FTP path and file name of the test instance admin ftp to D:\abc and abc.txt respectively.

<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-filename D:\abc\abc.txt
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >