CN115114164A - Test method, test device, electronic equipment and storage medium - Google Patents

Test method, test device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115114164A
CN115114164A CN202210769607.0A CN202210769607A CN115114164A CN 115114164 A CN115114164 A CN 115114164A CN 202210769607 A CN202210769607 A CN 202210769607A CN 115114164 A CN115114164 A CN 115114164A
Authority
CN
China
Prior art keywords
preset
test
compiling
data distribution
distribution service
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
CN202210769607.0A
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.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile 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 Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202210769607.0A priority Critical patent/CN115114164A/en
Publication of CN115114164A publication Critical patent/CN115114164A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • 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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1744Redundancy elimination performed by the file system using compression, e.g. sparse files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Landscapes

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

Abstract

The application provides a testing method, a testing device, electronic equipment and a storage medium, a configuration object to be managed is determined in a preset tool chain platform, a test file compression package of the configuration object to be managed is downloaded to a preset shared space, the test file compression package is detected to exist in the preset shared space, the test file compression package is decompressed and compiled to obtain a compiling result, and the compiling result is stored to a preset text file to complete testing of middleware codes based on data distribution service.

Description

Test method, test device, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of testing, in particular to a testing method, a testing device, electronic equipment and a storage medium.
Background
With the development of intelligent networking automobiles, a Service-Oriented Architecture (SOA) is receiving more and more attention. One important principle of the SOA architecture is its flexibility, loose coupling and multiplexing capability. The SOA tool chain platform is a service management platform based on a Web page, can manage and configure application, service, method and data type, and can generate codes generated based on the configured application, service, method and data; and the code generated by the SOA tool chain is compiled and run in a Linux environment after being downloaded so as to test the correctness of the generated code.
The test mode of the related technology mainly depends on manual realization, the test result needs manual observation and manual recording, the test efficiency is low, and the test cost is high.
Disclosure of Invention
In view of the foregoing disadvantages of the prior art, embodiments of the present invention provide a testing method, an apparatus, an electronic device, and a storage medium, so as to solve the technical problem that a pointer system in the related art is relatively rigid and cannot meet the development requirement of a service.
The test method provided by the embodiment of the invention comprises the following steps:
determining a configuration object to be managed in a preset tool chain platform, and downloading a test file compression package of the configuration object to be managed to a preset shared space, wherein the test file compression package comprises a middleware code based on data distribution service generated by the preset tool chain platform, and the configuration object to be managed comprises at least one of an application, a service, a method and a data type;
detecting that the test file compression packet exists in the preset shared space, decompressing and compiling the test file compression packet to obtain a compiling result;
and storing the compiling result to a preset text file so as to complete the test of the middleware code based on the data distribution service.
In an embodiment of the present invention, if the compiling result includes a successful compiling, storing the compiling result in a preset text file includes:
if the client application and the server application which depend on the middleware code of the data distribution service exist, starting the client application and the server application;
detecting a communication state between the client application and the server application;
and storing the compiling result and the communication state in the preset text file.
In an embodiment of the present invention, the determining that the client application and the server application depend on the middleware code of the data distribution service includes:
acquiring a compiling result file name of a compiling result generated after compiling;
and if the compiling result file name comprises a client application identifier and a server application identifier, determining that the client application and the server application which depend on the middleware code of the data distribution service exist.
In an embodiment of the present invention, detecting that the test file compression packet exists in the preset shared space, and decompressing and compiling the test file compression packet includes:
if the preset file directory of the preset shared space comprises a compressed packet with a preset format, determining that the compressed packet of the test file exists in the preset shared space;
decompressing the test file compression packet to obtain a decompressed folder;
if the decompressed folder comprises the subfolder with the preset name, a new folder is created in the decompressed folder;
and compiling and testing the middleware codes based on the data distribution service in the new folder.
In an embodiment of the present invention, if the decompressed folder does not include the preset name subfolder, the testing method further includes:
the prompt is based on a data distribution service middleware code error.
In an embodiment of the present invention, the performing a compilation test on the middleware code based on the data distribution service in the new folder includes:
and entering the new folder, and executing a preset automatic compiling tool to carry out compiling test on the middleware code based on the data distribution service.
In an embodiment of the present invention, before determining the configuration object to be managed in the default tool chain platform, the testing method further includes:
setting a preset shared space which can be accessed by both a code generation end and a code compiling end;
the code generation end is deployed with a preset tool chain platform, and the code compiling end is used for detecting that the test file compression package exists in the preset shared space, decompressing and compiling the test file compression package to obtain a compiling result, and storing the compiling result in a preset text file to complete the test based on the data distribution service middleware codes.
The embodiment of the invention also provides a testing device, which comprises:
the system comprises a downloading module, a sharing module and a sharing module, wherein the downloading module is used for determining a configuration object to be managed in a preset tool chain platform and downloading a test file compression package of the configuration object to be managed to a preset sharing space, the test file compression package comprises a middleware code based on data distribution service generated by the preset tool chain platform, and the configuration object to be managed comprises at least one of application, service, method and data type;
the compiling module is used for detecting that the test file compression package exists in the preset shared space, decompressing and compiling the test file compression package to obtain a compiling result;
and the storage module is used for storing the compiling result to a preset text file so as to complete the test of the middleware code based on the data distribution service.
An embodiment of the present invention further provides an electronic device, including:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the electronic device to implement a testing method as in any one of the above embodiments.
Embodiments of the present invention also provide a computer-readable storage medium having stored thereon computer-readable instructions, which, when executed by a processor of a computer, cause the computer to execute the testing method described in any of the above embodiments.
The embodiment of the invention has the following beneficial effects: according to the testing method, the testing device, the electronic equipment and the storage medium in the embodiment of the invention, the configuration object to be managed is determined in the preset tool chain platform, the test file compression package of the configuration object to be managed is downloaded to the preset shared space, the test file compression package is detected to exist in the preset shared space, the test file compression package is decompressed and compiled to obtain the compiling result, and the compiling result is stored in the preset text file to complete the test of the middleware code based on the data distribution service.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 is a schematic diagram of an implementation environment of a testing method shown in an exemplary embodiment of the present application;
FIG. 2 is a flow chart illustrating a testing method according to an exemplary embodiment of the present application;
FIG. 3 is a flowchart illustrating SOA toolchain platform code download in accordance with an exemplary embodiment of the present application;
FIG. 4 is a schematic diagram of a decompressed folder shown in an exemplary embodiment of the present application;
FIG. 5 is a flowchart illustrating a DDS middleware code test at the Linux end according to an exemplary embodiment of the present application;
FIG. 6 is a block diagram of a test apparatus shown in an exemplary embodiment of the present application;
FIG. 7 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the disclosure herein, wherein the embodiments of the present invention are described in detail with reference to the accompanying drawings and preferred embodiments. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It should be understood that the preferred embodiments are illustrative of the invention only and are not limiting upon the scope of the invention.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
In the following description, numerous details are set forth to provide a more thorough explanation of embodiments of the present invention, however, it will be apparent to one skilled in the art that embodiments of the present invention may be practiced without these specific details, and in other embodiments, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring embodiments of the present invention.
Fig. 1 is a schematic diagram of an implementation environment of a test system according to an exemplary embodiment of the present application, as shown in fig. 1, the system includes an SOA tool chain platform 101, a vehicle-side device 102, and a code testing apparatus 103, where the SOA tool chain platform may be deployed on a Windows side, and downloads a code file N, such as a DDS (data distribution service) middleware code, to a directory of Windows by selecting and downloading a certain version of a certain application; and after downloading is finished, copying the code file into the windows and the shared directory of the vehicle terminal. The vehicle-end equipment automatically monitors whether the code file N exists or not through the code testing device arranged on the vehicle-end equipment, and if the code file N exists, the vehicle-end equipment decompresses and compiles the code file N and outputs a compiling result to a preset text file for pulling a testing result subsequently. The vehicle end can be a Linux system, an Android system, a Linux virtual machine and the like.
With the development of the smart internet automobile, the Service-Oriented Architecture SOA (Service-Oriented Architecture) is receiving more and more attention. One important principle of the SOA architecture is its flexibility, loose coupling and multiplexing capability. The SOA tool chain platform is a service management platform based on a Web page, can manage and configure application, service, method and data type, and can generate codes generated based on the configured application, service, method and data; after being downloaded, codes generated by the SOA toolchain need to be compiled and run in a Linux environment so as to test the correctness of the generated codes, and the test method in the related technology has the following problems:
1. manual service selection is required;
2. manually selecting downloading;
3. manually decompressing to generate a compressed packet of codes;
4. copying a manual input command to a target system environment;
5. manual command input is needed for compiling, and a compiling result needs to be checked manually;
6. manually inputting a command to operate a Client terminal and a Server terminal, and manually observing, operating and outputting a printing message;
in view of the foregoing, it is desirable to improve testing efficiency, and therefore, the present invention provides an automated testing method, an automated testing apparatus, an electronic device, a storage medium, and a computer program.
Referring to fig. 2, fig. 2 is a flowchart illustrating a testing method according to an exemplary embodiment of the present application. As shown in fig. 2, in an exemplary embodiment, the testing method at least includes steps S201 to S203, which are described in detail as follows:
step S201, determining a configuration object to be managed in a preset tool chain platform, and downloading a test file compression package of the configuration object to be managed to a preset shared space.
The test file compression package comprises middleware codes which are generated by a preset tool chain platform and based on data distribution service. The configuration object to be managed includes, but is not limited to, at least one of an application, a service, a method, a data type, and the like. The preset tool chain platform comprises but is not limited to an SOA tool chain management platform and the like. The preset shared space can be accessed by a Windows end where the preset tool chain platform is located, and a Linux end, a vehicle end, an Android system or a Linux virtual machine in the subsequent testing process. The format of the test file compression package is a preset format.
According to the test method provided by the embodiment, a test object is a DDS middleware code generated by configuring at least one of application, service, method and data type aiming at an SOA tool chain management platform, the method is suitable for downloading, decompressing and testing the application, service, method and data generated code configured on the SOA tool chain platform in a test file compression package mode, and the method can realize test automation and get through a technical path from Web page selection service to running codes of a virtual machine Linux environment.
In an embodiment, downloading the test file compression package of the configuration object to be managed to the preset shared space includes:
and downloading the test file compression package to a local folder, and copying the complete test file compression package in the local folder to a preset shared space after the downloading is finished.
In an embodiment, the step S201 is applied to a Windows end, a test flow is controlled by a script configured by a person skilled in the art, such as a Python script, a Selenium frame is introduced, a web page is automatically operated by the Python script, a service (application, method, data type) is selected, a click download is performed, a specific file (test file compression package) is selected to be downloaded to a directory of Windows, and after the download is completed, the test file compression package is copied to a shared directory of Linux (a preset shared space).
In an embodiment, before determining the configuration object to be managed in the preset tool chain platform, the testing method further includes:
and starting an automatic testing tool, detecting the login state of a preset tool chain platform, prompting a user to log in if the preset tool chain platform is not logged in, and automatically selecting a configuration object to be managed through the automatic testing tool after the login is finished.
In an embodiment, referring to fig. 3, fig. 3 is a flowchart illustrating SOA toolchain platform code downloading according to an exemplary embodiment of the present application. As shown in fig. 3, this step is applied to the Windows end, and first login to the SOA tool chain platform is performed, and the login is selected to be memorized; then, a page operation is carried out by using a Selenium frame through a Python script, application deployment under a deployment management page is selected, MPU deployment is selected, a version of a determined application is selected, downloading is clicked, a code file is selected, an access path is selected, the path is a shared folder of a Linux virtual machine and Windows, a storage button is clicked, and a format of storing a default file name (the default name is determined by a code generation rule of an SOA tool chain platform, and is an application name _ version _ code _ mpu.tgz or an application name _ version _ code _ mcu.tgz, such as musicApp _ V9.0.0_ code _ mpu.tgz) is determined to be tgz compressed packets, and the preset format is tgz. Initially, a Python script is started first, and if the script fails to be started, the Python environment is prompted to be checked. And after the script is successfully started, starting the Selenium frame, if the Selenium frame is failed to be started, checking the running environment of the Selenium frame, if the Selenium frame is successfully started, logging in an SOA tool chain platform, if the logging is successful, selecting a service or an application, packaging the generated code into a test file compression package for downloading, and if the logging is not successful, prompting to log in first. And in the downloading process, monitoring the downloading state, if the downloading fails, prompting the downloading failure, and if the downloading succeeds, storing the test file compression package in a preset sharing idle state.
In an embodiment, before determining the configuration object to be managed in the preset tool chain platform, the testing method further includes:
setting a preset shared space which can be accessed by both a code generation end and a code compiling end;
the code generation end is deployed with a preset tool chain platform, the code compiling end is used for detecting that a test file compression package exists in a preset shared space, decompressing and compiling the test file compression package to obtain a compiling result, and storing the compiling result into a preset text file to finish testing the middleware code based on the data distribution service.
For example, the code generation end may be a Windows end, and the code compiling end may be a car end, a Linux system, an Android system, or a Linux virtual machine.
Step S202, detecting that a test file compression package exists in the preset shared space, decompressing and compiling the test file compression package to obtain a compiling result.
The compilation result includes a compilation success or a compilation failure.
The test file compression packet in the preset shared space can be realized in a timing monitoring mode, and once the test file compression packet which is not decompressed exists in the preset shared space is found, the test file compression packet is decompressed.
In an embodiment, detecting that a test file compression packet exists in a preset shared space, and decompressing and compiling the test file compression packet includes:
if the preset file directory of the preset shared space comprises a compressed packet with a preset format, determining that a test file compressed packet exists in the preset shared space;
decompressing the test file compression packet to obtain a decompressed folder;
if the decompressed folder comprises the subfolder with the preset name, a new folder is created in the decompressed folder;
and compiling and testing the middleware codes based on the data distribution service in the new folder.
In an embodiment, if the decompressed folder does not include the subfolder with the preset name, the testing method further includes:
the prompt is based on a data distribution service middleware code error. At this time, it is described that the middleware code based on the data distribution service in the test file compression package obtained at the previous stage is abnormal, and the subsequent compiling work cannot be performed. Related workers can be reminded to investigate the error reasons.
For example, referring to fig. 4, fig. 4 is a schematic diagram of a decompressed folder shown in an exemplary embodiment of the present application. As shown in fig. 4, the decompressed folder includes several sub-folders, taking the sub-folder with the preset name as the gen folder as an example, and fig. 4 is an example of a qualified decompressed folder. It should be noted that the folder type, name, number, and the like in fig. 4 are only examples, and are not used to limit the test method in this embodiment.
In one embodiment, the compiling test of the middleware code based on the data distribution service in the new folder comprises the following steps:
and entering a new folder, and executing a preset automatic compiling tool to carry out compiling test on the middleware codes based on the data distribution service. The preset automatic compiling tools include, but are not limited to, cmake, make commands, and the like.
If the decompressed folder comprises the preset name subfolder, a build folder (a new folder) is created in the same level directory where the preset name subfolder is located, the build folder is entered, a cmake command and a make command are executed to perform compiling test on codes generated by the SOA tool chain platform, and a compiling result is directionally output to a compiling result file (a preset text file) in a text format.
And step S203, storing the compiling result to a preset text file so as to complete the test of the middleware code based on the data distribution service.
In an embodiment, if the compiling result includes a successful compiling, storing the compiling result in the predetermined text file includes:
if the client application and the server application which depend on the middleware code of the data distribution service exist, starting the client application and the server application;
detecting a communication state between the client application and the server application, wherein the communication state comprises communication success or communication failure;
and presetting a text file according to the compiling result and the communication state storage value.
In one embodiment, the determining that the client application and the server application depend on the middleware code of the data distribution service comprises the following steps:
acquiring a compiling result file name of a compiling result generated after compiling;
and if the compiling result file name comprises a client application identifier and a server application identifier, determining that the client application and the server application which depend on the middleware code of the data distribution service exist.
For example, referring to fig. 5, fig. 5 is a flowchart illustrating a Linux-side DDS middleware code test according to an exemplary embodiment of the present application. As shown in fig. 5, this step may be executed in a Linux virtual machine end, a vehicle end, a Linux system, an Android system, or the like. At the moment, a vehicle end (or a Linux system or an Android system) or a Linux virtual machine is logged in through a Python script running on Windows, and after the login is successful, a Shell script with the following functions is started: the Shell script automatically and circularly detects a newly added compression packet (a test file compression packet) under a shared directory, automatically compiles after decompression is finished, and directionally outputs a compiling result to a text file (a preset text file), so that DDS-based middleware codes from an SOA tool chain platform are tested, whether codes generated by the SOA tool chain can be compiled or not is detected, if a Client (Client application) and a Server (Server application) based on the DDS middleware codes exist, the Client and the Server are automatically started, and whether the middleware codes based on a DDS communication protocol can be communicated or not is tested.
The Linux virtual machine end sets a shared directory with Windows in advance, Shell scripts scan a compressed packet with the name of application name tgz, decompress the compressed packet, open a folder generated after decompression, judge whether a gen subfolder is included below the folder (codes generated by an SOA tool chain are stored in the folder, and the name subfolder is preset), if yes, create a build folder (new folder) in a peer directory where the gen folder is located, enter the build folder, execute cmake and make commands to perform compilation test on the codes generated by the SOA tool chain platform, and directionally output the compilation result to a compilation result file with a text format. If the Client application and the Server application which depend on the generated codes exist, the Client terminal and the Server application are automatically started, whether CS (Client, Server) communication is successful or not is detected, the DDS-based middleware codes are further detected and verified, and the results are output to a log file in a text format; and if the decompressed folder does not contain the gen subfolder, directly judging that the code generated by the SOA tool chain is output to be wrong. And in the starting process of the Shell automation program at the Linux end, monitoring the starting state, and prompting the starting failure if the starting fails. If the compiling is failed, storing the text file which is failed to compile, if the compiling is successful, judging whether applications (Client application and Server application) exist, if the applications do not exist, storing the text file which is failed to compile, if the applications exist, storing the text file which is failed to compile, on one hand, detecting that the Client terminal and the Server terminal are successfully communicated, if the communication is successful, storing the DDS code which is successfully communicated to the text file, and if the communication is failed, storing the DDS code which is not successfully communicated to the text file.
In the testing method provided by the embodiment, the configuration object to be managed is determined in the preset tool chain platform, the test file compression package of the configuration object to be managed is downloaded to the preset shared space, the test file compression package is detected to exist in the preset shared space, the test file compression package is decompressed and compiled to obtain the compiling result, and the compiling result is stored in the preset text file, so that the test based on the middleware code of the data distribution service is completed.
The testing method provided by the embodiment supports the Web automation page to select a plurality of services or applications in batch to download the codes, and the Linux automation script compiles the codes generated by the SOA tool chain platform in batch. The method has the advantages that manual page selection service or application and downloading, manual copying, decompression and compiling are replaced, and compiling test results are output to the preset text file by using an automatic method, so that great convenience is brought to code testing of DDS middleware generated by different services and applications, and testing complexity, testing time, labor and other costs are reduced; the test efficiency of the code test generated by various scenes is improved, and the formatted result output file can be directly obtained.
The automatic service selection, code downloading, automatic decompression and automatic compiling are realized through an automatic method, so that the correctness of the codes generated by the SOA tool chain platform is tested. The test method in the related technology adopts a manual operation SOA tool chain platform, manually selects services, selects the type of downloaded codes, clicks the download and selects a storage path; then manually transferring the compressed package of the downloaded code to a vehicle end (Linux, Android or virtual machine environment) through other software; then decompressing the downloaded codes at the vehicle end, finding out corresponding subfolders, manually inputting a compiling command, visually checking a compiling result, manually starting programs of the client and the server, and visually observing printing results of the programs of the client and the server. The automated testing method provided by the embodiment mainly refers to that a Web automated testing tool (Selenium) is used for carrying out SOA tool chain platform page operation and selectively downloading codes automatically generated based on DDS middleware; and decompressing, compiling, running and testing the code from the SOA tool chain platform through the Shell script.
Fig. 6 is a block diagram of a test apparatus shown in an exemplary embodiment of the present application. The apparatus may be applied to the implementation environment shown in fig. 1. The apparatus may also be applied to other exemplary implementation environments and specifically configured in other devices, and the embodiment does not limit the implementation environment to which the apparatus is applied.
As shown in fig. 6, the exemplary test device 600 includes:
the downloading module 601 is configured to determine a configuration object to be managed in a preset tool chain platform, and download a test file compression package of the configuration object to be managed to a preset shared space, where the test file compression package includes a middleware code based on data distribution service generated by the preset tool chain platform, and the configuration object to be managed includes at least one of an application, a service, a method, and a data type;
the compiling module 602 is configured to detect that a test file compression packet exists in a preset shared space, decompress and compile the test file compression packet, and obtain a compiling result;
the storage module 603 is configured to store the compiling result in a preset text file, so as to complete a test on the middleware code based on the data distribution service.
It should be noted that the test apparatus provided in the foregoing embodiment and the test method provided in the foregoing embodiment in fig. 2 belong to the same concept, and specific ways of performing operations by each module and unit have been described in detail in the method embodiments, and are not described herein again. In practical applications, the test apparatus provided in the above embodiment may distribute the functions to different functional modules according to needs, that is, divide the internal structure of the apparatus into different functional modules to complete all or part of the functions described above, which is not limited herein.
An embodiment of the present application further provides an electronic device, including: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the electronic device to implement the testing method provided in the above-described embodiments.
FIG. 7 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application. It should be noted that the computer system 700 of the electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for system operation are also stored. The CPU701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An Input/Output (I/O) interface 705 is also connected to the bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that the computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program executes various functions defined in the system of the present application when executed by a Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer-readable signal medium may comprise a propagated data signal with a computer-readable computer program embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
Yet another aspect of the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a testing method as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist separately without being incorporated in the electronic device.
Another aspect of the application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the test method provided in the above embodiments.
The foregoing embodiments are merely illustrative of the principles of the present invention and its efficacy, and are not to be construed as limiting the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (10)

