WO2020000806A1 - Configuration file comparison method and configuration file comparison device - Google Patents

Configuration file comparison method and configuration file comparison device Download PDF

Info

Publication number
WO2020000806A1
WO2020000806A1 PCT/CN2018/111492 CN2018111492W WO2020000806A1 WO 2020000806 A1 WO2020000806 A1 WO 2020000806A1 CN 2018111492 W CN2018111492 W CN 2018111492W WO 2020000806 A1 WO2020000806 A1 WO 2020000806A1
Authority
WO
WIPO (PCT)
Prior art keywords
configuration file
configuration
parameter
tested
instruction
Prior art date
Application number
PCT/CN2018/111492
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 WO2020000806A1 publication Critical patent/WO2020000806A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management

Definitions

  • the present application relates to the field of system development and application technology, and in particular, to a configuration file comparison method and a configuration file comparison device.
  • the generally adopted method is to set up a test environment, configure the files to be tested in the test environment, and then perform a comprehensive test on the test system. After the test passes, the system is deployed to the production environment, and the system is configured with files in the production environment to ensure that it runs correctly.
  • the embodiments of the present application provide a configuration file comparison method and a configuration file comparison device, which can timely compare the configuration files in the production environment and the test environment, which helps maintain the normal operation of the system and reduce the possibility of production accidents. .
  • an embodiment of the present application provides a configuration file comparison method.
  • the configuration file comparison method includes:
  • first configuration file being a configuration file of the system to be tested in a test environment
  • second configuration file being A configuration file of the system to be tested in a production environment
  • the comparison result is output.
  • an embodiment of the present application provides a configuration file comparison device.
  • the configuration file comparison device includes an instruction acquisition module, a configuration file acquisition module, a configuration file comparison module, and an output module. Among them,
  • the instruction obtaining module is configured to receive a configuration file obtaining instruction of a tester
  • the configuration file acquisition module is configured to acquire a first configuration file and a second configuration file of a system to be tested according to the configuration file acquisition instruction, where the first configuration file is a configuration file of a system to be tested in a test environment.
  • the second configuration file is a configuration file of a system to be tested in a production environment;
  • the configuration file comparison module is configured to perform a comparison between the first configuration file and the second configuration file according to the obtained first configuration file and the second configuration file, and obtain a comparison result.
  • the comparison result shows at least a difference between the first configuration file and the second configuration file;
  • the output module is configured to output the comparison result.
  • an embodiment of the present application provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor.
  • the processor executes the computer program, the processor implements the method described in the first aspect. method.
  • an embodiment of the present application provides a computer non-volatile readable storage medium, where the computer non-volatile readable storage medium includes a stored program, wherein the computer is controlled when the program runs.
  • the device on which the volatile readable storage medium is located executes the method as described in the first aspect above.
  • the embodiment of the present application provides a configuration file comparison method and a configuration file comparison device.
  • a configuration file obtaining instruction of a tester is first received, and then a system to be tested is obtained according to the configuration file obtaining instruction.
  • the first configuration file and the second configuration file and then comparing the first configuration file and the second configuration file according to the obtained first configuration file and the second configuration file to obtain a comparison result, and the comparison result displays at least the first The difference between the first configuration file and the second configuration file, and finally the comparison result is output, so that the configuration files of the test environment and the production environment can be compared in a timely and convenient manner, so that the tester can conveniently and timely find the inconsistencies between the two.
  • testers to adjust the configuration files in the test environment in a timely manner to make the two consistent, thereby helping to maintain the normal operation of the system and reduce the possibility of production accidents .
  • FIG. 1 is a flowchart of a configuration file comparison method according to an embodiment of the present application
  • FIG. 2 is a flowchart of step 102 according to an embodiment of the present application.
  • FIG. 3 is a first schematic diagram of a configuration file comparison device according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a configuration file obtaining module according to an embodiment of the present application.
  • FIG. 5 is a second schematic diagram of a configuration file comparison apparatus according to an embodiment of the present application.
  • FIG. 6 is a third schematic diagram of a configuration file comparison apparatus according to an embodiment of the present application.
  • test environment refers to the general name of computer hardware, software, network equipment, and historical data necessary to complete system test work.
  • Production environment refers to the environment that is ultimately used when the system is online, including computer hardware, software, and network equipment.
  • the test environment computer group includes at least one test environment computer, each test environment computer is connected to the server, and the production environment test unit includes at least one production environment computer, each production environment computer. All are connected to the server, and each production environment computer corresponds to each test environment computer.
  • This correspondence refers to the application or operating system tested by the test environment computer in the test environment, and the application program or operating system running in the corresponding production environment. The application or operating system on the production computer is the same.
  • FIG. 1 is a flowchart of a configuration file comparison method provided by an embodiment of the present application.
  • the configuration file comparison method includes:
  • Step 101 Receive a configuration file obtaining instruction of a tester.
  • Step 102 Obtain a first configuration file and a second configuration file of the system to be tested according to the configuration file acquisition instruction.
  • the first configuration file is a configuration file of the system to be tested in the test environment
  • the second configuration file is the system to be tested in production. Configuration files in the environment.
  • Step 103 Compare the first configuration file and the second configuration file according to the obtained first configuration file and the second configuration file, and obtain a comparison result.
  • the comparison result shows at least the first configuration file and the second configuration file. difference.
  • Step 104 Output the comparison result.
  • the above configuration file comparison method can be applied to a computer system, or a program for executing the configuration file comparison method is set in a computer.
  • first receive a configuration file acquisition instruction from a tester and then obtain a first configuration file and The second configuration file
  • the first configuration file is a configuration file of the system to be tested in the test environment
  • the second configuration file is the configuration file of the system to be tested in the production environment
  • Comparing the first configuration file and the second configuration file to obtain a comparison result the comparison result shows at least the difference between the first configuration file and the second configuration file
  • the comparison result is output, so that the test can be conveniently and timely performed
  • the configuration files of the environment and the production environment are compared, so that testers can easily and timely find the inconsistencies between the two, so that developers can adjust the configuration files in the production environment in a timely manner or testers can make timely adjustments to the test files in the test environment.
  • Configuration files are adjusted to make them consistent, which helps maintain the system Uptime, reducing the likelihood of accidents occur.
  • a tester may issue a configuration file acquisition instruction through a client (such as a computer or a smartphone), and the tester may issue a configuration by entering text, inputting a voice, or selecting based on a selection box popped up by the client.
  • File acquisition instructions are not limited here.
  • the tester can issue only one configuration file acquisition instruction, or can issue multiple configuration file acquisition instructions.
  • each configuration file can be processed in a certain order (such as chronological order, priority order, etc.) Get instruction to receive.
  • the configuration file obtaining instruction includes at least an identification of a system to be tested, an identification of a configuration file type, an identification of a test environment computer, and an identification of a production environment computer.
  • the identification of the system to be tested in the configuration file acquisition instruction is used to obtain the system to be tested from multiple systems, the configuration file type identification is used to determine the configuration file type, the test environment computer identification is used to determine the test environment computer, and the production environment computer identification is used to Identify production environment computers.
  • the identification of the system under test includes at least one or more of the name, version, etc. of the system under test;
  • the configuration file type includes at least one or more of a script configuration file and a database configuration file, etc.
  • the script configuration file includes at least an xml file and one or more of the properties file, etc .;
  • the test environment computer identification includes at least one or more of the IP address, model, etc. of the test environment computer;
  • the production environment computer identification includes at least one or more of the IP address, etc. of the test environment computer Each.
  • the configuration file obtaining instruction may further include multiple configuration parameter identifiers, the first configuration file includes multiple first configuration parameters, and the second configuration file includes multiple second configuration parameters, where the configuration parameter identifier may be used to determine multiple Configuration parameters for comparison between the first configuration parameter and the plurality of second configuration parameters, so that the required first configuration parameter and the second configuration parameter can be compared according to the actual situation, and the configuration file comparison method is improved Practicality.
  • the configuration file obtaining instruction includes at least a system identifier to be tested, a configuration file type identifier, a test environment computer identifier, and a production environment computer identifier.
  • FIG. 2 is a step 102 provided by an embodiment of the present application
  • acquiring the first configuration file and the second configuration file of the system to be tested according to the configuration file acquisition instruction specifically includes:
  • Step 201 Obtain a system to be tested from a plurality of systems according to the identification of the system to be tested in the configuration file obtaining instruction;
  • Step 202 Acquire a configuration file acquisition policy corresponding to the configuration file type according to the configuration file type identifier in the configuration file acquisition instruction.
  • step 202 may be various.
  • the configuration file comparison method in the embodiment of the present application further includes: constructing a mapping relationship between a configuration file type and a configuration file acquisition policy.
  • the configuration file acquisition strategy corresponding to the configuration file type specifically includes: searching for the corresponding configuration file acquisition strategy in the mapping relationship according to the configuration file type identifier in the configuration file acquisition instruction.
  • the above mapping relationship includes, but is not limited to, the following: If the configuration file type is a script configuration file, the configuration file acquisition strategy is to obtain a first configuration file from a configuration file source (web form or database form), and obtain a second configuration file from application deployment. ; And / or, if the configuration file type is a database configuration file, the configuration file acquisition strategy is to export the test table from the test library as the first configuration file and the csv (Comma-Separated Values, comma-separated values) file from the production library as the first configuration file The second configuration file.
  • a script configuration file the configuration file acquisition strategy is to obtain a first configuration file from a configuration file source (web form or database form), and obtain a second configuration file from application deployment. ; And / or, if the configuration file type is a database configuration file, the configuration file acquisition strategy is to export the test table from the test library as the first configuration file and the csv (Comma-Separated Values, comma-s
  • Step 203 Obtain a first configuration file from the test environment computer and a second configuration file from the production environment computer according to the test environment computer identification, the production environment computer identification, and the configuration file acquisition strategy in the configuration file acquisition instruction.
  • the configuration file obtaining instruction may further include multiple configuration parameter identifiers.
  • the first configuration file includes multiple first configuration parameters and the second configuration file includes multiple second configuration parameters
  • step 103 according to the acquired first A configuration file and a second configuration file. Comparing the first configuration file and the second configuration file includes: comparing the first configuration parameter corresponding to each configuration parameter identifier with the second configuration parameter one by one.
  • the configuration file acquisition instruction includes three configuration parameter identifiers, X1, X2, and X3, the first configuration file includes three first configuration parameters C1, C2, and C3, and the second configuration file includes three second configuration parameters C1 ', C2 'and C3', the configuration parameter identifier X1 corresponds to the first configuration parameter C1 and the second configuration parameter C1 ', the configuration parameter identifier X2 corresponds to the first configuration parameter C2 and the second configuration parameter C2', and the configuration parameter identifier X3 Corresponding to the first configuration parameter C3 and the second configuration parameter C3 ', the first configuration parameter C1 and the second configuration parameter C1' are compared, and the first configuration parameter C2 and the second configuration parameter C2 'are compared, The first configuration parameter C3 is compared with the second configuration parameter C3 '.
  • the corresponding relationship between the configuration parameter identifier and the first configuration parameter and the second configuration parameter are different, and the specific ways of comparing the first configuration file and the second configuration file are also different.
  • the configuration parameter identifier corresponds to the first configuration parameter one-to-one
  • the second configuration parameter corresponds one-to-one.
  • the specific way of comparing the first configuration file with the second configuration file is: All the first configuration parameters included in the first configuration file and all the second configuration parameters included in the second configuration file are compared one by one, so that omissions are not easy to occur. Specific examples are as previously described.
  • the configuration parameter identifier corresponds to the first configuration parameter of the plurality of first configuration parameters that will cause a production accident, and corresponds to the second configuration parameter of the second configuration parameter that will cause a production accident.
  • the specific way of comparing the first configuration file and the second configuration file is: the first configuration parameter included in the first configuration file that will cause a production accident, and the first configuration parameter included in the second configuration file will cause a production accident
  • the second configuration parameters are compared one by one, which can effectively prevent production accidents and improve the comparison efficiency.
  • the configuration file acquisition instruction includes three configuration parameter identifiers, X1, X2, and X3, the first configuration file includes five first configuration parameters C1, C2, C3, C4, and C5, and the second configuration file includes five second configurations Parameters C1 ', C2', C3 ', C4', and C5 '.
  • the first configuration parameters C1, C2, and C3 will cause a production accident, the first configuration parameters C4 and C5 will not cause a production accident, and the second configuration parameters C1', C2 'and C3' will cause a production accident, and the second configuration parameter C4 'and C5' will not cause a production accident, the configuration parameter identifier X1 corresponds to the first configuration parameter C1 and the second configuration parameter C1 ', and the configuration parameter identifier X2 Corresponding to the first configuration parameter C2 and the second configuration parameter C2 ', and the configuration parameter identifier X3 corresponds to the first configuration parameter C3 and the second configuration parameter C3', then the first configuration parameter C1 and the second configuration parameter C1 ' For comparison, the first configuration parameter C2 and the second configuration parameter C2 'are compared, and the first configuration parameter C3 and the second configuration parameter C3' are compared.
  • all first configuration parameters in all first configuration files and all second configuration parameters in all second configuration files can be analyzed to determine each first configuration parameter If there is a difference between the second configuration parameter and the corresponding second configuration parameter, whether a production accident will occur, and according to the result, the configuration parameter identifier required to be included in the configuration file acquisition instruction is set, so that the configuration parameter identifier is different from multiple first configuration parameters.
  • the configuration parameter identifier corresponds one-to-one with the first configuration parameter that causes the seriousness of the production accident in the plurality of first configuration parameters to be greater than the preset level, and corresponds to the seriousness of the production accident that is caused in the second configuration parameter.
  • the second configuration parameter whose level is greater than the preset level corresponds one-to-one, and the specific way of comparing the first configuration file and the second configuration file is: the severity level of the production accident included in the first configuration file is greater than the preset level.
  • the first configuration parameter of the level is compared with the second configuration parameter of the second configuration file that causes the severity of the production accident that is greater than the preset level, thereby improving the comparison efficiency.
  • the configuration file acquisition instruction includes three configuration parameter identifiers, X1, X2, and X3, the first configuration file includes five first configuration parameters C1, C2, C3, C4, and C5, and the second configuration file includes five second configurations The parameters C1 ', C2', C3 ', C4', and C5 '.
  • the first configuration parameter C1, C2, and C3 causes the severity of the production accident to be greater than the preset level, and the first configuration parameters C4 and C5 cause the severity of the production accident.
  • the configuration parameter identifier X1 corresponds to the first configuration parameter C1 and the second configuration parameter C1 '
  • the configuration parameter identifier X2 corresponds to the first configuration parameter C2 and the second configuration parameter C2'
  • the configuration parameter identifier X3 corresponds to the first configuration parameter C3
  • the first configuration parameter C1 and the second configuration parameter C1' are compared
  • all first configuration parameters in all first configuration files and all second configuration parameters in all second configuration files can be analyzed to determine each first configuration parameter
  • the severity of the production accident is induced, and all the first configuration parameters and all the second configuration parameters are divided into multiple levels (for example, all the first configuration parameters are classified as The order of decreasing severity of accidents is divided into ranks 1 to 5.
  • all second configuration parameters are divided into ranks 1 to 5 in order of decreasing severity of accidents, and preset levels (such as rank 4) are set.
  • the configuration parameter identifiers required to be included in the configuration file acquisition instruction are set according to the preset levels, so that the configuration parameter identifiers correspond to the first configuration parameters of the multiple first configuration parameters that cause the severity of the production accident to be greater than the preset level.
  • the second configuration parameter with a severity level that causes a production accident in the second configuration parameter is greater than a preset level Number one to one correspondence.
  • the configuration parameter identifier corresponds to the first configuration parameter in which the number of differences in the plurality of first configuration parameters is greater than a preset value, and corresponds to the number of differences in the second configuration parameter that is greater than the preset value.
  • the second configuration parameter has a one-to-one correspondence, and the specific way of comparing the first configuration file with the second configuration file is: the first configuration parameter included in the first configuration file with a number of occurrences greater than a preset value is compared with the first configuration parameter
  • the second configuration file includes a comparison of the second configuration parameters whose number of occurrences is greater than a preset value, thereby improving the comparison efficiency.
  • the configuration file acquisition instruction includes three configuration parameter identifiers, X1, X2, and X3, the first configuration file includes five first configuration parameters C1, C2, C3, C4, and C5, and the second configuration file includes five second configurations
  • the parameters C1 ', C2', C3 ', C4', and C5 ', the number of differences between the first configuration parameters C1, C2, and C3 is greater than a preset value (for example, 3 times), and the number of differences between the first configuration parameters C4 and C5 is not greater than Preset value.
  • the configuration parameter identifier X1 is different from the first
  • the configuration parameter C1 corresponds to the second configuration parameter C1 '
  • the configuration parameter identifier X2 corresponds to the first configuration parameter C2 and the second configuration parameter C2'
  • the configuration parameter identifier X3 corresponds to the first configuration parameter C3 and the second configuration parameter C3 '
  • the first configuration parameter C1 and the second configuration parameter C1 ' are compared
  • the first configuration parameter C2 and the second configuration parameter C2' are compared
  • all first configuration parameters in all first configuration files and all second configuration parameters in all second configuration files can be analyzed to determine each first configuration parameter
  • the number of times that there is a difference between the second configuration parameter and the corresponding second configuration parameter, and a preset value (for example, 3 times) is set, and the configuration parameter identifier required by the configuration file acquisition instruction is set according to the preset value, so that the configuration parameter identifier and the
  • the plurality of first configuration parameters have a one-to-one correspondence with the first configuration parameter with a difference greater than a preset value, and one-to-one correspondence with the second configuration parameter with the second configuration parameter with a difference greater than a preset value.
  • the manner of outputting the comparison result in step 104 may be: displaying the comparison result in a list form.
  • the configuration file comparison method in the embodiment of the present application further includes: storing the current comparison result and deleting the previous comparison result, so that the tester can conveniently query the latest comparison result and track and analyze the difference , And then monitor changes in the first configuration file or the second configuration file.
  • FIG. 3 is a schematic diagram 1 of a configuration file comparison device provided by an embodiment of the present application.
  • the configuration file comparison device includes instruction acquisition. Module 1, configuration file acquisition module 2, configuration file comparison module 3, and output module 4;
  • the instruction obtaining module 1 is configured to receive a configuration file obtaining instruction of a tester.
  • the configuration file type includes at least: a script configuration file and a database configuration file, and the script configuration file includes at least an xml file and a properties file.
  • the configuration file obtaining instruction includes at least an identification of a system to be tested, an identification of a configuration file type, an identification of a test environment computer, and an identification of a production environment computer.
  • the configuration file acquisition module 2 is configured to acquire a first configuration file and a second configuration file of the system to be tested according to the configuration file acquisition instruction.
  • the first configuration file is a configuration file of the system to be tested in the test environment
  • the second configuration file is Test system configuration files in a production environment.
  • the configuration file comparison module 3 is configured to perform a comparison between the first configuration file and the second configuration file according to the obtained first configuration file and the second configuration file, to obtain a comparison result, and the comparison result shows at least the first configuration file and The difference in the second profile.
  • the configuration file comparison module is specifically configured to, according to the obtained first configuration file and the second configuration file, compare multiple first configuration parameters included in the first configuration file with multiple second configurations included in the second configuration file. Compare the parameters one by one to get the comparison result.
  • the comparison result shows a comparison result of all the first configuration parameters and all the second configuration parameters.
  • the output module 4 is used to output the comparison result.
  • the identification of the system to be tested in the configuration file acquisition instruction is used to obtain the system to be tested from multiple systems
  • the configuration file type identification is used to determine the configuration file type
  • the test environment computer identification is used to determine the test environment computer
  • the production environment computer identification Used to determine the production environment computer.
  • the identification of the system under test includes at least one or more of the name, version, etc. of the system under test;
  • the configuration file type includes at least one or more of a script configuration file and a database configuration file, etc.
  • the script configuration file includes at least an xml file and one or more of the properties file, etc .;
  • the test environment computer identification includes at least one or more of the IP address, model, etc. of the test environment computer;
  • the production environment computer identification includes at least one or more of the IP address, etc. of the test environment computer Each.
  • FIG. 4 is a configuration file acquisition provided by an embodiment of the present application.
  • the configuration file acquisition module 2 includes a test system acquisition unit 21, a configuration file acquisition strategy acquisition unit 22, and a configuration file acquisition unit 23, where:
  • the test system acquisition unit 21 is configured to acquire the system to be tested from multiple systems according to the identification of the system to be tested in the configuration file acquisition instruction;
  • the configuration file acquisition policy acquisition unit 22 is configured to acquire a configuration file acquisition policy corresponding to the configuration file type according to the configuration file type identifier in the configuration file acquisition instruction.
  • the configuration file obtaining unit 23 is configured to obtain a first configuration file from the test environment computer and a second configuration file from the production environment computer according to the test environment computer identification, the production environment computer identification, and the configuration file acquisition strategy in the configuration file acquisition instruction. .
  • FIG. 5 is a second schematic diagram of a configuration file comparison device according to an embodiment of the present application.
  • the configuration file comparison device further includes a mapping relationship construction module 5, and the mapping relationship construction module 5 is configured to construct a configuration. Mapping between file types and configuration file acquisition policies.
  • the configuration file acquisition policy acquisition unit 22 is specifically configured to find a corresponding configuration file acquisition policy in the mapping relationship according to the configuration file type identifier in the configuration file acquisition instruction.
  • the above mapping relationship includes, but is not limited to, the following: If the configuration file type is a script configuration file, the configuration file acquisition strategy is to obtain a first configuration file from a configuration file source (web form or database form), and obtain a second configuration file from application deployment. ; And / or, if the configuration file type is a database configuration file, the configuration file acquisition strategy is to export the test table from the test library as the first configuration file and the csv (Comma-Separated Values, comma-separated values) file from the production library as the first configuration file The second configuration file.
  • a script configuration file the configuration file acquisition strategy is to obtain a first configuration file from a configuration file source (web form or database form), and obtain a second configuration file from application deployment. ; And / or, if the configuration file type is a database configuration file, the configuration file acquisition strategy is to export the test table from the test library as the first configuration file and the csv (Comma-Separated Values, comma-s
  • the configuration file obtaining instruction may further include multiple configuration parameter identifiers, the first configuration file includes multiple first configuration parameters, and the second configuration file includes multiple second configuration parameters, wherein the configuration parameter identifier may be used to determine multiple Configuration parameters for comparison between the first configuration parameter and the plurality of second configuration parameters, so that the required first configuration parameter and the second configuration parameter can be compared according to the actual situation, and the configuration file comparison method is improved Practicality.
  • the configuration file acquisition unit 23 included in the configuration file acquisition module 2 is specifically configured to compare the first configuration parameter corresponding to each configuration parameter identifier with the second configuration parameter one by one.
  • the configuration parameter identifier corresponds to the first configuration parameter one-to-one, and corresponds to the second configuration parameter one-to-one.
  • the configuration file obtaining unit 23 is specifically configured to: A configuration parameter is compared with all the second configuration parameters included in the second configuration file, so that it is not easy to miss.
  • the configuration parameter identifier corresponds to the first configuration parameter of the plurality of first configuration parameters that will cause a production accident, and corresponds to the second configuration parameter of the second configuration parameter that will cause a production accident. If there is a correspondence, the configuration file obtaining unit 23 is specifically configured to perform one by one the first configuration parameter included in the first configuration file that may cause a production accident and the second configuration parameter included in the second configuration file that may cause a production accident The comparison can effectively prevent production accidents and improve the comparison efficiency.
  • the configuration file obtaining device may further include a difference analysis module and a configuration parameter identification setting module, where the difference analysis module is configured to: for all the first configuration parameters in all the first configuration files, and for all the first configuration parameters in all the second configuration files; The second configuration parameter is analyzed to determine whether there is a production accident when there is a difference between each of the first configuration parameters and the corresponding second configuration parameter; the configuration parameter identification setting module is used to: obtain the configuration file instruction instructions according to the results.
  • the included configuration parameter identifier is set so that the configuration parameter identifier corresponds to the first configuration parameter among the plurality of first configuration parameters that would lead to a production accident, and to the second configuration parameter among the second configuration parameters that would cause a production accident.
  • the parameters correspond one-to-one.
  • the configuration parameter identifier corresponds one-to-one with the first configuration parameter that causes the seriousness of the production accident in the plurality of first configuration parameters to be greater than the preset level, and corresponds to the seriousness of the production accident that is caused in the second configuration parameter.
  • the second configuration parameter whose level is greater than the preset level corresponds one-to-one, and the configuration file obtaining unit 23 is specifically configured to: compare the first configuration parameter of the first configuration file with the severity level of the production accident that is greater than the preset level to the first configuration parameter.
  • the second configuration file includes the second configuration parameters that cause a production accident with a severity level greater than a preset level to compare one by one, thereby improving the comparison efficiency.
  • the configuration file obtaining device may further include a difference analysis module and a configuration parameter identification setting module, where the difference analysis module is configured to: for all the first configuration parameters in all the first configuration files, and for all the first configuration parameters in all the second configuration files; Analyze the second configuration parameters to determine the severity of the production accident when there is a difference between each first configuration parameter and the corresponding second configuration parameter, and use this to divide all the first configuration parameters from all the second configuration parameters For multiple levels (for example, all the first configuration parameters are divided into levels one to five in the order of decreasing severity of the accident, and all second configuration parameters are correspondingly divided into ranks one to five in the order of decreasing severity of the accident) , And set a preset level (for example, level four); the configuration parameter identification setting module is used to: set the configuration parameter identification required by the configuration file acquisition instruction according to the preset level; so that the configuration parameter identification and multiple first configurations The first configuration parameter in the parameter that caused the severity of the production accident is greater than the preset level Yes, and one-to-one correspondence with the
  • the configuration parameter identifier corresponds to the first configuration parameter in which the number of differences in the plurality of first configuration parameters is greater than a preset value, and corresponds to the number of differences in the second configuration parameter that is greater than the preset value.
  • the second configuration parameters are in one-to-one correspondence, and the configuration file obtaining unit 23 is specifically configured to: set the first configuration parameter in which the number of occurrence differences included in the first configuration file is greater than a preset value, and the number of occurrence differences included in the second configuration file is greater than The preset second configuration parameters are compared one by one, thereby improving the comparison efficiency.
  • the configuration file obtaining device may further include a difference analysis module and a configuration parameter identification setting module, where the difference analysis module is configured to: for all the first configuration parameters in all the first configuration files, and for all the first configuration parameters in all the second configuration files; The second configuration parameter is analyzed to determine the number of times that there is a difference between each first configuration parameter and the corresponding second configuration parameter, and a preset value is set (for example, 3 times); the configuration parameter identification setting module is configured to: The value sets the configuration parameter identifiers that need to be included in the configuration file acquisition instruction, so that the configuration parameter identifiers correspond to the first configuration parameters in which the number of differences between the plurality of first configuration parameters is greater than a preset value, and corresponds to the second configuration.
  • the second configuration parameters in which the number of times of difference in the parameters is greater than a preset value correspond one-to-one.
  • FIG. 6 is a third schematic diagram of a configuration file comparison device provided in an embodiment of the present application.
  • the configuration file comparison device further includes a storage module 6 for storing the current comparison result. , And delete the previous comparison results, so that the tester can easily query the latest comparison results, track and analyze the differences, and then monitor the changes in the first configuration file or the second configuration file.
  • An embodiment of the present application provides a computer device.
  • the computer device includes a memory and a processor.
  • the memory is used to store information including program instructions.
  • the processor is used to control the execution of the program instructions. When the program instructions are loaded and executed by the processor, the following steps are implemented.
  • the first configuration file is a configuration file of the system to be tested in the test environment
  • the second configuration The file is the configuration file of the system to be tested in the production environment; according to the obtained first configuration file and the second configuration file, the first configuration file and the second configuration file are compared to obtain a comparison result, and the comparison result is displayed at least Difference between the first configuration file and the second configuration file; output the comparison result.
  • the configuration file acquisition instruction includes at least a system identification to be tested, a configuration file type identification, a test environment computer identification, and a production environment computer identification; when the program instruction is loaded and executed by the processor, the following steps are further implemented: according to the configuration file acquisition instruction, To obtain the system to be tested from multiple systems; to obtain the configuration file type corresponding to the configuration file type from the configuration file type instruction in the configuration file acquisition instruction; to obtain the test environment in the instruction according to the configuration file A computer identification, a production environment computer identification, and a configuration file acquisition strategy, obtain a first configuration file from a test environment computer, and obtain a second configuration file from a production environment computer.
  • the following steps are also implemented: constructing a mapping relationship between the configuration file type and the configuration file acquisition strategy; and searching for the corresponding relationship in the mapping relationship according to the configuration file type identifier in the configuration file acquisition instruction. Profile acquisition strategy.
  • the following steps are further implemented: if the configuration file type is a script configuration file, obtaining the first configuration file from the configuration file source and obtaining the second configuration file from the application deployment; and / or If the configuration file type is a database configuration file, the test table is exported from the test library as the first configuration file, and the comma-separated value csv file is exported from the production library as the second configuration file.
  • the configuration file acquisition instruction further includes multiple configuration parameter identifiers; the first configuration file includes multiple first configuration parameters, and the second configuration file includes multiple second configuration parameters; when the program instructions are loaded and executed by the processor, The following steps are implemented: the first configuration parameter corresponding to each configuration parameter identifier is compared with the second configuration parameter one by one.
  • the configuration parameter identifiers correspond one-to-one to the first configuration parameter and one-to-one to the second configuration parameter.
  • the configuration parameter identifiers correspond one-to-one to a first configuration parameter of the plurality of first configuration parameters that may cause a production accident, and correspond one-to-one to a second configuration parameter of the second configuration parameters that may cause a production accident.
  • the configuration parameter identifier corresponds to the first configuration parameter in which the severity level of the production accident caused by the plurality of first configuration parameters is greater than a preset level, and corresponds to the severity level of the production accident in the second configuration parameter that is greater than the The second configuration parameters of the ranks are in one-to-one correspondence.
  • the configuration parameter identifier corresponds one-to-one to the first configuration parameter in which the number of times of difference in the plurality of first configuration parameters is greater than a preset value, and to the second configuration in which the number of times of difference in the second configuration parameter is greater than the preset value
  • the parameters correspond one-to-one.
  • An embodiment of the present application provides a computer non-volatile readable storage medium, in which, when a program is running, controlling a device where the computer non-volatile readable storage medium is located performs the following steps: receiving a configuration file acquisition instruction of a tester; and according to the configuration File acquisition instruction to obtain the first configuration file and the second configuration file of the system to be tested.
  • the first configuration file is the configuration file of the system to be tested in the test environment
  • the second configuration file is the configuration file of the system to be tested in the production environment. ; Comparing the first configuration file and the second configuration file according to the obtained first configuration file and the second configuration file to obtain a comparison result, and the comparison result shows at least the difference between the first configuration file and the second configuration file; Output comparison results.
  • the configuration file obtaining instruction includes at least an identification of a system to be tested, an identification of a configuration file type, an identification of a test environment computer, and an identification of a production environment computer; when the program is running, controlling a device where the computer non-volatile readable storage medium is located further performs the following steps: : Obtain the system to be tested from multiple systems according to the configuration file instruction; obtain the system to be tested from multiple systems; obtain the configuration file acquisition strategy corresponding to the configuration file type according to the configuration file type identifier from the configuration file acquisition instruction; and according to the configuration The test environment computer identification, the production environment computer identification, and the configuration file acquisition strategy in the file acquisition instruction, obtain a first configuration file from the test environment computer, and obtain a second configuration file from the production environment computer.
  • the device that controls the computer's non-volatile readable storage medium further performs the following steps: constructing a mapping relationship between the configuration file type and the configuration file acquisition strategy; and according to the configuration file type identifier in the configuration file acquisition instruction, Find the corresponding configuration file acquisition strategy in the mapping relationship.
  • the device controlling the computer's non-volatile readable storage medium further performs the following steps: if the configuration file type is a script configuration file, obtaining a first configuration file from a configuration file source, and obtaining a first configuration file from an application deployment Two configuration files; and / or, if the configuration file type is a database configuration file, export the test table from the test library as the first configuration file, and export the comma-separated value csv file from the production library as the second configuration file.
  • the configuration file obtaining instruction further includes a plurality of configuration parameter identifiers; the first configuration file includes a plurality of first configuration parameters, and the second configuration file includes a plurality of second configuration parameters; controlling the computer nonvolatile when the program is running
  • the device where the readable storage medium is located further performs the following steps: comparing the first configuration parameter corresponding to each configuration parameter identifier with the second configuration parameter one by one.
  • the configuration parameter identifiers correspond one-to-one to the first configuration parameter and one-to-one to the second configuration parameter.
  • the configuration parameter identifiers correspond one-to-one to a first configuration parameter of the plurality of first configuration parameters that may cause a production accident, and correspond one-to-one to a second configuration parameter of the second configuration parameters that may cause a production accident.
  • the configuration parameter identifier corresponds to the first configuration parameter in which the severity level of the production accident caused by the plurality of first configuration parameters is greater than a preset level, and corresponds to the severity level of the production accident in the second configuration parameter that is greater than the The second configuration parameters of the ranks are in one-to-one correspondence.
  • the configuration parameter identifier corresponds one-to-one to the first configuration parameter in which the number of times of difference in the plurality of first configuration parameters is greater than a preset value, and to the second configuration in which the number of times of difference in the second configuration parameter is greater than the preset value
  • the parameters correspond one-to-one.
  • the embodiment of the present application provides a configuration file comparison method and a configuration file comparison device.
  • a configuration file obtaining instruction of a tester is first received, and then a system to be tested is obtained according to the configuration file obtaining instruction.
  • the first configuration file and the second configuration file and then comparing the first configuration file and the second configuration file according to the obtained first configuration file and the second configuration file to obtain a comparison result, and the comparison result displays at least the first The difference between the first configuration file and the second configuration file, and finally the comparison result is output, so that the configuration files of the test environment and the production environment can be compared in a timely and convenient manner, so that the tester can conveniently and timely find the inconsistencies between the two.
  • testers to adjust the configuration files in the test environment in a timely manner to make the two consistent, thereby helping to maintain the normal operation of the system and reduce the possibility of production accidents .

Landscapes

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

Abstract

A configuration file comparison method and a configuration file comparison device, relating to the field of system development and application technology. The configuration file comparison method comprises: receiving a configuration file acquisition instruction from test personnel (101); according to the configuration file acquisition instruction, acquiring a first configuration file and a second configuration file of a system to be tested (102); according to the acquired first and second configuration file, comparing the first configuration file with the second configuration file to obtain a comparison result, the comparison result showing at least the difference between the first configuration file and the second configuration file (103); and outputting the comparison result (104). Said method can compare in a timely manner a configuration file in a production environment with a configuration file in a test environment, maintaining the normal running of a system, reducing the possibility of occurrence of a production accident.

Description

一种配置文件比对方法和配置文件比对装置Configuration file comparison method and configuration file comparison device
本申请要求于2018年06月28日提交中国专利局、申请号为201810689707.6、发明名称为“一种配置文件比对方法和配置文件比对***”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on June 28, 2018 with the Chinese Patent Office, application number 201810689707.6, and the invention name as "a configuration file comparison method and configuration file comparison system", all of which passed Citations are incorporated in this application.
技术领域Technical field
本申请涉及***开发与应用技术领域,尤其涉及一种配置文件比对方法和配置文件比对装置。The present application relates to the field of system development and application technology, and in particular, to a configuration file comparison method and a configuration file comparison device.
背景技术Background technique
在***开发和应用过程中,为了能够保证***的正确、平稳运行,开发者们需要对其进行非常全面的测试。一般采用的方法是:搭建一套测试环境,在测试环境中对待测试***进行文件配置,然后对待测试***进行全面测试。等测试通过之后,再将该***部署到生产环境中,并在生产环境中对该***进行文件配置,从而保证其正确运行。In the process of system development and application, in order to ensure the correct and smooth operation of the system, developers need to test it very comprehensively. The generally adopted method is to set up a test environment, configure the files to be tested in the test environment, and then perform a comprehensive test on the test system. After the test passes, the system is deployed to the production environment, and the system is configured with files in the production environment to ensure that it runs correctly.
申请人发现,在将该***部署到生产环境的过程中,难免会出现文件配置错误的情况,使得生产环境中的配置文件与测试环境中的配置文件不一致,一旦出现不一致的情况,***将可能无法正常运行,甚至可能导致生产事故的发生。因此,亟需一种配置文件比对方法,能够及时对生产环境与测试环境中的配置文件进行比对,进而有助于维持***的正常运行,降低生产事故发生可能性。The applicant found that in the process of deploying the system to the production environment, file configuration errors will inevitably occur, making the configuration files in the production environment and the test environment inconsistent. Once there is an inconsistency, the system will likely Failure to operate properly may even lead to production accidents. Therefore, there is an urgent need for a configuration file comparison method that can timely compare the configuration files in the production environment and the test environment, thereby helping to maintain the normal operation of the system and reduce the possibility of production accidents.
申请内容Application content
本申请实施例提供一种配置文件比对方法和配置文件比对装置,可以及 时对生产环境与测试环境中的配置文件进行比对,有助于维持***的正常运行,降低生产事故发生可能性。The embodiments of the present application provide a configuration file comparison method and a configuration file comparison device, which can timely compare the configuration files in the production environment and the test environment, which helps maintain the normal operation of the system and reduce the possibility of production accidents. .
第一方面,本申请实施例提供一种配置文件比对方法,所述配置文件比对方法包括:In a first aspect, an embodiment of the present application provides a configuration file comparison method. The configuration file comparison method includes:
接收测试人员的配置文件获取指令;Receive tester configuration file acquisition instructions;
根据所述配置文件获取指令,获取待测试***的第一配置文件和第二配置文件,所述第一配置文件为所述待测试***在测试环境中的配置文件,所述第二配置文件为所述待测试***在生产环境中的配置文件;Obtaining a first configuration file and a second configuration file of the system to be tested according to the configuration file obtaining instruction, the first configuration file being a configuration file of the system to be tested in a test environment, and the second configuration file being A configuration file of the system to be tested in a production environment;
根据获取的所述第一配置文件和所述第二配置文件,对所述第一配置文件和所述第二配置文件进行比对,获得比对结果,所述比对结果至少显示所述第一配置文件和所述第二配置文件的差别;Comparing the first configuration file and the second configuration file according to the obtained first configuration file and the second configuration file to obtain a comparison result, where the comparison result displays at least the first A difference between a configuration file and the second configuration file;
输出所述比对结果。The comparison result is output.
第二方面,本申请实施例提供一种配置文件比对装置,所述配置文件比对装置包括:指令获取模块、配置文件获取模块、配置文件比对模块和输出模块;其中,In a second aspect, an embodiment of the present application provides a configuration file comparison device. The configuration file comparison device includes an instruction acquisition module, a configuration file acquisition module, a configuration file comparison module, and an output module. Among them,
所述指令获取模块用于接收测试人员的配置文件获取指令;The instruction obtaining module is configured to receive a configuration file obtaining instruction of a tester;
所述配置文件获取模块用于根据所述配置文件获取指令,获取待测试***的第一配置文件和第二配置文件,所述第一配置文件为待测试***在测试环境中的配置文件,所述第二配置文件为待测试***在生产环境中的配置文件;The configuration file acquisition module is configured to acquire a first configuration file and a second configuration file of a system to be tested according to the configuration file acquisition instruction, where the first configuration file is a configuration file of a system to be tested in a test environment. The second configuration file is a configuration file of a system to be tested in a production environment;
所述配置文件比对模块用于根据获取的所述第一配置文件和所述第二配置文件,对所述第一配置文件和所述第二配置文件进行比对,获得比对结果,所述比对结果至少显示所述第一配置文件和所述第二配置文件的差别;The configuration file comparison module is configured to perform a comparison between the first configuration file and the second configuration file according to the obtained first configuration file and the second configuration file, and obtain a comparison result. The comparison result shows at least a difference between the first configuration file and the second configuration file;
所述输出模块用于输出所述比对结果。The output module is configured to output the comparison result.
第三方面,本申请实施例提供一种计算机设备,包括存储器、处理器以及存储在存储器中并可在处理器上运行的计算机程序,处理器执行计算机程 序时实现如上述第一方面所述的方法。According to a third aspect, an embodiment of the present application provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the processor implements the method described in the first aspect. method.
第四方面,本申请实施例提供一种计算机非易失性可读存储介质,所述计算机非易失性可读存储介质包括存储的程序,其中,在所述程序运行时控制所述计算机非易失性可读存储介质所在设备执行如上述第一方面所述的方法。According to a fourth aspect, an embodiment of the present application provides a computer non-volatile readable storage medium, where the computer non-volatile readable storage medium includes a stored program, wherein the computer is controlled when the program runs. The device on which the volatile readable storage medium is located executes the method as described in the first aspect above.
本申请实施例提供了一种配置文件比对方法和配置文件比对装置,在上述配置文件比对方法中,先接收测试人员的配置文件获取指令,然后根据配置文件获取指令,获取待测试***的第一配置文件和第二配置文件,接着根据获取的第一配置文件和第二配置文件,对第一配置文件和第二配置文件进行比对,获得比对结果,比对结果至少显示第一配置文件和第二配置文件的差别,最后输出比对结果,从而可以及时方便地对测试环境和生产环境的配置文件进行比对,使得测试人员可以方便及时地发现二者之间的不一致性,以便于开发人员及时对生产环境中的配置文件进行调整或者测试人员及时对测试环境中的配置文件进行调整,使二者一致,进而有助于维持***的正常运行,降低生产事故发生可能性。The embodiment of the present application provides a configuration file comparison method and a configuration file comparison device. In the above configuration file comparison method, a configuration file obtaining instruction of a tester is first received, and then a system to be tested is obtained according to the configuration file obtaining instruction. The first configuration file and the second configuration file, and then comparing the first configuration file and the second configuration file according to the obtained first configuration file and the second configuration file to obtain a comparison result, and the comparison result displays at least the first The difference between the first configuration file and the second configuration file, and finally the comparison result is output, so that the configuration files of the test environment and the production environment can be compared in a timely and convenient manner, so that the tester can conveniently and timely find the inconsistencies between the two. In order to facilitate developers to adjust the configuration files in the production environment in a timely manner or testers to adjust the configuration files in the test environment in a timely manner to make the two consistent, thereby helping to maintain the normal operation of the system and reduce the possibility of production accidents .
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present application or the prior art more clearly, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without paying creative labor.
图1为本申请实施例提供的配置文件比对方法的流程图;FIG. 1 is a flowchart of a configuration file comparison method according to an embodiment of the present application;
图2为本申请实施例提供的步骤102的流程图;FIG. 2 is a flowchart of step 102 according to an embodiment of the present application;
图3为本申请实施例提供的配置文件比对装置的示意图一;FIG. 3 is a first schematic diagram of a configuration file comparison device according to an embodiment of the present application; FIG.
图4为本申请实施例提供的配置文件获取模块的示意图;4 is a schematic diagram of a configuration file obtaining module according to an embodiment of the present application;
图5为本申请实施例提供的配置文件比对装置的示意图二;FIG. 5 is a second schematic diagram of a configuration file comparison apparatus according to an embodiment of the present application; FIG.
图6为本申请实施例提供的配置文件比对装置的示意图三。FIG. 6 is a third schematic diagram of a configuration file comparison apparatus according to an embodiment of the present application.
具体实施方式detailed description
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments These are part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in this application, all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.
在不冲突的情况下,本申请实施例中的各技术特征均可以相互结合。In the case of no conflict, the technical features in the embodiments of the present application can be combined with each other.
在本申请中,测试环境:指为了完成***测试工作所必需的计算机硬件、软件、网络设备、历史数据的总称。生产环境:指***上线时最终使用的环境,包括计算机硬件、软件、网络设备等。In this application, test environment: refers to the general name of computer hardware, software, network equipment, and historical data necessary to complete system test work. Production environment: refers to the environment that is ultimately used when the system is online, including computer hardware, software, and network equipment.
在***测试和应用过程中,测试环境计算机组中包含有至少一台测试环境计算机,各测试环境计算机均与所述服务器相连,生产环境测试机组包含有至少一台生产环境计算机,各生产环境计算机均与服务器相连,各生产环境计算机分别与各测试环境计算机一一对应,该对应是指,测试环境下的测试环境计算机进行测试的应用程序或者操作***,与运行在与其对应的生产环境下的生产环境计算机上的应用程序或操作***是相同的。During the system test and application process, the test environment computer group includes at least one test environment computer, each test environment computer is connected to the server, and the production environment test unit includes at least one production environment computer, each production environment computer. All are connected to the server, and each production environment computer corresponds to each test environment computer. This correspondence refers to the application or operating system tested by the test environment computer in the test environment, and the application program or operating system running in the corresponding production environment. The application or operating system on the production computer is the same.
第一方面,本申请实施例提供一种配置文件比对方法,如图1所示,图1为本申请实施例提供的配置文件比对方法的流程图,该配置文件比对方法包括:In a first aspect, an embodiment of the present application provides a configuration file comparison method. As shown in FIG. 1, FIG. 1 is a flowchart of a configuration file comparison method provided by an embodiment of the present application. The configuration file comparison method includes:
步骤101、接收测试人员的配置文件获取指令。Step 101: Receive a configuration file obtaining instruction of a tester.
步骤102、根据配置文件获取指令,获取待测试***的第一配置文件和第二配置文件,第一配置文件为待测试***在测试环境中的配置文件,第二配置文件为待测试***在生产环境中的配置文件。Step 102: Obtain a first configuration file and a second configuration file of the system to be tested according to the configuration file acquisition instruction. The first configuration file is a configuration file of the system to be tested in the test environment, and the second configuration file is the system to be tested in production. Configuration files in the environment.
步骤103、根据获取的第一配置文件和第二配置文件,对第一配置文件和第二配置文件进行比对,获得比对结果,比对结果至少显示第一配置文件和第二配置文件的差别。Step 103: Compare the first configuration file and the second configuration file according to the obtained first configuration file and the second configuration file, and obtain a comparison result. The comparison result shows at least the first configuration file and the second configuration file. difference.
步骤104、输出比对结果。Step 104: Output the comparison result.
上述配置文件比对方法可以应用在计算机***中,或者,用以执行该配置文件比对方法的程序被设置在计算机中。The above configuration file comparison method can be applied to a computer system, or a program for executing the configuration file comparison method is set in a computer.
使用上述配置文件比对方法对测试环境和生产环境的配置文件进行比对的过程中,先接收测试人员的配置文件获取指令,然后根据配置文件获取指令,获取待测试***的第一配置文件和第二配置文件,第一配置文件为待测试***在测试环境中的配置文件,第二配置文件为待测试***在生产环境中的配置文件,接着根据获取的第一配置文件和第二配置文件,对第一配置文件和第二配置文件进行比对,获得比对结果,比对结果至少显示第一配置文件和第二配置文件的差别,最后输出比对结果,从而可以及时方便地对测试环境和生产环境的配置文件进行比对,使得测试人员可以方便及时地发现二者之间的不一致性,以便于开发人员及时对生产环境中的配置文件进行调整或者测试人员及时对测试环境中的配置文件进行调整,使二者一致,进而有助于维持***的正常运行,降低生产事故发生可能性。In the process of comparing the configuration files of the test environment and the production environment by using the above configuration file comparison method, first receive a configuration file acquisition instruction from a tester, and then obtain a first configuration file and The second configuration file, the first configuration file is a configuration file of the system to be tested in the test environment, the second configuration file is the configuration file of the system to be tested in the production environment, and then according to the obtained first configuration file and the second configuration file , Comparing the first configuration file and the second configuration file to obtain a comparison result, the comparison result shows at least the difference between the first configuration file and the second configuration file, and finally the comparison result is output, so that the test can be conveniently and timely performed The configuration files of the environment and the production environment are compared, so that testers can easily and timely find the inconsistencies between the two, so that developers can adjust the configuration files in the production environment in a timely manner or testers can make timely adjustments to the test files in the test environment. Configuration files are adjusted to make them consistent, which helps maintain the system Uptime, reducing the likelihood of accidents occur.
为了便于本领域技术人员理解和实施,下面本申请实施例对上述步骤101至步骤104的具体可实现方式进行举例说明。In order to facilitate understanding and implementation by those skilled in the art, the following embodiments of the present application illustrate the specific implementable manners of the foregoing steps 101 to 104 by way of examples.
可选地,步骤101中,测试人员可通过客户端(例如计算机或者智能手机)发出配置文件获取指令,测试人员可以通过输入文字、输入语音或者根据客户端弹出的选择框进行选择等方式发出配置文件获取指令,此处不进行限定。测试人员可以仅发出一个配置文件获取指令,也可以发出多个配置文件获取指令,测试人员发出多个配置文件获取指令时,可按一定顺序(例如时间顺序,优先级顺序等)对各个配置文件获取指令进行接收。Optionally, in step 101, a tester may issue a configuration file acquisition instruction through a client (such as a computer or a smartphone), and the tester may issue a configuration by entering text, inputting a voice, or selecting based on a selection box popped up by the client. File acquisition instructions are not limited here. The tester can issue only one configuration file acquisition instruction, or can issue multiple configuration file acquisition instructions. When the tester issues multiple configuration file acquisition instructions, each configuration file can be processed in a certain order (such as chronological order, priority order, etc.) Get instruction to receive.
可选地,配置文件获取指令至少包括待测试***标识、配置文件类型标识、测试环境计算机标识和生产环境计算机标识。Optionally, the configuration file obtaining instruction includes at least an identification of a system to be tested, an identification of a configuration file type, an identification of a test environment computer, and an identification of a production environment computer.
配置文件获取指令中的待测试***标识用于从多个***中获取待测试***,配置文件类型标识用于确定配置文件类型,测试环境计算机标识用于确定测试环境计算机,生产环境计算机标识用于确定生产环境计算机。The identification of the system to be tested in the configuration file acquisition instruction is used to obtain the system to be tested from multiple systems, the configuration file type identification is used to determine the configuration file type, the test environment computer identification is used to determine the test environment computer, and the production environment computer identification is used to Identify production environment computers.
待测试***标识至少包括待测试***的名称、版本等中的一个或多个;配置文件类型至少包括:脚本配置文件和数据库配置文件等中的一个或多个,脚本配置文件至少包括xml文件和properties文件等中的一个或多个;测试环境计算机标识至少包括测试环境计算机的IP地址、型号等中的一个或多个;生产环境计算机标识至少包括测试环境计算机的IP地址等中的一个或多个。The identification of the system under test includes at least one or more of the name, version, etc. of the system under test; the configuration file type includes at least one or more of a script configuration file and a database configuration file, etc. The script configuration file includes at least an xml file and one or more of the properties file, etc .; the test environment computer identification includes at least one or more of the IP address, model, etc. of the test environment computer; the production environment computer identification includes at least one or more of the IP address, etc. of the test environment computer Each.
示例性地,配置文件获取指令还可以包括多个配置参数标识,第一配置文件包括多个第一配置参数,第二配置文件包括多个第二配置参数,其中,配置参数标识可用于确定多个第一配置参数和多个第二配置参数中进行比对的配置参数,以使可根据实际情况对有需要的第一配置参数和第二配置参数进行比对,提高该配置文件比对方法的实用性。Exemplarily, the configuration file obtaining instruction may further include multiple configuration parameter identifiers, the first configuration file includes multiple first configuration parameters, and the second configuration file includes multiple second configuration parameters, where the configuration parameter identifier may be used to determine multiple Configuration parameters for comparison between the first configuration parameter and the plurality of second configuration parameters, so that the required first configuration parameter and the second configuration parameter can be compared according to the actual situation, and the configuration file comparison method is improved Practicality.
可选地,配置文件获取指令至少包括待测试***标识、配置文件类型标识、测试环境计算机标识和生产环境计算机标识,基于此,如图2所示,图2为本申请实施例提供的步骤102的流程图,步骤102中,根据配置文件获取指令,获取待测试***的第一配置文件和第二配置文件具体包括:Optionally, the configuration file obtaining instruction includes at least a system identifier to be tested, a configuration file type identifier, a test environment computer identifier, and a production environment computer identifier. Based on this, as shown in FIG. 2, FIG. 2 is a step 102 provided by an embodiment of the present application According to the flowchart, in step 102, acquiring the first configuration file and the second configuration file of the system to be tested according to the configuration file acquisition instruction specifically includes:
步骤201、根据配置文件获取指令中的待测试***标识,从多个***中获取待测试***;Step 201: Obtain a system to be tested from a plurality of systems according to the identification of the system to be tested in the configuration file obtaining instruction;
步骤202、根据配置文件获取指令中的配置文件类型标识,获取与配置文件类型相对应的配置文件获取策略;Step 202: Acquire a configuration file acquisition policy corresponding to the configuration file type according to the configuration file type identifier in the configuration file acquisition instruction.
其中,步骤202的具体实现方式可以有多种,示例性地,本申请实施例中配置文件比对方法还包括:构建配置文件类型与配置文件获取策略的映射关系,则步骤202中,获取与配置文件类型相对应的配置文件获取策略具体包括:根据配置文件获取指令中的配置文件类型标识,在映射关系中查找相对应的配置文件获取策略。The specific implementation manner of step 202 may be various. For example, the configuration file comparison method in the embodiment of the present application further includes: constructing a mapping relationship between a configuration file type and a configuration file acquisition policy. The configuration file acquisition strategy corresponding to the configuration file type specifically includes: searching for the corresponding configuration file acquisition strategy in the mapping relationship according to the configuration file type identifier in the configuration file acquisition instruction.
上述映射关系包括但不限于以下内容:若配置文件类型为脚本配置文件,则配置文件获取策略为从配置文件源(WEB形式或者数据库形式)获取第一配置文件,从应用部署获取第二配置文件;和/或,若配置文件类型为数据库配置文件,则配置文件获取策略为从测试库中导出测试表作为第一配置文件,从生产库导出csv(Comma-Separated Values,逗号分隔值)文件作为第二配置文件。The above mapping relationship includes, but is not limited to, the following: If the configuration file type is a script configuration file, the configuration file acquisition strategy is to obtain a first configuration file from a configuration file source (web form or database form), and obtain a second configuration file from application deployment. ; And / or, if the configuration file type is a database configuration file, the configuration file acquisition strategy is to export the test table from the test library as the first configuration file and the csv (Comma-Separated Values, comma-separated values) file from the production library as the first configuration file The second configuration file.
步骤203、根据配置文件获取指令中的测试环境计算机标识、生产环境计算机标识以及配置文件获取策略,从测试环境计算机中获取第一配置文件,从生产环境计算机中获取第二配置文件。Step 203: Obtain a first configuration file from the test environment computer and a second configuration file from the production environment computer according to the test environment computer identification, the production environment computer identification, and the configuration file acquisition strategy in the configuration file acquisition instruction.
可选地,配置文件获取指令还可以包括多个配置参数标识,第一配置文件包括多个第一配置参数,第二配置文件包括多个第二配置参数时,步骤103中,根据获取的第一配置文件和第二配置文件,对第一配置文件和第二配置文件进行比对包括:将与各个配置参数标识对应的第一配置参数与第二配置参数一一进行比对。Optionally, the configuration file obtaining instruction may further include multiple configuration parameter identifiers. When the first configuration file includes multiple first configuration parameters and the second configuration file includes multiple second configuration parameters, in step 103, according to the acquired first A configuration file and a second configuration file. Comparing the first configuration file and the second configuration file includes: comparing the first configuration parameter corresponding to each configuration parameter identifier with the second configuration parameter one by one.
例如,配置文件获取指令包括3个配置参数标识,X1、X2和X3,第一配置文件包括3个第一配置参数C1、C2和C3,第二配置文件包括3个第二配置参数C1’、C2’和C3’,配置参数标识X1与第一配置参数C1和第二配置参数C1’相对应,配置参数标识X2与第一配置参数C2和第二配置参数C2’相对应,配置参数标识X3与第一配置参数C3和第二配置参数C3’相对应,则将第一配置参数C1和第二配置参数C1’进行比对,第一配置参数C2和第二配置参数C2’进行比对,第一配置参数C3和第二配置参数C3’进行比对。For example, the configuration file acquisition instruction includes three configuration parameter identifiers, X1, X2, and X3, the first configuration file includes three first configuration parameters C1, C2, and C3, and the second configuration file includes three second configuration parameters C1 ', C2 'and C3', the configuration parameter identifier X1 corresponds to the first configuration parameter C1 and the second configuration parameter C1 ', the configuration parameter identifier X2 corresponds to the first configuration parameter C2 and the second configuration parameter C2', and the configuration parameter identifier X3 Corresponding to the first configuration parameter C3 and the second configuration parameter C3 ', the first configuration parameter C1 and the second configuration parameter C1' are compared, and the first configuration parameter C2 and the second configuration parameter C2 'are compared, The first configuration parameter C3 is compared with the second configuration parameter C3 '.
其中,配置参数标识与第一配置参数和第二配置参数之间的对应关系不同,将第一配置文件和第二配置文件进行比对的具体方式也有所不同。The corresponding relationship between the configuration parameter identifier and the first configuration parameter and the second configuration parameter are different, and the specific ways of comparing the first configuration file and the second configuration file are also different.
在第一个例子中,配置参数标识与第一配置参数一一对应,且与第二配置参数一一对应,则将第一配置文件和第二配置文件进行比对的具体方式为:将第一配置文件包括的所有第一配置参数与第二配置文件包括的所有第二配置参数一一进行比对,进而不容易出现遗漏。具体示例如之前所述。In the first example, the configuration parameter identifier corresponds to the first configuration parameter one-to-one, and the second configuration parameter corresponds one-to-one. The specific way of comparing the first configuration file with the second configuration file is: All the first configuration parameters included in the first configuration file and all the second configuration parameters included in the second configuration file are compared one by one, so that omissions are not easy to occur. Specific examples are as previously described.
在第二个例子中,配置参数标识与多个第一配置参数中会导致生产事故的第一配置参数一一对应,且与第二配置参数中会导致生产事故的第二配置参数一一对应,则将第一配置文件和第二配置文件进行比对的具体方式为:将第一配置文件包括的会导致生产事故的第一配置参数,与第二配置文件包括的会导致生产事故的第二配置参数一一进行比对,进而可以有效预防生产事故的发生,且提高比对效率。In the second example, the configuration parameter identifier corresponds to the first configuration parameter of the plurality of first configuration parameters that will cause a production accident, and corresponds to the second configuration parameter of the second configuration parameter that will cause a production accident. One corresponding, the specific way of comparing the first configuration file and the second configuration file is: the first configuration parameter included in the first configuration file that will cause a production accident, and the first configuration parameter included in the second configuration file will cause a production accident The second configuration parameters are compared one by one, which can effectively prevent production accidents and improve the comparison efficiency.
例如,配置文件获取指令包括3个配置参数标识,X1、X2和X3,第一配置文件包括5个第一配置参数C1、C2、C3、C4和C5,第二配置文件包括5个第二配置参数C1’、C2’、C3’、C4’和C5’,第一配置参数C1、C2和C3会导致生产事故,第一配置参数C4和C5不会导致生产事故,第二配置参数C1’、C2’和C3’会导致生产事故,第二配置参数C4’和C5’不会导致生产事故,则配置参数标识X1与第一配置参数C1和第二配置参数C1’相对应,配置参数标识X2与第一配置参数C2和第二配置参数C2’相对应,配置参数标识X3与第一配置参数C3和第二配置参数C3’相对应,则将第一配置参数C1和第二配置参数C1’进行比对,第一配置参数C2和第二配置参数C2’进行比对,第一配置参数C3和第二配置参数C3’进行比对。For example, the configuration file acquisition instruction includes three configuration parameter identifiers, X1, X2, and X3, the first configuration file includes five first configuration parameters C1, C2, C3, C4, and C5, and the second configuration file includes five second configurations Parameters C1 ', C2', C3 ', C4', and C5 '. The first configuration parameters C1, C2, and C3 will cause a production accident, the first configuration parameters C4 and C5 will not cause a production accident, and the second configuration parameters C1', C2 'and C3' will cause a production accident, and the second configuration parameter C4 'and C5' will not cause a production accident, the configuration parameter identifier X1 corresponds to the first configuration parameter C1 and the second configuration parameter C1 ', and the configuration parameter identifier X2 Corresponding to the first configuration parameter C2 and the second configuration parameter C2 ', and the configuration parameter identifier X3 corresponds to the first configuration parameter C3 and the second configuration parameter C3', then the first configuration parameter C1 and the second configuration parameter C1 ' For comparison, the first configuration parameter C2 and the second configuration parameter C2 'are compared, and the first configuration parameter C3 and the second configuration parameter C3' are compared.
在实际过程中,可以在接收配置文件获取指令之前,对所有第一配置文件中的所有第一配置参数,和所有第二配置文件中的所有第二配置参数进行分析,确定各个第一配置参数和对应的第二配置参数之间存在差异时,是否会导致生产事故的发生,并根据结果对配置文件获取指令需要包括的配置参数标识进行设置,以使配置参数标识与多个第一配置参数中会导致生产事故的第一配置参数一一对应,且与第二配置参数中会导致生产事故的第 二配置参数一一对应。In the actual process, before receiving the configuration file acquisition instruction, all first configuration parameters in all first configuration files and all second configuration parameters in all second configuration files can be analyzed to determine each first configuration parameter If there is a difference between the second configuration parameter and the corresponding second configuration parameter, whether a production accident will occur, and according to the result, the configuration parameter identifier required to be included in the configuration file acquisition instruction is set, so that the configuration parameter identifier is different from multiple first configuration parameters. The one-to-one correspondence of the first configuration parameter that would lead to a production accident in one-to-one correspondence with the one-to-one correspondence with the second configuration parameter that would cause a production accident in the second configuration parameter.
在第三个例子中,配置参数标识与多个第一配置参数中引发生产事故的严重等级大于预设等级的第一配置参数一一对应,且与第二配置参数中引发生产事故的严重等级大于预设等级的第二配置参数一一对应,则将第一配置文件和第二配置文件进行比对的具体方式为:将第一配置文件包括的引发生产事故的严重等级大于预设等级的第一配置参数,与第二配置文件包括的引发生产事故的严重等级大于预设等级的第二配置参数一一进行比对,进而可以提高比对效率。In the third example, the configuration parameter identifier corresponds one-to-one with the first configuration parameter that causes the seriousness of the production accident in the plurality of first configuration parameters to be greater than the preset level, and corresponds to the seriousness of the production accident that is caused in the second configuration parameter. The second configuration parameter whose level is greater than the preset level corresponds one-to-one, and the specific way of comparing the first configuration file and the second configuration file is: the severity level of the production accident included in the first configuration file is greater than the preset level. The first configuration parameter of the level is compared with the second configuration parameter of the second configuration file that causes the severity of the production accident that is greater than the preset level, thereby improving the comparison efficiency.
例如,配置文件获取指令包括3个配置参数标识,X1、X2和X3,第一配置文件包括5个第一配置参数C1、C2、C3、C4和C5,第二配置文件包括5个第二配置参数C1’、C2’、C3’、C4’和C5’,第一配置参数C1、C2和C3引发生产事故的严重等级大于预设等级,第一配置参数C4和C5引发生产事故的严重等级不大于预设等级,第二配置参数C1’、C2’和C3’引发生产事故的严重等级大于预设等级,第二配置参数C4’和C5’引发生产事故的严重等级不大于预设等级,则配置参数标识X1与第一配置参数C1和第二配置参数C1’相对应,配置参数标识X2与第一配置参数C2和第二配置参数C2’相对应,配置参数标识X3与第一配置参数C3和第二配置参数C3’相对应,则将第一配置参数C1和第二配置参数C1’进行比对,第一配置参数C2和第二配置参数C2’进行比对,第一配置参数C3和第二配置参数C3’进行比对。For example, the configuration file acquisition instruction includes three configuration parameter identifiers, X1, X2, and X3, the first configuration file includes five first configuration parameters C1, C2, C3, C4, and C5, and the second configuration file includes five second configurations The parameters C1 ', C2', C3 ', C4', and C5 '. The first configuration parameter C1, C2, and C3 causes the severity of the production accident to be greater than the preset level, and the first configuration parameters C4 and C5 cause the severity of the production accident. Greater than the preset level, the severity level of the production accident caused by the second configuration parameter C1 ', C2', and C3 'is greater than the preset level, and the severity level of the production accident caused by the second configuration parameter C4' and C5 'is not greater than the preset level, then The configuration parameter identifier X1 corresponds to the first configuration parameter C1 and the second configuration parameter C1 ', the configuration parameter identifier X2 corresponds to the first configuration parameter C2 and the second configuration parameter C2', and the configuration parameter identifier X3 corresponds to the first configuration parameter C3 Corresponding to the second configuration parameter C3 ', the first configuration parameter C1 and the second configuration parameter C1' are compared, the first configuration parameter C2 and the second configuration parameter C2 'are compared, and the first configuration parameter C3 and The second configuration parameter C3 'For comparison.
在实际过程中,可以在接收配置文件获取指令之前,对所有第一配置文件中的所有第一配置参数,和所有第二配置文件中的所有第二配置参数进行分析,确定各个第一配置参数和对应的第二配置参数之间存在差异时,引发的生产事故的严重程度,并以此将所有第一配置参数与所有第二配置参数划分为多个等级(例如将所有第一配置参数按引发事故严重程度递减的顺序划分为等级一至等级五,对应地将所有第二配置参数按引发事故严重程度递减的顺序划分为等级一至等级五),并设定预设等级(例如等级四),根据预设等级对配置文件获取指令需要包括的配置参数标识进行设置,以使配置参数标识与多个第一配置参数中引发生产事故的严重等级大于预设等级的第一配置参数一一对应,且与第二配置参数中引发生产事故的严重等级大于预设等级的第二配置参数一一对应。In the actual process, before receiving the configuration file acquisition instruction, all first configuration parameters in all first configuration files and all second configuration parameters in all second configuration files can be analyzed to determine each first configuration parameter When there is a difference between the second configuration parameter and the corresponding second configuration parameter, the severity of the production accident is induced, and all the first configuration parameters and all the second configuration parameters are divided into multiple levels (for example, all the first configuration parameters are classified as The order of decreasing severity of accidents is divided into ranks 1 to 5. Correspondingly, all second configuration parameters are divided into ranks 1 to 5 in order of decreasing severity of accidents, and preset levels (such as rank 4) are set. The configuration parameter identifiers required to be included in the configuration file acquisition instruction are set according to the preset levels, so that the configuration parameter identifiers correspond to the first configuration parameters of the multiple first configuration parameters that cause the severity of the production accident to be greater than the preset level. , And the second configuration parameter with a severity level that causes a production accident in the second configuration parameter is greater than a preset level Number one to one correspondence.
在第四个例子中,配置参数标识与多个第一配置参数中出现差别次数大于预设值的第一配置参数一一对应,且与第二配置参数中出现差别次数大于预设值的第二配置参数一一对应,则将第一配置文件和第二配置文件进行比对的具体方式为:将第一配置文件包括的出现差别次数大于预设值的第一配置参数,与第二配置文件包括的出现差别次数大于预设值的第二配置参数一一进行比对,进而可以提高比对效率。In the fourth example, the configuration parameter identifier corresponds to the first configuration parameter in which the number of differences in the plurality of first configuration parameters is greater than a preset value, and corresponds to the number of differences in the second configuration parameter that is greater than the preset value. The second configuration parameter has a one-to-one correspondence, and the specific way of comparing the first configuration file with the second configuration file is: the first configuration parameter included in the first configuration file with a number of occurrences greater than a preset value is compared with the first configuration parameter The second configuration file includes a comparison of the second configuration parameters whose number of occurrences is greater than a preset value, thereby improving the comparison efficiency.
例如,配置文件获取指令包括3个配置参数标识,X1、X2和X3,第一配置文件包括5个第一配置参数C1、C2、C3、C4和C5,第二配置文件包括5个第二配置参数C1’、C2’、C3’、C4’和C5’,第一配置参数C1、C2和C3出现差别次数大于预设值(例如3次),第一配置参数C4和C5出现差别次数不大于预设值,第二配置参数C1’、C2’和C3’出现差别次数大于预设值,第二配置参数C4’和C5’出现差别次数不大于预设值,则配置参数标识X1与第一配置参数C1和第二配置参数C1’相对应,配置参数标识X2与第一配置参数C2和第二配置参数C2’相对应,配置参数标识X3与第一配置参数C3和第二配置 参数C3’相对应,则将第一配置参数C1和第二配置参数C1’进行比对,第一配置参数C2和第二配置参数C2’进行比对,第一配置参数C3和第二配置参数C3’进行比对。For example, the configuration file acquisition instruction includes three configuration parameter identifiers, X1, X2, and X3, the first configuration file includes five first configuration parameters C1, C2, C3, C4, and C5, and the second configuration file includes five second configurations The parameters C1 ', C2', C3 ', C4', and C5 ', the number of differences between the first configuration parameters C1, C2, and C3 is greater than a preset value (for example, 3 times), and the number of differences between the first configuration parameters C4 and C5 is not greater than Preset value. The number of differences between the second configuration parameters C1 ', C2', and C3 'is greater than the preset value, and the number of differences between the second configuration parameters C4' and C5 'is not greater than the preset value. Then, the configuration parameter identifier X1 is different from the first The configuration parameter C1 corresponds to the second configuration parameter C1 ', the configuration parameter identifier X2 corresponds to the first configuration parameter C2 and the second configuration parameter C2', and the configuration parameter identifier X3 corresponds to the first configuration parameter C3 and the second configuration parameter C3 ' Correspondingly, the first configuration parameter C1 and the second configuration parameter C1 'are compared, the first configuration parameter C2 and the second configuration parameter C2' are compared, and the first configuration parameter C3 and the second configuration parameter C3 'are compared Comparison.
在实际过程中,可以在接收配置文件获取指令之前,对所有第一配置文件中的所有第一配置参数,和所有第二配置文件中的所有第二配置参数进行分析,确定各个第一配置参数和对应的第二配置参数之间存在差异的次数,并设定预设值(例如3次),根据预设值对配置文件获取指令需要包括的配置参数标识进行设置,以使配置参数标识与多个第一配置参数中出现差别次数大于预设值的第一配置参数一一对应,且与第二配置参数中出现差别次数大于预设值的第二配置参数一一对应。In the actual process, before receiving the configuration file acquisition instruction, all first configuration parameters in all first configuration files and all second configuration parameters in all second configuration files can be analyzed to determine each first configuration parameter The number of times that there is a difference between the second configuration parameter and the corresponding second configuration parameter, and a preset value (for example, 3 times) is set, and the configuration parameter identifier required by the configuration file acquisition instruction is set according to the preset value, so that the configuration parameter identifier and the The plurality of first configuration parameters have a one-to-one correspondence with the first configuration parameter with a difference greater than a preset value, and one-to-one correspondence with the second configuration parameter with the second configuration parameter with a difference greater than a preset value.
可选地,步骤104中输出比对结果的方式可以为:以列表形式显示比对结果。Optionally, the manner of outputting the comparison result in step 104 may be: displaying the comparison result in a list form.
可选地,本申请实施例中的配置文件比对方法还包括:存储当前的比对结果,并删除之前的比对结果,以使测试人员方便对最近的比对结果进行查询,跟踪分析差异,进而对第一配置文件或者第二配置文件的变更进行监控。Optionally, the configuration file comparison method in the embodiment of the present application further includes: storing the current comparison result and deleting the previous comparison result, so that the tester can conveniently query the latest comparison result and track and analyze the difference , And then monitor changes in the first configuration file or the second configuration file.
第二方面,本申请实施例提供一种配置文件比对装置,如图3所示,图3为本申请实施例提供的配置文件比对装置的示意图一,该配置文件比对装置包括指令获取模块1、配置文件获取模块2、配置文件比对模块3和输出模块4;其中,In a second aspect, an embodiment of the present application provides a configuration file comparison device. As shown in FIG. 3, FIG. 3 is a schematic diagram 1 of a configuration file comparison device provided by an embodiment of the present application. The configuration file comparison device includes instruction acquisition. Module 1, configuration file acquisition module 2, configuration file comparison module 3, and output module 4;
指令获取模块1用于接收测试人员的配置文件获取指令。配置文件类型至少包括:脚本配置文件和数据库配置文件,脚本配置文件至少包括xml文件和properties文件。配置文件获取指令至少包括待测试***标识、配置文件类型标识、测试环境计算机标识和生产环境计算机标识。The instruction obtaining module 1 is configured to receive a configuration file obtaining instruction of a tester. The configuration file type includes at least: a script configuration file and a database configuration file, and the script configuration file includes at least an xml file and a properties file. The configuration file obtaining instruction includes at least an identification of a system to be tested, an identification of a configuration file type, an identification of a test environment computer, and an identification of a production environment computer.
配置文件获取模块2用于根据配置文件获取指令,获取待测试***的第一配置文件和第二配置文件,第一配置文件为待测试***在测试环境中的配置文件,第二配置文件为待测试***在生产环境中的配置文件。The configuration file acquisition module 2 is configured to acquire a first configuration file and a second configuration file of the system to be tested according to the configuration file acquisition instruction. The first configuration file is a configuration file of the system to be tested in the test environment, and the second configuration file is Test system configuration files in a production environment.
配置文件比对模块3用于根据获取的第一配置文件和第二配置文件,对第一配置文件和第二配置文件进行比对,获得比对结果,比对结果至少显示第一配置文件和第二配置文件的差别。可选地,配置文件比对模块具体用于根据获取的第一配置文件和第二配置文件,将第一配置文件包括的多个第一配置参数与第二配置文件包括的多个第二配置参数一一进行比对,获得比对结果。可选地,比对结果显示所有第一配置参数和所有第二配置参数的比对结果。The configuration file comparison module 3 is configured to perform a comparison between the first configuration file and the second configuration file according to the obtained first configuration file and the second configuration file, to obtain a comparison result, and the comparison result shows at least the first configuration file and The difference in the second profile. Optionally, the configuration file comparison module is specifically configured to, according to the obtained first configuration file and the second configuration file, compare multiple first configuration parameters included in the first configuration file with multiple second configurations included in the second configuration file. Compare the parameters one by one to get the comparison result. Optionally, the comparison result shows a comparison result of all the first configuration parameters and all the second configuration parameters.
输出模块4用于输出比对结果。The output module 4 is used to output the comparison result.
其中,配置文件获取指令中的待测试***标识用于从多个***中获取待测试***,配置文件类型标识用于确定配置文件类型,测试环境计算机标识用于确定测试环境计算机,生产环境计算机标识用于确定生产环境计算机。The identification of the system to be tested in the configuration file acquisition instruction is used to obtain the system to be tested from multiple systems, the configuration file type identification is used to determine the configuration file type, the test environment computer identification is used to determine the test environment computer, and the production environment computer identification. Used to determine the production environment computer.
待测试***标识至少包括待测试***的名称、版本等中的一个或多个;配置文件类型至少包括:脚本配置文件和数据库配置文件等中的一个或多个,脚本配置文件至少包括xml文件和properties文件等中的一个或多个;测试环境计算机标识至少包括测试环境计算机的IP地址、型号等中的一个或多个;生产环境计算机标识至少包括测试环境计算机的IP地址等中的一个或多个。The identification of the system under test includes at least one or more of the name, version, etc. of the system under test; the configuration file type includes at least one or more of a script configuration file and a database configuration file, etc. The script configuration file includes at least an xml file and one or more of the properties file, etc .; the test environment computer identification includes at least one or more of the IP address, model, etc. of the test environment computer; the production environment computer identification includes at least one or more of the IP address, etc. of the test environment computer Each.
当配置文件获取指令至少包括待测试***标识、配置文件类型标识、测试环境计算机 标识和生产环境计算机标识时,可选地,如图4所示,图4为本申请实施例提供的配置文件获取模块的示意图,配置文件获取模块2包括测试***获取单元21、配置文件获取策略获取单元22和配置文件获取单元23,其中,When the configuration file acquisition instruction includes at least a system identification to be tested, a configuration file type identification, a test environment computer identification, and a production environment computer identification, optionally, as shown in FIG. 4, FIG. 4 is a configuration file acquisition provided by an embodiment of the present application. A schematic diagram of a module. The configuration file acquisition module 2 includes a test system acquisition unit 21, a configuration file acquisition strategy acquisition unit 22, and a configuration file acquisition unit 23, where:
测试***获取单元21用于根据配置文件获取指令中的待测试***标识,从多个***中获取待测试***;The test system acquisition unit 21 is configured to acquire the system to be tested from multiple systems according to the identification of the system to be tested in the configuration file acquisition instruction;
配置文件获取策略获取单元22用于根据配置文件获取指令中的配置文件类型标识,获取与配置文件类型相对应的配置文件获取策略。The configuration file acquisition policy acquisition unit 22 is configured to acquire a configuration file acquisition policy corresponding to the configuration file type according to the configuration file type identifier in the configuration file acquisition instruction.
配置文件获取单元23用于根据配置文件获取指令中的测试环境计算机标识、生产环境计算机标识以及配置文件获取策略,从测试环境计算机中获取第一配置文件,从生产环境计算机中获取第二配置文件。The configuration file obtaining unit 23 is configured to obtain a first configuration file from the test environment computer and a second configuration file from the production environment computer according to the test environment computer identification, the production environment computer identification, and the configuration file acquisition strategy in the configuration file acquisition instruction. .
可选地,如图5所示,图5为本申请实施例提供的配置文件比对装置的示意图二,配置文件比对装置还包括映射关系构建模块5,映射关系构建模块5用于构建配置文件类型与配置文件获取策略的映射关系。此时,配置文件获取策略获取单元22具体用于根据配置文件获取指令中的配置文件类型标识,在映射关系中查找相对应的配置文件获取策略。Optionally, as shown in FIG. 5, FIG. 5 is a second schematic diagram of a configuration file comparison device according to an embodiment of the present application. The configuration file comparison device further includes a mapping relationship construction module 5, and the mapping relationship construction module 5 is configured to construct a configuration. Mapping between file types and configuration file acquisition policies. At this time, the configuration file acquisition policy acquisition unit 22 is specifically configured to find a corresponding configuration file acquisition policy in the mapping relationship according to the configuration file type identifier in the configuration file acquisition instruction.
上述映射关系包括但不限于以下内容:若配置文件类型为脚本配置文件,则配置文件获取策略为从配置文件源(WEB形式或者数据库形式)获取第一配置文件,从应用部署获取第二配置文件;和/或,若配置文件类型为数据库配置文件,则配置文件获取策略为从测试库中导出测试表作为第一配置文件,从生产库导出csv(Comma-Separated Values,逗号分隔值)文件作为第二配置文件。The above mapping relationship includes, but is not limited to, the following: If the configuration file type is a script configuration file, the configuration file acquisition strategy is to obtain a first configuration file from a configuration file source (web form or database form), and obtain a second configuration file from application deployment. ; And / or, if the configuration file type is a database configuration file, the configuration file acquisition strategy is to export the test table from the test library as the first configuration file and the csv (Comma-Separated Values, comma-separated values) file from the production library as the first configuration file The second configuration file.
可选地,配置文件获取指令还可以包括多个配置参数标识,第一配置文件包括多个第一配置参数,第二配置文件包括多个第二配置参数,其中,配置参数标识可用于确定多个第一配置参数和多个第二配置参数中进行比对的配置参数,以使可根据实际情况对有需要的第一配置参数和第二配置参数进行比对,提高该配置文件比对方法的实用性。Optionally, the configuration file obtaining instruction may further include multiple configuration parameter identifiers, the first configuration file includes multiple first configuration parameters, and the second configuration file includes multiple second configuration parameters, wherein the configuration parameter identifier may be used to determine multiple Configuration parameters for comparison between the first configuration parameter and the plurality of second configuration parameters, so that the required first configuration parameter and the second configuration parameter can be compared according to the actual situation, and the configuration file comparison method is improved Practicality.
基于此,配置文件获取模块2包括的配置文件获取单元23具体用于:将与各个配置参数标识对应的第一配置参数与第二配置参数一一进行比对。Based on this, the configuration file acquisition unit 23 included in the configuration file acquisition module 2 is specifically configured to compare the first configuration parameter corresponding to each configuration parameter identifier with the second configuration parameter one by one.
在第一个例子中,配置参数标识与第一配置参数一一对应,且与第二配置参数一一对应,则配置文件获取单元23具体用于:将第一配置文件包括的所有第一配置参数与第二配置文件包括的所有第二配置参数一一进行比对,进而不容易出现遗漏。In the first example, the configuration parameter identifier corresponds to the first configuration parameter one-to-one, and corresponds to the second configuration parameter one-to-one. Then, the configuration file obtaining unit 23 is specifically configured to: A configuration parameter is compared with all the second configuration parameters included in the second configuration file, so that it is not easy to miss.
在第二个例子中,配置参数标识与多个第一配置参数中会导致生产事故的第一配置参数一一对应,且与第二配置参数中会导致生产事故的第二配置参数一一对应,则配置文件获取单元23具体用于:将第一配置文件包括的会导致生产事故的第一配置参数,与第二配置文件包括的会导致生产事故的第二配置参数一一进行比对,进而可以有效预防生产事故的发生,且提高比对效率。In the second example, the configuration parameter identifier corresponds to the first configuration parameter of the plurality of first configuration parameters that will cause a production accident, and corresponds to the second configuration parameter of the second configuration parameter that will cause a production accident. If there is a correspondence, the configuration file obtaining unit 23 is specifically configured to perform one by one the first configuration parameter included in the first configuration file that may cause a production accident and the second configuration parameter included in the second configuration file that may cause a production accident The comparison can effectively prevent production accidents and improve the comparison efficiency.
可选地,配置文件获取装置还可以包括差异分析模块和配置参数标识设置模块,差异分析模块用于:对所有第一配置文件中的所有第一配置参数,和所有第二配置文件中的所有第二配置参数进行分析,确定各个第一配置参数和对应的第二配置参数之间存在差异时,是否会导致生产事故的发生;配置参数标识设置模块用于:根据结果对配置文件获取指令需要包括的配置参数标识进行设置;以使配置参数标识与多个第一配置参数中会导致 生产事故的第一配置参数一一对应,且与第二配置参数中会导致生产事故的第二配置参数一一对应。Optionally, the configuration file obtaining device may further include a difference analysis module and a configuration parameter identification setting module, where the difference analysis module is configured to: for all the first configuration parameters in all the first configuration files, and for all the first configuration parameters in all the second configuration files; The second configuration parameter is analyzed to determine whether there is a production accident when there is a difference between each of the first configuration parameters and the corresponding second configuration parameter; the configuration parameter identification setting module is used to: obtain the configuration file instruction instructions according to the results. The included configuration parameter identifier is set so that the configuration parameter identifier corresponds to the first configuration parameter among the plurality of first configuration parameters that would lead to a production accident, and to the second configuration parameter among the second configuration parameters that would cause a production accident. The parameters correspond one-to-one.
在第三个例子中,配置参数标识与多个第一配置参数中引发生产事故的严重等级大于预设等级的第一配置参数一一对应,且与第二配置参数中引发生产事故的严重等级大于预设等级的第二配置参数一一对应,则配置文件获取单元23具体用于:将第一配置文件包括的引发生产事故的严重等级大于预设等级的第一配置参数,与第二配置文件包括的引发生产事故的严重等级大于预设等级的第二配置参数一一进行比对,进而可以提高比对效率。In the third example, the configuration parameter identifier corresponds one-to-one with the first configuration parameter that causes the seriousness of the production accident in the plurality of first configuration parameters to be greater than the preset level, and corresponds to the seriousness of the production accident that is caused in the second configuration parameter. The second configuration parameter whose level is greater than the preset level corresponds one-to-one, and the configuration file obtaining unit 23 is specifically configured to: compare the first configuration parameter of the first configuration file with the severity level of the production accident that is greater than the preset level to the first configuration parameter. The second configuration file includes the second configuration parameters that cause a production accident with a severity level greater than a preset level to compare one by one, thereby improving the comparison efficiency.
可选地,配置文件获取装置还可以包括差异分析模块和配置参数标识设置模块,差异分析模块用于:对所有第一配置文件中的所有第一配置参数,和所有第二配置文件中的所有第二配置参数进行分析,确定各个第一配置参数和对应的第二配置参数之间存在差异时,引发的生产事故的严重程度,并以此将所有第一配置参数与所有第二配置参数划分为多个等级(例如将所有第一配置参数按引发事故严重程度递减的顺序划分为等级一至等级五,对应地将所有第二配置参数按引发事故严重程度递减的顺序划分为等级一至等级五),并设定预设等级(例如等级四);配置参数标识设置模块用于:根据预设等级对配置文件获取指令需要包括的配置参数标识进行设置;以使配置参数标识与多个第一配置参数中引发生产事故的严重等级大于预设等级的第一配置参数一一对应,且与第二配置参数中引发生产事故的严重等级大于预设等级的第二配置参数一一对应。Optionally, the configuration file obtaining device may further include a difference analysis module and a configuration parameter identification setting module, where the difference analysis module is configured to: for all the first configuration parameters in all the first configuration files, and for all the first configuration parameters in all the second configuration files; Analyze the second configuration parameters to determine the severity of the production accident when there is a difference between each first configuration parameter and the corresponding second configuration parameter, and use this to divide all the first configuration parameters from all the second configuration parameters For multiple levels (for example, all the first configuration parameters are divided into levels one to five in the order of decreasing severity of the accident, and all second configuration parameters are correspondingly divided into ranks one to five in the order of decreasing severity of the accident) , And set a preset level (for example, level four); the configuration parameter identification setting module is used to: set the configuration parameter identification required by the configuration file acquisition instruction according to the preset level; so that the configuration parameter identification and multiple first configurations The first configuration parameter in the parameter that caused the severity of the production accident is greater than the preset level Yes, and one-to-one correspondence with the second configuration parameter in which the severity level of the production accident caused by the second configuration parameter is greater than a preset level.
在第四个例子中,配置参数标识与多个第一配置参数中出现差别次数大于预设值的第一配置参数一一对应,且与第二配置参数中出现差别次数大于预设值的第二配置参数一一对应,则配置文件获取单元23具体用于:将第一配置文件包括的出现差别次数大于预设值的第一配置参数,与第二配置文件包括的出现差别次数大于预设值的第二配置参数一一进行比对,进而可以提高比对效率。In the fourth example, the configuration parameter identifier corresponds to the first configuration parameter in which the number of differences in the plurality of first configuration parameters is greater than a preset value, and corresponds to the number of differences in the second configuration parameter that is greater than the preset value. The second configuration parameters are in one-to-one correspondence, and the configuration file obtaining unit 23 is specifically configured to: set the first configuration parameter in which the number of occurrence differences included in the first configuration file is greater than a preset value, and the number of occurrence differences included in the second configuration file is greater than The preset second configuration parameters are compared one by one, thereby improving the comparison efficiency.
可选地,配置文件获取装置还可以包括差异分析模块和配置参数标识设置模块,差异分析模块用于:对所有第一配置文件中的所有第一配置参数,和所有第二配置文件中的所有第二配置参数进行分析,确定各个第一配置参数和对应的第二配置参数之间存在差异的次数,并设定预设值(例如3次);配置参数标识设置模块用于:根据预设值对配置文件获取指令需要包括的配置参数标识进行设置;以使配置参数标识与多个第一配置参数中出现差别次数大于预设值的第一配置参数一一对应,且与第二配置参数中出现差别次数大于预设值的第二配置参数一一对应。Optionally, the configuration file obtaining device may further include a difference analysis module and a configuration parameter identification setting module, where the difference analysis module is configured to: for all the first configuration parameters in all the first configuration files, and for all the first configuration parameters in all the second configuration files; The second configuration parameter is analyzed to determine the number of times that there is a difference between each first configuration parameter and the corresponding second configuration parameter, and a preset value is set (for example, 3 times); the configuration parameter identification setting module is configured to: The value sets the configuration parameter identifiers that need to be included in the configuration file acquisition instruction, so that the configuration parameter identifiers correspond to the first configuration parameters in which the number of differences between the plurality of first configuration parameters is greater than a preset value, and corresponds to the second configuration. The second configuration parameters in which the number of times of difference in the parameters is greater than a preset value correspond one-to-one.
可选地,如图6所示,图6为本申请实施例提供的配置文件比对装置的示意图三,配置文件比对装置还包括存储模块6,存储模块6用于存储当前的比对结果,并删除之前的比对结果,以使测试人员方便对最近的比对结果进行查询,跟踪分析差异,进而对第一配置文件或者第二配置文件的变更进行监控。Optionally, as shown in FIG. 6, FIG. 6 is a third schematic diagram of a configuration file comparison device provided in an embodiment of the present application. The configuration file comparison device further includes a storage module 6 for storing the current comparison result. , And delete the previous comparison results, so that the tester can easily query the latest comparison results, track and analyze the differences, and then monitor the changes in the first configuration file or the second configuration file.
需要说明的是,本申请实施例中配置文件比对方法的相关描述均适用于配置文件比对装置,配置文件比对装置的相关描述均适用于配置文件比对方法。It should be noted that the descriptions of the configuration file comparison method in the embodiments of the present application are all applicable to the configuration file comparison device, and the descriptions of the configuration file comparison device are applicable to the configuration file comparison method.
本申请实施例提供一种计算机设备,该计算机设备包括存储器和处理器,存储器用于存储包括程序指令的信息,处理器用于控制程序指令的执行,程序指令被处理器加载并执 行时实现以下步骤:接收测试人员的配置文件获取指令;根据配置文件获取指令,获取待测试***的第一配置文件和第二配置文件,第一配置文件为待测试***在测试环境中的配置文件,第二配置文件为待测试***在生产环境中的配置文件;根据获取的第一配置文件和第二配置文件,对第一配置文件和第二配置文件进行比对,获得比对结果,比对结果至少显示第一配置文件和第二配置文件的差别;输出比对结果。An embodiment of the present application provides a computer device. The computer device includes a memory and a processor. The memory is used to store information including program instructions. The processor is used to control the execution of the program instructions. When the program instructions are loaded and executed by the processor, the following steps are implemented. : Receiving the configuration file acquisition instruction of the tester; obtaining the first configuration file and the second configuration file of the system to be tested according to the configuration file acquisition instruction, the first configuration file is a configuration file of the system to be tested in the test environment, and the second configuration The file is the configuration file of the system to be tested in the production environment; according to the obtained first configuration file and the second configuration file, the first configuration file and the second configuration file are compared to obtain a comparison result, and the comparison result is displayed at least Difference between the first configuration file and the second configuration file; output the comparison result.
可选地,配置文件获取指令至少包括待测试***标识、配置文件类型标识、测试环境计算机标识和生产环境计算机标识;程序指令被处理器加载并执行时还实现以下步骤:根据配置文件获取指令中的待测试***标识,从多个***中获取待测试***;根据配置文件获取指令中的配置文件类型标识,获取与配置文件类型相对应的配置文件获取策略;根据配置文件获取指令中的测试环境计算机标识、生产环境计算机标识以及配置文件获取策略,从测试环境计算机中获取第一配置文件,从生产环境计算机中获取第二配置文件。Optionally, the configuration file acquisition instruction includes at least a system identification to be tested, a configuration file type identification, a test environment computer identification, and a production environment computer identification; when the program instruction is loaded and executed by the processor, the following steps are further implemented: according to the configuration file acquisition instruction, To obtain the system to be tested from multiple systems; to obtain the configuration file type corresponding to the configuration file type from the configuration file type instruction in the configuration file acquisition instruction; to obtain the test environment in the instruction according to the configuration file A computer identification, a production environment computer identification, and a configuration file acquisition strategy, obtain a first configuration file from a test environment computer, and obtain a second configuration file from a production environment computer.
可选地,程序指令被处理器加载并执行时还实现以下步骤:构建配置文件类型与配置文件获取策略的映射关系;根据配置文件获取指令中的配置文件类型标识,在映射关系中查找相对应的配置文件获取策略。Optionally, when the program instruction is loaded and executed by the processor, the following steps are also implemented: constructing a mapping relationship between the configuration file type and the configuration file acquisition strategy; and searching for the corresponding relationship in the mapping relationship according to the configuration file type identifier in the configuration file acquisition instruction. Profile acquisition strategy.
可选地,程序指令被处理器加载并执行时还实现以下步骤:若配置文件类型为脚本配置文件,则从配置文件源获取第一配置文件,从应用部署获取第二配置文件;和/或,若配置文件类型为数据库配置文件,则从测试库中导出测试表作为第一配置文件,从生产库导出逗号分隔值csv文件作为第二配置文件。Optionally, when the program instructions are loaded and executed by the processor, the following steps are further implemented: if the configuration file type is a script configuration file, obtaining the first configuration file from the configuration file source and obtaining the second configuration file from the application deployment; and / or If the configuration file type is a database configuration file, the test table is exported from the test library as the first configuration file, and the comma-separated value csv file is exported from the production library as the second configuration file.
可选地,配置文件获取指令还包括多个配置参数标识;第一配置文件包括多个第一配置参数,第二配置文件包括多个第二配置参数;程序指令被处理器加载并执行时还实现以下步骤:将与各个配置参数标识对应的第一配置参数与第二配置参数一一进行比对。Optionally, the configuration file acquisition instruction further includes multiple configuration parameter identifiers; the first configuration file includes multiple first configuration parameters, and the second configuration file includes multiple second configuration parameters; when the program instructions are loaded and executed by the processor, The following steps are implemented: the first configuration parameter corresponding to each configuration parameter identifier is compared with the second configuration parameter one by one.
可选地,配置参数标识与第一配置参数一一对应,且与第二配置参数一一对应。Optionally, the configuration parameter identifiers correspond one-to-one to the first configuration parameter and one-to-one to the second configuration parameter.
可选地,配置参数标识与多个第一配置参数中会导致生产事故的第一配置参数一一对应,且与第二配置参数中会导致生产事故的第二配置参数一一对应。Optionally, the configuration parameter identifiers correspond one-to-one to a first configuration parameter of the plurality of first configuration parameters that may cause a production accident, and correspond one-to-one to a second configuration parameter of the second configuration parameters that may cause a production accident.
可选地,配置参数标识与多个第一配置参数中引发生产事故的严重等级大于预设等级的第一配置参数一一对应,且与第二配置参数中引发生产事故的严重等级大于预设等级的第二配置参数一一对应。Optionally, the configuration parameter identifier corresponds to the first configuration parameter in which the severity level of the production accident caused by the plurality of first configuration parameters is greater than a preset level, and corresponds to the severity level of the production accident in the second configuration parameter that is greater than the The second configuration parameters of the ranks are in one-to-one correspondence.
可选地,配置参数标识与多个第一配置参数中出现差别次数大于预设值的第一配置参数一一对应,且与第二配置参数中出现差别次数大于预设值的第二配置参数一一对应。Optionally, the configuration parameter identifier corresponds one-to-one to the first configuration parameter in which the number of times of difference in the plurality of first configuration parameters is greater than a preset value, and to the second configuration in which the number of times of difference in the second configuration parameter is greater than the preset value The parameters correspond one-to-one.
本申请实施例提供一种计算机非易失性可读存储介质,其中,在程序运行时控制计算机非易失性可读存储介质所在设备执行以下步骤:接收测试人员的配置文件获取指令;根据配置文件获取指令,获取待测试***的第一配置文件和第二配置文件,第一配置文件为待测试***在测试环境中的配置文件,第二配置文件为待测试***在生产环境中的配置文件;根据获取的第一配置文件和第二配置文件,对第一配置文件和第二配置文件进行比对,获得比对结果,比对结果至少显示第一配置文件和第二配置文件的差别;输出比对结果。An embodiment of the present application provides a computer non-volatile readable storage medium, in which, when a program is running, controlling a device where the computer non-volatile readable storage medium is located performs the following steps: receiving a configuration file acquisition instruction of a tester; and according to the configuration File acquisition instruction to obtain the first configuration file and the second configuration file of the system to be tested. The first configuration file is the configuration file of the system to be tested in the test environment, and the second configuration file is the configuration file of the system to be tested in the production environment. ; Comparing the first configuration file and the second configuration file according to the obtained first configuration file and the second configuration file to obtain a comparison result, and the comparison result shows at least the difference between the first configuration file and the second configuration file; Output comparison results.
可选地,配置文件获取指令至少包括待测试***标识、配置文件类型标识、测试环境计算机标识和生产环境计算机标识;在程序运行时控制计算机非易失性可读存储介质所在设备还执行以下步骤:根据配置文件获取指令中的待测试***标识,从多个***中获取待 测试***;根据配置文件获取指令中的配置文件类型标识,获取与配置文件类型相对应的配置文件获取策略;根据配置文件获取指令中的测试环境计算机标识、生产环境计算机标识以及配置文件获取策略,从测试环境计算机中获取第一配置文件,从生产环境计算机中获取第二配置文件。Optionally, the configuration file obtaining instruction includes at least an identification of a system to be tested, an identification of a configuration file type, an identification of a test environment computer, and an identification of a production environment computer; when the program is running, controlling a device where the computer non-volatile readable storage medium is located further performs the following steps: : Obtain the system to be tested from multiple systems according to the configuration file instruction; obtain the system to be tested from multiple systems; obtain the configuration file acquisition strategy corresponding to the configuration file type according to the configuration file type identifier from the configuration file acquisition instruction; and according to the configuration The test environment computer identification, the production environment computer identification, and the configuration file acquisition strategy in the file acquisition instruction, obtain a first configuration file from the test environment computer, and obtain a second configuration file from the production environment computer.
可选地,在程序运行时控制计算机非易失性可读存储介质所在设备还执行以下步骤:构建配置文件类型与配置文件获取策略的映射关系;根据配置文件获取指令中的配置文件类型标识,在映射关系中查找相对应的配置文件获取策略。Optionally, when the program is running, the device that controls the computer's non-volatile readable storage medium further performs the following steps: constructing a mapping relationship between the configuration file type and the configuration file acquisition strategy; and according to the configuration file type identifier in the configuration file acquisition instruction, Find the corresponding configuration file acquisition strategy in the mapping relationship.
可选地,在程序运行时控制计算机非易失性可读存储介质所在设备还执行以下步骤:若配置文件类型为脚本配置文件,则从配置文件源获取第一配置文件,从应用部署获取第二配置文件;和/或,若配置文件类型为数据库配置文件,则从测试库中导出测试表作为第一配置文件,从生产库导出逗号分隔值csv文件作为第二配置文件。Optionally, when the program is running, the device controlling the computer's non-volatile readable storage medium further performs the following steps: if the configuration file type is a script configuration file, obtaining a first configuration file from a configuration file source, and obtaining a first configuration file from an application deployment Two configuration files; and / or, if the configuration file type is a database configuration file, export the test table from the test library as the first configuration file, and export the comma-separated value csv file from the production library as the second configuration file.
可选地,配置文件获取指令还包括多个配置参数标识;第一配置文件包括多个第一配置参数,第二配置文件包括多个第二配置参数;在程序运行时控制计算机非易失性可读存储介质所在设备还执行以下步骤:将与各个配置参数标识对应的第一配置参数与第二配置参数一一进行比对。Optionally, the configuration file obtaining instruction further includes a plurality of configuration parameter identifiers; the first configuration file includes a plurality of first configuration parameters, and the second configuration file includes a plurality of second configuration parameters; controlling the computer nonvolatile when the program is running The device where the readable storage medium is located further performs the following steps: comparing the first configuration parameter corresponding to each configuration parameter identifier with the second configuration parameter one by one.
可选地,配置参数标识与第一配置参数一一对应,且与第二配置参数一一对应。Optionally, the configuration parameter identifiers correspond one-to-one to the first configuration parameter and one-to-one to the second configuration parameter.
可选地,配置参数标识与多个第一配置参数中会导致生产事故的第一配置参数一一对应,且与第二配置参数中会导致生产事故的第二配置参数一一对应。Optionally, the configuration parameter identifiers correspond one-to-one to a first configuration parameter of the plurality of first configuration parameters that may cause a production accident, and correspond one-to-one to a second configuration parameter of the second configuration parameters that may cause a production accident.
可选地,配置参数标识与多个第一配置参数中引发生产事故的严重等级大于预设等级的第一配置参数一一对应,且与第二配置参数中引发生产事故的严重等级大于预设等级的第二配置参数一一对应。Optionally, the configuration parameter identifier corresponds to the first configuration parameter in which the severity level of the production accident caused by the plurality of first configuration parameters is greater than a preset level, and corresponds to the severity level of the production accident in the second configuration parameter that is greater than the The second configuration parameters of the ranks are in one-to-one correspondence.
可选地,配置参数标识与多个第一配置参数中出现差别次数大于预设值的第一配置参数一一对应,且与第二配置参数中出现差别次数大于预设值的第二配置参数一一对应。Optionally, the configuration parameter identifier corresponds one-to-one to the first configuration parameter in which the number of times of difference in the plurality of first configuration parameters is greater than a preset value, and to the second configuration in which the number of times of difference in the second configuration parameter is greater than the preset value The parameters correspond one-to-one.
本申请实施例提供了一种配置文件比对方法和配置文件比对装置,在上述配置文件比对方法中,先接收测试人员的配置文件获取指令,然后根据配置文件获取指令,获取待测试***的第一配置文件和第二配置文件,接着根据获取的第一配置文件和第二配置文件,对第一配置文件和第二配置文件进行比对,获得比对结果,比对结果至少显示第一配置文件和第二配置文件的差别,最后输出比对结果,从而可以及时方便地对测试环境和生产环境的配置文件进行比对,使得测试人员可以方便及时地发现二者之间的不一致性,以便于开发人员及时对生产环境中的配置文件进行调整或者测试人员及时对测试环境中的配置文件进行调整,使二者一致,进而有助于维持***的正常运行,降低生产事故发生可能性。The embodiment of the present application provides a configuration file comparison method and a configuration file comparison device. In the above configuration file comparison method, a configuration file obtaining instruction of a tester is first received, and then a system to be tested is obtained according to the configuration file obtaining instruction. The first configuration file and the second configuration file, and then comparing the first configuration file and the second configuration file according to the obtained first configuration file and the second configuration file to obtain a comparison result, and the comparison result displays at least the first The difference between the first configuration file and the second configuration file, and finally the comparison result is output, so that the configuration files of the test environment and the production environment can be compared in a timely and convenient manner, so that the tester can conveniently and timely find the inconsistencies between the two. In order to facilitate developers to adjust the configuration files in the production environment in a timely manner or testers to adjust the configuration files in the test environment in a timely manner to make the two consistent, thereby helping to maintain the normal operation of the system and reduce the possibility of production accidents .
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to describe the technical solution of the present application, rather than limiting it. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: The technical solutions described in the foregoing embodiments can still be modified, or some or all of the technical features can be equivalently replaced; and these modifications or replacements do not deviate the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present application. range.

Claims (20)

  1. 一种配置文件比对方法,其特征在于,包括:A configuration file comparison method, comprising:
    接收测试人员的配置文件获取指令;Receive tester configuration file acquisition instructions;
    根据所述配置文件获取指令,获取待测试***的第一配置文件和第二配置文件,所述第一配置文件为所述待测试***在测试环境中的配置文件,所述第二配置文件为所述待测试***在生产环境中的配置文件;Obtaining a first configuration file and a second configuration file of the system to be tested according to the configuration file obtaining instruction, the first configuration file being a configuration file of the system to be tested in a test environment, and the second configuration file being A configuration file of the system to be tested in a production environment;
    根据获取的所述第一配置文件和所述第二配置文件,对所述第一配置文件和所述第二配置文件进行比对,获得比对结果,所述比对结果至少显示所述第一配置文件和所述第二配置文件的差别;Comparing the first configuration file and the second configuration file according to the obtained first configuration file and the second configuration file to obtain a comparison result, where the comparison result displays at least the first A difference between a configuration file and the second configuration file;
    输出所述比对结果。The comparison result is output.
  2. 根据权利要求1所述的配置文件比对方法,其特征在于,所述配置文件获取指令至少包括待测试***标识、配置文件类型标识、测试环境计算机标识和生产环境计算机标识;The configuration file comparison method according to claim 1, wherein the configuration file acquisition instruction includes at least a system identification to be tested, a configuration file type identification, a test environment computer identification, and a production environment computer identification;
    所述根据所述配置文件获取指令,获取待测试***的第一配置文件和第二配置文件包括:The acquiring the first configuration file and the second configuration file of the system to be tested according to the configuration file acquisition instruction includes:
    根据所述配置文件获取指令中的所述待测试***标识,从多个***中获取所述待测试***;Obtaining the system to be tested from a plurality of systems according to the identifier of the system to be tested in the configuration file obtaining instruction;
    根据所述配置文件获取指令中的所述配置文件类型标识,获取与配置文件类型相对应的配置文件获取策略;Acquiring a configuration file acquisition policy corresponding to a configuration file type according to the configuration file type identifier in the configuration file acquisition instruction;
    根据所述配置文件获取指令中的所述测试环境计算机标识、所述生产环境计算机标识以及所述配置文件获取策略,从测试环境计算机中获取所述第一配置文件,从生产环境计算机中获取所述第二配置文件。Acquiring the first configuration file from the test environment computer according to the test environment computer identification, the production environment computer identification, and the configuration file acquisition strategy in the configuration file acquisition instruction, and obtaining all the information from the production environment computer. The second configuration file is described.
  3. 根据权利要求2所述的配置文件比对方法,其特征在于,所述配置文件比对方法还包括:构建所述配置文件类型与所述配置文件获取策略的映射关系;The configuration file comparison method according to claim 2, wherein the configuration file comparison method further comprises: constructing a mapping relationship between the configuration file type and the configuration file acquisition policy;
    所述根据所述配置文件获取指令中的所述配置文件类型标识,获取与配置文件类型相对应的配置文件获取策略包括:根据所述配置文件获取指令中的所述配置文件类型标识,在所述映射关系中查找相对应的所述配置文件获取策略。The acquiring a configuration file acquisition strategy corresponding to a configuration file type according to the configuration file type identifier in the configuration file acquisition instruction includes: according to the configuration file type instruction in the configuration file acquisition instruction, Find the corresponding configuration file acquisition strategy in the mapping relationship.
  4. 根据权利要求3所述的配置文件比对方法,其特征在于,所述映射关系包括:The configuration file comparison method according to claim 3, wherein the mapping relationship comprises:
    若所述配置文件类型为脚本配置文件,则所述配置文件获取策略为从配置文件源获取第一配置文件,从应用部署获取第二配置文件;和/或,If the configuration file type is a script configuration file, the configuration file acquisition strategy is to acquire a first configuration file from a configuration file source and a second configuration file from an application deployment; and / or,
    若所述配置文件类型为数据库配置文件,则所述配置文件获取策略为从测试库中导出测试表作为第一配置文件,从生产库导出逗号分隔值csv文件作为第二配置文件。If the configuration file type is a database configuration file, the configuration file acquisition strategy is to export a test table from a test library as a first configuration file and a comma-separated value csv file from a production library as a second configuration file.
  5. 根据权利要求1至4任一项所述的配置文件比对方法,其特征在于,所述配置文件获取指令还包括多个配置参数标识;所述第一配置文件包括多个第一配置参数,所述第二配置文件包括多个第二配置参数;The configuration file comparison method according to any one of claims 1 to 4, wherein the configuration file acquisition instruction further includes multiple configuration parameter identifiers; the first configuration file includes multiple first configuration parameters, The second configuration file includes a plurality of second configuration parameters;
    所述根据获取的所述第一配置文件和所述第二配置文件,对所述第一配置文件和所述第二配置文件进行比对包括:Comparing the first configuration file and the second configuration file according to the obtained first configuration file and the second configuration file includes:
    将与各个所述配置参数标识对应的所述第一配置参数与所述第二配置参数一一进行比对。The first configuration parameter corresponding to each of the configuration parameter identifiers is compared with the second configuration parameter one by one.
  6. 根据权利要求5所述的配置文件比对方法,其特征在于,所述配置参数标识与所述第一配置参数一一对应,且与所述第二配置参数一一对应。The configuration file comparison method according to claim 5, wherein the configuration parameter identifiers correspond to the first configuration parameters in a one-to-one correspondence, and correspond to the second configuration parameters in a one-to-one correspondence.
  7. 根据权利要求5所述的配置文件比对方法,其特征在于,所述配置参数标识与多个所述第一配置参数中会导致生产事故的所述第一配置参数一一对应,且与所述第二配置参数中会导致生产事故的所述第二配置参数一一对应。The configuration file comparison method according to claim 5, wherein the configuration parameter identifier corresponds to the first configuration parameter of the plurality of first configuration parameters that would cause a production accident, and corresponds to There is a one-to-one correspondence between the second configuration parameters that would cause a production accident.
  8. 根据权利要求5所述的配置文件比对方法,其特征在于,所述配置参数标识与多个所述第一配置参数中引发生产事故的严重等级大于预设等级的 所述第一配置参数一一对应,且与所述第二配置参数中引发生产事故的严重等级大于所述预设等级的所述第二配置参数一一对应。The configuration file comparison method according to claim 5, wherein the configuration parameter identifier and the plurality of first configuration parameters cause the first configuration parameter with a severity level that causes a production accident to be greater than a preset level One-to-one correspondence, and one-to-one correspondence with the second configuration parameter in which the severity level of the production accident caused by the second configuration parameter is greater than the preset level.
  9. 根据权利要求5所述的配置文件比对方法,其特征在于,所述配置参数标识与多个所述第一配置参数中出现差别次数大于预设值的所述第一配置参数一一对应,且与所述第二配置参数中出现差别次数大于所述预设值的所述第二配置参数一一对应。The configuration file comparison method according to claim 5, wherein the configuration parameter identifier corresponds to the first configuration parameter in which the number of times of difference between the plurality of first configuration parameters is greater than a preset value one-to-one And one-to-one correspondence with the second configuration parameter in which the number of differences in the second configuration parameter is greater than the preset value.
  10. 一种配置文件比对装置,其特征在于,包括:指令获取模块、配置文件获取模块、配置文件比对模块和输出模块;其中,A configuration file comparison device, comprising: an instruction acquisition module, a configuration file acquisition module, a configuration file comparison module, and an output module; wherein,
    所述指令获取模块用于接收测试人员的配置文件获取指令;The instruction obtaining module is configured to receive a configuration file obtaining instruction of a tester;
    所述配置文件获取模块用于根据所述配置文件获取指令,获取待测试***的第一配置文件和第二配置文件,所述第一配置文件为待测试***在测试环境中的配置文件,所述第二配置文件为待测试***在生产环境中的配置文件;The configuration file acquisition module is configured to acquire a first configuration file and a second configuration file of a system to be tested according to the configuration file acquisition instruction, where the first configuration file is a configuration file of a system to be tested in a test environment. The second configuration file is a configuration file of a system to be tested in a production environment;
    所述配置文件比对模块用于根据获取的所述第一配置文件和所述第二配置文件,对所述第一配置文件和所述第二配置文件进行比对,获得比对结果,所述比对结果至少显示所述第一配置文件和所述第二配置文件的差别;The configuration file comparison module is configured to perform a comparison between the first configuration file and the second configuration file according to the obtained first configuration file and the second configuration file, and obtain a comparison result. The comparison result shows at least a difference between the first configuration file and the second configuration file;
    所述输出模块用于输出所述比对结果。The output module is configured to output the comparison result.
  11. 一种计算机设备,包括存储器和处理器,所述存储器用于存储包括程序指令的信息,所述处理器用于控制所述程序指令的执行,其特征在于,所述程序指令被所述处理器加载并执行时实现以下步骤:A computer device includes a memory and a processor, the memory is used to store information including program instructions, the processor is used to control the execution of the program instructions, and the program instructions are loaded by the processor The following steps are implemented when executed:
    接收测试人员的配置文件获取指令;Receive tester configuration file acquisition instructions;
    根据所述配置文件获取指令,获取待测试***的第一配置文件和第二配置文件,所述第一配置文件为所述待测试***在测试环境中的配置文件,所述第二配置文件为所述待测试***在生产环境中的配置文件;Obtaining a first configuration file and a second configuration file of the system to be tested according to the configuration file obtaining instruction, the first configuration file being a configuration file of the system to be tested in a test environment, and the second configuration file being A configuration file of the system to be tested in a production environment;
    根据获取的所述第一配置文件和所述第二配置文件,对所述第一配置文件和所述第二配置文件进行比对,获得比对结果,所述比对结果至少显示所 述第一配置文件和所述第二配置文件的差别;Comparing the first configuration file and the second configuration file according to the obtained first configuration file and the second configuration file to obtain a comparison result, where the comparison result displays at least the first A difference between a configuration file and the second configuration file;
    输出所述比对结果。The comparison result is output.
  12. 根据权利要求11所述的计算机设备,其特征在于,所述配置文件获取指令至少包括待测试***标识、配置文件类型标识、测试环境计算机标识和生产环境计算机标识;The computer device according to claim 11, wherein the configuration file obtaining instruction includes at least a system identification to be tested, a configuration file type identification, a test environment computer identification, and a production environment computer identification;
    所述程序指令被所述处理器加载并执行时还实现以下步骤:When the program instructions are loaded and executed by the processor, the following steps are also implemented:
    根据所述配置文件获取指令中的所述待测试***标识,从多个***中获取所述待测试***;Obtaining the system to be tested from a plurality of systems according to the identifier of the system to be tested in the configuration file obtaining instruction;
    根据所述配置文件获取指令中的所述配置文件类型标识,获取与配置文件类型相对应的配置文件获取策略;Acquiring a configuration file acquisition policy corresponding to a configuration file type according to the configuration file type identifier in the configuration file acquisition instruction;
    根据所述配置文件获取指令中的所述测试环境计算机标识、所述生产环境计算机标识以及所述配置文件获取策略,从测试环境计算机中获取所述第一配置文件,从生产环境计算机中获取所述第二配置文件。Acquiring the first configuration file from the test environment computer according to the test environment computer identification, the production environment computer identification, and the configuration file acquisition strategy in the configuration file acquisition instruction, and obtaining all the information from the production environment computer. The second configuration file is described.
  13. 根据权利要求12所述的计算机设备,其特征在于,所述程序指令被所述处理器加载并执行时还实现以下步骤:The computer device according to claim 12, wherein when the program instructions are loaded and executed by the processor, the following steps are further implemented:
    构建所述配置文件类型与所述配置文件获取策略的映射关系;Constructing a mapping relationship between the configuration file type and the configuration file acquisition policy;
    根据所述配置文件获取指令中的所述配置文件类型标识,在所述映射关系中查找相对应的所述配置文件获取策略。Searching for the corresponding configuration file acquisition strategy in the mapping relationship according to the configuration file type identifier in the configuration file acquisition instruction.
  14. 根据权利要求13所述的计算机设备,其特征在于,所述程序指令被所述处理器加载并执行时还实现以下步骤:The computer device according to claim 13, wherein when the program instructions are loaded and executed by the processor, the following steps are further implemented:
    若所述配置文件类型为脚本配置文件,则从配置文件源获取第一配置文件,从应用部署获取第二配置文件;和/或,If the configuration file type is a script configuration file, obtaining a first configuration file from a configuration file source and a second configuration file from an application deployment; and / or,
    若所述配置文件类型为数据库配置文件,则从测试库中导出测试表作为第一配置文件,从生产库导出逗号分隔值csv文件作为第二配置文件。If the configuration file type is a database configuration file, the test table is exported from the test library as the first configuration file, and the comma-separated value csv file is exported from the production library as the second configuration file.
  15. 根据权利要求11至14任一项所述的计算机设备,其特征在于,所述配置文件获取指令还包括多个配置参数标识;所述第一配置文件包括多个 第一配置参数,所述第二配置文件包括多个第二配置参数;The computer device according to any one of claims 11 to 14, wherein the configuration file obtaining instruction further includes multiple configuration parameter identifiers; the first configuration file includes multiple first configuration parameters, and the first The second configuration file includes multiple second configuration parameters;
    所述程序指令被所述处理器加载并执行时还实现以下步骤:When the program instructions are loaded and executed by the processor, the following steps are also implemented:
    将与各个所述配置参数标识对应的所述第一配置参数与所述第二配置参数一一进行比对。The first configuration parameter corresponding to each of the configuration parameter identifiers is compared with the second configuration parameter one by one.
  16. 一种计算机非易失性可读存储介质,其特征在于,在所述程序运行时控制所述计算机非易失性可读存储介质所在设备执行以下步骤:A computer non-volatile readable storage medium, characterized in that, when the program is running, controlling a device where the computer non-volatile readable storage medium is located performs the following steps:
    接收测试人员的配置文件获取指令;Receive tester configuration file acquisition instructions;
    根据所述配置文件获取指令,获取待测试***的第一配置文件和第二配置文件,所述第一配置文件为所述待测试***在测试环境中的配置文件,所述第二配置文件为所述待测试***在生产环境中的配置文件;Obtaining a first configuration file and a second configuration file of the system to be tested according to the configuration file obtaining instruction, the first configuration file being a configuration file of the system to be tested in a test environment, and the second configuration file being A configuration file of the system to be tested in a production environment;
    根据获取的所述第一配置文件和所述第二配置文件,对所述第一配置文件和所述第二配置文件进行比对,获得比对结果,所述比对结果至少显示所述第一配置文件和所述第二配置文件的差别;Comparing the first configuration file and the second configuration file according to the obtained first configuration file and the second configuration file to obtain a comparison result, where the comparison result displays at least the first A difference between a configuration file and the second configuration file;
    输出所述比对结果。The comparison result is output.
  17. 根据权利要求16所述的计算机非易失性可读存储介质,其特征在于,所述配置文件获取指令至少包括待测试***标识、配置文件类型标识、测试环境计算机标识和生产环境计算机标识;The computer non-volatile readable storage medium according to claim 16, wherein the configuration file acquisition instruction includes at least a system identification to be tested, a configuration file type identification, a test environment computer identification, and a production environment computer identification;
    在所述程序运行时控制所述计算机非易失性可读存储介质所在设备还执行以下步骤:When the program is running, controlling the device where the computer non-volatile readable storage medium is located further performs the following steps:
    根据所述配置文件获取指令中的所述待测试***标识,从多个***中获取所述待测试***;Obtaining the system to be tested from a plurality of systems according to the identifier of the system to be tested in the configuration file obtaining instruction;
    根据所述配置文件获取指令中的所述配置文件类型标识,获取与配置文件类型相对应的配置文件获取策略;Acquiring a configuration file acquisition policy corresponding to a configuration file type according to the configuration file type identifier in the configuration file acquisition instruction;
    根据所述配置文件获取指令中的所述测试环境计算机标识、所述生产环境计算机标识以及所述配置文件获取策略,从测试环境计算机中获取所述第一配置文件,从生产环境计算机中获取所述第二配置文件。Acquiring the first configuration file from the test environment computer according to the test environment computer identification, the production environment computer identification, and the configuration file acquisition strategy in the configuration file acquisition instruction, and obtaining all the information from the production environment computer. The second configuration file is described.
  18. 根据权利要求17所述的计算机非易失性可读存储介质,其特征在于,在所述程序运行时控制所述计算机非易失性可读存储介质所在设备还执行以下步骤:The computer non-volatile readable storage medium according to claim 17, wherein, when the program is running, controlling a device where the computer non-volatile readable storage medium is located further performs the following steps:
    构建所述配置文件类型与所述配置文件获取策略的映射关系;Constructing a mapping relationship between the configuration file type and the configuration file acquisition policy;
    根据所述配置文件获取指令中的所述配置文件类型标识,在所述映射关系中查找相对应的所述配置文件获取策略。Searching for the corresponding configuration file acquisition strategy in the mapping relationship according to the configuration file type identifier in the configuration file acquisition instruction.
  19. 根据权利要求18所述的计算机非易失性可读存储介质,其特征在于,在所述程序运行时控制所述计算机非易失性可读存储介质所在设备还执行以下步骤:The computer non-volatile readable storage medium according to claim 18, wherein, when the program is running, controlling a device where the computer non-volatile readable storage medium is located further performs the following steps:
    若所述配置文件类型为脚本配置文件,从配置文件源获取第一配置文件,从应用部署获取第二配置文件;和/或,If the configuration file type is a script configuration file, acquiring a first configuration file from a configuration file source and a second configuration file from an application deployment; and / or,
    若所述配置文件类型为数据库配置文件,从测试库中导出测试表作为第一配置文件,从生产库导出逗号分隔值csv文件作为第二配置文件。If the configuration file type is a database configuration file, the test table is exported from the test library as the first configuration file, and the comma-separated value csv file is exported from the production library as the second configuration file.
  20. 根据权利要求16至19任一项所述的计算机非易失性可读存储介质,其特征在于,所述配置文件获取指令还包括多个配置参数标识;所述第一配置文件包括多个第一配置参数,所述第二配置文件包括多个第二配置参数;The computer non-volatile readable storage medium according to any one of claims 16 to 19, wherein the configuration file obtaining instruction further includes a plurality of configuration parameter identifiers; the first configuration file includes a plurality of first A configuration parameter, the second configuration file includes a plurality of second configuration parameters;
    在所述程序运行时控制所述计算机非易失性可读存储介质所在设备还执行以下步骤:When the program is running, controlling the device where the computer non-volatile readable storage medium is located further performs the following steps:
    将与各个所述配置参数标识对应的所述第一配置参数与所述第二配置参数一一进行比对。The first configuration parameter corresponding to each of the configuration parameter identifiers is compared with the second configuration parameter one by one.
PCT/CN2018/111492 2018-06-28 2018-10-23 Configuration file comparison method and configuration file comparison device WO2020000806A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810689707.6 2018-06-28
CN201810689707.6A CN109240755A (en) 2018-06-28 2018-06-28 A kind of configuration file comparison method and configuration file Compare System

Publications (1)

Publication Number Publication Date
WO2020000806A1 true WO2020000806A1 (en) 2020-01-02

Family

ID=65072204

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/111492 WO2020000806A1 (en) 2018-06-28 2018-10-23 Configuration file comparison method and configuration file comparison device

Country Status (2)

Country Link
CN (1) CN109240755A (en)
WO (1) WO2020000806A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110069277A (en) * 2019-03-16 2019-07-30 平安普惠企业管理有限公司 Using loading method, using online equipment, storage medium and device
CN109902025A (en) * 2019-03-25 2019-06-18 腾讯科技(深圳)有限公司 Test environment Chinese part processing method, device, storage medium and computer equipment
CN110795290A (en) * 2019-10-30 2020-02-14 杭州迪普科技股份有限公司 Double-machine configuration strategy consistency detection method and device
CN110851167B (en) * 2019-11-15 2022-06-10 腾讯科技(深圳)有限公司 Container environment updating method, device, equipment and storage medium
CN111782528A (en) * 2020-06-30 2020-10-16 中国平安人寿保险股份有限公司 Configuration information comparison method and device, computer equipment and storage medium
CN112612694A (en) * 2020-12-17 2021-04-06 广州橙行智动汽车科技有限公司 Data detection method and device and electronic equipment
CN112579205B (en) * 2020-12-24 2023-02-14 平安普惠企业管理有限公司 Configuration file checking method and device, computer equipment and storage medium
CN113687858B (en) * 2021-08-05 2024-04-19 深圳须弥云图空间科技有限公司 Configuration file checking method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105391566A (en) * 2014-09-04 2016-03-09 ***通信集团黑龙江有限公司 Dynamic network equipment configuration comparison method and device
CN105824792A (en) * 2016-03-18 2016-08-03 ***股份有限公司 Text comparison method and equipment
CN107741952A (en) * 2017-09-12 2018-02-27 国网江苏省电力公司技能培训中心 The auto-scoring and examination system compared based on intelligent substation SCD configuration files

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103578048A (en) * 2013-11-13 2014-02-12 国家电网公司 Method for checking and comparing configuration related information of intelligent substation SCL documents
CN103631921B (en) * 2013-12-03 2017-11-07 国家电网公司 A kind of configuration information of transformer substation detection method and device
CN104217029B (en) * 2014-09-26 2018-06-05 北京国双科技有限公司 The amending method and device of a kind of configuration file
CN106325826A (en) * 2015-06-16 2017-01-11 阿里巴巴集团控股有限公司 Configuration file detection method and apparatus
CN107122368B (en) * 2016-02-25 2021-05-28 阿里巴巴集团控股有限公司 Data verification method and device and electronic equipment
CN106021043A (en) * 2016-05-10 2016-10-12 浪潮电子信息产业股份有限公司 Method and device for acquiring configuration information of server
CN106126389B (en) * 2016-06-23 2019-02-01 上海爱数信息技术股份有限公司 Hardware detection method and system
CN107423078A (en) * 2017-02-28 2017-12-01 福建中金在线信息科技有限公司 A kind of Oftware updating method and device
CN107861863A (en) * 2017-08-24 2018-03-30 平安普惠企业管理有限公司 Running environment switching method, equipment and computer-readable recording medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105391566A (en) * 2014-09-04 2016-03-09 ***通信集团黑龙江有限公司 Dynamic network equipment configuration comparison method and device
CN105824792A (en) * 2016-03-18 2016-08-03 ***股份有限公司 Text comparison method and equipment
CN107741952A (en) * 2017-09-12 2018-02-27 国网江苏省电力公司技能培训中心 The auto-scoring and examination system compared based on intelligent substation SCD configuration files

Also Published As

Publication number Publication date
CN109240755A (en) 2019-01-18

Similar Documents

Publication Publication Date Title
WO2020000806A1 (en) Configuration file comparison method and configuration file comparison device
US10802951B2 (en) Systems and methods of integrated testing and deployment in a continuous integration continuous deployment (CICD) system
US11163731B1 (en) Autobuild log anomaly detection methods and systems
US9836710B2 (en) Resource planning for data protection validation
US10127141B2 (en) Electronic technology resource evaluation system
US9547579B1 (en) Method and apparatus for automatically detecting defects
US11003563B2 (en) Compliance testing through sandbox environments
CN106575227B (en) Automatic software update framework
US8661418B2 (en) Setting program, workflow creating method, and work flow creating apparatus
US20190235988A1 (en) Parallel execution of continuous delivery pipeline segment models
US20190235847A1 (en) On-demand execution of continuous delivery pipeline segment models
US8713531B1 (en) Integrated bug tracking and testing
US20120084412A1 (en) Configuration reporting
US11989540B2 (en) Systems and methods for non-disruptive continuous software delivery
US10365995B2 (en) Composing future application tests including test action data
US10901746B2 (en) Automatic anomaly detection in computer processing pipelines
WO2017201478A1 (en) Continuous delivery pipeline segment models
US9380000B2 (en) Deploying and modifying a service-oriented architecture deployment environment model
US9405657B2 (en) Application architecture assessment system
US9720919B1 (en) System and method of assessing the state of a database product for installation consistency
US9959329B2 (en) Unified master report generator
CN114978923A (en) Fault drilling method, device and system
US20160275002A1 (en) Image capture in application lifecycle management for documentation and support
US8775873B2 (en) Data processing apparatus that performs test validation and computer-readable storage medium
US20230083221A1 (en) Systems and methods for validating data

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: 18923860

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18923860

Country of ref document: EP

Kind code of ref document: A1