CN113986751A - Testing method and device suitable for multiple operating systems - Google Patents

Testing method and device suitable for multiple operating systems Download PDF

Info

Publication number
CN113986751A
CN113986751A CN202111318282.6A CN202111318282A CN113986751A CN 113986751 A CN113986751 A CN 113986751A CN 202111318282 A CN202111318282 A CN 202111318282A CN 113986751 A CN113986751 A CN 113986751A
Authority
CN
China
Prior art keywords
test
tested
parameters
equipment
function
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
CN202111318282.6A
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202111318282.6A priority Critical patent/CN113986751A/en
Publication of CN113986751A publication Critical patent/CN113986751A/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

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)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The embodiment of the invention provides a test method and a test device suitable for a multi-operation system, wherein the method comprises the following steps: the test system determines an operating system based on which the test system operates based on a test request triggered by a user; the test request is used for indicating the function to be tested of the device to be tested; the test request comprises test parameters of each configuration item of the function to be tested of the equipment to be tested; the test system constructs a calling request based on the test module of the function to be tested and the test parameters, and sends the calling request to the equipment to be tested through the peripheral service function corresponding to the operating system for testing. The method relates to the technical field of testing and is used for reducing the development and maintenance cost of a testing tool.

Description

Testing method and device suitable for multiple operating systems
Technical Field
The present application relates to the field of testing technologies, and in particular, to a testing method and device suitable for multiple operating systems.
Background
With the rapid development and popularization of computer technology, in order to improve the computing efficiency, the security and the like of a computer, the updating and upgrading of an operating system are more frequent, new operating systems are developed more and more, the types of the corresponding operating systems are obviously increased, and as the operating systems need to be changed and terminal migration needs to be completed for different operating systems, a large number of terminals need to be tested.
In the prior art, generally, corresponding test tools exist in operating systems such as Windows and Linux, and terminals under the corresponding operating systems are tested through the test tools. However, some newly developed operating systems do not yet develop corresponding testing tools, and the terminals corresponding to the operating systems need to be manually tested, so that the testing workload is large. That is, there is no operating system corresponding to the test tool, a large amount of test work needs to be performed manually, there is an operating system of the test tool, the test tools of the operating system are strongly coupled to the operating system, developers need to perform maintenance on each test tool, the maintenance cost is high, once a terminal of a new equipment brand, a new interface, and a new equipment type needs to be accessed for testing, a test function corresponding to the terminal needs to be developed on each test tool of each operating system, the development workload is large again, and the development and maintenance costs of the test tool are further increased.
Therefore, there is a need for a testing method and apparatus for multiple operating systems, which is used to reduce the development and maintenance costs of the testing tool.
Disclosure of Invention
The embodiment of the invention provides a testing method and a testing device suitable for a multi-operating system, which are used for reducing the development and maintenance cost of a testing tool.
In a first aspect, an embodiment of the present invention provides a testing method applicable to a multi-operating system, where the method includes:
the test system determines an operating system based on which the test system operates based on a test request triggered by a user; the test request is used for indicating the function to be tested of the device to be tested; the test request comprises test parameters of each configuration item of the function to be tested of the equipment to be tested; the test system constructs a calling request based on the test module of the function to be tested and the test parameters, and sends the calling request to the equipment to be tested through the peripheral service function corresponding to the operating system for testing.
In the method, the test system can assemble and obtain the test parameters according to the input client object and the selected relevant parameters such as the test module identification and the test interface identification corresponding to the client object. The test system can also further select relevant parameters such as a test module identifier, a test interface identifier and the like according to the input client object, the selected device to be tested corresponding to the client object and the function to be tested of the device to be tested, and assemble and obtain test parameters. The specific implementation of how to obtain the test parameters is not limited herein. And then, the test system can identify the operating system on which the test system operates, construct a calling request based on the test module and the test parameters of the function to be tested, and transmit the calling request to the peripheral service function corresponding to the operating system. The peripheral service function disassembles the calling function in the calling request to obtain test parameters, checks the test parameters, corrects the test parameters according to default parameters if the test parameters are absent or wrong, and determines the driver corresponding to the device to be tested according to the corrected test parameters. The test system realizes a calling interface with the equipment to be tested through the driving program, and transmits the test parameters to the equipment to be tested through the calling interface. The operating system may be any one of operating systems such as Windows, Linux, kylin, and the like, and correspondingly, the peripheral service function may include a disassembling and perfecting logic of a calling function in a calling request for any one of the operating systems, and a driver of any one of the operating systems for the device. That is to say, the test system can call the corresponding operating system according to the operating system running by itself to test the device to be tested. Compared with the coupling of the test tool and the operating system in the prior art, the test tool and the operating system can be compatible with the test logic of each operating system, and the test workload and the development and maintenance cost of the test tool are reduced.
Optionally, the peripheral service function further encapsulates a driver of the device to be tested; sending the calling request to the device to be tested through the peripheral service function corresponding to the operating system for testing, wherein the testing comprises the following steps: the test system realizes a calling interface with the equipment to be tested based on the driving program through a peripheral service function corresponding to the operating system; and the test system sends the test parameters to the equipment to be tested through the calling interface and tests the equipment to be tested based on the test module and the test parameters.
In the method, the device to be tested is added, the driver of the device to be tested can be added in the peripheral service function so as to realize the calling interface with the device to be tested, the test parameters are sent to the device to be tested through the calling interface, the device to be tested is driven based on the driver, and the device to be tested is tested based on the test module and the test parameters. Therefore, if a certain device needs to be tested, the driver of the device can be placed in the specified directory of the peripheral service function, namely, the position is specified, namely, the calling interface of the device can be realized, the device can be driven, the development period and workload of the test tool are reduced, and the development cost of the test tool is reduced.
Optionally, the test parameters include interface parameters, device connection parameters, and service parameters; testing the device to be tested based on the test module and the test parameters, comprising: the test system is connected with the equipment to be tested based on the calling interface and the equipment connection parameters; the test system is connected with the interface corresponding to the function to be tested based on the interface parameter; and the test system tests the function to be tested through the test module and the service parameters.
In the method, the test parameters of the equipment to be tested comprise interface parameters, equipment connection parameters and service parameters, the test parameters are hardly changed, the equipment connection parameters of the client object can be obtained according to the content of the configuration file corresponding to the client object so as to realize the connection with the equipment to be tested of the client object, the butt joint with the functional module of the equipment to be tested is realized through the interface parameters, the functional module of the function to be tested of the equipment to be tested is operated through the service parameters, the test of the corresponding function is completed, and the test connection reliability and the test accuracy are improved.
Optionally, the test system, based on the test request triggered by the user, includes: the test system receives the equipment to be tested and the function to be tested which are selected by a user in the page display; the test system receives test cases selected by a user in the page display, wherein the test cases are any one or more of the test cases to be tested of the equipment to be tested displayed on the page; and obtaining a test request based on the triggering of the user on the test case.
In the above method, the customer object, for example, a certain company, a certain organization or a certain organization, etc., the test system already stores the device to be tested of the customer object in the configuration file, the device to be tested can perform the function to be tested, and the test module combination condition to which each function to be tested is applied, etc., and the configuration file may also contain the relevant information of the test parameters, the test cases, etc. The client object is received at the test system, and the device to be tested of the client object, the function to be tested of the device to be tested, and the test case corresponding to the function to be tested can be further displayed. After the user selects the corresponding device to be tested, the function to be tested and the test case (test parameters can also be directly input), the test request is determined according to the content selected by the user. Therefore, the relevant information of the client object in the configuration file is preset, the man-machine interaction is facilitated, and the testing efficiency is improved.
Optionally, the test system, based on the test request triggered by the user, includes: the test system receives the equipment to be tested and the function to be tested which are selected by a user in the page display; the test system receives the test parameters of the configuration items of the device to be tested, configured in the page display by the user, of the device to be tested, so as to obtain a test request.
In the method, the test parameters may be obtained through the test case, or may be obtained through direct input of the test parameters by the user. Therefore, the flexibility of the test is improved, and the accuracy of the test result is further ensured.
Optionally, the method further includes: the test system obtains a test result from the equipment to be tested; and the test system verifies the test result and the corresponding test case according to the test instruction, and if the verification is passed, the equipment to be tested is determined to normally operate.
In the method, after the test result is obtained, the test result can be compared with the data corresponding to the test case for detection, and the result of normal operation or abnormal operation of the functional module corresponding to the device to be tested is obtained. Therefore, the user can conveniently and intuitively, simply and quickly obtain the test result.
Optionally, after determining that the device under test operates normally, the method further includes: and when the test system receives a case updating instruction, generating test data according to the test result, and editing and acquiring new test case storage according to the test data.
In the method, if the equipment to be tested is determined to normally operate, the test case can be generated according to the test data corresponding to the test result (in the process, some data can be manually accessed and modified, so that the accuracy of the test case is improved), the test case can be conveniently recycled subsequently, and the workload is reduced.
In a second aspect, an embodiment of the present invention provides a testing apparatus suitable for a multi-operating system, where the apparatus includes:
the determining module is used for determining an operating system based on which the self runs based on a test request triggered by a user; the test request is used for indicating the function to be tested of the device to be tested; the test request comprises test parameters of each configuration item of the function to be tested of the equipment to be tested;
and the processing module is used for constructing a calling request based on the test module with the function to be tested and the test parameters, and sending the calling request to the equipment to be tested through the peripheral service function corresponding to the operating system for testing.
In a third aspect, an embodiment of the present application further provides a computing device, including: a memory for storing a program; a processor for calling the program stored in said memory and executing the method as described in the various possible designs of the first aspect according to the obtained program.
In a fourth aspect, embodiments of the present application also provide a computer program product, which when run on a computer causes the computer to perform the method as set forth in the various possible designs of the first aspect.
These and other implementations of the present application will be more readily understood from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a block diagram of a test architecture for a multi-OS according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a test system suitable for a multi-OS according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a testing method for a multi-OS according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a test procedure for a multi-OS according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a testing apparatus suitable for a multi-os according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
Fig. 1 is a schematic structural diagram of a test applicable to multiple operating systems according to an embodiment of the present invention, as shown in fig. 1, where a test device 101 runs the test applicable to multiple operating systems, and the test system includes a configuration file. The configuration file contains relevant information such as the equipment to be tested of each client object, a test module scheme and a test parameter/test case to which the function to be tested of the equipment to be tested is applied. It should be noted that, the information corresponding to the client object in the configuration file may be; if the user selects the test module and the corresponding one or more functions to be tested, the test system can respectively test the one or more functions to be tested for the equipment cluster to be tested of the client object. With the device to be tested as one dimension, if the user selects one or more devices to be tested of the client object (different device clusters to be tested may also be set according to the specification, properties, and the like of the devices to be tested, where the specific setting of the devices to be tested is not limited), the test system may test the function to be tested corresponding to the device to be tested based on the test module combination for the test module combination scheme corresponding to the one or more devices to be tested. The specific setting mode of the configuration file is not limited, and the configuration file can be specifically set according to the test requirement. The set position of the peripheral service function of the test system stores a driver of the device to be tested. The driver program corresponding to the device to be tested in the setting position of the peripheral service function and the relevant information of the configuration file aiming at the client object is preset by the user. The test system in the test equipment 101 receives a client object input by a user, and displays a function to be tested and a test case and/or a test parameter input box of the client object according to information of the client object in the configuration file. It should be noted that the method for displaying the function to be tested may be displaying interface information of the function to be tested or a name of the function to be tested, and the above example is only used to clearly illustrate the present solution, and the specific displaying method is not limited. The test system may trigger generation of a test request based on user selection of relevant information. The test system further determines an operating system based on which the test system operates, operates a driver of the device to be tested corresponding to the operating system through a peripheral service function, realizes a calling interface with the device to be tested, is connected with the device to be tested according to a device connection parameter in the test parameters, is in butt joint with the function to be tested of the device to be tested according to the interface parameter, tests the device to be tested according to the service parameters and the corresponding test module, and obtains a test result of the function to be tested of the device to be tested. And if the test system receives the test instruction, verifying the test result and the corresponding test case, and if the verification fails, determining that the equipment to be tested is abnormal in operation and generating an alarm. And if the verification is passed, determining that the equipment to be tested normally operates. And if the test system also receives a case updating instruction, generating test data according to the test result, and editing and acquiring new test case storage according to the test data.
Based on the above system architecture, an embodiment of the present invention further provides a structural schematic diagram of a test system suitable for a multi-operating system, as shown in fig. 2, the test system may include: the system comprises a page display layer, an interface and case management layer, an assembly calling layer, a peripheral service layer and an equipment driving layer. The layering of the test system is only for clearly illustrating the technical scheme of the invention, and the specific structural arrangement of the test system is not limited.
And the interface and case management layer is used for receiving, importing and storing the configuration file comprising the interface parameters, the test cases, the test modules and other related information.
And the page display layer is used for displaying the relevant information such as the test module identification, the test interface identification, the test case and the like corresponding to the client object, which is visible and selected by the user, and reading the information such as the corresponding interface and case (if the user directly inputs the test parameters, the test parameters can be directly used) in the interface and case management layer according to the information selected by the user. And the test case can be edited and obtained according to the test data in the test result, so that the test case is updated.
And the assembly calling layer is used for assembling test parameters according to the read information such as the interface, the case (user input test parameters) and the like in the interface and case management layer, determining an operating system on which the test system operates, generating a calling request according to the operating system and the test parameters, and sending the calling request to a corresponding peripheral service function in the peripheral service layer. The peripheral service function may be a peripheral service function corresponding to different operating systems and used for disassembling and perfecting the call request.
And the peripheral service layer is used for receiving the call request, disassembling the call request, perfecting the call request (for example, if the test parameters lack information or have information errors, the test parameters can be corrected according to default corresponding parameters), and calling the driver of the device to be tested of the operating system corresponding to the peripheral service layer according to the corrected test parameters or the call function applying the test parameters. The peripheral service layer is provided with a driver of the device to be tested for each operating system, for example, the driver of the operating system corresponding to the device to be tested, such as Windows, Linux, kylin, etc.
And the device driving layer is used for establishing connection with the device to be tested based on the driving program and the test parameters and driving the function to be tested of the device to be tested to obtain a test result.
Based on the above framework, the present invention further provides a testing method suitable for multiple operating systems, as shown in fig. 3, including:
step 301, the test system determines an operating system based on which the test system operates based on a test request triggered by a user; the test request is used for indicating the function to be tested of the device to be tested; the test request comprises test parameters of each configuration item of the function to be tested of the equipment to be tested;
step 302, the test system constructs a call request based on the test module of the function to be tested and the test parameters, and sends the call request to the device to be tested through the peripheral service function corresponding to the operating system for testing.
In the method, the test system can assemble and obtain the test parameters according to the input client object and the selected relevant parameters such as the test module identification and the test interface identification corresponding to the client object. The test system can also further select relevant parameters such as a test module identifier, a test interface identifier and the like according to the input client object, the selected device to be tested corresponding to the client object and the function to be tested of the device to be tested, and assemble and obtain test parameters. The specific implementation of how to obtain the test parameters is not limited herein. And then, the test system can identify the operating system on which the test system operates, construct a calling request based on the test module and the test parameters of the function to be tested, and transmit the calling request to the peripheral service function corresponding to the operating system. The peripheral service function disassembles the calling function in the calling request to obtain test parameters, checks the test parameters, corrects the test parameters according to default parameters if the test parameters are absent or wrong, and determines the driver corresponding to the device to be tested according to the corrected test parameters. The test system realizes a calling interface with the equipment to be tested through the driving program, and transmits the test parameters to the equipment to be tested through the calling interface. The operating system may be any one of operating systems such as Windows, Linux, kylin, and the like, and correspondingly, the peripheral service function may include a disassembling and perfecting logic of a calling function in a calling request for any one of the operating systems, and a driver of any one of the operating systems for the device. That is to say, the test system can call the corresponding operating system according to the operating system running by itself to test the device to be tested. Compared with the coupling of the test tool and the operating system in the prior art, the test tool and the operating system can be compatible with the test logic of each operating system, and the test workload and the development and maintenance cost of the test tool are reduced.
In the test method applicable to the multiple operating systems provided by the embodiment of the invention, the peripheral service function is further packaged with a driver of the device to be tested; sending the calling request to the device to be tested through the peripheral service function corresponding to the operating system for testing, wherein the testing comprises the following steps: the test system realizes a calling interface with the equipment to be tested based on the driving program through a peripheral service function corresponding to the operating system; and the test system sends the test parameters to the equipment to be tested through the calling interface and tests the equipment to be tested based on the test module and the test parameters. In one example, the test system tests the serial number acquisition function of the banknote counter, and using kylin (chinese proprietary intellectual property operating system), the driver of the banknote counter for kylin provided by the banknote counter manufacturer is put in a test system-specified directory, i.e. the driver of the banknote counter is encapsulated in a peripheral service function. The testing system realizes a calling interface with the cash register based on a driving program of the cash register packaged in the peripheral service function through the peripheral service function corresponding to kylin; the testing system sends testing parameters (which can include information such as an IP address of the cash register and interface parameters (such as RJ 45)) to the cash register by calling the interface, and tests the function of acquiring the serial number of the cash register based on a testing module corresponding to the cash register and the testing parameters.
The test method applicable to the multi-operation system provided by the embodiment of the invention is characterized in that the test parameters comprise interface parameters, equipment connection parameters and service parameters; testing the device to be tested based on the test module and the test parameters, comprising: the test system is connected with the equipment to be tested based on the calling interface and the equipment connection parameters; the test system is connected with the interface corresponding to the function to be tested based on the interface parameter; and the test system tests the function to be tested through the test module and the service parameters. Based on the above example, the test system is connected to the banknote counter based on the call interface and the IP address of the banknote counter. The testing system is connected with an interface corresponding to the function of acquiring the serial number of the currency count machine based on the interface parameter RJ 45. The test system tests the function of acquiring the serial number of the currency count machine through the corresponding test module and the service parameters (which can be service parameters such as the definition of identifying the serial number).
The embodiment of the invention provides a test method suitable for a multi-operation system, and the test method of the test system based on a test request triggered by a user comprises the following steps: the test system receives the equipment to be tested and the function to be tested which are selected by a user in the page display; the test system receives test cases selected by a user in the page display, wherein the test cases are any one or more of the test cases to be tested of the equipment to be tested displayed on the page; and obtaining a test request based on the triggering of the user on the test case. Based on the above example, the test system may receive the name of the banknote counter manufacturer input by the user, and the test system may display the corresponding configuration information of the name of the banknote counter manufacturer in the configuration file, such as the relevant information of the test module combination scheme, the interface parameters, the device connection parameters, the service parameters/test cases, and the like. The test system receives information such as the equipment to be tested and/or the test module and/or the function to be tested and/or the test case selected by the user to generate a test request. Here, if the user selects a test case, one or more test cases may be selected to implement the batch test of multiple test cases.
The embodiment of the invention provides a test method suitable for a multi-operation system, and the test method of the test system based on a test request triggered by a user comprises the following steps: the test system receives the equipment to be tested and the function to be tested which are selected by a user in the page display; the test system receives the test parameters of the configuration items of the device to be tested, configured in the page display by the user, of the device to be tested, so as to obtain a test request. Based on the above example, the test system receives the information such as the device to be tested and/or the test module and/or the function to be tested selected by the user and the test parameters input by the user to generate the test request. Here, a test parameter input interface may be provided, enabling flexibility in setting test parameters. Here, a multi-input interface may be provided to receive multiple sets of test parameters, or a single input may be provided to receive a set of test parameters, which is not limited specifically.
The test method applicable to the multi-operation system provided by the embodiment of the invention further comprises the following steps: the test system obtains a test result from the equipment to be tested; and the test system verifies the test result and the corresponding test case according to the test instruction, and if the verification is passed, the equipment to be tested is determined to normally operate. Here, the verification instruction may be generated based on a user trigger. In one example, the test system obtains a test result, namely an image specification, chromaticity, resolution and the like, from the camera, verifies the test result with a corresponding test case (containing information of the image specification, chromaticity, resolution and the like) according to a verification instruction triggered by a user, and determines that the camera shooting function of the camera normally operates if the verification is passed.
The test method applicable to the multiple operating systems provided by the embodiment of the invention further comprises the following steps after the device to be tested is determined to normally operate: and when the test system receives a case updating instruction, generating test data according to the test result, and editing and acquiring new test case storage according to the test data. Here, the case update instruction may be generated by the test system according to a user trigger. Based on the above example, the test system determines that the camera shooting function is operating normally, and displays the result of the normal operation of the camera shooting function to the user. The user can select the case update or select the button of the test result generation test case, so that the test case receives the case update instruction, obtains the test data of the test result, and edits and obtains the new test case according to the test data and stores the new test case. In the process, the user can also adjust the related test data, so that the generated test case is more accurate.
Based on the above method flow, an embodiment of the present invention provides a method flow applicable to testing of multiple operating systems, as shown in fig. 4, including:
step 401, the test system receives configuration import and driver settings for the device under test.
Here, the related information such as the client object (organization, mechanism, etc.) belonging to the device under test, the function to be tested, the test parameters, and the test case may be imported into the configuration file of the test system, and the driver corresponding to the operating system may be placed in the corresponding peripheral service function of the test system. Or importing the batch related information of the equipment to be tested, the function to be tested, the test parameters, the test cases and the like of one client object into a configuration file of the test system, and placing the driver program corresponding to the operating system in the corresponding peripheral service function of the test system.
Step 402, the test system receives test information selected by a user on a page to generate a test request.
Here, the test information may include any necessary information among related information such as a customer object, a device under test, a test module, a function under test, a test case, input test parameters, and the like.
Step 403, the test system identifies the operating system of the device where the test system is located.
Step 404, the test system builds a call request based on the test information in the test request and the operating system.
Step 405, the test system sends the call request to a peripheral service function corresponding to the operating system.
And 406, disassembling the call request by the test system through the peripheral service function, perfecting a call function and a test parameter in the call request, and realizing a call interface with the equipment to be tested based on the driving program.
Step 407, the test system sends the test parameters to the device to be tested through the call interface.
And 408, the test system is connected with the equipment to be tested based on the calling interface and the equipment connection parameters, and tests the function to be tested through the test module and the service parameters based on the interface connection corresponding to the interface parameters and the function to be tested.
Step 409, the test system obtains the test result.
And step 410, the test system receives the test instruction, tests the test result according to the corresponding test case, and if the test case fails, the equipment to be tested runs abnormally. And if the verification is passed, the equipment to be tested normally operates.
Step 411, the test system generates test data according to the test result after receiving the case update instruction, and edits and acquires a new test case storage according to the test data (or the test data adjusted by the user).
Step 412, the test system receives the instruction for exporting the test report, performs the execution result analysis on the test, and generates the test report.
Here, if the test cases are executed in batches, batch generation of one or more test reports may be implemented.
It should be noted that the above method flow is not exclusive, and for example, step 411 and/or step 412 may not be executed. In addition, compared with the prior art that the test report cannot be generated by analyzing the test result, the test report can be generated according to the test result, and the corresponding batch test report can be generated according to the batch test result, so that the workload of test workers is greatly reduced.
Based on the same concept, an embodiment of the present invention provides a testing apparatus suitable for a multi-operating system, and fig. 5 is a schematic diagram of the testing apparatus suitable for the multi-operating system provided in the embodiment of the present application, as shown in fig. 5, including:
a determining module 501, configured to determine, based on a test request triggered by a user, an operating system on which the operating system is running; the test request is used for indicating the function to be tested of the device to be tested; the test request comprises test parameters of each configuration item of the function to be tested of the equipment to be tested;
the processing module 502 is configured to construct a call request based on the test module to be tested and the test parameters, and send the call request to the device to be tested through the peripheral service function corresponding to the operating system for testing.
Optionally, the peripheral service function further encapsulates a driver of the device to be tested; the processing module 502 is specifically configured to implement a call interface with the device to be tested based on the driver through a peripheral service function corresponding to the operating system; and sending the test parameters to the equipment to be tested through the calling interface, and testing the equipment to be tested based on the test module and the test parameters.
Optionally, the test parameters include interface parameters, device connection parameters, and service parameters, and the processing module 502 is specifically configured to connect to the device to be tested based on the call interface and the device connection parameters; based on the interface parameters, connecting with an interface corresponding to the function to be tested; and testing the function to be tested through the test module and the service parameters.
Optionally, the determining module 501 is specifically configured to receive the device to be tested and the function to be tested, which are selected by the user in the page display; receiving test cases selected by a user in the page display, wherein the test cases are any one or more of the test cases to be tested of the equipment to be tested displayed on the page; and obtaining a test request based on the triggering of the user on the test case.
Optionally, the determining module 501 is specifically configured to receive the device to be tested and the function to be tested, which are selected by the user in the page display; and receiving the test parameters of the configuration items of the device to be tested, configured in the page display by the user, so as to obtain a test request.
Optionally, the processing module 502 is further configured to obtain a test result from the device to be tested; and verifying the test result and the corresponding test case according to the test instruction, and if the verification is passed, determining that the equipment to be tested normally operates.
Optionally, the processing module 502 is further configured to, after receiving the case update instruction, generate test data according to the test result, and edit and acquire a new test case storage according to the test data.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (11)

