CN112579453A - Task testing method, device, equipment and storage medium - Google Patents

Task testing method, device, equipment and storage medium Download PDF

Info

Publication number
CN112579453A
CN112579453A CN202011532306.3A CN202011532306A CN112579453A CN 112579453 A CN112579453 A CN 112579453A CN 202011532306 A CN202011532306 A CN 202011532306A CN 112579453 A CN112579453 A CN 112579453A
Authority
CN
China
Prior art keywords
test
task
result
tested
assertion
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
CN202011532306.3A
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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank 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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202011532306.3A priority Critical patent/CN112579453A/en
Publication of CN112579453A publication Critical patent/CN112579453A/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/3684Test management for test design, e.g. generating new test cases
    • 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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the field of testing, and provides a task testing method, a task testing device and a task testing equipment and a task testing storage medium. The task testing method comprises the steps of receiving a task testing request sent by a user, analyzing the request and obtaining a task to be tested carried in the request, calling a server of an isolation network segment through a pre-configured bridging server to obtain a testing case corresponding to the task to be tested, carrying out assertion setting on the testing case based on a pre-configured assertion file to obtain a target testing case, carrying out testing operation on the target testing case to obtain a testing execution result, and feeding the testing execution result back to the user. The invention also relates to the technical field of block chains, and the target test case and the test execution result can be stored in a node of a block chain.

Description

