CN111625449A - File filtering rule testing method, device, equipment and readable storage medium - Google Patents

File filtering rule testing method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN111625449A
CN111625449A CN202010381966.XA CN202010381966A CN111625449A CN 111625449 A CN111625449 A CN 111625449A CN 202010381966 A CN202010381966 A CN 202010381966A CN 111625449 A CN111625449 A CN 111625449A
Authority
CN
China
Prior art keywords
file
filtering rule
test
destination path
successfully transmitted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010381966.XA
Other languages
Chinese (zh)
Inventor
周培烁
王倩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010381966.XA priority Critical patent/CN111625449A/en
Publication of CN111625449A publication Critical patent/CN111625449A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Library & Information Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a file filtering rule testing method, a device, equipment and a readable storage medium. The method disclosed by the application is applied to test equipment and comprises the following steps: acquiring identification information of a target channel; inquiring channel information of the target channel by using the identification information; uploading the test file set to a source path of a target channel so that the target channel transmits files in the test file set according to a file filtering rule; after the file transmission is finished, determining the file of the destination path successfully transmitted to the target channel, and judging whether the file successfully transmitted to the destination path meets the file filtering rule or not; and if so, determining that the file filtering rule test passes. According to the file filtering rule testing method and device, the testing of the file filtering rule can be automatically completed, manual intervention is not needed in the whole process, the time consumed by testing is short, and the testing efficiency and the accuracy are improved to a certain degree.

Description