1. A testing method applicable to a multi-operating system is characterized by comprising the following steps:
the test system determines an operating system based on which the test system operates based on a test request triggered by a user; the test request is used for indicating the function to be tested of the device to be tested; the test request comprises test parameters of each configuration item of the function to be tested of the equipment to be tested;
the test system constructs a calling request based on the test module of the function to be tested and the test parameters, and sends the calling request to the equipment to be tested through the peripheral service function corresponding to the operating system for testing.
2. The method of claim 1, wherein the peripheral service function further encapsulates a driver for the device under test;
sending the calling request to the device to be tested through the peripheral service function corresponding to the operating system for testing, wherein the testing comprises the following steps:
the test system realizes a calling interface with the equipment to be tested based on the driving program through a peripheral service function corresponding to the operating system;
and the test system sends the test parameters to the equipment to be tested through the calling interface and tests the equipment to be tested based on the test module and the test parameters.
3. The method of claim 2, wherein the test parameters include interface parameters, device connection parameters, and service parameters; testing the device to be tested based on the test module and the test parameters, comprising:
the test system is connected with the equipment to be tested based on the calling interface and the equipment connection parameters;
the test system is connected with the interface corresponding to the function to be tested based on the interface parameter;
and the test system tests the function to be tested through the test module and the service parameters.
4. The method of claim 1, wherein the testing system is based on a user-triggered test request, comprising:
the test system receives the equipment to be tested and the function to be tested which are selected by a user in the page display;
the test system receives test cases selected by a user in the page display, wherein the test cases are any one or more of the test cases to be tested of the equipment to be tested displayed on the page;
and obtaining a test request based on the triggering of the user on the test case.
5. The method of claim 1, wherein the testing system is based on a user-triggered test request, comprising:
the test system receives the equipment to be tested and the function to be tested which are selected by a user in the page display;
the test system receives the test parameters of the configuration items of the device to be tested, configured in the page display by the user, of the device to be tested, so as to obtain a test request.
6. The method as recited in claim 1, further comprising:
the test system obtains a test result from the equipment to be tested;
and the test system verifies the test result and the corresponding test case according to the test instruction, and if the verification is passed, the equipment to be tested is determined to normally operate.
7. The method as recited in claim 6, wherein after determining that the device under test is operating properly, further comprising:
and when the test system receives a case updating instruction, generating test data according to the test result, and editing and acquiring new test case storage according to the test data.
8. A test apparatus adapted for use with multiple operating systems, the apparatus comprising:
the determining module is used for determining an operating system based on which the self runs based on a test request triggered by a user; the test request is used for indicating the function to be tested of the device to be tested; the test request comprises test parameters of each configuration item of the function to be tested of the equipment to be tested;
and the processing module is used for constructing a calling request based on the test module with the function to be tested and the test parameters, and sending the calling request to the equipment to be tested through the peripheral service function corresponding to the operating system for testing.
9. The test apparatus as claimed in claim 8, wherein the processing module is further configured to obtain a test result from the device under test; and verifying the test result and the corresponding test case according to the test instruction, and if the verification is passed, determining that the equipment to be tested normally operates.
10. A computer program product, characterized in that, when said program is run on a computer, it causes the computer to perform the method according to any of claims 1 to 7.
11. A computer device, comprising:
a memory for storing a computer program;
a processor for calling a computer program stored in said memory to execute the method of any of claims 1 to 7 in accordance with the obtained program.
CN202111318282.6A 2021-11-09 2021-11-09 Testing method and device suitable for multiple operating systems Pending CN113986751A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111318282.6A CN113986751A (en) 2021-11-09 2021-11-09 Testing method and device suitable for multiple operating systems

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111318282.6A CN113986751A (en) 2021-11-09 2021-11-09 Testing method and device suitable for multiple operating systems