1. A method of testing, the method comprising:
determining a configuration object to be managed in a preset tool chain platform, and downloading a test file compression package of the configuration object to be managed to a preset shared space, wherein the test file compression package comprises a middleware code based on data distribution service generated by the preset tool chain platform, and the configuration object to be managed comprises at least one of an application, a service, a method and a data type;
detecting that the test file compression packet exists in the preset shared space, decompressing and compiling the test file compression packet to obtain a compiling result;
and storing the compiling result to a preset text file so as to complete the test of the middleware code based on the data distribution service.
2. The testing method of claim 1, wherein if the compilation result comprises a successful compilation, storing the compilation result in a predetermined text file comprises:
if the client application and the server application which depend on the middleware code of the data distribution service exist, starting the client application and the server application;
detecting a communication state between the client application and the server application;
and storing the compiling result and the communication state in the preset text file.
3. The testing method of claim 2, wherein determining that there is a dependency on the client application and the server application based on the data distribution service middleware code comprises:
acquiring a compilation result file name of a compilation result generated after compilation;
and if the compiling result file name comprises a client application identifier and a server application identifier, determining that the client application and the server application which depend on the middleware code of the data distribution service exist.
4. The testing method of claim 1, wherein detecting that the test file compressed package exists in the preset shared space, and decompressing and compiling the test file compressed package comprises:
if the preset file directory of the preset shared space comprises a compressed packet with a preset format, determining that the compressed packet of the test file exists in the preset shared space;
decompressing the test file compression packet to obtain a decompressed folder;
if the decompressed folder comprises the subfolder with the preset name, a new folder is created in the decompressed folder;
and compiling and testing the middleware codes based on the data distribution service in the new folder.
5. The method of claim 4, wherein if the decompressed folder does not include a default name subfolder, the method further comprises:
the prompt is based on a data distribution service middleware code error.
6. The method for testing as defined in claim 4, wherein performing a compilation test on the data distribution service based middleware code in the new folder comprises:
and entering the new folder, and executing a preset automatic compiling tool to carry out compiling test on the middleware code based on the data distribution service.
7. The testing method of any of claims 1-6, wherein prior to determining the configuration object to be managed in the pre-defined tool chain platform, the testing method further comprises:
setting a preset shared space which can be accessed by both a code generation end and a code compiling end;
the code generation end is deployed with a preset tool chain platform, and the code compiling end is used for detecting that the test file compression package exists in the preset shared space, decompressing and compiling the test file compression package to obtain a compiling result, and storing the compiling result in a preset text file to complete the test based on the data distribution service middleware codes.
8. A test apparatus, characterized in that the test apparatus comprises:
the system comprises a downloading module, a sharing module and a sharing module, wherein the downloading module is used for determining a configuration object to be managed in a preset tool chain platform and downloading a test file compression package of the configuration object to be managed to a preset sharing space, the test file compression package comprises a middleware code based on data distribution service generated by the preset tool chain platform, and the configuration object to be managed comprises at least one of application, service, method and data type;
the compiling module is used for detecting that the test file compression package exists in the preset shared space, decompressing and compiling the test file compression package to obtain a compiling result;
and the storage module is used for storing the compiling result to a preset text file so as to complete the test of the middleware code based on the data distribution service.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the electronic device to carry out a test method according to any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon computer-readable instructions which, when executed by a processor of a computer, cause the computer to perform the testing method of any one of claims 1 to 7.
CN202210769607.0A 2022-06-30 2022-06-30 Test method, test device, electronic equipment and storage medium Pending CN115114164A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210769607.0A CN115114164A (en) 2022-06-30 2022-06-30 Test method, test device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210769607.0A CN115114164A (en) 2022-06-30 2022-06-30 Test method, test device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115114164A true CN115114164A (en) 2022-09-27