File filtering rule testing method, device, equipment and readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for testing a file filtering rule.
Background
At present, a user can set allowable file types for each channel of the Insight platform according to requirements, namely, file filtering rules are set for each channel, and in the file transmission process, the file filtering rules only allow certain preset types of files to pass through. It should be noted that after the file filtering rule is formulated, the file filtering rule needs to be tested, and the existing testing method is as follows: a user manually tries to enable different types of files to be transmitted in a channel with a file filtering rule, and meanwhile checks which files are transmitted successfully and which files are transmitted unsuccessfully in a log, so that whether the current file filtering rule passes the test successfully or not is judged.
In the practical application of the Insight platform, the amount of files to be transmitted is large, the file types are complex and various, manual testing is difficult to cover more file types, the testing process is time-consuming, the testing efficiency is low, and meanwhile, a user can autonomously judge whether the testing is passed or not, and deviation is possibly generated due to subjective factors, so that the testing result is not accurate enough.
Therefore, how to improve the testing efficiency and accuracy of the file filtering rules is a problem to be solved by those skilled in the art.
Disclosure of Invention
In view of the above, an object of the present application is to provide a method, an apparatus, a device and a readable storage medium for testing a file filtering rule, so as to improve the testing efficiency and accuracy of the file filtering rule. The specific scheme is as follows:
in a first aspect, the present application provides a file filtering rule testing method, applied to a testing device, including:
acquiring identification information of a target channel;
using the identification information to query channel information of the target channel, wherein the channel information comprises: the target channel is used for filtering file filtering rules of files, and a source path and a destination path of the target channel; the file filtering rule filters files according to file types and/or file sizes;
uploading a test file set to the source path so that the target channel transmits the test file set according to the file filtering rule; the test file set comprises a plurality of files of different types and/or different sizes;
after the file transmission is finished, determining the file which is successfully transmitted to the destination path, and judging whether the file which is successfully transmitted to the destination path meets the file filtering rule or not;
if so, determining that the file filtering rule test passes.
Preferably, the determining the file successfully transmitted to the destination path includes:
and reading the residual files in the current source path, and comparing the residual files with the test file set to determine the files successfully transmitted to the destination path.
Preferably, the determining the file successfully transmitted to the destination path includes:
and acquiring and recording the file successfully transmitted to the destination path from a system log.
Preferably, the determining whether the file successfully transmitted to the destination path meets the file filtering rule includes:
determining the file type and/or the file size of the file successfully transmitted to the destination path; if the file filtering rule comprises the file type and/or the file size, determining that the file successfully transmitted to the destination path conforms to the file filtering rule; otherwise, determining that the file successfully transmitted to the destination path does not accord with the file filtering rule.
Preferably, the method further comprises the following steps:
and if the file successfully transmitted to the destination path does not accord with the file filtering rule, determining that the file filtering rule test fails.
Preferably, the method further comprises the following steps:
and if the file filtering rule passes and/or fails the test, generating test prompt information, wherein the test prompt information comprises the identification information and the file filtering rule.
In a second aspect, the present application provides a file filtering rule testing apparatus, which is applied to a testing device, and includes:
the acquisition module is used for acquiring the identification information of the target channel;
a query module, configured to query channel information of the target channel using the identification information, where the channel information includes: the target channel is used for filtering file filtering rules of files, and a source path and a destination path of the target channel; the file filtering rule filters files according to file types and/or file sizes;
the uploading module is used for uploading a test file set to the source path so that the target channel transmits the test file set according to the file filtering rule; the test file set comprises a plurality of files of different types and/or different sizes;
the judging module is used for determining the file successfully transmitted to the destination path after the file transmission is finished, and judging whether the file successfully transmitted to the destination path meets the file filtering rule or not;
and the determining module is used for determining that the file filtering rule passes the test if the file which is successfully transmitted to the destination path accords with the file filtering rule.
Preferably, the determining module is specifically configured to:
determining the file type and/or the file size of the file successfully transmitted to the destination path; if the file filtering rule comprises the file type and/or the file size, determining that the file successfully transmitted to the destination path conforms to the file filtering rule; otherwise, determining that the file successfully transmitted to the destination path does not accord with the file filtering rule.
In a third aspect, the present application provides a file filtering rule testing apparatus, including:
a memory for storing a computer program;
a processor for executing the computer program to implement the file filtering rule testing method disclosed in the foregoing.
In a fourth aspect, the present application provides a readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the file filtering rule testing method disclosed in the foregoing.
According to the scheme, the file filtering rule testing method is applied to testing equipment and comprises the following steps: acquiring identification information of a target channel; using the identification information to query channel information of the target channel, wherein the channel information comprises: the target channel is used for filtering file filtering rules of files, and a source path and a destination path of the target channel; the file filtering rule filters files according to file types and/or file sizes; uploading a test file set to the source path so that the target channel transmits the test file set according to the file filtering rule; the test file set comprises a plurality of files of different types and/or different sizes; after the file transmission is finished, determining the file which is successfully transmitted to the destination path, and judging whether the file which is successfully transmitted to the destination path meets the file filtering rule or not; if so, determining that the file filtering rule test passes.
The method comprises the steps that identification information is obtained by using test equipment, channel information of a target channel is inquired based on the identification information, and then a test file set is uploaded to a source path of the target channel, so that the target channel transmits files in the test file set according to a file filtering rule; after the file transmission is finished, judging whether the file successfully transmitted to the target path meets the file filtering rule or not; and if so, determining that the file filtering rule test passes. The specific process of the target channel for transmitting the file is to transmit the file in the source path to the destination path. Thus, by uploading the test file set to the source path of the target channel, the target channel can attempt to transmit the files in the test file set to its destination path. If some files are successfully transmitted to the destination path, the file filtering rules allow the files to be transmitted in the target channel; in contrast, file filtering rules do not allow these files to be transmitted in the target channel. Therefore, the file successfully transmitted to the destination path can be considered to be in accordance with the file filtering rule, that is, the file filtering rule successfully blocks the file which is not in accordance with the file filtering rule from being transmitted in the target channel, so that the file filtering rule of the target channel is effective, and the test is passed. According to the file filtering rule testing method and device, the testing of the file filtering rule can be automatically completed, manual intervention is not needed in the whole process, the time consumed by testing is short, and the testing efficiency and the accuracy are improved to a certain degree.
Correspondingly, the file filtering rule testing device, the equipment and the readable storage medium provided by the application also have the technical effects.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a document filtering rule testing method disclosed in the present application;
FIG. 2 is a flow chart of another document filtering rule testing method disclosed in the present application;
FIG. 3 is a schematic diagram of a document filtering rule testing apparatus according to the present disclosure;
fig. 4 is a schematic diagram of a file filtering rule testing apparatus disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, in the practical application of the Insight platform, the amount of files to be transmitted is large, the types of the files are complex and various, manual testing is difficult to cover more types of the files, the testing process is time-consuming, the testing efficiency is low, and meanwhile, a user can independently judge whether the testing is passed or not and deviation is possibly generated due to subjective factors, so that the testing result is not accurate enough. Therefore, the file filtering rule testing scheme is provided, and the testing efficiency and the accuracy of the file filtering rule can be improved.
Referring to fig. 1, an embodiment of the present application discloses a file filtering rule testing method, which is applied to a testing device, and includes:
s101, obtaining identification information of the target channel.
The test equipment in this embodiment may support file transmission between different nodes in the Insight platform, and may also support file transmission between the Insight platform and other equipment. Therefore, the target channel can be a transmission channel between different nodes in the Insight platform, and can also be a transmission channel between other equipment and the Insight platform. Such as: and (3) transmission channels between other equipment and large data components in the Insight platform.
In a specific embodiment, before acquiring the identification information of the target channel, the method further includes: and inquiring all channels to be tested in the Insight platform, and determining the channels to be tested as target channels. All channels to be tested in the Insight platform can be transmission channels between different nodes in the Insight platform, and can also be transmission channels between other equipment and the Insight platform.
Wherein, each channel is distinguished by different identification information, so the identification information is the ID of the target channel.
S102, inquiring channel information of the target channel by using the identification information, wherein the channel information comprises: the target channel is used for filtering file filtering rules of the file, and a source path and a destination path of the target channel.
Wherein the channel information is returned in an orthogonal form, such as: txt file transfer, then the parameter value of the file filter rule is returned as [. txt ], at which point the file filter rule can be expressed as: file Filter Rules [. txt ]. One channel may allow multiple types of file transfers. If a channel allows multiple types of file transfers, the different types in the returned file Filter Rules will be comma separated, for example: file Filter Rules [. txt ], [. png ]. The file filtering rules then filter the file according to the file type.
If the file filtering rules filter the file according to the file size, the file filtering rules can be expressed as: fileFilter Rules [ minFileSize ═ 5, maxFileSize ═ 10], indicating that the target channel allows files of 5M to 10M in size to be transmitted therein.
If the file filtering rules filter the file according to file type and file size, the file filtering rules may be expressed as: file Filter Rules ═ 5 and maxFileSize ═ 10; [. txt ]. Txt files, which represent the target channel's allowable file size between 5M and 10M, are transmitted therein.
Of course, the file filtering rules may also record the file types and/or file sizes that are not allowed to be transmitted. In this case, the type and/or size of the file successfully transmitted to the destination path is not consistent with the type and/or size recorded in the file filtering rule, indicating that the file filtering rule test passes; the type and/or size of the file successfully transmitted to the destination path is consistent with the type and/or size recorded in the file filtering rule, and the file filtering rule test is not passed.
It should be noted that one channel corresponds to one source path and one destination path, the source paths of different channels are different, and the identification information of the channel has uniqueness. The file filtering rules in this embodiment filter files according to file type and/or file size.
S103, uploading the test file set to a source path, so that the target channel transmits the test file set according to the file filtering rule.
In one embodiment, uploading the test file set to the source path is: and uploading the files in the test file set to the source path in batches. Namely: and a plurality of files are uploaded to the source path by one key, so that the file uploading times are reduced, and the unified management and test coverage increase of the plurality of files are realized. The set of test files includes a plurality of files of different types and/or different sizes.
Among these, different types of files are: files of the type txt,. doc,. json,. jpg,. tar,. xlsx,. csv,. avro,. png, etc.
S104, after the transmission of the file is finished, determining the file successfully transmitted to the destination path, and judging whether the file successfully transmitted to the destination path meets the file filtering rule or not; if yes, executing S105; if not, go to step S106.
In one embodiment, determining a file for successful transmission to a destination path includes: and reading the residual files in the current source path, and comparing the residual files with the test file set to determine the files which are successfully transmitted to the destination path. The specific process of transmitting the file by the target channel is to transmit the file in the source path to the target path, so after the file transmission is finished, the remaining files in the current source path are files which do not accord with the file filtering rule, and the file successfully transmitted to the target path is a difference file between the test file set and the remaining files.
In one embodiment, determining a file for successful transmission to a destination path includes: and acquiring and recording the file successfully transmitted to the destination path from the system log. The system log of the test equipment records the file successfully transmitted to the destination path in real time, and therefore can be obtained and recorded from the file.
And S105, determining that the file filtering rule passes the test.
In one embodiment, the determining whether the file successfully transmitted to the destination path meets the file filtering rule includes: determining the file type and/or the file size of the file successfully transmitted to the destination path; if the file filtering rule comprises the file type and/or the file size, determining that the file successfully transmitted to the destination path conforms to the file filtering rule; otherwise, determining that the file successfully transmitted to the destination path does not accord with the file filtering rule. Of course, if the target channel allows more file types to be transmitted, the file types that the target channel does not allow to be transmitted may be set in the file filtering rule, so as to simplify the file filtering rule.
And S106, determining that the file filtering rule test fails.
In a specific embodiment, if the file filtering rule passes and/or fails the test, generating test prompt information, where the test prompt information includes identification information and the file filtering rule, so that a technician can check the test prompt information in time and modify the file filtering rule in time when the file filtering rule fails the test.
In one embodiment, the target channel transmits the test file set according to the file filtering rule, including: and the target channel transmits the test file set according to the file filtering rule and the SFTP protocol. SFTP (Secure File transfer protocol) is a protocol for transmission in a File transmission process, and can provide a Secure network encryption method for transmitting a File.
Therefore, the method and the device for testing the file filtering rule have the advantages that the testing device is used for obtaining the identification information, channel information of the target channel is inquired based on the identification information, and then the testing file set is uploaded to the source path of the target channel, so that the target channel transmits the files in the testing file set according to the file filtering rule; after the file transmission is finished, judging whether the file successfully transmitted to the target path meets the file filtering rule or not; and if so, determining that the file filtering rule test passes. The specific process of the target channel for transmitting the file is to transmit the file in the source path to the destination path. Thus, by uploading the test file set to the source path of the target channel, the target channel can attempt to transmit the files in the test file set to its destination path. If some files are successfully transmitted to the destination path, the file filtering rules allow the files to be transmitted in the target channel; in contrast, file filtering rules do not allow these files to be transmitted in the target channel. Therefore, the file successfully transmitted to the destination path can be considered to be in accordance with the file filtering rule, that is, the file filtering rule successfully blocks the file which is not in accordance with the file filtering rule from being transmitted in the target channel, so that the file filtering rule of the target channel is effective, and the test is passed. According to the file filtering rule testing method and device, the testing of the file filtering rule can be automatically completed, manual intervention is not needed in the whole process, the time consumed by testing is short, and the testing efficiency and the accuracy are improved to a certain degree.
Referring to fig. 2, an embodiment of the present application discloses another file filtering rule testing method, based on which a shell script is implemented, and the script is installed in a testing device. The method specifically comprises the following steps:
(1) the method comprises the steps of setting a test file set locally on the test equipment, wherein files in the test file set are different in size and comprise files of types of txt, doc, json, jpg, tar, xlsx, csv, avro, png and the like, and the test file set is saved to a/test _ date folder.
(2) Inputting a channel ID (identification information) to be tested to a shell script on a human-computer interaction interface, wherein the shell script acquires detailed channel information of the channel by using the channel ID, and the detailed channel information comprises: the channel is used for filtering a file filtering rule of the file, the file filtering rule filters the file according to the file size and/or the file type, and a source path (which can be regarded as a source node, namely a file sending end) and a destination path (which can be regarded as a destination node, namely a file receiving end) of the channel. The file filtering Rules are represented by fileFilter Rules parameter values.
(3) The shell script uploads all test files in the/test _ date folder to the source node, so that the channel to be tested tries to transmit the files in the source node to the destination node. The shell script can call the rz command upload file of the linux system (the testing device is provided with the linux system).
(4) And after the file transmission process is finished, the shell script acquires a file list left in the current source node, wherein the files in the list are files which are not transmitted successfully. Or, the shell script directly acquires the file with the transmission failure recorded in the system log.
(5) And (4) comparing the file which is not successfully transmitted with the file list uploaded to the source node in the step (3), so as to determine the file which is successfully transmitted. Or, the shell script directly acquires the file recorded in the system log and successfully transmitted.
(6) If the file type of the file which is successfully transmitted is consistent with the file type represented by the file Filter Rules parameter value, returning true to represent that the test is passed; otherwise, false is returned, representing a test failure. Recorded in the current file filtering rules are the file sizes and/or file types that the channel allows for transmission.
It should be noted that other implementation steps in this embodiment are the same as or similar to those in the above embodiment, and therefore, the description of this embodiment is omitted here.
Therefore, the test cost is reduced according to the rule, the test time investment is reduced, the test method is convenient and effective, the test coverage is greatly increased, and the test efficiency and accuracy are improved.
In the following, a file filtering rule testing apparatus provided by an embodiment of the present application is introduced, and a file filtering rule testing apparatus described below and a file filtering rule testing method described above may be referred to each other.
Referring to fig. 3, an embodiment of the present application discloses a file filtering rule testing apparatus, which is applied to a testing device, and includes:
an obtaining module 301, configured to obtain identification information of a target channel;
a query module 302, configured to query channel information of the target channel by using the identification information, where the channel information includes: the target channel is used for filtering file filtering rules of the file, and a source path and a destination path of the target channel; the file filtering rule filters the file according to the file type and/or the file size;
an uploading module 303, configured to upload the test file set to a source path, so that the target channel transmits the test file set according to a file filtering rule; the test file set comprises a plurality of files of different types and/or different sizes;
the judging module 304 is configured to determine, after the file transmission is finished, a file successfully transmitted to the destination path, and judge whether the file successfully transmitted to the destination path meets a file filtering rule;
the determining module 305 is configured to determine that the file filtering rule test passes if the file successfully transmitted to the destination path meets the file filtering rule.
In a specific embodiment, the determining module is specifically configured to:
determining the file type and/or the file size of the file successfully transmitted to the destination path; if the file filtering rule comprises the file type and/or the file size, determining that the file successfully transmitted to the destination path conforms to the file filtering rule; otherwise, determining that the file successfully transmitted to the destination path does not accord with the file filtering rule.
In a specific embodiment, the method further comprises the following steps:
and the channel query module is used for querying all channels to be tested in the Insight platform and determining the channels to be tested as target channels.
In a specific embodiment, the uploading module is specifically configured to:
and uploading the test file sets to the source path in batches.
In a specific embodiment, the determining module is specifically configured to:
and reading the residual files in the current source path, and comparing the residual files with the test file set to determine the files which are successfully transmitted to the destination path.
In a specific embodiment, the determining module is specifically configured to: and acquiring and recording the file successfully transmitted to the destination path from the system log.
Preferably, the determining module is specifically configured to:
determining the file type and/or the file size of the file successfully transmitted to the destination path; if the file filtering rule comprises the file type and/or the file size, determining that the file successfully transmitted to the destination path conforms to the file filtering rule; otherwise, determining that the file successfully transmitted to the destination path does not accord with the file filtering rule.
In a specific embodiment, the method further comprises the following steps:
and the test failure module is used for determining that the file filtering rule test fails if the file which is successfully transmitted to the destination path does not accord with the file filtering rule.
In a specific embodiment, the method further comprises the following steps:
and the prompt module is used for generating test prompt information if the file filtering rule passes and/or fails the test, wherein the test prompt information comprises identification information and the file filtering rule, so that technicians can check the test prompt information in time, and modify the file filtering rule in time when the file filtering rule fails the test.
In one embodiment, the target channel transmits the test set of files according to the file filtering rules and the SFTP protocol.
For more specific working processes of each module and unit in this embodiment, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not described here again.
Therefore, the file filtering rule testing device can automatically complete the testing of the file filtering rules, the whole process does not need manual intervention, the time consumed by testing is short, and the testing efficiency and the accuracy are improved to a certain degree.
In the following, a file filtering rule testing device provided by an embodiment of the present application is introduced, and a file filtering rule testing device described below and a file filtering rule testing method and device described above may refer to each other.
Referring to fig. 4, an embodiment of the present application discloses a file filtering rule testing apparatus, including:
a memory 401 for storing a computer program;
a processor 402 for executing said computer program for implementing the method disclosed in any of the embodiments described above.
In the following, a readable storage medium provided by an embodiment of the present application is introduced, and a readable storage medium described below and a file filtering rule testing method, device and apparatus described above may be referred to each other.
A readable storage medium for storing a computer program, wherein the computer program when executed by a processor implements the file filtering rule testing method disclosed in the foregoing embodiments. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, which are not described herein again.
References in this application to "first," "second," "third," "fourth," etc., if any, are intended to distinguish between similar elements and not necessarily to describe a particular order or sequence. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, or apparatus.
It should be noted that the descriptions in this application referring to "first", "second", etc. are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present application.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of readable storage medium known in the art.
The principle and the implementation of the present application are explained herein by applying specific examples, and the above description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A file filtering rule testing method is applied to testing equipment and comprises the following steps:
acquiring identification information of a target channel;
using the identification information to query channel information of the target channel, wherein the channel information comprises: the target channel is used for filtering file filtering rules of files, and a source path and a destination path of the target channel; the file filtering rule filters files according to file types and/or file sizes;
uploading a test file set to the source path so that the target channel transmits the test file set according to the file filtering rule; the test file set comprises a plurality of files of different types and/or different sizes;
after the file transmission is finished, determining the file which is successfully transmitted to the destination path, and judging whether the file which is successfully transmitted to the destination path meets the file filtering rule or not;
if so, determining that the file filtering rule test passes.
2. The method according to claim 1, wherein the determining the file successfully transmitted to the destination path comprises:
and reading the residual files in the current source path, and comparing the residual files with the test file set to determine the files successfully transmitted to the destination path.
3. The method according to claim 1, wherein the determining the file successfully transmitted to the destination path comprises:
and acquiring and recording the file successfully transmitted to the destination path from a system log.
4. The method according to any one of claims 1 to 3, wherein the determining whether the file successfully transmitted to the destination path complies with the file filtering rule comprises:
determining the file type and/or the file size of the file successfully transmitted to the destination path; if the file filtering rule comprises the file type and/or the file size, determining that the file successfully transmitted to the destination path conforms to the file filtering rule; otherwise, determining that the file successfully transmitted to the destination path does not accord with the file filtering rule.
5. The file filtering rule testing method of claim 4, further comprising:
and if the file successfully transmitted to the destination path does not accord with the file filtering rule, determining that the file filtering rule test fails.
6. The file filtering rule testing method of claim 5, further comprising:
and if the file filtering rule passes and/or fails the test, generating test prompt information, wherein the test prompt information comprises the identification information and the file filtering rule.
7. A file filtering rule testing device is applied to testing equipment and comprises:
the acquisition module is used for acquiring the identification information of the target channel;
a query module, configured to query channel information of the target channel using the identification information, where the channel information includes: the target channel is used for filtering file filtering rules of files, and a source path and a destination path of the target channel; the file filtering rule filters files according to file types and/or file sizes;
the uploading module is used for uploading a test file set to the source path so that the target channel transmits the test file set according to the file filtering rule; the test file set comprises a plurality of files of different types and/or different sizes;
the judging module is used for determining the file successfully transmitted to the destination path after the file transmission is finished, and judging whether the file successfully transmitted to the destination path meets the file filtering rule or not;
and the determining module is used for determining that the file filtering rule passes the test if the file which is successfully transmitted to the destination path accords with the file filtering rule.
8. The file filtering rule testing device of claim 7, wherein the determining module is specifically configured to:
determining the file type and/or the file size of the file successfully transmitted to the destination path; if the file filtering rule comprises the file type and/or the file size, determining that the file successfully transmitted to the destination path conforms to the file filtering rule; otherwise, determining that the file successfully transmitted to the destination path does not accord with the file filtering rule.
9. A file filtering rule testing apparatus, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the file filtering rule testing method of any one of claims 1 to 6.
10. A readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the file filter rule testing method of any of claims 1 to 6.
CN202010381966.XA 2020-05-08 2020-05-08 File filtering rule testing method, device, equipment and readable storage medium Pending CN111625449A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010381966.XA CN111625449A (en) 2020-05-08 2020-05-08 File filtering rule testing method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010381966.XA CN111625449A (en) 2020-05-08 2020-05-08 File filtering rule testing method, device, equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN111625449A true CN111625449A (en) 2020-09-04