Publications (1)

Publication Number Publication Date
CN113986751A true CN113986751A (en) 2022-01-28

Family

ID=79747276

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111318282.6A Pending CN113986751A (en) 2021-11-09 2021-11-09 Testing method and device suitable for multiple operating systems

Country Status (1)

Country Link
CN (1) CN113986751A (en)

Similar Documents

Publication Publication Date Title
CN111026645B (en) User interface automatic test method and device, storage medium and electronic equipment
CN105787364B (en) Automatic testing method, device and system for tasks
CN110058998B (en) Software testing method and device
CN111158741A (en) Method and device for monitoring change of dependency relationship of business module on third-party class library
CN111211929A (en) Fault positioning method, fault positioning device, control equipment and intelligent equipment
CN110347085A (en) Automatization test system, method, vehicle and computer-readable medium
CN110765018A (en) Automatic interface testing method and equipment
CN114546738A (en) Server general test method, system, terminal and storage medium
CN112783756A (en) Automatic test method, terminal, system and storage medium
CN112671609A (en) Asset census and safety detection method and device and terminal equipment
CN112650670A (en) Application testing method, device, system, electronic equipment and storage medium
CN114168471A (en) Test method, test device, electronic equipment and storage medium
CN112559348B (en) Test analysis method, system, equipment and medium based on jacoco
CN113760774A (en) OTA simulation test method, platform and system
CN112579452A (en) Software automation test method, device, equipment and storage medium
CN113986751A (en) Testing method and device suitable for multiple operating systems
CN115934513A (en) Demand analysis and test design adaptation method, device, equipment and medium
CN113572826B (en) Device information binding method and system and electronic device
KR20120111618A (en) Apparatus and method for testing plc command
CN111984537B (en) WebIDE-based software testing method, storage medium and device
CN114218072A (en) Test script generation method and device, storage medium and computer equipment
CN113986753A (en) Interface test method, device, equipment and storage medium
CN114676066A (en) Security testing method and device for target application, electronic equipment and storage medium
CN114428706A (en) Interface monitoring method and device, storage medium and electronic equipment
CN110348984B (en) Automatic credit card data input method and related equipment under different transaction channels

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