Task testing method, device, equipment and storage medium
Technical Field
The present invention relates to the field of testing, and in particular, to a method, an apparatus, a device, and a storage medium for task testing.
Background
At present, machines deployed in different network segments and needing to be accessed through bastion machines cannot be connected in a ssh direct connection mode, so that a test task on a remote machine cannot be scheduled when the correctness of test data is verified, and because interdependency conditions may exist during data correctness testing, for example, when the correctness of data A is verified, the testing of a next batch can be performed only when data B is verified correctly, so that the testing of the next batch needs to be performed after the execution of a previous batch is finished, and testers need to manually check whether the previous batch is finished, so that the efficiency of executing the test is low.
Disclosure of Invention
In view of the above, the present invention provides a task testing method, device, apparatus and storage medium, and aims to solve the technical problem of low task testing efficiency in the prior art.
In order to achieve the above object, the present invention provides a task testing method, including:
receiving a task test request sent by a user, and analyzing the request to obtain a task to be tested;
calling a server of an isolation network segment through a pre-configured bridging server to obtain a test case corresponding to the task to be tested, and executing assertion setting on the test case based on a pre-configured assertion file to obtain a target test case;
and executing the test operation on the target test case to obtain a test execution result, and feeding back the test execution result to the user.
Preferably, before the receiving the request of task test sent by the user, the method further includes:
and providing a preset operation interface for the user to pre-configure the relevant information of the task to be tested, wherein the relevant information of the task to be tested comprises the task name of the task to be tested and the configuration time of the task to be tested.
Preferably, after the user pre-configures the relevant information of the task to be tested, the method further includes:
judging whether the user is configured with a plurality of tasks to be tested, when the user is judged to be configured with the plurality of tasks to be tested, obtaining the configuration time of each task to be tested, and sequencing the plurality of tasks to be tested according to the configuration time of each task to be tested in sequence.
Preferably, the performing assertion setting on the test case based on the pre-configured assertion file includes:
analyzing an analysis result obtained by analyzing the assertion file, and executing assertion setting on the test case according to the analysis result, wherein the analysis result comprises an operation type of assertion operation and an expected result after the assertion operation is executed.
Preferably, the executing the test operation on the target test case to obtain the test execution result includes:
obtaining an operation type of an assertion operation corresponding to the target test case, executing the assertion operation based on the operation type of the assertion operation to obtain an assertion result, and taking the assertion result as an actual test result;
judging whether the actual test result is the same as an expected result corresponding to a target test case, generating a first test result of the target test case when the actual test result is the same as the expected result corresponding to the target test case, and taking the first test result as the test execution result;
and when the actual test result is different from the expected result corresponding to the target test case, generating a second test result of the target test case, and taking the second test result as the test execution result.
Preferably, the feeding back the test execution result to the user includes:
and obtaining test cases with different expected results corresponding to the target test cases in the test execution results, and sending the test cases to a preset user group in a mail format.
Preferably, the executing the test operation on the target test case to obtain the test execution result includes:
and when the identification information in the target test case contains priority information, executing test operation on the target test case according to the priority information, and when the target test case with the same priority exists, randomly executing the test operation on the target test case with the same priority.
To achieve the above object, the present invention also provides a task testing device, including:
a receiving module: the task testing system is used for receiving a task testing request sent by a user and analyzing the request to obtain a task to be tested;
setting a module: the server for calling the isolation network segment through a pre-configured bridging server obtains a test case corresponding to the task to be tested, and the test case is subjected to assertion setting based on a pre-configured assertion file to obtain a target test case;
a test module: and the test execution module is used for executing the test operation on the target test case to obtain a test execution result and feeding the test execution result back to the user.
In order to achieve the above object, the present invention also provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a program executable by the at least one processor to enable the at least one processor to perform any of the steps of the task testing method as described above.
To achieve the above object, the present invention also provides a computer readable storage medium storing a task testing program, which when executed by a processor, implements any of the steps of the task testing method as described above.
According to the task testing method, the device, the equipment and the storage medium, the testing case corresponding to the task to be tested can be obtained by calling the server of the isolated network segment through the pre-configured bridging server, the network to which the user belongs can call the testing case of the server of the isolated network segment through the bridging server, the sequence of the task to be tested can be configured, and the task testing efficiency is improved.
Drawings
FIG. 1 is a schematic flow chart diagram of a preferred embodiment of a task testing method of the present invention;
FIG. 2 is a block diagram of a task testing device according to a preferred embodiment of the present invention;
FIG. 3 is a diagram of an electronic device according to a preferred embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. 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 invention.
The invention provides a task testing method. Referring to fig. 1, a method flow diagram of an embodiment of the task testing method of the present invention is shown. The method may be performed by an electronic device, which may be implemented by software and/or hardware. The task testing method comprises the following steps:
step S10: and receiving a task test request sent by a user, and analyzing the request to obtain a task to be tested.
The application scenario of this embodiment may be a test for checking correctness of data in the financial field, where the task test requires that a tester perform rule matching on the premise of knowing business rules, for example, the tester needs to perform a check test on correctness of data such as a client number, a card number, an account number, and a credit issuing number in a credit issuing business process by combing a credit issuing process, or the tester performs a check test on monthly payment amount and rate-related data in a loan checking business process by combing a loan business process to find out a parameter error problem. It should be noted that the practical application scenario of the present embodiment is not limited to this. A user initiates a task test request to an electronic device (for example, an office terminal), wherein the task test request may include a task to be tested, and may also include a storage path and a unique identifier of the task to be tested. That is, the test tasks to be tested may be entered by the user together when submitting the task test request, or may be obtained from the address specified by the request after the user submits the task test request.
In one embodiment, before the receiving the request for the task test issued by the user, the method further comprises:
and providing a preset operation interface for the user to pre-configure the relevant information of the task to be tested, wherein the relevant information of the task to be tested comprises the task name of the task to be tested and the configuration time of the task to be tested.
When a user opens a page for testing task configuration on the terminal, the terminal receives a request instruction of the user for the application program, and then an operation page of testing task input information is displayed on a display screen of the terminal. The user can input the task to be tested in the operation page, and when the user completes the input operation of one task to be tested, the configuration time for completing the configuration of the task to be tested can be generated.
In one embodiment, after the user pre-configures the related information of the task to be tested, the method further includes:
judging whether the user is configured with a plurality of tasks to be tested, when the user is judged to be configured with the plurality of tasks to be tested, obtaining the configuration time of each task to be tested, and sequencing the plurality of tasks to be tested according to the configuration time of each task to be tested in sequence.
When a user configures a plurality of tasks to be tested, the testing tasks to be tested can be sequenced according to the configuration time of each task to be tested, and the tasks to be tested are sequentially tested according to the sequence when the subsequent tests are executed.
In one embodiment, the method further comprises: and acquiring the identity information of the user, matching the identity information with a white list with configuration authority, allowing the user to initiate a task test request when the matching is successful, and rejecting the request when the matching is failed.
The method comprises the steps of matching identity information of a user with a white list with request permission in a preset database, wherein the white list can be a user list of testing personnel with testing permission, when data matched with the user identity information exist in the white list, the user is considered to have the permission of initiating a task testing request, the user is allowed to initiate the task testing request, when the data matched with the user identity information do not exist in the white list, the user is considered to have no permission, the testing request of the user is rejected, preset prompt information is sent, the preset prompt information is sent, and the prompt information can be 'no testing permission', and the like.
Step S20: and calling a server of the isolated network segment through a pre-configured bridging server to obtain a test case corresponding to the task to be tested, and executing assertion setting on the test case based on a pre-configured assertion file to obtain a target test case.
In this embodiment, because the shell scripts corresponding to the tasks to be tested may be on servers in different network segments, and machines deployed in different network segments and needing to be accessed through the bastion machine cannot be connected in a direct connection manner through the SSH protocol, a test case (e.g., the shell script) on a remote machine cannot be scheduled. SSH is a remote control tool, is a protocol specially used for providing security for remote login session and other network services, and can effectively prevent the problem of information leakage in the remote management process by utilizing the SSH protocol.
Therefore, after the task to be tested is obtained, the electronic device (for example, an office terminal) can call the server of the isolation network segment through the pre-configured bridge server to obtain the test case corresponding to the task to be tested, the bridge server is added to the isolation network segment, the machine configures the privacy-free service to the test network segment, and the network (for example, the office network) to which the user belongs can call the test case of the isolation network segment server through the bridge server.
Then, setting assertions on the test cases according to a pre-configured assertion file to obtain target test cases, wherein assertions (assert) can be used for searching for logic errors of a program during testing, certain assumptions can be made during code writing, the assertions are used for capturing the assumptions in the code, the assertions are expressed as Boolean expressions, a programmer believes that the expression values are true at a certain point in the program, and the assertions can be used for ensuring that the setting conditions are met in a debugging mode, for example, a developer wants to ensure that x is greater than 0, and the assertions (x is greater than 0) can be written in the code; if x 0 is found to be interrupted during run-time, the code can be interrupted and the problem can be found, since assertion verification can be enabled and disabled at any time, assertions can be enabled during testing and disabled at deployment.
In one embodiment, the performing assertion setting on the test case based on the pre-configured assertion file includes:
analyzing an analysis result obtained by analyzing the assertion file, and executing assertion setting on the test case according to the analysis result, wherein the analysis result comprises an operation type of assertion operation and an expected result after the assertion operation is executed.
The pre-configured assertion file can be configured according to the relevant business rule of the rule engine, and after the assertion file is analyzed, expected values of assertion operation and assertion execution can be obtained, for example, if the business rule has 100 points of card number issuance consuming 1000 units, corresponding assertion can be set for the number of issued points.
In an actual application scenario, a data correctness checking test needs to check whether a result obtained after data is processed by a service rule is correct, for example, a data table a obtains a data table B after being processed by the service rule of a rule engine, and checks whether a corresponding result of the data table B is correct, an assertion can be set by a test case corresponding to an important field in the data table B, and the important field in the data table B can be a field required to be used in a service or a service strong association, for example: customer number, card number, account number, issue score, matching information, etc.
Step S30: and executing the test operation on the target test case to obtain a test execution result, and feeding back the test execution result to the user.
In this embodiment, after the target test case is obtained, a test result can be obtained by performing a test operation on the target test case, and the obtained test result is fed back to the user.
In an embodiment, the executing the test operation on the target test case to obtain the test execution result includes:
obtaining an operation type of an assertion operation corresponding to the target test case, executing the assertion operation based on the operation type of the assertion operation to obtain an assertion result, and taking the assertion result as an actual test result;
obtaining an operation type of the assertion operation and an expected result of executing the assertion operation from the analysis result, judging whether the actual test result is the same as the expected result corresponding to the target test case, generating a first test result of the target test case when the actual test result is the same as the expected result corresponding to the target test case, and taking the first test result as the test execution result;
and when the actual test result is different from the expected result corresponding to the target test case, generating a second test result of the target test case, and taking the second test result as the test execution result.
And comparing the actual test result with the expected result corresponding to the target test case, judging whether the segment test execution result is the same as the expected result corresponding to the target test case, if so, indicating that the test execution result meets the expected test requirement, and the first test result can mean that the test result meets the expected result. If not, the test execution result does not meet the expected test requirement, and the second test result may mean that the test result does not meet the expected test requirement.
In one embodiment, the feeding back the test execution result to the user includes:
and obtaining test cases with different expected results corresponding to the target test cases in the test execution results, and sending the test cases to a preset user group in a mail format.
Because the reason that the test cases with different actual test results and expected results need to be manually found, the mail results can be sent to related users in an attachment mode, and can also be sent to the users as mail contents, and the users can click the failed tests in the mails to directly check the detailed information of the failure logs so as to be convenient for the users to modify or debug the test cases.
In an embodiment, the executing the test operation on the target test case to obtain the test execution result includes:
and when the identification information in the target test case contains priority information, executing test operation on the target test case according to the priority information, and when the target test case with the same priority exists, randomly executing the test operation on the target test case with the same priority.
The target test cases can be labeled with priorities (e.g., high, medium, and low) in advance, the target test cases can be executed according to the priority parameters when executed, the test cases with the same priority are randomly executed when the test cases with the same priority exist, and the case identifier of the test failure can be recorded after each test case is executed.
Referring to FIG. 2, a functional block diagram of the task testing device 100 according to the present invention is shown.
The task testing device 100 of the present invention can be installed in an electronic apparatus. According to the implemented functions, the task testing device 100 may include a receiving module 110, a setting module 120, and a testing module 130. A module according to the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the receiving module 110 is configured to receive a task test request sent by a user, and analyze the request to obtain a task to be tested.
The application scenario of this embodiment may be a test for checking correctness of data in the financial field, where the task test requires that a tester perform rule matching on the premise of knowing business rules, for example, the tester needs to perform a check test on correctness of data such as a client number, a card number, an account number, and a credit issuing number in a credit issuing business process by combing a credit issuing process, or the tester performs a check test on monthly payment amount and rate-related data in a loan checking business process by combing a loan business process to find out a parameter error problem. It should be noted that the practical application scenario of the present embodiment is not limited to this. The task test request may include the task to be tested, and may also include a storage path and a unique identifier of the task to be tested. That is, the test tasks to be tested may be entered by the user together when submitting the task test request, or may be obtained from the address specified by the request after the user submits the task test request.
In one embodiment, the receiving module 110 is further configured to:
and providing a preset operation interface for the user to pre-configure the relevant information of the task to be tested, wherein the relevant information of the task to be tested comprises the task name of the task to be tested and the configuration time of the task to be tested.
When a user opens a page for testing task configuration on the terminal, the terminal receives a request instruction of the user for the application program, and then an operation page of testing task input information is displayed on a display screen of the terminal. The user can input the task to be tested in the operation page, and when the user completes the input operation of one task to be tested, the configuration time for completing the configuration of the task to be tested can be generated.
In one embodiment, the receiving module 110 is further configured to:
judging whether the user is configured with a plurality of tasks to be tested, when the user is judged to be configured with the plurality of tasks to be tested, obtaining the configuration time of each task to be tested, and sequencing the plurality of tasks to be tested according to the configuration time of each task to be tested in sequence.
When a user configures a plurality of tasks to be tested, the testing tasks to be tested can be sequenced according to the configuration time of each task to be tested, and the tasks to be tested are sequentially tested according to the sequence when the subsequent tests are executed.
In one embodiment, the receiving module 110 is further configured to:
and acquiring the identity information of the user, matching the identity information with a white list with configuration authority, allowing the user to initiate a task test request when the matching is successful, and rejecting the request when the matching is failed.
The method comprises the steps of matching identity information of a user with a white list with request permission in a preset database, wherein the white list can be a user list of testing personnel with testing permission, when data matched with the user identity information exist in the white list, the user is considered to have the permission of initiating a task testing request, the user is allowed to initiate the task testing request, when the data matched with the user identity information do not exist in the white list, the user is considered to have no permission, the testing request of the user is rejected, preset prompt information is sent, the preset prompt information is sent, and the prompt information can be 'no testing permission', and the like.
The setting module 120 is configured to call a server of the isolated network segment through a preconfigured bridge server to obtain a test case corresponding to the task to be tested, and perform assertion setting on the test case based on a preconfigured assertion file to obtain a target test case.
In this embodiment, because the shell scripts corresponding to the tasks to be tested may be on servers in different network segments, and machines deployed in different network segments and needing to be accessed through the bastion machine cannot be connected in a direct connection manner through the SSH protocol, a test case (e.g., the shell script) on a remote machine cannot be scheduled. SSH is a remote control tool, is a protocol specially used for providing security for remote login session and other network services, and can effectively prevent the problem of information leakage in the remote management process by utilizing the SSH protocol.
Therefore, after obtaining the task to be tested, the task testing device 100 may call a server in the isolated network segment through a pre-configured bridge server to obtain a test case corresponding to the task to be tested, add a bridge server in the isolated network segment, configure a privacy-free service from the machine to the test network segment, and call the test case of the isolated network segment server through the bridge server by the network to which the user belongs (e.g., an office network).
Then, setting assertions on the test cases according to a pre-configured assertion file to obtain target test cases, wherein assertions (assert) can be used for searching for logic errors of a program during testing, certain assumptions can be made during code writing, the assertions are used for capturing the assumptions in the code, the assertions are expressed as Boolean expressions, a programmer believes that the expression values are true at a certain point in the program, and the assertions can be used for ensuring that the setting conditions are met in a debugging mode, for example, a developer wants to ensure that x is greater than 0, and the assertions (x is greater than 0) can be written in the code; if x 0 is found to be interrupted during run-time, the code can be interrupted and the problem can be found, since assertion verification can be enabled and disabled at any time, assertions can be enabled during testing and disabled at deployment.
In one embodiment, the performing assertion setting on the test case based on the pre-configured assertion file includes:
analyzing an analysis result obtained by analyzing the assertion file, and executing assertion setting on the test case according to the analysis result, wherein the analysis result comprises an operation type of assertion operation and an expected result after the assertion operation is executed.
The pre-configured assertion file can be configured according to the relevant business rule of the rule engine, and after the assertion file is analyzed, expected values of assertion operation and assertion execution can be obtained, for example, if the business rule has 100 points of card number issuance consuming 1000 units, corresponding assertion can be set for the number of issued points.
In an actual application scenario, a data correctness checking test needs to check whether a result obtained after data is processed by a service rule is correct, for example, a data table a obtains a data table B after being processed by the service rule of a rule engine, and checks whether a corresponding result of the data table B is correct, an assertion can be set by a test case corresponding to an important field in the data table B, and the important field in the data table B can be a field required to be used in a service or a service strong association, for example: customer number, card number, account number, issue score, matching information, etc.
The test module 130 is configured to execute a test operation on the target test case to obtain a test execution result, and feed back the test execution result to the user.
In this embodiment, after the target test case is obtained, a test result can be obtained by performing a test operation on the target test case, and the obtained test result is fed back to the user.
In an embodiment, the executing the test operation on the target test case to obtain the test execution result includes:
obtaining an operation type of an assertion operation corresponding to the target test case, executing the assertion operation based on the operation type of the assertion operation to obtain an assertion result, and taking the assertion result as an actual test result;
obtaining an operation type of the assertion operation and an expected result of executing the assertion operation from the analysis result, judging whether the actual test result is the same as the expected result corresponding to the target test case, generating a first test result of the target test case when the actual test result is the same as the expected result corresponding to the target test case, and taking the first test result as the test execution result;
and when the actual test result is different from the expected result corresponding to the target test case, generating a second test result of the target test case, and taking the second test result as the test execution result.
And comparing the actual test result with the expected result corresponding to the target test case, judging whether the segment test execution result is the same as the expected result corresponding to the target test case, if so, indicating that the test execution result meets the expected test requirement, and the first test result can mean that the test result meets the expected result. If not, the test execution result does not meet the expected test requirement, and the second test result may mean that the test result does not meet the expected test requirement.
In one embodiment, the feeding back the test execution result to the user includes:
and obtaining test cases with different expected results corresponding to the target test cases in the test execution results, and sending the test cases to a preset user group in a mail format.
Because the reason that the test cases with different actual test results and expected results need to be manually found, the mail results can be sent to related users in an attachment mode, and can also be sent to the users as mail contents, and the users can click the failed tests in the mails to directly check the detailed information of the failure logs so as to be convenient for the users to modify or debug the test cases.
In an embodiment, the executing the test operation on the target test case to obtain the test execution result includes:
and when the identification information in the target test case contains priority information, executing test operation on the target test case according to the priority information, and when the target test case with the same priority exists, randomly executing the test operation on the target test case with the same priority.
The target test cases can be labeled with priorities (e.g., high, medium, and low) in advance, the target test cases can be executed according to the priority parameters when executed, the test cases with the same priority are randomly executed when the test cases with the same priority exist, and the case identifier of the test failure can be recorded after each test case is executed.
Fig. 3 is a schematic diagram of an electronic device 1 according to a preferred embodiment of the invention.
The electronic device 1 includes but is not limited to: memory 11, processor 12, display 13, and network interface 14. The electronic device 1 is connected to a network through a network interface 14 to obtain raw data. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System for Mobile communications (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), Wi-Fi, or a communication network.
The memory 11 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 11 may be an internal storage unit of the electronic device 1, such as a hard disk or a memory of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like equipped with the electronic device 1. Of course, the memory 11 may also comprise both an internal memory unit and an external memory device of the electronic device 1. In this embodiment, the memory 11 is generally used for storing an operating system installed in the electronic device 1 and various application software, such as program codes of the task test program 10. Further, the memory 11 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 12 is typically used for controlling the overall operation of the electronic device 1, such as performing data interaction or communication related control and processing. In this embodiment, the processor 12 is configured to run the program code stored in the memory 11 or process data, for example, run the program code of the task test program 10.
The display 13 may be referred to as a display screen or display unit. In some embodiments, the display 13 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an Organic Light-Emitting Diode (OLED) touch screen, or the like. The display 13 is used for displaying information processed in the electronic device 1 and for displaying a visual work interface, e.g. displaying the results of data statistics.
The network interface 14 may optionally comprise a standard wired interface, a wireless interface (e.g. WI-FI interface), the network interface 14 typically being used for establishing a communication connection between the electronic device 1 and other electronic devices.
Fig. 3 only shows the electronic device 1 with components 11-14 and the task test program 10, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
Optionally, the electronic device 1 may further comprise a user interface, the user interface may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may further comprise a standard wired interface and a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an Organic Light-Emitting Diode (OLED) touch screen, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
The electronic device 1 may further include a Radio Frequency (RF) circuit, a sensor, an audio circuit, and the like, which are not described in detail herein.
In the above embodiment, the processor 12 may implement the following steps when executing the task test program 10 stored in the memory 11:
receiving a task test request sent by a user, and analyzing the request to obtain a task to be tested;
calling a server of an isolation network segment through a pre-configured bridging server to obtain a test case corresponding to the task to be tested, and executing assertion setting on the test case based on a pre-configured assertion file to obtain a target test case;
and executing the test operation on the target test case to obtain a test execution result, and feeding back the test execution result to the user.
The storage device may be the memory 11 of the electronic device 1, or may be another storage device communicatively connected to the electronic device 1.
For detailed description of the above steps, please refer to the above description of fig. 2 regarding a functional block diagram of an embodiment of the task testing apparatus 100 and fig. 1 regarding a flowchart of an embodiment of a task testing method.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium may be non-volatile or volatile. The computer readable storage medium may be any one or any combination of hard disks, multimedia cards, SD cards, flash memory cards, SMCs, Read Only Memories (ROMs), Erasable Programmable Read Only Memories (EPROMs), portable compact disc read only memories (CD-ROMs), USB memories, etc. The computer readable storage medium comprises a storage data area and a storage program area, the storage data area stores data created according to the use of the blockchain node, the storage program area stores a task test program 10, and when being executed by a processor, the task test program 10 realizes the following operations:
receiving a task test request sent by a user, and analyzing the request to obtain a task to be tested;
calling a server of an isolation network segment through a pre-configured bridging server to obtain a test case corresponding to the task to be tested, and executing assertion setting on the test case based on a pre-configured assertion file to obtain a target test case;
and executing the test operation on the target test case to obtain a test execution result, and feeding back the test execution result to the user.
The embodiment of the computer readable storage medium of the present invention is substantially the same as the embodiment of the task testing method, and will not be described herein again.
In another embodiment, in order to further ensure the privacy and security of all the data, all the data may be stored in a node of a block chain. Such as tasks to be tested and test execution results, may be stored in block link points.
It should be noted that the blockchain in the present invention is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention essentially or contributing to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above and includes several instructions for enabling a terminal device (such as a mobile phone, a computer, an electronic device, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for task testing, the method comprising:
receiving a task test request sent by a user, and analyzing the request to obtain a task to be tested;
calling a server of an isolation network segment through a pre-configured bridging server to obtain a test case corresponding to the task to be tested, and executing assertion setting on the test case based on a pre-configured assertion file to obtain a target test case;
and executing the test operation on the target test case to obtain a test execution result, and feeding back the test execution result to the user.
2. The task test method of claim 1, wherein prior to the receiving a request for task testing by a user, the method further comprises:
and providing a preset operation interface for the user to pre-configure the relevant information of the task to be tested, wherein the relevant information of the task to be tested comprises the task name of the task to be tested and the configuration time of the task to be tested.
3. The task testing method of claim 2, wherein after the user pre-configures the related information of the task to be tested, the method further comprises:
judging whether the user is configured with a plurality of tasks to be tested, when the user is judged to be configured with the plurality of tasks to be tested, obtaining the configuration time of each task to be tested, and sequencing the plurality of tasks to be tested according to the configuration time of each task to be tested in sequence.
4. The task testing method of claim 1, wherein the performing assertion settings on the test cases based on the preconfigured assertion file comprises:
analyzing an analysis result obtained by analyzing the assertion file, and executing assertion setting on the test case according to the analysis result, wherein the analysis result comprises an operation type of assertion operation and an expected result after the assertion operation is executed.
5. The task testing method of claim 1, wherein the performing the test operation on the target test case to obtain a test execution result comprises:
obtaining an operation type of an assertion operation corresponding to the target test case, executing the assertion operation based on the operation type of the assertion operation to obtain an assertion result, and taking the assertion result as an actual test result;
judging whether the actual test result is the same as an expected result corresponding to a target test case, generating a first test result of the target test case when the actual test result is the same as the expected result corresponding to the target test case, and taking the first test result as the test execution result;
and when the actual test result is different from the expected result corresponding to the target test case, generating a second test result of the target test case, and taking the second test result as the test execution result.
6. The task testing method of claim 1, wherein the feeding back the test execution result to the user comprises:
and obtaining test cases with different expected results corresponding to the target test cases in the test execution results, and sending the test cases to a preset user group in a mail format.
7. The task testing method according to any one of claims 1 to 6, wherein the performing the test operation on the target test case to obtain a test execution result comprises:
and when the identification information in the target test case contains priority information, executing test operation on the target test case according to the priority information, and when the target test case with the same priority exists, randomly executing the test operation on the target test case with the same priority.
8. A task testing apparatus, characterized in that the apparatus comprises:
a receiving module: the task testing system is used for receiving a task testing request sent by a user and analyzing the request to obtain a task to be tested;
setting a module: the server for calling the isolation network segment through a pre-configured bridging server obtains a test case corresponding to the task to be tested, and the test case is subjected to assertion setting based on a pre-configured assertion file to obtain a target test case;
a test module: and the test execution module is used for executing the test operation on the target test case to obtain a test execution result and feeding the test execution result back to the user.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a program executable by the at least one processor to enable the at least one processor to perform the task testing method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a task test program, which when executed by a processor implements the steps of the task test method according to any one of claims 1 to 7.
CN202011532306.3A 2020-12-22 2020-12-22 Task testing method, device, equipment and storage medium Pending CN112579453A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011532306.3A CN112579453A (en) 2020-12-22 2020-12-22 Task testing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011532306.3A CN112579453A (en) 2020-12-22 2020-12-22 Task testing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112579453A true CN112579453A (en) 2021-03-30

Family

ID=75138976

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011532306.3A Pending CN112579453A (en) 2020-12-22 2020-12-22 Task testing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112579453A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116501610A (en) * 2023-03-13 2023-07-28 深圳华锐分布式技术股份有限公司 Method, device, equipment and medium for testing market transaction system
CN117873906A (en) * 2024-03-11 2024-04-12 云账户技术(天津)有限公司 Method and device for testing prize amount distribution in transaction system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105049297A (en) * 2015-08-26 2015-11-11 上海斐讯数据通信技术有限公司 Wireless throughput testing method and system
CN106502905A (en) * 2016-10-26 2017-03-15 腾讯科技(深圳)有限公司 A kind of method of testing of application program, apparatus and system
CN106603260A (en) * 2015-10-19 2017-04-26 北京京东尚科信息技术有限公司 WCF service test method
CN110888804A (en) * 2019-11-11 2020-03-17 网联清算有限公司 Interface test method and interface test platform

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105049297A (en) * 2015-08-26 2015-11-11 上海斐讯数据通信技术有限公司 Wireless throughput testing method and system
CN106603260A (en) * 2015-10-19 2017-04-26 北京京东尚科信息技术有限公司 WCF service test method
CN106502905A (en) * 2016-10-26 2017-03-15 腾讯科技(深圳)有限公司 A kind of method of testing of application program, apparatus and system
CN110888804A (en) * 2019-11-11 2020-03-17 网联清算有限公司 Interface test method and interface test platform

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
董武等: "《计算机网络技术基础教程》", 31 October 2008 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116501610A (en) * 2023-03-13 2023-07-28 深圳华锐分布式技术股份有限公司 Method, device, equipment and medium for testing market transaction system
CN116501610B (en) * 2023-03-13 2024-03-01 深圳华锐分布式技术股份有限公司 Method, device, equipment and medium for testing market transaction system
CN117873906A (en) * 2024-03-11 2024-04-12 云账户技术(天津)有限公司 Method and device for testing prize amount distribution in transaction system

Similar Documents

Publication Publication Date Title
CN109474578B (en) Message checking method, device, computer equipment and storage medium
CN109165856B (en) Dynamic configuration method, device and storage medium of approval chain
CN111414172A (en) Automatic deployment and release system and method for application software
CN113014475B (en) Message pushing integration method and device
CN108509344B (en) Daily cutting batch test method, equipment and readable storage medium
CN108418787B (en) Method for acquiring enterprise resource planning data, terminal device and medium
CN111343168B (en) Identity authentication method and device, computer equipment and readable storage medium
CN110851298B (en) Abnormality analysis and processing method, electronic device and storage medium
CN109766483B (en) Regular expression generation method, device, computer equipment and storage medium
CN112579453A (en) Task testing method, device, equipment and storage medium
CN109460653B (en) Rule engine based verification method, verification device, storage medium and apparatus
CN112506779A (en) Software interface testing method and device, electronic equipment and storage medium
CN111737334A (en) Data reporting method, device, equipment and storage medium
CN108427639B (en) Automated testing method, application server and computer readable storage medium
CN108829575B (en) Test case recommendation method, electronic device and readable storage medium
CN112596919A (en) Model calling method, device, equipment and storage medium
CN112083925A (en) Data acquisition method, device, equipment and storage medium based on H5 page development
CN112085611A (en) Asynchronous data verification method and device, electronic equipment and storage medium
CN110516172B (en) Resource calling method and device, computer equipment and storage medium
CN111324537A (en) Test script-based test method and device and computer equipment
CN111400191A (en) Webpage security testing method and device and computer readable storage medium
CN111143399A (en) Data processing method, data processing device, storage medium and computer equipment
CN106101125A (en) Authentication processing method, Apparatus and system
CN115470281A (en) Batch data importing method and device, terminal equipment and storage medium
CN113378180A (en) Vulnerability detection method and device, computer equipment 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: 20210330

RJ01 Rejection of invention patent application after publication