Family

ID=83330638

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210769607.0A Pending CN115114164A (en) 2022-06-30 2022-06-30 Test method, test device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115114164A (en)

Similar Documents

Publication Publication Date Title
CN110442524B (en) Method and device for testing web service interface with authentication authorization
CN107896244B (en) Version file distribution method, client and server
CN107678949B (en) Automatic testing method for realizing different communication modes of embedded equipment
WO2023045849A1 (en) Software package processing method, apparatus, system, and device, and medium
CN110647332A (en) Software deployment method and device based on container cloud
CN113553257B (en) Test method, device, storage medium and electronic equipment
CN110659198A (en) Application program test case execution method and device and software test system
CN113434158A (en) User-defined management method, device, equipment and medium for big data component
CN113992514B (en) Method for rapidly realizing data acquisition instrument protocol by zero code and data acquisition instrument terminal
CN112631919A (en) Comparison test method and device, computer equipment and storage medium
CN111026439A (en) Application program compatibility method, device, equipment and computer storage medium
CN116069341A (en) Automatic deployment method, equipment and storage medium for application program
CN113687858A (en) Configuration file checking method and device, electronic equipment and storage medium
CN115437915A (en) Vehicle-based version testing method and device and electronic equipment
CN112988588B (en) Client software debugging method and device, storage medium and electronic equipment
CN108170588B (en) Test environment construction method and device
CN113220337A (en) Version construction method and device, computer equipment and storage medium
CN115129574A (en) Code testing method and device
CN115114164A (en) Test method, test device, electronic equipment and storage medium
CN107247661B (en) Method and system for supporting automatic verification of installation package of application
CN115952089A (en) Software automation unit testing method and device, server and storage medium
CN111580789B (en) Function block frame generation
CN114297088A (en) Method, device, equipment and medium for testing front end vue frame assembly
CN112543104A (en) Application program packaging method and device, electronic equipment and storage medium
CN112433938A (en) Method and device for testing application of mobile terminal

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