WO2018184420A1 - Software testing method, apparatus, electronic device, and medium - Google Patents

Software testing method, apparatus, electronic device, and medium Download PDF

Info

Publication number
WO2018184420A1
WO2018184420A1 PCT/CN2018/074874 CN2018074874W WO2018184420A1 WO 2018184420 A1 WO2018184420 A1 WO 2018184420A1 CN 2018074874 W CN2018074874 W CN 2018074874W WO 2018184420 A1 WO2018184420 A1 WO 2018184420A1
Authority
WO
WIPO (PCT)
Prior art keywords
buried point
data
software
buried
mongodb database
Prior art date
Application number
PCT/CN2018/074874
Other languages
French (fr)
Chinese (zh)
Inventor
陈奕玲
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2018184420A1 publication Critical patent/WO2018184420A1/en

Links

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/362Software debugging
    • G06F11/3636Software debugging by tracing the execution of the program
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics

Definitions

  • the present application belongs to the field of computer information processing technologies, and in particular, to a software testing method, device, electronic device and medium.
  • the number of buried data received by the server is large and repeated, and the developer performs fixed point searching and analysis.
  • the testing process is cumbersome and the workload is large, and the testing time is long and the labor cost is high.
  • special analysis software such as Python software
  • the dedicated analysis software such as Python software
  • the professional training can complete the software testing process, and there is a problem of high labor costs.
  • the present application provides a software testing method, device, electronic device and medium to solve the problem of cumbersome work and large workload in the existing software testing process.
  • a first aspect of the embodiments of the present application provides a software testing method, including:
  • Running the software to be tested on the client includes at least one function module, and each function module is provided with at least one buried point;
  • the buried point on the software to be tested When the buried point on the software to be tested is triggered, generating buried point data, and transmitting the buried point data to a MongoDB database;
  • the buried point data includes a buried point ID, a test check code, and parameter information. ;
  • the awk script configured on the MongoDB database obtains the buried data of the test verification code as a failure, and is determined as the data to be analyzed;
  • the parameter information in the data to be analyzed is analyzed by using a preset analysis algorithm to obtain an analysis result that causes the buried point test to fail.
  • a second aspect of the embodiments of the present application provides a software testing apparatus, including:
  • a software running module configured to run the software to be tested on the client, where the software to be tested includes at least one functional module, and each functional module is provided with at least one buried point;
  • a buried point data generating module configured to generate buried point data when the buried point on the software to be tested is triggered, and send the buried point data to a MongoDB database;
  • the buried point data includes a buried point ID , test verification code and parameter information;
  • the data analysis module to be analyzed is configured to enable the awk script configured on the MongoDB database to obtain the buried data of the test verification code as a failure, and determine the data to be analyzed;
  • the analysis result obtaining module is configured to analyze the parameter information in the data to be analyzed by using a preset analysis algorithm, and obtain an analysis result that causes the buried point test to fail.
  • a third aspect of the embodiments of the present application provides an electronic device including a memory and a processor, wherein the memory stores computer readable instructions executable on the processor, the processor executing the computer The following steps are implemented when reading the instruction:
  • Running the software to be tested on the client includes at least one function module, and each function module is provided with at least one buried point;
  • the buried point on the software to be tested When the buried point on the software to be tested is triggered, generating buried point data, and transmitting the buried point data to a MongoDB database;
  • the buried point data includes a buried point ID, a test check code, and parameter information. ;
  • the awk script configured on the MongoDB database obtains the buried data of the test verification code as a failure, and is determined as the data to be analyzed;
  • the parameter information in the data to be analyzed is analyzed by using a preset analysis algorithm to obtain an analysis result that causes the buried point test to fail.
  • a fourth aspect of the embodiments of the present application provides a computer readable storage medium storing computer readable instructions that, when executed by a processor, implement the following steps:
  • Running the software to be tested on the client includes at least one function module, and each function module is provided with at least one buried point;
  • the buried point on the software to be tested When the buried point on the software to be tested is triggered, generating buried point data, and transmitting the buried point data to a MongoDB database;
  • the buried point data includes a buried point ID, a test check code, and parameter information. ;
  • the awk script configured on the MongoDB database obtains the buried data of the test verification code as a failure, and is determined as the data to be analyzed;
  • the parameter information in the data to be analyzed is analyzed by using a preset analysis algorithm to obtain an analysis result that causes the buried point test to fail.
  • the MongoDB database is used to store the embedded data triggered by the client running the software to be tested.
  • the MongoDB database is an open source document-oriented database, and the stored buried point data is not limited by the storage table, and the flexibility is Stronger.
  • the awk script configured on the MongoDB database analyzes the buried data to obtain all the buried data that failed the test verification code as the data to be analyzed.
  • the awk script has the advantages of low threshold, simple positioning and fast data processing efficiency. Direct operation of buried data in the MongoDB database without cumbersome installation and configuration.
  • the preset analysis algorithm is used to analyze the parameter information in the analysis data to obtain the analysis result that causes the buried point test to fail, and the analysis result can visually display the influence of each parameter information on the test failure of the function module of the buried point, so as to facilitate Improve the software to be tested.
  • Embodiment 1 is a flow chart of a software testing method in Embodiment 1 of the present application.
  • FIG. 2 is a schematic block diagram of a software testing device in Embodiment 2 of the present application.
  • Embodiment 3 is a schematic diagram of an electronic device in Embodiment 3 of the present application.
  • FIG. 1 shows a flow chart of a software testing method in this embodiment.
  • the software test method is coordinated by the client and the server to complete the testing process of the software to be tested.
  • the client and the server may be connected through a wireless network such as a WiFi network, a 3G network, or a 4G network, or may be connected through a wired network.
  • the client can be a terminal that can be connected to the server, such as a smartphone, a notebook, a tablet, a PAD, or a desktop computer, to which the software to be tested is installed.
  • the software testing method includes the following steps:
  • the software to be tested is installed and run on the client, and the software to be tested is provided with at least one function module, and each function module is provided with at least one buried point, and when the client runs the corresponding software to be tested When the function module is used, the buried point on the function module is triggered.
  • the buried point data is generated, and the buried point data is sent to the MongoDB database; the buried point data includes the buried point ID, the test check code, and the parameter information.
  • the generated buried point data can reflect the test result, so as to analyze and improve based on the buried point data, and improve the user's satisfaction with the software to be tested.
  • a financial product APP including a user login module, a product inquiry module, an upload product, and a payment module
  • the user login module includes a user registration, a login interface, a retrieval of a user name, or a password recovery, etc.
  • Program codes such as user registration, login interface, retrieving user name or retrieving passwords are provided with a buried point.
  • the buried point ID is used to uniquely identify the identifier of the buried point, and the identifier is numbered according to a preset numbering rule.
  • the number of the function module ID + serial number may be numbered. For example, in the above-mentioned wealth management product APP, if the function module ID of the user login module is X1, and the function module ID registered by the user is X101, the available X10101 indicates the first buried point set in the user registration program code.
  • the test verification code is used to mark whether the program code test corresponding to the buried point is successful, including two test verification codes, success and failure.
  • the test verification code can be represented by two letters Y and N, respectively, and can also be represented by other codes.
  • the test verification code distinguishes whether the program code test corresponding to the buried point is successful. Based on the test verification code, all the buried point data can be divided into two types, and the buried check data of the test is verified by the test verification code, without special Regular troubleshooting by developers can reduce the workload of the testing process to a certain extent, reduce testing time and save labor costs.
  • the parameter information is used to objectively reflect the operating environment of the program code where the buried point is located, which is closely related to the success of the software test to be tested.
  • the parameter information includes at least one of a device model, a device configuration, a trigger time, a network type, a network bandwidth, and a network bandwidth time delay product.
  • the device model is an internal number of the client on which the software to be tested is installed, and the device model is associated with the performance of the client.
  • each smart phone manufacturer distinguishes different versions of smart phones, such as iphone4 and iphone5, by the device model when producing the corresponding brand of smart phones.
  • the device configuration may be an operating system installed on the client, such as an Android system, an IOS operating system, a Windows system, a Linux system, or the like, or may be a processor or other hardware model installed on the client, such as an i5 or i7 processor.
  • the triggering time may be the time for running the software to be tested, and the triggering time is related to the running network of the client.
  • the failure rate of the software to be tested at the peak of the network is higher than the failure rate of the software to be tested under the low peak of the network.
  • the network type is the network used by the client to communicate with the server, and may be a wired network, or a wireless network such as a WiFi network, a 3G network, or a 4G network.
  • Network bandwidth is the amount of data transmitted per unit time, that is, the data transmission rate.
  • the network bandwidth time delay product is the maximum number of bits on the link.
  • the buried point data sent by the client is directly stored in the MongoDB database, and the MongoDB database is an open source and document-oriented database, which is more flexible than the relational database stored in a table structure such as SQL.
  • the analysis of the buried point data stored in the MongoDB database is implemented.
  • the awk script configured on the MongoDB database obtains the test verification code as the failed buried point data, and determines the data to be analyzed.
  • awk script is a powerful text analysis tool, which can read all the buried data stored in the MongoDB database line by line, and then separate the buried data with spaces or other default separators, and separate the separated content. Analytical processing.
  • the awk script configured on the MongoDB database is used to analyze all the buried data, and the test verification code is the failed buried point data, and the data is determined as the data to be analyzed, so as to determine the buried point based on the data to be analyzed.
  • the reason for the failure of the program code test is to improve the software to be tested based on the cause of the failure.
  • the awk script can be used to directly determine the test verification code as the data to be analyzed as the data to be analyzed without installing other operating environments, and has the advantages of low threshold, simple positioning, and fast data processing efficiency.
  • the cumbersome installation and configuration also eliminates the need for professionals with strong code capabilities to complete the test, further reducing the labor cost of the software testing process under test.
  • the awk script configured on the MongoDB database first determines all the buried data that failed the test verification code as the data to be analyzed, and does not require a dedicated developer to periodically check the workload, which can reduce the workload during the test to a certain extent. , saving labor costs.
  • the preset analysis algorithm to analyze the parameter information in all the data to be analyzed, the reason for the failure of the program code corresponding to the buried point can be obtained, so as to form the analysis result, the analysis process is automated, and the configuration expert is not required to analyze, which is beneficial to the analysis. Reduce the cost of analysis.
  • the preset analysis algorithm includes a work breakdown structure algorithm, a resource decomposition structure algorithm, or an organization decomposition structure algorithm.
  • Work Breakdown Structure (Work Breakdowm Structure, referred to as WBS) algorithm is a deliverable-oriented grouping of project elements. It summarizes and defines the entire scope of work of the project. Each drop represents a more detailed definition of the project work.
  • Resource decomposition structure (Resouree Breakdowm Structure (RBS) algorithm is a resource hierarchy structure according to the type and form of resources. It is a kind of project decomposition structure, through which it can make schedules on the details of resource requirements, and can be aggregated to higher levels.
  • RBS Resource decomposition structure
  • One layer summarizes resource requirements and resource availability.
  • Organizational decomposition structure (Organizational Breakdowm Structure (OBS) algorithm is an extraordinary form of project organization chart. It describes the specific organizational unit responsible for each project activity. It is a project that links work packages to relevant departments or units in a hierarchical and systematic manner. Organize the graphics.
  • OBS Organizational Breakdowm Structure
  • the Work Breakdow Structure (WBS) algorithm divides all parameter information into device model, device configuration, trigger time, network type, network bandwidth, and network bandwidth delay according to a certain classification principle.
  • Product and other major categories then subdivide each major class into several sub-categories, and then further subdivide each sub-category into several groups... and so on, to divide all parameter information into non-reclassifiable categories.
  • the category is then determined whether the parameter information of each classification category is associated with the test failure of the software to be tested, and the purpose thereof is clear, so as to avoid missing relevant parameter information that affects the success or failure of the corresponding functional module test of the software under test during the analysis.
  • each non-re-divided classification category corresponds to a category ID; the control variable method may be used to determine whether the parameter information corresponding to each classification category ID is associated with the test failure of the software to be tested, to determine the impact on the successful operation of the software to be tested. Phase difference parameter information.
  • the MongoDB database is used to store the buried point data triggered by the client running the software to be tested, and the MongoDB database is an open source document-oriented database, and the stored buried point data is not stored in the table.
  • the restrictions are more flexible.
  • the awk script configured on the MongoDB database analyzes the buried data to obtain all the buried data that failed the test verification code as the data to be analyzed.
  • the awk script has the advantages of low threshold, simple positioning and fast data processing efficiency. Direct operation of buried data in the MongoDB database without cumbersome installation and configuration.
  • the preset analysis algorithm is used to analyze the parameter information in the analysis data to obtain the analysis result that causes the buried point test to fail, and the analysis result can visually display the influence of each parameter information on the test failure of the function module of the buried point, so as to facilitate Improve the software to be tested.
  • the embedded point data generated by the trigger needs to be sent to the corresponding MongoDB database, and corresponding configuration is needed to ensure that the buried point data is directly sent to MongoDB.
  • the database and the awk script analyze the buried data in the MongoDB database. Therefore, in the software testing method, before step S10, the following steps are further included:
  • S01 Install the MongoDB database on the server, complete the information configuration of the MongoDB database and the server, so that the MongoDB database can monitor and acquire the buried data in real time.
  • the MongoDB database installer on the server and run the mongod command to install the MongoDB database on the server. Then create a data directory on the server and start the server, waiting for the server to connect to the client. Mongod generally defaults to the data directory /data/db without parameters. If it does not exist, it will fail to start. In this embodiment, the data directory is created as mkdir-p/data/db. Then configure the 27017 port of the MongoDB database to listen to the server, configure the port 28017 to listen for HTTP requests, and when the client accesses http://server address 28017, the client and server are connected.
  • step S01 the information configuration between the MongoDB database and the server is completed. Since the MongoDB database supports storing data of relatively complex data types, the MongoDB database can monitor the http request received by the server in real time, when the client uploads the buried data server. Can be stored directly in the MongoDB database, no need to convert to a storage table structure and then store.
  • the awk script is preset to obtain the test verification code as the failed buried point data to determine the data to be analyzed, and the awk script has the advantages of low threshold and simple positioning, and does not require special test personnel to check the point, which is beneficial to improve the test. effectiveness.
  • the awk script periodically acquires the test verification code as the failed buried point data and analyzes it by using a preset analysis algorithm, and can obtain the analysis result periodically; without manual monitoring.
  • the software testing method further includes the following steps:
  • S50 Receive a query instruction sent by the client to the server through the client, and the query instruction includes a buried point ID.
  • the client (such as a tester or a developer) may input a query instruction to the client, and after receiving the query instruction, the client sends the query command to the server.
  • the query instruction may include only one buried point ID to query parameter information of a program code that affects a specific buried point, or may be a function module ID, and the function module includes at least one buried point ID to query parameters affecting a specific function module. information.
  • S60 Acquire a query result corresponding to the buried point ID based on the query instruction.
  • the query result is an analysis result corresponding to the buried point ID.
  • the MongoDB database on the server may obtain an analysis result that analyzes all data to be analyzed corresponding to the buried point ID in the query instruction by using a preset analysis algorithm, and uses the analysis result as a query.
  • the result is output.
  • the client displays the query result, so that the client can improve the program code or function module corresponding to the buried point ID based on the query result.
  • the document-oriented MongoDB database and the awk script that is good at processing the document row and column can cooperate to directly filter, compare, and count all the buried data uploaded to the MongoDB database. , timing output or loop output operations.
  • the software testing method can be based on the original development environment of the client, without changing the running environment of the client, realizing uploading the buried data to the real-time or batch in batch without sacrificing the user experience and delaying the data request.
  • the server's MongoDB database is lightweight, simple, and portable.
  • FIG. 2 shows a schematic block diagram of the software testing device in this embodiment.
  • the software testing device includes a client and a server, and cooperates with the client and the server to complete the testing process of the software to be tested.
  • the client and the server may be connected through a wireless network such as a WiFi network, a 3G network, or a 4G network, or may be connected through a wired network.
  • the client can be a terminal that can be connected to the server, such as a smartphone, a notebook, a tablet, a PAD, or a desktop computer, to which the software to be tested is installed. As shown in FIG.
  • the software testing device includes a software running module 10, a buried point data generating module 20, a data to be analyzed determining module 30, an analysis result obtaining module 40, an information configuration module 50, a query instruction receiving module 60, and a query result acquisition.
  • Module 70 the software running module 10.
  • the software running module 10 is configured to run the software to be tested on the client.
  • the software to be tested includes at least one functional module, and each functional module is provided with at least one buried point.
  • the software to be tested is installed and run on the client, and the software to be tested is provided with at least one function module, and each function module is provided with at least one buried point, and when the client runs the corresponding software to be tested When the function module is used, the buried point on the function module is triggered.
  • the buried point data generating module 20 is configured to generate buried point data when the buried point on the software to be tested is triggered, and send the buried point data to the MongoDB database; the buried point data includes a buried point ID, a test check code, and a parameter. information.
  • the generated buried point data can reflect the test result, so as to analyze and improve based on the buried point data, and improve the user's satisfaction with the software to be tested.
  • a financial product APP including a user login module, a product inquiry module, an upload product, and a payment module
  • the user login module includes a user registration, a login interface, a retrieval of a user name, or a password recovery, etc.
  • Program codes such as user registration, login interface, retrieving user name or retrieving passwords are provided with a buried point.
  • the buried point ID is used to uniquely identify the identifier of the buried point, and the identifier is numbered according to a preset numbering rule.
  • the number of the function module ID + serial number may be numbered. For example, in the above-mentioned wealth management product APP, if the function module ID of the user login module is X1, and the function module ID registered by the user is X101, the available X10101 indicates the first buried point set in the user registration program code.
  • the test verification code is used to mark whether the program code test corresponding to the buried point is successful, including two test verification codes, success and failure.
  • the test verification code can be represented by two letters Y and N, respectively, and can also be represented by other codes.
  • the test verification code distinguishes whether the program code test corresponding to the buried point is successful. Based on the test verification code, all the buried point data can be divided into two types, and the buried check data of the test is verified by the test verification code, without special Regular troubleshooting by developers can reduce the workload of the testing process to a certain extent, reduce testing time and save labor costs.
  • the parameter information is used to objectively reflect the operating environment of the program code where the buried point is located, which is closely related to the success of the software test to be tested.
  • the parameter information includes at least one of a device model, a device configuration, a trigger time, a network type, a network bandwidth, and a network bandwidth time delay product.
  • the device model is an internal number of the client on which the software to be tested is installed, and the device model is associated with the performance of the client.
  • each smart phone manufacturer distinguishes different versions of smart phones, such as iphone4 and iphone5, by the device model when producing the corresponding brand of smart phones.
  • the device configuration may be an operating system installed on the client, such as an Android system, an IOS operating system, a Windows system, a Linux system, or the like, or may be a processor or other hardware model installed on the client, such as an i5 or i7 processor.
  • the triggering time may be the time for running the software to be tested, and the triggering time is related to the running network of the client.
  • the failure rate of the software to be tested at the peak of the network is higher than the failure rate of the software to be tested under the low peak of the network.
  • the network type is the network used by the client to communicate with the server, and may be a wired network, or a wireless network such as a WiFi network, a 3G network, or a 4G network.
  • Network bandwidth is the amount of data transmitted per unit time, that is, the data transmission rate.
  • the network bandwidth time delay product is the maximum number of bits on the link.
  • the buried point data sent by the client is directly stored in the MongoDB database, and the MongoDB database is an open source and document-oriented database, which is more flexible than the relational database stored in a table structure such as SQL.
  • the analysis of the buried point data stored in the MongoDB database is implemented.
  • the to-be-analyzed data determining module 30 is configured to enable the awk script configured on the MongoDB database to obtain the test verification code as the failed buried point data, and determine the data to be analyzed.
  • awk script is a powerful text analysis tool, which can read all the buried data stored in the MongoDB database line by line, and then separate the buried data with spaces or other default separators, and separate the separated content. Analytical processing.
  • the awk script configured on the MongoDB database is used to analyze all the buried data, and the test verification code is the failed buried point data, and the data is determined as the data to be analyzed, so as to determine the buried point based on the data to be analyzed.
  • the reason for the failure of the program code test is to improve the software to be tested based on the cause of the failure.
  • the awk script can be used to directly determine the test verification code as the data to be analyzed as the data to be analyzed without installing other operating environments, and has the advantages of low threshold, simple positioning, and fast data processing efficiency.
  • the cumbersome installation and configuration also eliminates the need for professionals with strong code capabilities to complete the test, further reducing the labor cost of the software testing process under test.
  • the analysis result obtaining module 40 is configured to analyze the parameter information in the analysis data by using a preset analysis algorithm, and obtain an analysis result that causes the buried point test to fail.
  • the awk script configured on the MongoDB database first determines all the buried data that failed the test verification code as the data to be analyzed, and does not require a dedicated developer to periodically check the workload, which can reduce the workload during the test to a certain extent. , saving labor costs.
  • the preset analysis algorithm to analyze the parameter information in all the data to be analyzed, the reason for the failure of the program code corresponding to the buried point can be obtained, so as to form the analysis result, the analysis process is automated, and the configuration expert is not required to analyze, which is beneficial to the analysis. Reduce the cost of analysis.
  • the preset analysis algorithm includes a work breakdown structure algorithm, a resource decomposition structure algorithm, or an organization decomposition structure algorithm.
  • Work Breakdown Structure (Work Breakdowm Structure, referred to as WBS) algorithm is a deliverable-oriented grouping of project elements. It summarizes and defines the entire scope of work of the project. Each drop represents a more detailed definition of the project work.
  • Resource decomposition structure (Resouree Breakdowm Structure (RBS) algorithm is a resource hierarchy structure according to the type and form of resources. It is a kind of project decomposition structure, through which it can make schedules on the details of resource requirements, and can be aggregated to higher levels.
  • RBS Resource decomposition structure
  • One layer summarizes resource requirements and resource availability.
  • Organizational decomposition structure (Organizational Breakdowm Structure (OBS) algorithm is an extraordinary form of project organization chart. It describes the specific organizational unit responsible for each project activity. It is a project that links work packages to relevant departments or units in a hierarchical and systematic manner. Organize the graphics.
  • OBS Organizational Breakdowm Structure
  • the Work Breakdow Structure (WBS) algorithm divides all parameter information into device model, device configuration, trigger time, network type, network bandwidth, and network bandwidth delay according to a certain classification principle.
  • Product and other major categories then subdivide each major class into several sub-categories, and then further subdivide each sub-category into several groups... and so on, to divide all parameter information into non-reclassifiable categories.
  • the category is then determined whether the parameter information of each classification category is associated with the test failure of the software to be tested, and the purpose thereof is clear, so as to avoid missing relevant parameter information that affects the success or failure of the corresponding functional module test of the software under test during the analysis.
  • each non-re-divided classification category corresponds to a category ID; the control variable method may be used to determine whether the parameter information corresponding to each classification category ID is associated with the test failure of the software to be tested, to determine the impact on the successful operation of the software to be tested. Phase difference parameter information.
  • the MongoDB database is used to store the embedded data triggered by the client running the software to be tested.
  • the MongoDB database is an open source document-oriented database, and the stored buried point data is not stored in the table. The restrictions are more flexible.
  • the awk script configured on the MongoDB database analyzes the buried data to obtain all the buried data that failed the test verification code as the data to be analyzed.
  • the awk script has the advantages of low threshold, simple positioning and fast data processing efficiency. Direct operation of buried data in the MongoDB database without cumbersome installation and configuration.
  • the preset analysis algorithm is used to analyze the parameter information in the analysis data to obtain the analysis result that causes the buried point test to fail, and the analysis result can visually display the influence of each parameter information on the test failure of the function module of the buried point, so as to facilitate Improve the software to be tested.
  • the software testing device when the buried point data on the software to be tested is triggered, the embedded point data generated by the trigger needs to be sent to the corresponding MongoDB database, and corresponding configuration is needed to ensure that the buried point data is directly sent to MongoDB.
  • the database and the awk script analyze the buried data in the MongoDB database. Therefore, the software testing device also includes an information configuration module 50.
  • the information configuration module 50 is configured to install the MongoDB database on the server, complete the information configuration of the MongoDB database and the server, so that the MongoDB database monitors and acquires the buried point data in real time.
  • the MongoDB database installer on the server and run the mongod command to install the MongoDB database on the server. Then create a data directory on the server and start the server, waiting for the server to connect to the client. Mongod generally defaults to the data directory /data/db without parameters. If it does not exist, it will fail to start. In this embodiment, the data directory is created as mkdir-p/data/db. Then configure the 27017 port of the MongoDB database to listen to the server, configure the port 28017 to listen for HTTP requests, and when the client accesses http://server address 28017, the client and server are connected.
  • the information configuration module 50 can complete the information configuration between the MongoDB database and the server. Since the MongoDB database supports storing data of relatively complex data types, the MongoDB database can monitor the http request received by the server in real time, and the client uploads the buried data server. It can be stored directly in the MongoDB database without being converted to a storage table structure for storage.
  • the information configuration module 50 is further configured to set the awk script to periodically acquire the test verification code as the failed buried point data.
  • the awk script is preset to obtain the test verification code as the failed buried point data to determine the data to be analyzed, and the awk script has the advantages of low threshold and simple positioning, and does not require special test personnel to check the point, which is beneficial to improve the test. effectiveness.
  • the awk script periodically acquires the test verification code as the failed buried point data and analyzes it by using a preset analysis algorithm, and can obtain the analysis result periodically; without manual monitoring.
  • the software testing device further includes a query instruction receiving module 60 and a query result obtaining module 70.
  • the query instruction receiving module 60 is configured to receive a query instruction sent by the client to the server through the client, and the query instruction includes a buried point ID.
  • the client (such as a tester or a developer) may input a query instruction to the client, and after receiving the query instruction, the client sends the query command to the server.
  • the query instruction may include only one buried point ID to query parameter information of a program code that affects a specific buried point, or may be a function module ID, and the function module includes at least one buried point ID to query parameters affecting a specific function module. information.
  • the query result obtaining module 70 is configured to obtain a query result corresponding to the buried point ID based on the query instruction.
  • the query result is an analysis result corresponding to the buried point ID.
  • the MongoDB database on the server may obtain an analysis result that analyzes all data to be analyzed corresponding to the buried point ID in the query instruction by using a preset analysis algorithm, and uses the analysis result as a query.
  • the result is output.
  • the client displays the query result, so that the client can improve the program code or function module corresponding to the buried point ID based on the query result.
  • the software testing device adopts a document-oriented MongoDB database and an awk script that is good at processing document rows and columns, and can directly filter, compare, and count all buried data uploaded to the MongoDB database. , timing output or loop output operations.
  • the software testing device can be based on the original development environment of the client, without changing the operating environment of the client, realizing uploading the buried data to the real-time or batch in batch without sacrificing the user experience and delaying the data request.
  • the server's MongoDB database is lightweight, simple, and portable.
  • FIG. 3 is a schematic diagram of an electronic device according to an embodiment of the present application.
  • the electronic device 3 of this embodiment includes a processor 30 and a memory 31 in which are stored computer readable instructions 32, such as software test programs, executable on the processor 30.
  • the processor 30 executes the computer readable instructions 32 to implement the steps in the various software test method embodiments described above, such as steps 10 through 40 shown in FIG.
  • the processor 30 executes the computer readable instructions 32
  • the functions of the modules/units in the various apparatus embodiments described above are implemented, such as the functions of the modules 10 to 70 shown in FIG.
  • the computer readable instructions 32 may be partitioned into one or more modules/units that are stored in the memory 31 and executed by the processor 30, To complete this application.
  • the one or more modules/units may be a series of computer readable instruction segments capable of performing a particular function, the instruction segments being used to describe the execution of the computer readable instructions 32 in the electronic device 3.
  • the electronic device 3 can be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the electronic device may include, but is not limited to, the processor 30, the memory 31. It will be understood by those skilled in the art that FIG. 3 is merely an example of the electronic device 3 and does not constitute a limitation on the electronic device 3, and may include more or less components than those illustrated, or combine some components, or different components.
  • the electronic device may further include an input and output device, a network access device, a bus, and the like.
  • the so-called processor 30 can be a central processing unit (Central Processing Unit, CPU), can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the memory 31 may be an internal storage unit of the electronic device 3, such as a hard disk or a memory of the electronic device 3.
  • the memory 31 may also be an external storage device of the electronic device 3, such as a plug-in hard disk equipped on the electronic device 3, a smart memory card (SMC), and a secure digital (SD). Card, flash card (Flash Card) and so on.
  • the memory 31 may also include both an internal storage unit of the electronic device 3 and an external storage device.
  • the memory 31 is configured to store the computer readable instructions and other programs and data required by the electronic device.
  • the memory 31 can also be used to temporarily store data that has been output or is about to be output.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Landscapes

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

Abstract

Provided in the present solution are a software testing method, an apparatus, an electronic device, and a medium, for use in the technical field of computer information processing, the method comprising: running software to be tested on a client terminal, the software to be tested comprising at least one function module, each function module being provided with at least one buried point; when a buried point on the software to be tested is triggered, generating buried point data and sending the buried point data to a MongoDB database; the buried point data comprises buried point ID, a testing verification code, and parameter information; making an awk script configured on the MongoDB database acquire the test verification code as failed buried point data, and determine same as data to be analysed; and, using a preset analysis algorithm, analysing the parameter information in the data to be analysed in order to acquire analysis results of the cause of the buried point test failure. The present solution uses a MongoDB database to store buried point data, and is therefore more flexible; using an awk script to analyse buried point data in order to acquire data to be analysed has the advantages of a low threshold, simple positioning, and rapid data processing efficiency.

Description

软件测试方法、装置、电子设备及介质Software testing method, device, electronic device and medium
本申请要求于2017年04月06日提交中国专利局、申请号为201710221079.4 、发明名称为“软件测试方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims the priority of the Chinese Patent Application, the entire disclosure of which is hereby incorporated by reference.
技术领域Technical field
本申请属于计算机信息处理技术领域,尤其涉及一种软件测试方法、装置、电子设备及介质。The present application belongs to the field of computer information processing technologies, and in particular, to a software testing method, device, electronic device and medium.
背景技术Background technique
随着计算机技术的迅速发展,具有文本编辑、图像处理、语音聊天、播放音视频等功能的各种软件层出不穷,为了保证软件各功能模块能够正常工作,需在软件发布之前,对软件各功能模块进行测试。现有软件测试方法中,在软件的各功能模块上分别设置至少一个埋点,当用户使用到某一功能模块时,会触发预设在该功能模块中的埋点,产生埋点数据并发送给服务器,服务器收集并分析对应的埋点数据,以查找出该软件运行过程中,容易出错的功能模块,并加以改进,从而达到完善软件的目的。With the rapid development of computer technology, various softwares with functions such as text editing, image processing, voice chat, and playing audio and video are emerging one after another. In order to ensure that all functional modules of the software can work normally, it is necessary to implement various functional modules of the software before the software is released. carry out testing. In the existing software testing method, at least one buried point is respectively set on each functional module of the software. When the user uses a certain functional module, the buried point preset in the functional module is triggered, and the buried point data is generated and sent. The server and the server collect and analyze the corresponding buried point data to find out the function modules that are error-prone during the running of the software, and improve them to achieve the purpose of perfecting the software.
现有软件测试方法中,服务器接收到的埋点数据数量庞大且重复,由开发人员进行定点查找并分析,测试过程工作繁琐且工作量大,存在测试时间较长且人力成本高的问题。若采用专用分析软件(如Python软件)分析埋点数据,虽在一定程度上降低测试过程的工作量,但专用分析软件(如Python软件)需进行繁琐安装和配置,且需有代码能力较强的专业人员配合才可以完成软件测试过程,存在人力成本较高的问题。In the existing software testing method, the number of buried data received by the server is large and repeated, and the developer performs fixed point searching and analysis. The testing process is cumbersome and the workload is large, and the testing time is long and the labor cost is high. If special analysis software (such as Python software) is used to analyze the buried data, although the workload of the test process is reduced to a certain extent, the dedicated analysis software (such as Python software) needs to be cumbersomely installed and configured, and requires strong code capability. The professional training can complete the software testing process, and there is a problem of high labor costs.
技术问题technical problem
有鉴于此,本申请提供了一种软件测试方法、装置、电子设备及介质,以解决现有软件测试过程中工作繁琐且工作量大的问题。In view of this, the present application provides a software testing method, device, electronic device and medium to solve the problem of cumbersome work and large workload in the existing software testing process.
技术解决方案Technical solution
本申请实施例的第一方面提供了一种软件测试方法,包括:A first aspect of the embodiments of the present application provides a software testing method, including:
在客户端上运行待测软件,所述待测软件包括至少一个功能模块,每一功能模块上设有至少一个埋点;Running the software to be tested on the client, the software to be tested includes at least one function module, and each function module is provided with at least one buried point;
当所述待测软件上的所述埋点被触发时,生成埋点数据,并将所述埋点数据发送给MongoDB数据库;所述埋点数据包括埋点ID、测试校验代码和参数信息;When the buried point on the software to be tested is triggered, generating buried point data, and transmitting the buried point data to a MongoDB database; the buried point data includes a buried point ID, a test check code, and parameter information. ;
使MongoDB数据库上配置的awk脚本获取测试校验代码为失败的所述埋点数据,确定为待分析数据;The awk script configured on the MongoDB database obtains the buried data of the test verification code as a failure, and is determined as the data to be analyzed;
采用预设分析算法对所述待分析数据中的参数信息进行分析,获取导致所述埋点测试失败的分析结果。The parameter information in the data to be analyzed is analyzed by using a preset analysis algorithm to obtain an analysis result that causes the buried point test to fail.
本申请实施例的第二方面提供了一种软件测试装置,包括:A second aspect of the embodiments of the present application provides a software testing apparatus, including:
软件运行模块,用于在客户端上运行待测软件,所述待测软件包括至少一个功能模块,每一功能模块上设有至少一个埋点;a software running module, configured to run the software to be tested on the client, where the software to be tested includes at least one functional module, and each functional module is provided with at least one buried point;
埋点数据生成模块,用于当所述待测软件上的所述埋点被触发时,生成埋点数据,并将所述埋点数据发送给MongoDB数据库;所述埋点数据包括埋点ID、测试校验代码和参数信息;a buried point data generating module, configured to generate buried point data when the buried point on the software to be tested is triggered, and send the buried point data to a MongoDB database; the buried point data includes a buried point ID , test verification code and parameter information;
待分析数据确定模块,用于使MongoDB数据库上配置的awk脚本获取测试校验代码为失败的所述埋点数据,确定为待分析数据;The data analysis module to be analyzed is configured to enable the awk script configured on the MongoDB database to obtain the buried data of the test verification code as a failure, and determine the data to be analyzed;
分析结果获取模块,用于采用预设分析算法对所述待分析数据中的参数信息进行分析,获取导致所述埋点测试失败的分析结果。The analysis result obtaining module is configured to analyze the parameter information in the data to be analyzed by using a preset analysis algorithm, and obtain an analysis result that causes the buried point test to fail.
本申请实施例的第三方面提供了一种电子设备,包括存储器以及处理器,所述存储器中存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:A third aspect of the embodiments of the present application provides an electronic device including a memory and a processor, wherein the memory stores computer readable instructions executable on the processor, the processor executing the computer The following steps are implemented when reading the instruction:
在客户端上运行待测软件,所述待测软件包括至少一个功能模块,每一功能模块上设有至少一个埋点;Running the software to be tested on the client, the software to be tested includes at least one function module, and each function module is provided with at least one buried point;
当所述待测软件上的所述埋点被触发时,生成埋点数据,并将所述埋点数据发送给MongoDB数据库;所述埋点数据包括埋点ID、测试校验代码和参数信息;When the buried point on the software to be tested is triggered, generating buried point data, and transmitting the buried point data to a MongoDB database; the buried point data includes a buried point ID, a test check code, and parameter information. ;
使MongoDB数据库上配置的awk脚本获取测试校验代码为失败的所述埋点数据,确定为待分析数据;The awk script configured on the MongoDB database obtains the buried data of the test verification code as a failure, and is determined as the data to be analyzed;
采用预设分析算法对所述待分析数据中的参数信息进行分析,获取导致所述埋点测试失败的分析结果。The parameter information in the data to be analyzed is analyzed by using a preset analysis algorithm to obtain an analysis result that causes the buried point test to fail.
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如下步骤:A fourth aspect of the embodiments of the present application provides a computer readable storage medium storing computer readable instructions that, when executed by a processor, implement the following steps:
在客户端上运行待测软件,所述待测软件包括至少一个功能模块,每一功能模块上设有至少一个埋点;Running the software to be tested on the client, the software to be tested includes at least one function module, and each function module is provided with at least one buried point;
当所述待测软件上的所述埋点被触发时,生成埋点数据,并将所述埋点数据发送给MongoDB数据库;所述埋点数据包括埋点ID、测试校验代码和参数信息;When the buried point on the software to be tested is triggered, generating buried point data, and transmitting the buried point data to a MongoDB database; the buried point data includes a buried point ID, a test check code, and parameter information. ;
使MongoDB数据库上配置的awk脚本获取测试校验代码为失败的所述埋点数据,确定为待分析数据;The awk script configured on the MongoDB database obtains the buried data of the test verification code as a failure, and is determined as the data to be analyzed;
采用预设分析算法对所述待分析数据中的参数信息进行分析,获取导致所述埋点测试失败的分析结果。The parameter information in the data to be analyzed is analyzed by using a preset analysis algorithm to obtain an analysis result that causes the buried point test to fail.
有益效果Beneficial effect
本申请实施例中,采用MongoDB数据库存储客户端运行待测软件过程中触发形成的埋点数据,MongoDB数据库是开源的面向文档型数据库,其存储的埋点数据不受存储表的限制,灵活性更强。再通过MongoDB数据库上配置的awk脚本对埋点数据进行分析,以获取测试校验代码为失败的所有埋点数据确定为待分析数据,awk脚本具有门槛低、定位简单、数据处理效率快的优点,无需进行繁琐的安装和配置,即可对MongoDB数据库中的埋点数据直接操作。再采用预设分析算法对待分析数据中的参数信息进行分析,以获取导致埋点测试失败的分析结果,通过该分析结果可直观显示各参数信息对埋点所在功能模块测试失败的影响,以便于对待测软件进行改善。In the embodiment of the present application, the MongoDB database is used to store the embedded data triggered by the client running the software to be tested. The MongoDB database is an open source document-oriented database, and the stored buried point data is not limited by the storage table, and the flexibility is Stronger. Then the awk script configured on the MongoDB database analyzes the buried data to obtain all the buried data that failed the test verification code as the data to be analyzed. The awk script has the advantages of low threshold, simple positioning and fast data processing efficiency. Direct operation of buried data in the MongoDB database without cumbersome installation and configuration. Then, the preset analysis algorithm is used to analyze the parameter information in the analysis data to obtain the analysis result that causes the buried point test to fail, and the analysis result can visually display the influence of each parameter information on the test failure of the function module of the buried point, so as to facilitate Improve the software to be tested.
附图说明DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only the present application. For some embodiments, other drawings may be obtained from those of ordinary skill in the art in light of the inventive workability.
图1是本申请实施例1中软件测试方法的一流程图。1 is a flow chart of a software testing method in Embodiment 1 of the present application.
图2是本申请实施例2中软件测试装置的一原理框图。2 is a schematic block diagram of a software testing device in Embodiment 2 of the present application.
图3是本申请实施例3中电子设备的示意图。3 is a schematic diagram of an electronic device in Embodiment 3 of the present application.
本发明的实施方式Embodiments of the invention
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for purposes of illustration and description However, it will be apparent to those skilled in the art that the present invention may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the application.
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。In order to explain the technical solutions described in the present application, the following description will be made by way of specific embodiments.
实施例1Example 1
图1示出本实施例中的软件测试方法的一流程图。该软件测试方法由客户端和服务器配合,完成对待测软件的测试过程。其中,客户端与服务器之间可通过WiFi网络、3G网络或4G网络等无线网络通信相连,也可通过有线网络通信相连。客户端可以是安装有待测软件的智能手机、笔记本、平板电脑、PAD或台式电脑等可与服务器通信相连的终端。如图1所示,该软件测试方法包括如下步骤:FIG. 1 shows a flow chart of a software testing method in this embodiment. The software test method is coordinated by the client and the server to complete the testing process of the software to be tested. The client and the server may be connected through a wireless network such as a WiFi network, a 3G network, or a 4G network, or may be connected through a wired network. The client can be a terminal that can be connected to the server, such as a smartphone, a notebook, a tablet, a PAD, or a desktop computer, to which the software to be tested is installed. As shown in FIG. 1, the software testing method includes the following steps:
S10:在客户端上运行待测软件,待测软件包括至少一个功能模块,每一功能模块上设有至少一个埋点。S10: Running the software to be tested on the client, the software to be tested includes at least one function module, and each function module has at least one buried point.
具体地,在客户端上安装有待测软件并运行,该待测软件上设有至少一个功能模块,且每一功能模块上设有至少一个埋点,当客户端运行该待测软件的相应功能模块时,该功能模块上的埋点被触发。Specifically, the software to be tested is installed and run on the client, and the software to be tested is provided with at least one function module, and each function module is provided with at least one buried point, and when the client runs the corresponding software to be tested When the function module is used, the buried point on the function module is triggered.
S20:当待测软件上的埋点被触发时,生成埋点数据,并将埋点数据发送给MongoDB数据库;埋点数据包括埋点ID、测试校验代码和参数信息。S20: When the buried point on the software to be tested is triggered, the buried point data is generated, and the buried point data is sent to the MongoDB database; the buried point data includes the buried point ID, the test check code, and the parameter information.
具体地,当待测软件上的埋点被触发时,触发生成的埋点数据可体现其测试结果,以便基于该埋点数据进行分析并改进,提高用户对待测软件的满意度。如在一理财产品APP中,包括用户登录模块、产品查询模块、上传产品和支付模块等,且用户登录模块包括用户注册、登录界面、找回用户名或找回密码等程序代码,则可在用户注册、登录界面、找回用户名或找回密码等程序代码均设有埋点,当用户通过客户端运行待测软件,并执行用户注册、登录界面、找回用户名或找回密码等相应操作时,客户端分别生成埋点数据并将埋点数据发送给MongoDB数据库。Specifically, when the buried point on the software to be tested is triggered, the generated buried point data can reflect the test result, so as to analyze and improve based on the buried point data, and improve the user's satisfaction with the software to be tested. For example, in a financial product APP, including a user login module, a product inquiry module, an upload product, and a payment module, and the user login module includes a user registration, a login interface, a retrieval of a user name, or a password recovery, etc., Program codes such as user registration, login interface, retrieving user name or retrieving passwords are provided with a buried point. When the user runs the software to be tested through the client, and performs user registration, login interface, retrieved user name or retrieved password, etc. In the corresponding operation, the client generates the buried point data and sends the buried point data to the MongoDB database.
其中,埋点ID用于唯一识别埋点的标识,该标识按预设编号规则进行编号。本实施例中,可以按功能模块ID+序号这一预设编号规则进行编号,如上述理财产品APP中,若用户登录模块的功能模块ID为X1,且用户注册的功能模块ID为X101,则可用X10101表示设置在用户注册程序代码中设有的第一个埋点。The buried point ID is used to uniquely identify the identifier of the buried point, and the identifier is numbered according to a preset numbering rule. In this embodiment, the number of the function module ID + serial number may be numbered. For example, in the above-mentioned wealth management product APP, if the function module ID of the user login module is X1, and the function module ID registered by the user is X101, the available X10101 indicates the first buried point set in the user registration program code.
测试校验代码用于标注埋点对应的程序代码测试是否成功,包括成功和失败两种测试校验代码。本实施例中,测试校验代码可分别用Y和N两个字母表示,也可用其他代码表示。通过测试校验代码区分埋点对应的程序代码测试是否成功,基于测试校验代码可将所有埋点数据划分成两类,通过对测试校验代码为失败的埋点数据进行分析,无需专门的开发人员定时排查,可在一定程度上减轻测试过程的工作量,减少测试时间,节省人力成本。The test verification code is used to mark whether the program code test corresponding to the buried point is successful, including two test verification codes, success and failure. In this embodiment, the test verification code can be represented by two letters Y and N, respectively, and can also be represented by other codes. The test verification code distinguishes whether the program code test corresponding to the buried point is successful. Based on the test verification code, all the buried point data can be divided into two types, and the buried check data of the test is verified by the test verification code, without special Regular troubleshooting by developers can reduce the workload of the testing process to a certain extent, reduce testing time and save labor costs.
参数信息用于客观体现埋点所在的程序代码的运行环境,其与待测软件测试是否成功密切相关。具体地,参数信息包括设备型号、设备配置、触发时间、网络类型、网络带宽和网络宽带时延积中的至少一个。The parameter information is used to objectively reflect the operating environment of the program code where the buried point is located, which is closely related to the success of the software test to be tested. Specifically, the parameter information includes at least one of a device model, a device configuration, a trigger time, a network type, a network bandwidth, and a network bandwidth time delay product.
本实施例中,设备型号是安装有待测软件的客户端的内部编号,该设备型号与客户端的性能相关联。以智能手机为例,每一智能手机厂家在生产相应品牌的智能手机时,以设备型号来区分不同版本的智能手机,如iphone4、iphone5等。设备配置可以是客户端上安装的操作系统,如安卓系统、IOS操作系统、Windows系统、Linux系统等,或者可以是安装在客户端上的处理器或其他硬件的型号,如i5或i7处理器。触发时间可以是运行该待测软件的时间,该触发时间与客户端运行网络相关,一般情况下,在网络高峰触发待测软件的失败率会比在网络低峰触发待测软件的失败率高。网络类型是客户端与服务器通信所采用的网络,可以是有线网络,也可以是WiFi网络、3G网络或4G网络等无线网络。网络带宽是单位时间内传输的数据量,即数据传输率。网络宽带时延积是链路上最大比特数。In this embodiment, the device model is an internal number of the client on which the software to be tested is installed, and the device model is associated with the performance of the client. Taking smart phones as an example, each smart phone manufacturer distinguishes different versions of smart phones, such as iphone4 and iphone5, by the device model when producing the corresponding brand of smart phones. The device configuration may be an operating system installed on the client, such as an Android system, an IOS operating system, a Windows system, a Linux system, or the like, or may be a processor or other hardware model installed on the client, such as an i5 or i7 processor. . The triggering time may be the time for running the software to be tested, and the triggering time is related to the running network of the client. Generally, the failure rate of the software to be tested at the peak of the network is higher than the failure rate of the software to be tested under the low peak of the network. . The network type is the network used by the client to communicate with the server, and may be a wired network, or a wireless network such as a WiFi network, a 3G network, or a 4G network. Network bandwidth is the amount of data transmitted per unit time, that is, the data transmission rate. The network bandwidth time delay product is the maximum number of bits on the link.
进一步地,客户端发送的埋点数据直接存储在MongoDB数据库中,而MongoDB数据库是一种开源且面向文档型数据库,相比于SQL等表结构存储的关系型数据库,其灵活性更强,以便于实现对存储在MongoDB数据库中的埋点数据进行分析。Further, the buried point data sent by the client is directly stored in the MongoDB database, and the MongoDB database is an open source and document-oriented database, which is more flexible than the relational database stored in a table structure such as SQL. The analysis of the buried point data stored in the MongoDB database is implemented.
S30:使MongoDB数据库上配置的awk脚本获取测试校验代码为失败的埋点数据,确定为待分析数据。S30: The awk script configured on the MongoDB database obtains the test verification code as the failed buried point data, and determines the data to be analyzed.
其中,awk脚本是一种强大的文本分析工具,可对存储在MongoDB数据库中所有埋点数据逐行读入,再以空格或其他默认分隔符将埋点数据进行分隔,并对分隔的内容进行分析处理。本实施例中,采用MongoDB数据库上配置的awk脚本对所有埋点数据进行分析,获取测试校验代码为失败的埋点数据,将其确定为待分析数据,以便基于待分析数据确定导致埋点所在的程序代码测试失败的原因,以基于失败原因对待测软件进行改进。可以理解地,可直接采用awk脚本将测试校验代码为失败的埋点数据确定为待分析数据,而无需再安装其他运行环境,具有门槛低、定位简单、数据处理效率快的优点,无需进行繁琐安装和配置,也无需代码能力较强的专业人员配合完成测试,进一步降低待测软件测试过程的人力成本。Among them, awk script is a powerful text analysis tool, which can read all the buried data stored in the MongoDB database line by line, and then separate the buried data with spaces or other default separators, and separate the separated content. Analytical processing. In this embodiment, the awk script configured on the MongoDB database is used to analyze all the buried data, and the test verification code is the failed buried point data, and the data is determined as the data to be analyzed, so as to determine the buried point based on the data to be analyzed. The reason for the failure of the program code test is to improve the software to be tested based on the cause of the failure. It can be understood that the awk script can be used to directly determine the test verification code as the data to be analyzed as the data to be analyzed without installing other operating environments, and has the advantages of low threshold, simple positioning, and fast data processing efficiency. The cumbersome installation and configuration also eliminates the need for professionals with strong code capabilities to complete the test, further reducing the labor cost of the software testing process under test.
S40:采用预设分析算法对待分析数据中的参数信息进行分析,获取导致埋点测试失败的分析结果。S40: The parameter analysis information in the analysis data is analyzed by using a preset analysis algorithm, and the analysis result that causes the buried point test to fail is obtained.
具体地,MongoDB数据库上配置的awk脚本先将所有测试校验代码为失败的所有埋点数据确定为待分析数据,无需专门的开发人员定时排查,可在一定程度上减轻测试过程中的工作量,节省人力成本。采用预设分析算法对所有待分析数据中的参数信息进行分析,可获取导致该埋点对应的程序代码测试失败的原因,以形成分析结果,分析过程自动化,无需配置专业人员进行分析,有利于降低分析成本。Specifically, the awk script configured on the MongoDB database first determines all the buried data that failed the test verification code as the data to be analyzed, and does not require a dedicated developer to periodically check the workload, which can reduce the workload during the test to a certain extent. , saving labor costs. Using the preset analysis algorithm to analyze the parameter information in all the data to be analyzed, the reason for the failure of the program code corresponding to the buried point can be obtained, so as to form the analysis result, the analysis process is automated, and the configuration expert is not required to analyze, which is beneficial to the analysis. Reduce the cost of analysis.
具体地,预设分析算法包括工作分解结构算法、资源分解结构算法或组织分解结构算法。工作分解结构(Work Breakdowm Structure,简称WBS)算法以可交付成果为导向,对项目要素进行的分组,它归纳和定义了项目的整个工作范围,每下降一层代表对项目工作的更详细定义。资源分解结构(Resouree Breakdowm Structure,简称RBS)算法是按照资源种类和形式而划分的资源层级结构,它是项目分解结构的一种,通过它可以在资源需求细节上制定进度计划,并可以通过汇总的方式向更高一层汇总资源需求和资源可用性。组织分解结构(Organizational Breakdowm Structure,简称OBS)算法是项目组织结构图的一种非凡形式,描述负责每个项目活动的具体组织单元,它将工作包与相关部门或单位分层次、有条理地联系起来的一种项目组织安排图形。Specifically, the preset analysis algorithm includes a work breakdown structure algorithm, a resource decomposition structure algorithm, or an organization decomposition structure algorithm. Work Breakdown Structure (Work Breakdowm Structure, referred to as WBS) algorithm is a deliverable-oriented grouping of project elements. It summarizes and defines the entire scope of work of the project. Each drop represents a more detailed definition of the project work. Resource decomposition structure (Resouree Breakdowm Structure (RBS) algorithm is a resource hierarchy structure according to the type and form of resources. It is a kind of project decomposition structure, through which it can make schedules on the details of resource requirements, and can be aggregated to higher levels. One layer summarizes resource requirements and resource availability. Organizational decomposition structure (Organizational Breakdowm Structure (OBS) algorithm is an extraordinary form of project organization chart. It describes the specific organizational unit responsible for each project activity. It is a project that links work packages to relevant departments or units in a hierarchical and systematic manner. Organize the graphics.
本实施例中,工作分解结构(Work Breakdowm Structure,简称WBS)算法是指按一定分类原则,将所有参数信息先分为设备型号、设备配置、触发时间、网络类型、网络带宽和网络宽带时延积等大类,再将每一大类再细分为若干小类,然后再将每一小类进一步细分成若干小组……,依次类推,以将所有参数信息划分成不可再分割的分类类别,然后判断每一分类类别的参数信息是否与待测软件测试失败相关联,其目的性明确,以避免分析过程中遗漏影响待测软件相应功能模块测试成功或失败的相关参数信息。具体地,每一不可再分割的分类类别对应一类别ID;可采用控制变量法判断每一分类类别ID对应的参数信息是否与待测软件测试失败相关联,以确定影响待测软件成功运行的相差参数信息。In this embodiment, the Work Breakdow Structure (WBS) algorithm divides all parameter information into device model, device configuration, trigger time, network type, network bandwidth, and network bandwidth delay according to a certain classification principle. Product and other major categories, then subdivide each major class into several sub-categories, and then further subdivide each sub-category into several groups... and so on, to divide all parameter information into non-reclassifiable categories. The category is then determined whether the parameter information of each classification category is associated with the test failure of the software to be tested, and the purpose thereof is clear, so as to avoid missing relevant parameter information that affects the success or failure of the corresponding functional module test of the software under test during the analysis. Specifically, each non-re-divided classification category corresponds to a category ID; the control variable method may be used to determine whether the parameter information corresponding to each classification category ID is associated with the test failure of the software to be tested, to determine the impact on the successful operation of the software to be tested. Phase difference parameter information.
本实施例所提供的软件测试方法中,采用MongoDB数据库存储客户端运行待测软件过程中触发形成的埋点数据,MongoDB数据库是开源的面向文档型数据库,其存储的埋点数据不受存储表的限制,灵活性更强。再通过MongoDB数据库上配置的awk脚本对埋点数据进行分析,以获取测试校验代码为失败的所有埋点数据确定为待分析数据,awk脚本具有门槛低、定位简单、数据处理效率快的优点,无需进行繁琐的安装和配置,即可对MongoDB数据库中的埋点数据直接操作。再采用预设分析算法对待分析数据中的参数信息进行分析,以获取导致埋点测试失败的分析结果,通过该分析结果可直观显示各参数信息对埋点所在功能模块测试失败的影响,以便于对待测软件进行改善。In the software testing method provided by the embodiment, the MongoDB database is used to store the buried point data triggered by the client running the software to be tested, and the MongoDB database is an open source document-oriented database, and the stored buried point data is not stored in the table. The restrictions are more flexible. Then the awk script configured on the MongoDB database analyzes the buried data to obtain all the buried data that failed the test verification code as the data to be analyzed. The awk script has the advantages of low threshold, simple positioning and fast data processing efficiency. Direct operation of buried data in the MongoDB database without cumbersome installation and configuration. Then, the preset analysis algorithm is used to analyze the parameter information in the analysis data to obtain the analysis result that causes the buried point test to fail, and the analysis result can visually display the influence of each parameter information on the test failure of the function module of the buried point, so as to facilitate Improve the software to be tested.
在一具体实施方式中,由于待测软件上的埋点数据被触发时,需将触发生成的埋点数据发送给对应的MongoDB数据库,需进行相应的配置,以保证埋点数据直接发送给MongoDB数据库且awk脚本可对MongoDB数据库中的埋眯数据进行分析。因此,该软件测试方法中,步骤S10之前还包括如下步骤:In a specific implementation manner, when the buried point data on the software to be tested is triggered, the embedded point data generated by the trigger needs to be sent to the corresponding MongoDB database, and corresponding configuration is needed to ensure that the buried point data is directly sent to MongoDB. The database and the awk script analyze the buried data in the MongoDB database. Therefore, in the software testing method, before step S10, the following steps are further included:
S01:将MongoDB数据库安装在服务器,完成MongoDB数据库与服务器的信息配置,以使MongoDB数据库实时监控并获取埋点数据。S01: Install the MongoDB database on the server, complete the information configuration of the MongoDB database and the server, so that the MongoDB database can monitor and acquire the buried data in real time.
具体地,在服务器上运行MongoDB数据库安装程序,运行mongod命令,以将MongoDB数据库安装在服务器上。然后在服务器上创建数据目录,并启动服务器,等待服务器与客户端连接。mongod一般在没有参数的情况下会默认数据目录/data/db,若不存在就会启动失败;本实施例中,创建数据目录为mkdir-p/data/db。再给MongoDB数据库配置27017端口以监听服务器,配置28017端口以监听HTTP请求,当客户端访问http://服务器地址28017,即实现客户端与服务器连接。Specifically, run the MongoDB database installer on the server and run the mongod command to install the MongoDB database on the server. Then create a data directory on the server and start the server, waiting for the server to connect to the client. Mongod generally defaults to the data directory /data/db without parameters. If it does not exist, it will fail to start. In this embodiment, the data directory is created as mkdir-p/data/db. Then configure the 27017 port of the MongoDB database to listen to the server, configure the port 28017 to listen for HTTP requests, and when the client accesses http://server address 28017, the client and server are connected.
步骤S01中,完成MongoDB数据库与服务器之间的信息配置,由于MongoDB数据库支持存储数据类型比较复杂的数据,以使MongoDB数据库可实时监控服务器接收到的http请求,当客户端上传埋点数据服务器时,可直接存储在MongoDB数据库中,无需转换成存储表结构再存储。In step S01, the information configuration between the MongoDB database and the server is completed. Since the MongoDB database supports storing data of relatively complex data types, the MongoDB database can monitor the http request received by the server in real time, when the client uploads the buried data server. Can be stored directly in the MongoDB database, no need to convert to a storage table structure and then store.
S02:设置awk脚本定时获取测试校验代码为失败的埋点数据。S02: Set the awk script to periodically obtain the test verification code as the failed buried point data.
具体地,预先设置awk脚本定时获取测试校验代码为失败的埋点数据,以确定为待分析数据,awk脚本具有门槛低、定位简单等优点,无需专门的测试人员定点排查,有利于提高测试效率。通过awk脚本定时获取测试校验代码为失败的埋点数据并采用预设分析算法进行分析,可定时获取分析结果;而无需人工监控。Specifically, the awk script is preset to obtain the test verification code as the failed buried point data to determine the data to be analyzed, and the awk script has the advantages of low threshold and simple positioning, and does not require special test personnel to check the point, which is beneficial to improve the test. effectiveness. The awk script periodically acquires the test verification code as the failed buried point data and analyzes it by using a preset analysis algorithm, and can obtain the analysis result periodically; without manual monitoring.
在一具体实施方式中,该软件测试方法还包括如下步骤:In a specific embodiment, the software testing method further includes the following steps:
S50:接收客户通过客户端向服务器发送的查询指令,查询指令包括埋点ID。S50: Receive a query instruction sent by the client to the server through the client, and the query instruction includes a buried point ID.
具体地,客户(如测试人员或开发人员)可向客户端输入查询指令,客户端接收到该查询指令后,将该查询指令发送给服务器。该查询指令可以仅包括一个埋点ID,以查询影响特定埋点所在的程序代码的参数信息,也可以是功能模块ID,该功能模块包括至少一个埋点ID,以查询影响特定功能模块的参数信息。Specifically, the client (such as a tester or a developer) may input a query instruction to the client, and after receiving the query instruction, the client sends the query command to the server. The query instruction may include only one buried point ID to query parameter information of a program code that affects a specific buried point, or may be a function module ID, and the function module includes at least one buried point ID to query parameters affecting a specific function module. information.
S60:基于查询指令,获取与埋点ID相对应的查询结果。S60: Acquire a query result corresponding to the buried point ID based on the query instruction.
其中,该查询结果为与埋点ID相对应的分析结果。具体地,服务器上的MongoDB数据库在接收到查询指令后,可获取采用预设分析算法对与查询指令中的埋点ID对应的所有待分析数据进行分析的分析结果,并将该分析结果作为查询结果输出。客户端显示查询结果,以便客户基于查询结果对该埋点ID对应的程序代码或功能模块进行改善。The query result is an analysis result corresponding to the buried point ID. Specifically, after receiving the query instruction, the MongoDB database on the server may obtain an analysis result that analyzes all data to be analyzed corresponding to the buried point ID in the query instruction by using a preset analysis algorithm, and uses the analysis result as a query. The result is output. The client displays the query result, so that the client can improve the program code or function module corresponding to the buried point ID based on the query result.
可以理解地,本实施例所提供的软件测试方法中,采用面向文档的MongoDB数据库和擅长处理文档行列的awk脚本配合,可直接对上传到MongoDB数据库中的所有埋点数据进行筛选、对比、统计、定时输出或循环输出等操作。而且,该软件测试方法中,可基于客户端原有的开发环境,无需对客户端的运行环境进行改变,在不牺牲用户体验、不延迟数据请求的基础上实现将埋点数据实时或批量上传到服务器的MongoDB数据库中,轻便简洁且可移植性高。It can be understood that, in the software testing method provided by the embodiment, the document-oriented MongoDB database and the awk script that is good at processing the document row and column can cooperate to directly filter, compare, and count all the buried data uploaded to the MongoDB database. , timing output or loop output operations. Moreover, the software testing method can be based on the original development environment of the client, without changing the running environment of the client, realizing uploading the buried data to the real-time or batch in batch without sacrificing the user experience and delaying the data request. The server's MongoDB database is lightweight, simple, and portable.
实施例2Example 2
图2示出本实施例中的软件测试装置的一原理框图。该软件测试装置包括客户端和服务器,通过客户端和服务器配合,完成对待测软件的测试过程。其中,客户端与服务器之间可通过WiFi网络、3G网络或4G网络等无线网络通信相连,也可通过有线网络通信相连。客户端可以是安装有待测软件的智能手机、笔记本、平板电脑、PAD或台式电脑等可与服务器通信相连的终端。如图2所示,该软件测试装置包括软件运行模块10、埋点数据生成模块20、待分析数据确定模块30、分析结果获取模块40、信息配置模块50、查询指令接收模块60和查询结果获取模块70。FIG. 2 shows a schematic block diagram of the software testing device in this embodiment. The software testing device includes a client and a server, and cooperates with the client and the server to complete the testing process of the software to be tested. The client and the server may be connected through a wireless network such as a WiFi network, a 3G network, or a 4G network, or may be connected through a wired network. The client can be a terminal that can be connected to the server, such as a smartphone, a notebook, a tablet, a PAD, or a desktop computer, to which the software to be tested is installed. As shown in FIG. 2, the software testing device includes a software running module 10, a buried point data generating module 20, a data to be analyzed determining module 30, an analysis result obtaining module 40, an information configuration module 50, a query instruction receiving module 60, and a query result acquisition. Module 70.
软件运行模块10,用于在客户端上运行待测软件,待测软件包括至少一个功能模块,每一功能模块上设有至少一个埋点。The software running module 10 is configured to run the software to be tested on the client. The software to be tested includes at least one functional module, and each functional module is provided with at least one buried point.
具体地,在客户端上安装有待测软件并运行,该待测软件上设有至少一个功能模块,且每一功能模块上设有至少一个埋点,当客户端运行该待测软件的相应功能模块时,该功能模块上的埋点被触发。Specifically, the software to be tested is installed and run on the client, and the software to be tested is provided with at least one function module, and each function module is provided with at least one buried point, and when the client runs the corresponding software to be tested When the function module is used, the buried point on the function module is triggered.
埋点数据生成模块20,用于当待测软件上的埋点被触发时,生成埋点数据,并将埋点数据发送给MongoDB数据库;埋点数据包括埋点ID、测试校验代码和参数信息。The buried point data generating module 20 is configured to generate buried point data when the buried point on the software to be tested is triggered, and send the buried point data to the MongoDB database; the buried point data includes a buried point ID, a test check code, and a parameter. information.
具体地,当待测软件上的埋点被触发时,触发生成的埋点数据可体现其测试结果,以便基于该埋点数据进行分析并改进,提高用户对待测软件的满意度。如在一理财产品APP中,包括用户登录模块、产品查询模块、上传产品和支付模块等,且用户登录模块包括用户注册、登录界面、找回用户名或找回密码等程序代码,则可在用户注册、登录界面、找回用户名或找回密码等程序代码均设有埋点,当用户通过客户端运行待测软件,并执行用户注册、登录界面、找回用户名或找回密码等相应操作时,客户端分别生成埋点数据并将埋点数据发送给MongoDB数据库。Specifically, when the buried point on the software to be tested is triggered, the generated buried point data can reflect the test result, so as to analyze and improve based on the buried point data, and improve the user's satisfaction with the software to be tested. For example, in a financial product APP, including a user login module, a product inquiry module, an upload product, and a payment module, and the user login module includes a user registration, a login interface, a retrieval of a user name, or a password recovery, etc., Program codes such as user registration, login interface, retrieving user name or retrieving passwords are provided with a buried point. When the user runs the software to be tested through the client, and performs user registration, login interface, retrieved user name or retrieved password, etc. In the corresponding operation, the client generates the buried point data and sends the buried point data to the MongoDB database.
其中,埋点ID用于唯一识别埋点的标识,该标识按预设编号规则进行编号。本实施例中,可以按功能模块ID+序号这一预设编号规则进行编号,如上述理财产品APP中,若用户登录模块的功能模块ID为X1,且用户注册的功能模块ID为X101,则可用X10101表示设置在用户注册程序代码中设有的第一个埋点。The buried point ID is used to uniquely identify the identifier of the buried point, and the identifier is numbered according to a preset numbering rule. In this embodiment, the number of the function module ID + serial number may be numbered. For example, in the above-mentioned wealth management product APP, if the function module ID of the user login module is X1, and the function module ID registered by the user is X101, the available X10101 indicates the first buried point set in the user registration program code.
测试校验代码用于标注埋点对应的程序代码测试是否成功,包括成功和失败两种测试校验代码。本实施例中,测试校验代码可分别用Y和N两个字母表示,也可用其他代码表示。通过测试校验代码区分埋点对应的程序代码测试是否成功,基于测试校验代码可将所有埋点数据划分成两类,通过对测试校验代码为失败的埋点数据进行分析,无需专门的开发人员定时排查,可在一定程度上减轻测试过程的工作量,减少测试时间,节省人力成本。The test verification code is used to mark whether the program code test corresponding to the buried point is successful, including two test verification codes, success and failure. In this embodiment, the test verification code can be represented by two letters Y and N, respectively, and can also be represented by other codes. The test verification code distinguishes whether the program code test corresponding to the buried point is successful. Based on the test verification code, all the buried point data can be divided into two types, and the buried check data of the test is verified by the test verification code, without special Regular troubleshooting by developers can reduce the workload of the testing process to a certain extent, reduce testing time and save labor costs.
参数信息用于客观体现埋点所在的程序代码的运行环境,其与待测软件测试是否成功密切相关。具体地,参数信息包括设备型号、设备配置、触发时间、网络类型、网络带宽和网络宽带时延积中的至少一个。The parameter information is used to objectively reflect the operating environment of the program code where the buried point is located, which is closely related to the success of the software test to be tested. Specifically, the parameter information includes at least one of a device model, a device configuration, a trigger time, a network type, a network bandwidth, and a network bandwidth time delay product.
本实施例中,设备型号是安装有待测软件的客户端的内部编号,该设备型号与客户端的性能相关联。以智能手机为例,每一智能手机厂家在生产相应品牌的智能手机时,以设备型号来区分不同版本的智能手机,如iphone4、iphone5等。设备配置可以是客户端上安装的操作系统,如安卓系统、IOS操作系统、Windows系统、Linux系统等,或者可以是安装在客户端上的处理器或其他硬件的型号,如i5或i7处理器。触发时间可以是运行该待测软件的时间,该触发时间与客户端运行网络相关,一般情况下,在网络高峰触发待测软件的失败率会比在网络低峰触发待测软件的失败率高。网络类型是客户端与服务器通信所采用的网络,可以是有线网络,也可以是WiFi网络、3G网络或4G网络等无线网络。网络带宽是单位时间内传输的数据量,即数据传输率。网络宽带时延积是链路上最大比特数。In this embodiment, the device model is an internal number of the client on which the software to be tested is installed, and the device model is associated with the performance of the client. Taking smart phones as an example, each smart phone manufacturer distinguishes different versions of smart phones, such as iphone4 and iphone5, by the device model when producing the corresponding brand of smart phones. The device configuration may be an operating system installed on the client, such as an Android system, an IOS operating system, a Windows system, a Linux system, or the like, or may be a processor or other hardware model installed on the client, such as an i5 or i7 processor. . The triggering time may be the time for running the software to be tested, and the triggering time is related to the running network of the client. Generally, the failure rate of the software to be tested at the peak of the network is higher than the failure rate of the software to be tested under the low peak of the network. . The network type is the network used by the client to communicate with the server, and may be a wired network, or a wireless network such as a WiFi network, a 3G network, or a 4G network. Network bandwidth is the amount of data transmitted per unit time, that is, the data transmission rate. The network bandwidth time delay product is the maximum number of bits on the link.
进一步地,客户端发送的埋点数据直接存储在MongoDB数据库中,而MongoDB数据库是一种开源且面向文档型数据库,相比于SQL等表结构存储的关系型数据库,其灵活性更强,以便于实现对存储在MongoDB数据库中的埋点数据进行分析。Further, the buried point data sent by the client is directly stored in the MongoDB database, and the MongoDB database is an open source and document-oriented database, which is more flexible than the relational database stored in a table structure such as SQL. The analysis of the buried point data stored in the MongoDB database is implemented.
待分析数据确定模块30,用于使MongoDB数据库上配置的awk脚本获取测试校验代码为失败的埋点数据,确定为待分析数据。The to-be-analyzed data determining module 30 is configured to enable the awk script configured on the MongoDB database to obtain the test verification code as the failed buried point data, and determine the data to be analyzed.
其中,awk脚本是一种强大的文本分析工具,可对存储在MongoDB数据库中所有埋点数据逐行读入,再以空格或其他默认分隔符将埋点数据进行分隔,并对分隔的内容进行分析处理。本实施例中,采用MongoDB数据库上配置的awk脚本对所有埋点数据进行分析,获取测试校验代码为失败的埋点数据,将其确定为待分析数据,以便基于待分析数据确定导致埋点所在的程序代码测试失败的原因,以基于失败原因对待测软件进行改进。可以理解地,可直接采用awk脚本将测试校验代码为失败的埋点数据确定为待分析数据,而无需再安装其他运行环境,具有门槛低、定位简单、数据处理效率快的优点,无需进行繁琐安装和配置,也无需代码能力较强的专业人员配合完成测试,进一步降低待测软件测试过程的人力成本。Among them, awk script is a powerful text analysis tool, which can read all the buried data stored in the MongoDB database line by line, and then separate the buried data with spaces or other default separators, and separate the separated content. Analytical processing. In this embodiment, the awk script configured on the MongoDB database is used to analyze all the buried data, and the test verification code is the failed buried point data, and the data is determined as the data to be analyzed, so as to determine the buried point based on the data to be analyzed. The reason for the failure of the program code test is to improve the software to be tested based on the cause of the failure. It can be understood that the awk script can be used to directly determine the test verification code as the data to be analyzed as the data to be analyzed without installing other operating environments, and has the advantages of low threshold, simple positioning, and fast data processing efficiency. The cumbersome installation and configuration also eliminates the need for professionals with strong code capabilities to complete the test, further reducing the labor cost of the software testing process under test.
分析结果获取模块40,用于采用预设分析算法对待分析数据中的参数信息进行分析,获取导致埋点测试失败的分析结果。The analysis result obtaining module 40 is configured to analyze the parameter information in the analysis data by using a preset analysis algorithm, and obtain an analysis result that causes the buried point test to fail.
具体地,MongoDB数据库上配置的awk脚本先将所有测试校验代码为失败的所有埋点数据确定为待分析数据,无需专门的开发人员定时排查,可在一定程度上减轻测试过程中的工作量,节省人力成本。采用预设分析算法对所有待分析数据中的参数信息进行分析,可获取导致该埋点对应的程序代码测试失败的原因,以形成分析结果,分析过程自动化,无需配置专业人员进行分析,有利于降低分析成本。Specifically, the awk script configured on the MongoDB database first determines all the buried data that failed the test verification code as the data to be analyzed, and does not require a dedicated developer to periodically check the workload, which can reduce the workload during the test to a certain extent. , saving labor costs. Using the preset analysis algorithm to analyze the parameter information in all the data to be analyzed, the reason for the failure of the program code corresponding to the buried point can be obtained, so as to form the analysis result, the analysis process is automated, and the configuration expert is not required to analyze, which is beneficial to the analysis. Reduce the cost of analysis.
具体地,预设分析算法包括工作分解结构算法、资源分解结构算法或组织分解结构算法。工作分解结构(Work Breakdowm Structure,简称WBS)算法以可交付成果为导向,对项目要素进行的分组,它归纳和定义了项目的整个工作范围,每下降一层代表对项目工作的更详细定义。资源分解结构(Resouree Breakdowm Structure,简称RBS)算法是按照资源种类和形式而划分的资源层级结构,它是项目分解结构的一种,通过它可以在资源需求细节上制定进度计划,并可以通过汇总的方式向更高一层汇总资源需求和资源可用性。组织分解结构(Organizational Breakdowm Structure,简称OBS)算法是项目组织结构图的一种非凡形式,描述负责每个项目活动的具体组织单元,它将工作包与相关部门或单位分层次、有条理地联系起来的一种项目组织安排图形。Specifically, the preset analysis algorithm includes a work breakdown structure algorithm, a resource decomposition structure algorithm, or an organization decomposition structure algorithm. Work Breakdown Structure (Work Breakdowm Structure, referred to as WBS) algorithm is a deliverable-oriented grouping of project elements. It summarizes and defines the entire scope of work of the project. Each drop represents a more detailed definition of the project work. Resource decomposition structure (Resouree Breakdowm Structure (RBS) algorithm is a resource hierarchy structure according to the type and form of resources. It is a kind of project decomposition structure, through which it can make schedules on the details of resource requirements, and can be aggregated to higher levels. One layer summarizes resource requirements and resource availability. Organizational decomposition structure (Organizational Breakdowm Structure (OBS) algorithm is an extraordinary form of project organization chart. It describes the specific organizational unit responsible for each project activity. It is a project that links work packages to relevant departments or units in a hierarchical and systematic manner. Organize the graphics.
本实施例中,工作分解结构(Work Breakdowm Structure,简称WBS)算法是指按一定分类原则,将所有参数信息先分为设备型号、设备配置、触发时间、网络类型、网络带宽和网络宽带时延积等大类,再将每一大类再细分为若干小类,然后再将每一小类进一步细分成若干小组……,依次类推,以将所有参数信息划分成不可再分割的分类类别,然后判断每一分类类别的参数信息是否与待测软件测试失败相关联,其目的性明确,以避免分析过程中遗漏影响待测软件相应功能模块测试成功或失败的相关参数信息。具体地,每一不可再分割的分类类别对应一类别ID;可采用控制变量法判断每一分类类别ID对应的参数信息是否与待测软件测试失败相关联,以确定影响待测软件成功运行的相差参数信息。In this embodiment, the Work Breakdow Structure (WBS) algorithm divides all parameter information into device model, device configuration, trigger time, network type, network bandwidth, and network bandwidth delay according to a certain classification principle. Product and other major categories, then subdivide each major class into several sub-categories, and then further subdivide each sub-category into several groups... and so on, to divide all parameter information into non-reclassifiable categories. The category is then determined whether the parameter information of each classification category is associated with the test failure of the software to be tested, and the purpose thereof is clear, so as to avoid missing relevant parameter information that affects the success or failure of the corresponding functional module test of the software under test during the analysis. Specifically, each non-re-divided classification category corresponds to a category ID; the control variable method may be used to determine whether the parameter information corresponding to each classification category ID is associated with the test failure of the software to be tested, to determine the impact on the successful operation of the software to be tested. Phase difference parameter information.
本实施例所提供的软件测试装置中,采用MongoDB数据库存储客户端运行待测软件过程中触发形成的埋点数据,MongoDB数据库是开源的面向文档型数据库,其存储的埋点数据不受存储表的限制,灵活性更强。再通过MongoDB数据库上配置的awk脚本对埋点数据进行分析,以获取测试校验代码为失败的所有埋点数据确定为待分析数据,awk脚本具有门槛低、定位简单、数据处理效率快的优点,无需进行繁琐的安装和配置,即可对MongoDB数据库中的埋点数据直接操作。再采用预设分析算法对待分析数据中的参数信息进行分析,以获取导致埋点测试失败的分析结果,通过该分析结果可直观显示各参数信息对埋点所在功能模块测试失败的影响,以便于对待测软件进行改善。In the software testing device provided by the embodiment, the MongoDB database is used to store the embedded data triggered by the client running the software to be tested. The MongoDB database is an open source document-oriented database, and the stored buried point data is not stored in the table. The restrictions are more flexible. Then the awk script configured on the MongoDB database analyzes the buried data to obtain all the buried data that failed the test verification code as the data to be analyzed. The awk script has the advantages of low threshold, simple positioning and fast data processing efficiency. Direct operation of buried data in the MongoDB database without cumbersome installation and configuration. Then, the preset analysis algorithm is used to analyze the parameter information in the analysis data to obtain the analysis result that causes the buried point test to fail, and the analysis result can visually display the influence of each parameter information on the test failure of the function module of the buried point, so as to facilitate Improve the software to be tested.
在一具体实施方式中,由于待测软件上的埋点数据被触发时,需将触发生成的埋点数据发送给对应的MongoDB数据库,需进行相应的配置,以保证埋点数据直接发送给MongoDB数据库且awk脚本可对MongoDB数据库中的埋眯数据进行分析。因此,该软件测试装置还包括信息配置模块50。In a specific implementation manner, when the buried point data on the software to be tested is triggered, the embedded point data generated by the trigger needs to be sent to the corresponding MongoDB database, and corresponding configuration is needed to ensure that the buried point data is directly sent to MongoDB. The database and the awk script analyze the buried data in the MongoDB database. Therefore, the software testing device also includes an information configuration module 50.
信息配置模块50,用于将MongoDB数据库安装在服务器,完成MongoDB数据库与服务器的信息配置,以使MongoDB数据库实时监控并获取埋点数据。The information configuration module 50 is configured to install the MongoDB database on the server, complete the information configuration of the MongoDB database and the server, so that the MongoDB database monitors and acquires the buried point data in real time.
具体地,在服务器上运行MongoDB数据库安装程序,运行mongod命令,以将MongoDB数据库安装在服务器上。然后在服务器上创建数据目录,并启动服务器,等待服务器与客户端连接。mongod一般在没有参数的情况下会默认数据目录/data/db,若不存在就会启动失败;本实施例中,创建数据目录为mkdir-p/data/db。再给MongoDB数据库配置27017端口以监听服务器,配置28017端口以监听HTTP请求,当客户端访问http://服务器地址28017,即实现客户端与服务器连接。Specifically, run the MongoDB database installer on the server and run the mongod command to install the MongoDB database on the server. Then create a data directory on the server and start the server, waiting for the server to connect to the client. Mongod generally defaults to the data directory /data/db without parameters. If it does not exist, it will fail to start. In this embodiment, the data directory is created as mkdir-p/data/db. Then configure the 27017 port of the MongoDB database to listen to the server, configure the port 28017 to listen for HTTP requests, and when the client accesses http://server address 28017, the client and server are connected.
信息配置模块50可完成MongoDB数据库与服务器之间的信息配置,由于MongoDB数据库支持存储数据类型比较复杂的数据,以使MongoDB数据库可实时监控服务器接收到的http请求,当客户端上传埋点数据服务器时,可直接存储在MongoDB数据库中,无需转换成存储表结构再存储。The information configuration module 50 can complete the information configuration between the MongoDB database and the server. Since the MongoDB database supports storing data of relatively complex data types, the MongoDB database can monitor the http request received by the server in real time, and the client uploads the buried data server. It can be stored directly in the MongoDB database without being converted to a storage table structure for storage.
信息配置模块50,还用于设置awk脚本定时获取测试校验代码为失败的埋点数据。The information configuration module 50 is further configured to set the awk script to periodically acquire the test verification code as the failed buried point data.
具体地,预先设置awk脚本定时获取测试校验代码为失败的埋点数据,以确定为待分析数据,awk脚本具有门槛低、定位简单等优点,无需专门的测试人员定点排查,有利于提高测试效率。通过awk脚本定时获取测试校验代码为失败的埋点数据并采用预设分析算法进行分析,可定时获取分析结果;而无需人工监控。Specifically, the awk script is preset to obtain the test verification code as the failed buried point data to determine the data to be analyzed, and the awk script has the advantages of low threshold and simple positioning, and does not require special test personnel to check the point, which is beneficial to improve the test. effectiveness. The awk script periodically acquires the test verification code as the failed buried point data and analyzes it by using a preset analysis algorithm, and can obtain the analysis result periodically; without manual monitoring.
在一具体实施方式中,该软件测试装置还包括查询指令接收模块60和查询结果获取模块70。In a specific embodiment, the software testing device further includes a query instruction receiving module 60 and a query result obtaining module 70.
查询指令接收模块60,用于接收客户通过客户端向服务器发送的查询指令,查询指令包括埋点ID。The query instruction receiving module 60 is configured to receive a query instruction sent by the client to the server through the client, and the query instruction includes a buried point ID.
具体地,客户(如测试人员或开发人员)可向客户端输入查询指令,客户端接收到该查询指令后,将该查询指令发送给服务器。该查询指令可以仅包括一个埋点ID,以查询影响特定埋点所在的程序代码的参数信息,也可以是功能模块ID,该功能模块包括至少一个埋点ID,以查询影响特定功能模块的参数信息。Specifically, the client (such as a tester or a developer) may input a query instruction to the client, and after receiving the query instruction, the client sends the query command to the server. The query instruction may include only one buried point ID to query parameter information of a program code that affects a specific buried point, or may be a function module ID, and the function module includes at least one buried point ID to query parameters affecting a specific function module. information.
查询结果获取模块70,用于基于查询指令,获取与埋点ID相对应的查询结果。The query result obtaining module 70 is configured to obtain a query result corresponding to the buried point ID based on the query instruction.
其中,该查询结果为与埋点ID相对应的分析结果。具体地,服务器上的MongoDB数据库在接收到查询指令后,可获取采用预设分析算法对与查询指令中的埋点ID对应的所有待分析数据进行分析的分析结果,并将该分析结果作为查询结果输出。客户端显示查询结果,以便客户基于查询结果对该埋点ID对应的程序代码或功能模块进行改善。The query result is an analysis result corresponding to the buried point ID. Specifically, after receiving the query instruction, the MongoDB database on the server may obtain an analysis result that analyzes all data to be analyzed corresponding to the buried point ID in the query instruction by using a preset analysis algorithm, and uses the analysis result as a query. The result is output. The client displays the query result, so that the client can improve the program code or function module corresponding to the buried point ID based on the query result.
可以理解地,本实施例所提供的软件测试装置中,采用面向文档的MongoDB数据库和擅长处理文档行列的awk脚本配合,可直接对上传到MongoDB数据库中的所有埋点数据进行筛选、对比、统计、定时输出或循环输出等操作。而且,该软件测试装置中,可基于客户端原有的开发环境,无需对客户端的运行环境进行改变,在不牺牲用户体验、不延迟数据请求的基础上实现将埋点数据实时或批量上传到服务器的MongoDB数据库中,轻便简洁且可移植性高。It can be understood that the software testing device provided in this embodiment adopts a document-oriented MongoDB database and an awk script that is good at processing document rows and columns, and can directly filter, compare, and count all buried data uploaded to the MongoDB database. , timing output or loop output operations. Moreover, the software testing device can be based on the original development environment of the client, without changing the operating environment of the client, realizing uploading the buried data to the real-time or batch in batch without sacrificing the user experience and delaying the data request. The server's MongoDB database is lightweight, simple, and portable.
实施例3Example 3
图3是本申请一实施例提供的电子设备的示意图。如图3所示,该实施例的电子设备3包括:处理器30以及存储器31,所述存储器31中存储有可在所述处理器30上运行的计算机可读指令32,例如软件测试程序。所述处理器30执行所述计算机可读指令32时实现上述各个软件测试方法实施例中的步骤,例如图1所示的步骤10至40。或者,所述处理器30执行所述计算机可读指令32时实现上述各装置实施例中各模块/单元的功能,例如图2所示模块10至70的功能。FIG. 3 is a schematic diagram of an electronic device according to an embodiment of the present application. As shown in FIG. 3, the electronic device 3 of this embodiment includes a processor 30 and a memory 31 in which are stored computer readable instructions 32, such as software test programs, executable on the processor 30. The processor 30 executes the computer readable instructions 32 to implement the steps in the various software test method embodiments described above, such as steps 10 through 40 shown in FIG. Alternatively, when the processor 30 executes the computer readable instructions 32, the functions of the modules/units in the various apparatus embodiments described above are implemented, such as the functions of the modules 10 to 70 shown in FIG.
示例性的,所述计算机可读指令32可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器31中,并由所述处理器30执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令段,该指令段用于描述所述计算机可读指令32在所述电子设备3中的执行过程。Illustratively, the computer readable instructions 32 may be partitioned into one or more modules/units that are stored in the memory 31 and executed by the processor 30, To complete this application. The one or more modules/units may be a series of computer readable instruction segments capable of performing a particular function, the instruction segments being used to describe the execution of the computer readable instructions 32 in the electronic device 3.
所述电子设备3可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述电子设备可包括,但不仅限于,处理器30、存储器31。本领域技术人员可以理解,图3仅仅是电子设备3的示例,并不构成对电子设备3的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述电子设备还可以包括输入输出设备、网络接入设备、总线等。The electronic device 3 can be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server. The electronic device may include, but is not limited to, the processor 30, the memory 31. It will be understood by those skilled in the art that FIG. 3 is merely an example of the electronic device 3 and does not constitute a limitation on the electronic device 3, and may include more or less components than those illustrated, or combine some components, or different components. For example, the electronic device may further include an input and output device, a network access device, a bus, and the like.
所称处理器30可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application Specific Integrated Circuit,ASIC)、现成可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 30 can be a central processing unit (Central Processing Unit, CPU), can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
所述存储器31可以是所述电子设备3的内部存储单元,例如电子设备3的硬盘或内存。所述存储器31也可以是所述电子设备3的外部存储设备,例如所述电子设备3上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器31还可以既包括所述电子设备3的内部存储单元也包括外部存储设备。所述存储器31用于存储所述计算机可读指令以及所述电子设备所需的其他程序和数据。所述存储器31还可以用于暂时地存储已经输出或者将要输出的数据。The memory 31 may be an internal storage unit of the electronic device 3, such as a hard disk or a memory of the electronic device 3. The memory 31 may also be an external storage device of the electronic device 3, such as a plug-in hard disk equipped on the electronic device 3, a smart memory card (SMC), and a secure digital (SD). Card, flash card (Flash Card) and so on. Further, the memory 31 may also include both an internal storage unit of the electronic device 3 and an external storage device. The memory 31 is configured to store the computer readable instructions and other programs and data required by the electronic device. The memory 31 can also be used to temporarily store data that has been output or is about to be output.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application, in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。The above embodiments are only used to explain the technical solutions of the present application, and are not limited thereto; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still The technical solutions described in the embodiments are modified, or the equivalents of the technical features are replaced by the equivalents. The modifications and substitutions of the embodiments do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (20)

  1. 一种软件测试方法,其特征在于,包括:A software testing method, comprising:
    在客户端上运行待测软件,所述待测软件包括至少一个功能模块,每一功能模块上设有至少一个埋点;Running the software to be tested on the client, the software to be tested includes at least one function module, and each function module is provided with at least one buried point;
    当所述待测软件上的所述埋点被触发时,生成埋点数据,并将所述埋点数据发送给MongoDB数据库;所述埋点数据包括埋点ID、测试校验代码和参数信息;When the buried point on the software to be tested is triggered, generating buried point data, and transmitting the buried point data to a MongoDB database; the buried point data includes a buried point ID, a test check code, and parameter information. ;
    使MongoDB数据库上配置的awk脚本获取测试校验代码为失败的所述埋点数据,确定为待分析数据;The awk script configured on the MongoDB database obtains the buried data of the test verification code as a failure, and is determined as the data to be analyzed;
    采用预设分析算法对所述待分析数据中的参数信息进行分析,获取导致所述埋点测试失败的分析结果。The parameter information in the data to be analyzed is analyzed by using a preset analysis algorithm to obtain an analysis result that causes the buried point test to fail.
  2. 如权利要求1所述的软件测试方法,其特征在于,所述在客户端上运行待测软件,之前还包括:The software testing method according to claim 1, wherein the running the software to be tested on the client further comprises:
    将所述MongoDB数据库安装在所述服务器,完成所述MongoDB数据库与所述服务器的信息配置,以使所述MongoDB数据库实时监控并获取所述埋点数据;Installing the MongoDB database on the server, completing information configuration of the MongoDB database and the server, so that the MongoDB database monitors and acquires the buried point data in real time;
    设置所述awk脚本定时获取所述测试校验代码为失败的埋点数据。The awk script is set to periodically acquire the test verification code as a failed buried point data.
  3. 如权利要求1所述的软件测试方法,其特征在于,所述参数信息包括设备型号、设备配置、触发时间、网络类型、网络带宽和网络宽带时延积中的至少一个。The software testing method according to claim 1, wherein the parameter information comprises at least one of a device model, a device configuration, a trigger time, a network type, a network bandwidth, and a network bandwidth time delay product.
  4. 如权利要求1所述的软件测试方法,其特征在于,所述预设分析算法包括工作分解结构算法、资源分解结构算法或组织分解结构算法。The software testing method according to claim 1, wherein the preset analysis algorithm comprises a work breakdown structure algorithm, a resource decomposition structure algorithm or an organization decomposition structure algorithm.
  5. 如权利要求1-4任一项所述的软件测试方法,其特征在于,还包括:The software testing method according to any one of claims 1 to 4, further comprising:
    接收客户通过所述客户端向所述服务器发送的查询指令,所述查询指令包括所述埋点ID;Receiving, by the client, a query instruction sent by the client to the server, where the query instruction includes the buried point ID;
    基于所述查询指令,获取与所述埋点ID相对应的查询结果。And obtaining a query result corresponding to the buried point ID based on the query instruction.
  6. 一种软件测试装置,其特征在于,包括:A software testing device, comprising:
    软件运行模块,用于在客户端上运行待测软件,所述待测软件包括至少一个功能模块,每一功能模块上设有至少一个埋点;a software running module, configured to run the software to be tested on the client, where the software to be tested includes at least one functional module, and each functional module is provided with at least one buried point;
    埋点数据生成模块,用于当所述待测软件上的所述埋点被触发时,生成埋点数据,并将所述埋点数据发送给MongoDB数据库;所述埋点数据包括埋点ID、测试校验代码和参数信息;a buried point data generating module, configured to generate buried point data when the buried point on the software to be tested is triggered, and send the buried point data to a MongoDB database; the buried point data includes a buried point ID , test verification code and parameter information;
    待分析数据确定模块,用于使MongoDB数据库上配置的awk脚本获取测试校验代码为失败的所述埋点数据,确定为待分析数据;The data analysis module to be analyzed is configured to enable the awk script configured on the MongoDB database to obtain the buried data of the test verification code as a failure, and determine the data to be analyzed;
    分析结果获取模块,用于采用预设分析算法对所述待分析数据中的参数信息进行分析,获取导致所述埋点测试失败的分析结果。The analysis result obtaining module is configured to analyze the parameter information in the data to be analyzed by using a preset analysis algorithm, and obtain an analysis result that causes the buried point test to fail.
  7. 根据权利要求6所述的软件测试装置,其特征在于,还包括:The software testing device according to claim 6, further comprising:
    信息配置模块,用于将所述MongoDB数据库安装在所述服务器,完成所述MongoDB数据库与所述服务器的信息配置,以使所述MongoDB数据库实时监控并获取所述埋点数据;An information configuration module, configured to install the MongoDB database on the server, complete information configuration of the MongoDB database and the server, so that the MongoDB database monitors and acquires the buried point data in real time;
    所述信息配置模块,还用于设置所述awk脚本定时获取所述测试校验代码为失败的埋点数据。The information configuration module is further configured to set the awk script to periodically acquire the buried verification data of the test verification code as a failure.
  8. 根据权利要求6所述的软件测试装置,其特征在于,所述参数信息包括设备型号、设备配置、触发时间、网络类型、网络带宽和网络宽带时延积中的至少一个。The software testing device according to claim 6, wherein the parameter information comprises at least one of a device model, a device configuration, a trigger time, a network type, a network bandwidth, and a network bandwidth time delay product.
  9. 根据权利要求6所述的软件测试装置,其特征在于,所述预设分析算法包括工作分解结构算法、资源分解结构算法或组织分解结构算法。The software testing device according to claim 6, wherein the preset analysis algorithm comprises a work breakdown structure algorithm, a resource decomposition structure algorithm or an organization decomposition structure algorithm.
  10. 根据权利要求6-9任一项所述的软件测试装置,其特征在于,还包括:The software testing device according to any one of claims 6-9, further comprising:
    查询指令接收模块,用于接收客户通过所述客户端向所述服务器发送的查询指令,所述查询指令包括所述埋点ID;a query instruction receiving module, configured to receive a query instruction sent by the client to the server by using the client, where the query instruction includes the buried point ID;
    查询结果获取模块,用于基于所述查询指令,获取与所述埋点ID相对应的查询结果。The query result obtaining module is configured to obtain a query result corresponding to the buried point ID based on the query instruction.
  11. 一种电子设备,其特征在于,包括存储器以及处理器,所述存储器中存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:An electronic device, comprising: a memory and a processor, wherein the memory stores computer readable instructions executable on the processor, and the processor implements the following steps when the computer readable instructions are executed :
    在客户端上运行待测软件,所述待测软件包括至少一个功能模块,每一功能模块上设有至少一个埋点;Running the software to be tested on the client, the software to be tested includes at least one function module, and each function module is provided with at least one buried point;
    当所述待测软件上的所述埋点被触发时,生成埋点数据,并将所述埋点数据发送给MongoDB数据库;所述埋点数据包括埋点ID、测试校验代码和参数信息;When the buried point on the software to be tested is triggered, generating buried point data, and transmitting the buried point data to a MongoDB database; the buried point data includes a buried point ID, a test check code, and parameter information. ;
    使MongoDB数据库上配置的awk脚本获取测试校验代码为失败的所述埋点数据,确定为待分析数据;The awk script configured on the MongoDB database obtains the buried data of the test verification code as a failure, and is determined as the data to be analyzed;
    采用预设分析算法对所述待分析数据中的参数信息进行分析,获取导致所述埋点测试失败的分析结果。The parameter information in the data to be analyzed is analyzed by using a preset analysis algorithm to obtain an analysis result that causes the buried point test to fail.
  12. 根据权利要求11所述的电子设备,其特征在于,所述处理器执行所述计算机可读指令时还实现如下步骤:The electronic device according to claim 11, wherein the processor further implements the following steps when the computer readable instructions are executed:
    将所述MongoDB数据库安装在所述服务器,完成所述MongoDB数据库与所述服务器的信息配置,以使所述MongoDB数据库实时监控并获取所述埋点数据;Installing the MongoDB database on the server, completing information configuration of the MongoDB database and the server, so that the MongoDB database monitors and acquires the buried point data in real time;
    设置所述awk脚本定时获取所述测试校验代码为失败的埋点数据。The awk script is set to periodically acquire the test verification code as a failed buried point data.
  13. 根据权利要求11所述的电子设备,其特征在于,所述参数信息包括设备型号、设备配置、触发时间、网络类型、网络带宽和网络宽带时延积中的至少一个。The electronic device according to claim 11, wherein the parameter information comprises at least one of a device model, a device configuration, a trigger time, a network type, a network bandwidth, and a network bandwidth time delay product.
  14. 根据权利要求11所述的电子设备,其特征在于,所述预设分析算法包括工作分解结构算法、资源分解结构算法或组织分解结构算法。The electronic device according to claim 11, wherein the preset analysis algorithm comprises a work breakdown structure algorithm, a resource decomposition structure algorithm or an organization decomposition structure algorithm.
  15. 根据权利要求11至14任一项所述的电子设备,其特征在于,所述处理器执行所述计算机可读指令时,还实现如下步骤:The electronic device according to any one of claims 11 to 14, wherein when the processor executes the computer readable instructions, the following steps are further implemented:
    接收客户通过所述客户端向所述服务器发送的查询指令,所述查询指令包括所述埋点ID;Receiving, by the client, a query instruction sent by the client to the server, where the query instruction includes the buried point ID;
    基于所述查询指令,获取与所述埋点ID相对应的查询结果。And obtaining a query result corresponding to the buried point ID based on the query instruction.
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被至少一个处理器执行时实现如下步骤:A computer readable storage medium storing computer readable instructions, wherein the computer readable instructions, when executed by at least one processor, implement the following steps:
    在客户端上运行待测软件,所述待测软件包括至少一个功能模块,每一功能模块上设有至少一个埋点;Running the software to be tested on the client, the software to be tested includes at least one function module, and each function module is provided with at least one buried point;
    当所述待测软件上的所述埋点被触发时,生成埋点数据,并将所述埋点数据发送给MongoDB数据库;所述埋点数据包括埋点ID、测试校验代码和参数信息;When the buried point on the software to be tested is triggered, generating buried point data, and transmitting the buried point data to a MongoDB database; the buried point data includes a buried point ID, a test check code, and parameter information. ;
    使MongoDB数据库上配置的awk脚本获取测试校验代码为失败的所述埋点数据,确定为待分析数据;The awk script configured on the MongoDB database obtains the buried data of the test verification code as a failure, and is determined as the data to be analyzed;
    采用预设分析算法对所述待分析数据中的参数信息进行分析,获取导致所述埋点测试失败的分析结果。The parameter information in the data to be analyzed is analyzed by using a preset analysis algorithm to obtain an analysis result that causes the buried point test to fail.
  17. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述计算机可读指令被至少一个处理器执行时实现如下步骤:The computer readable storage medium of claim 16, wherein the computer readable instructions are executed by at least one processor to implement the following steps:
    将所述MongoDB数据库安装在所述服务器,完成所述MongoDB数据库与所述服务器的信息配置,以使所述MongoDB数据库实时监控并获取所述埋点数据;Installing the MongoDB database on the server, completing information configuration of the MongoDB database and the server, so that the MongoDB database monitors and acquires the buried point data in real time;
    设置所述awk脚本定时获取所述测试校验代码为失败的埋点数据。The awk script is set to periodically acquire the test verification code as a failed buried point data.
  18. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述参数信息包括设备型号、设备配置、触发时间、网络类型、网络带宽和网络宽带时延积中的至少一个。The computer readable storage medium of claim 16, wherein the parameter information comprises at least one of a device model number, a device configuration, a trigger time, a network type, a network bandwidth, and a network bandwidth time delay product.
  19. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述预设分析算法包括工作分解结构算法、资源分解结构算法或组织分解结构算法。The computer readable storage medium according to claim 16, wherein the preset analysis algorithm comprises a work breakdown structure algorithm, a resource decomposition structure algorithm or an organization decomposition structure algorithm.
  20. 根据权利要求19所述的计算机可读存储介质,其特征在于,所述计算机可读指令被至少一个处理器执行时,还实现如下步骤:A computer readable storage medium according to claim 19, wherein when said computer readable instructions are executed by at least one processor, the steps of:
    接收客户通过所述客户端向所述服务器发送的查询指令,所述查询指令包括所述埋点ID;Receiving, by the client, a query instruction sent by the client to the server, where the query instruction includes the buried point ID;
    基于所述查询指令,获取与所述埋点ID相对应的查询结果。And obtaining a query result corresponding to the buried point ID based on the query instruction.
PCT/CN2018/074874 2017-04-06 2018-01-31 Software testing method, apparatus, electronic device, and medium WO2018184420A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710221079.4 2017-04-06
CN201710221079.4A CN107688530B (en) 2017-04-06 2017-04-06 Software testing method and device

Publications (1)

Publication Number Publication Date
WO2018184420A1 true WO2018184420A1 (en) 2018-10-11

Family

ID=61152357

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/074874 WO2018184420A1 (en) 2017-04-06 2018-01-31 Software testing method, apparatus, electronic device, and medium

Country Status (2)

Country Link
CN (1) CN107688530B (en)
WO (1) WO2018184420A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110401899A (en) * 2019-07-25 2019-11-01 厦门盈趣科技股份有限公司 Audio testing method and relevant apparatus
CN111190807A (en) * 2018-11-14 2020-05-22 杭州萤石软件有限公司 Buried point testing method and device

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108664401B (en) * 2018-05-11 2021-10-12 创新先进技术有限公司 Method and device for evaluating reasonability of buried point
CN109101414B (en) * 2018-06-14 2021-10-15 挖财网络技术有限公司 Massive UI test generation method and device based on buried point data
CN109684155B (en) * 2018-08-27 2022-11-15 平安科技(深圳)有限公司 Monitoring configuration method, device, equipment and readable storage medium
CN110875858B (en) * 2018-08-31 2023-06-27 北京京东尚科信息技术有限公司 Application test data grabbing method, system, equipment and storage medium
CN111506489B (en) * 2019-01-30 2023-05-30 斑马智行网络(香港)有限公司 Test method, system, device, server and storage medium
CN109960651A (en) * 2019-02-13 2019-07-02 北京达佳互联信息技术有限公司 Bury a test method, system, device and computer readable storage medium
CN110515830A (en) * 2019-07-15 2019-11-29 平安普惠企业管理有限公司 Operation trace method for visualizing, device, equipment and storage medium
CN110674048B (en) * 2019-09-27 2023-09-22 北京新氧科技有限公司 Buried point test characteristic acquisition method and related device
CN111090592A (en) * 2019-12-20 2020-05-01 上海品顺信息科技有限公司 Automatic testing method of buried point, terminal and readable storage medium
CN111813698A (en) * 2020-08-27 2020-10-23 江苏洲际软件有限公司 Software testing device and testing method
CN112286834B (en) * 2020-12-31 2021-04-16 智道网联科技(北京)有限公司 Multi-device software testing method, testing device, electronic device and storage medium
CN113485889B (en) * 2021-06-29 2023-08-15 平安银行股份有限公司 Buried data verification method and device, electronic equipment and storage medium
CN113688031B (en) * 2021-07-15 2024-03-26 上海浦东发展银行股份有限公司 Test positioning method based on byte code enhancement technology
CN113673997A (en) * 2021-08-27 2021-11-19 深圳鼎盛电脑科技有限公司 Visualized processing method, device, equipment and medium of fund calculation engine
CN114168430A (en) * 2022-01-06 2022-03-11 携程旅游网络技术(上海)有限公司 Front-end abnormal alarm configuration method, system, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053906A (en) * 2009-10-30 2011-05-11 国际商业机器公司 System and method for collecting program runtime information
CN103778244A (en) * 2014-02-11 2014-05-07 五八同城信息技术有限公司 Automatic report analytical method based on user behavior logs
CN104915296A (en) * 2015-06-29 2015-09-16 北京金山安全软件有限公司 Buried point testing method, data query method and device
CN106294091A (en) * 2016-08-11 2017-01-04 福建富士通信息软件有限公司 A kind of without intrusive mood daily record interception method for analyzing performance and system
US9600405B1 (en) * 2008-10-03 2017-03-21 Federal Home Loan Mortgage Corporation (Freddie Mac) Systems and methods for testing a software application

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7865704B2 (en) * 2006-03-29 2011-01-04 Freescale Semiconductor, Inc. Selective instruction breakpoint generation based on a count of instruction source events
CN101201787A (en) * 2006-12-12 2008-06-18 英业达股份有限公司 System and method for debugging software program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9600405B1 (en) * 2008-10-03 2017-03-21 Federal Home Loan Mortgage Corporation (Freddie Mac) Systems and methods for testing a software application
CN102053906A (en) * 2009-10-30 2011-05-11 国际商业机器公司 System and method for collecting program runtime information
CN103778244A (en) * 2014-02-11 2014-05-07 五八同城信息技术有限公司 Automatic report analytical method based on user behavior logs
CN104915296A (en) * 2015-06-29 2015-09-16 北京金山安全软件有限公司 Buried point testing method, data query method and device
CN106294091A (en) * 2016-08-11 2017-01-04 福建富士通信息软件有限公司 A kind of without intrusive mood daily record interception method for analyzing performance and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111190807A (en) * 2018-11-14 2020-05-22 杭州萤石软件有限公司 Buried point testing method and device
CN111190807B (en) * 2018-11-14 2023-08-18 杭州萤石软件有限公司 Buried point testing method and equipment
CN110401899A (en) * 2019-07-25 2019-11-01 厦门盈趣科技股份有限公司 Audio testing method and relevant apparatus

Also Published As

Publication number Publication date
CN107688530B (en) 2020-04-10
CN107688530A (en) 2018-02-13

Similar Documents

Publication Publication Date Title
WO2018184420A1 (en) Software testing method, apparatus, electronic device, and medium
US11314574B2 (en) Techniques for managing and analyzing log data
US10372600B2 (en) Systems and methods for automated web performance testing for cloud apps in use-case scenarios
CN109302522B (en) Test method, test device, computer system, and computer medium
CN107273280B (en) Log processing method and device, electronic equipment and storage medium
WO2018113385A1 (en) Method and system for dynamically tracking application of client, client, and server
WO2020186809A1 (en) Big data platform-based hive task scheduling method and apparatus, device, and storage medium
US20170315902A1 (en) Systems And Methods For Performance Testing Cloud Applications From Multiple Different Geographic Locations
US9569325B2 (en) Method and system for automated test and result comparison
WO2018120721A1 (en) Method and system for testing user interface, electronic device, and computer readable storage medium
US9712410B1 (en) Local metrics in a service provider environment
US10831463B2 (en) Intelligent software deployment on an IaaS platform
CN112910945A (en) Request link tracking method and service request processing method
US20160283348A1 (en) Testing of application service versions on live data
US20140089477A1 (en) System and method for monitoring storage machines
US11023365B2 (en) Systems and methods for automated provisioning of a virtual mainframe test environment
WO2021120975A1 (en) Monitoring method and apparatus
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
EP3168748A1 (en) System and method for monitoring performance of applications
CN110737594A (en) Database standard conformance testing method and device for automatically generating test cases
WO2019148657A1 (en) Method for testing associated environments, electronic device and computer readable storage medium
US9158641B2 (en) Cloud auto-test system, method and non-transitory computer readable storage medium of the same
US11144440B1 (en) Implementing device-specific libraries for validation testing
CN112596723B (en) Database script generation method, device, equipment and medium
CN112882948A (en) Stability testing method, device and system for application and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18780320

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 15.01.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18780320

Country of ref document: EP

Kind code of ref document: A1