Family

ID=72259027

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010381966.XA Pending CN111625449A (en) 2020-05-08 2020-05-08 File filtering rule testing method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111625449A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113760986A (en) * 2021-01-29 2021-12-07 北京沃东天骏信息技术有限公司 Data query method, device, equipment and storage medium
CN113946853A (en) * 2021-10-29 2022-01-18 苏州浪潮智能科技有限公司 File filtering method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445951A (en) * 2015-08-07 2017-02-22 中兴通讯股份有限公司 File transmission method and apparatus
CN106933876A (en) * 2015-12-30 2017-07-07 平安科技(深圳)有限公司 The filter method and device of record screen file
CN109144946A (en) * 2018-07-24 2019-01-04 中国建设银行股份有限公司 A kind of document handling method and device
CN109491971A (en) * 2018-10-22 2019-03-19 郑州云海信息技术有限公司 A kind of file filter method, apparatus, equipment and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445951A (en) * 2015-08-07 2017-02-22 中兴通讯股份有限公司 File transmission method and apparatus
CN106933876A (en) * 2015-12-30 2017-07-07 平安科技(深圳)有限公司 The filter method and device of record screen file
CN109144946A (en) * 2018-07-24 2019-01-04 中国建设银行股份有限公司 A kind of document handling method and device
CN109491971A (en) * 2018-10-22 2019-03-19 郑州云海信息技术有限公司 A kind of file filter method, apparatus, equipment and computer readable storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113760986A (en) * 2021-01-29 2021-12-07 北京沃东天骏信息技术有限公司 Data query method, device, equipment and storage medium
CN113946853A (en) * 2021-10-29 2022-01-18 苏州浪潮智能科技有限公司 File filtering method and device, electronic equipment and storage medium
CN113946853B (en) * 2021-10-29 2024-01-30 苏州浪潮智能科技有限公司 File filtering method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111625449A (en) File filtering rule testing method, device, equipment and readable storage medium
CN104036194B (en) Vulnerability detection method and device for revealing private data in application program
CN110532779B (en) Vulnerability detection method, device, terminal and storage medium
CN111813788A (en) Information query method and device and information synchronization method and device
CN112363937B (en) Differential coverage rate testing method, differential coverage rate testing device, computer equipment and storage medium
CN111880508A (en) Automatic calibration and test method and device for T-box parameters
CN112328363B (en) Cloud hard disk mounting method and device
CN104517055A (en) Image processing apparatus to which security policy is applicable, and control method therefor
CN112740627A (en) Vehicle remote diagnosis method and system
CN112363936B (en) Differential coverage rate testing method, differential coverage rate testing device, computer equipment and storage medium
CN112395266A (en) Data file processing method, first server and computer storage medium
CN112015651A (en) Data processing method and device
CN112765035A (en) Distributed pressure test system, method, device, electronic equipment and storage medium
CN116204438A (en) Test case generation method, automatic test method and related device
CN110619022A (en) Node detection method, device, equipment and storage medium based on block chain network
CN107357701B (en) SAS signal testing method and device under distributed scene
CN115801426B (en) Method, device and medium for batch detection of residual validity period of sub domain name ssl certificate
CN116866031A (en) Industrial Internet data transmission processing method and system
CN116303041A (en) Distributed test method and system
CN114330278B (en) Method and equipment for judging consistency of returned data
CN115203697A (en) File detection method, device and equipment and readable storage medium
CN114006822B (en) Method and device for judging link between switch and server
CN114168108A (en) Code merging method and device, electronic equipment and computer readable storage medium
CN112416750A (en) Application program boundary testing method and system
CN111464395A (en) Method and device for creating block chain and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200904

RJ01 Rejection of invention patent application after publication