Disclosure of Invention
In order to solve the problem of low system integration accuracy in the related art, the invention provides a system integration method and device based on test flow improvement.
A system integration method based on test flow improvement, the method comprising:
when a system integration instruction is detected, integrating an initial code to be integrated according to the system integration instruction, and acquiring the integration speed of the initial code to be integrated;
determining timing test time of system integration according to the integration speed;
in the process of system integration, freezing a target code to be integrated at the current moment every the timing test time, wherein the target code to be integrated and the initial code to be integrated are codes to be integrated of different versions under different time;
starting a target test script to test the target code to be integrated, and judging whether the target code to be integrated passes the test;
when the target code to be integrated passes the test, executing the defrosting operation on the target code to be integrated to continue the system integration, and executing the process of the system integration, and freezing the target code to be integrated at the current moment every the timing test time until the system integration is completed.
As an optional implementation manner, the starting the target test script to perform a system test on the target code to be integrated includes:
determining the service node covered by the target code to be integrated;
generating a target test script for testing the service node;
and starting the target test script to test the service node covered by the code to be integrated.
As an optional implementation manner, the generating a target test script for testing the service node includes:
acquiring a target programming language category matched with the target code to be integrated;
and generating a target test script of the service node according to the target service class of the service node and the target programming language class.
As an optional implementation manner, the generating the target test script of the service node according to the target service class and the target programming language class of the service node includes:
judging whether an initial test script matched with a target service class of the service node exists in a preset test script database, wherein the preset test script database comprises the service class and the test script which are correspondingly stored;
when judging that the initial test script exists in the preset test script database, judging whether the programming language type of the initial test script is the target programming language type or not;
when the programming language type of the initial test script is judged to be the target programming language type, determining the initial test script as a target test script;
and when judging that the programming language type of the initial testing script is not the target programming language type, performing programming language conversion on the initial testing script to obtain a target testing script with the programming language type being the target programming language type.
As an optional implementation manner, after the determining the service node to be covered by the target to-be-integrated code, the method further includes:
inquiring a service association system with a service relation with the service node in a preset service association database;
and sending prompt information for prompting to suspend the service function corresponding to the service node to the service association system.
As an optional implementation manner, after determining that the target code to be integrated passes the test, the method further includes:
and storing the target code to be integrated as backtracking code to be integrated.
As an optional implementation manner, after determining that the target code to be integrated fails the test, the method further includes:
determining a modified code according to the target code to be integrated and the backtracking code to be integrated;
judging whether a target problem reason matched with the change code exists in a test problem database, wherein the test problem database comprises a corresponding stored problem reason and a corresponding code;
and outputting the target problem reason when judging that the target problem reason matched with the changed code exists in the test problem database, so that a developer changes the target code to be integrated according to the target problem reason.
A system integration device based on test flow improvement, the device comprising:
the system comprises an acquisition unit, a control unit and a control unit, wherein the acquisition unit is used for integrating an initial code to be integrated according to a system integration instruction when the system integration instruction is detected, and acquiring the integration speed of the initial code to be integrated;
the determining unit is used for determining the timing test time of system integration according to the integration speed;
the freezing unit is used for freezing the target code to be integrated at the current moment every other the timing test time in the system integration process, wherein the target code to be integrated and the initial code to be integrated are different versions of codes to be integrated under different time;
the judging unit is used for starting a target test script to test the target code to be integrated and judging whether the target code to be integrated passes the test;
and the defrosting unit is used for executing defrosting operation on the target code to be integrated when judging that the target code to be integrated passes the test, and is used for continuing system integration and triggering the freezing unit to execute the process of system integration, and freezing the target code to be integrated at the current moment every the timing test time until the system integration is completed.
An electronic device, the electronic device comprising:
a processor;
a memory having stored thereon computer readable instructions which, when executed by the processor, implement a method as described above.
A computer-readable storage medium storing a computer program that causes a computer to perform the method as described above.
The technical scheme provided by the embodiment of the invention can comprise the following beneficial effects:
when a system integration instruction is detected, integrating an initial code to be integrated according to the system integration instruction, and acquiring the integration speed of the initial code to be integrated; determining timing test time of system integration according to the integration speed; in the process of system integration, every other timing test time, freezing a target code to be integrated at the current moment, wherein the target code to be integrated and the initial code to be integrated are different versions of codes to be integrated under different times; starting a target test script to test the target code to be integrated, and judging whether the target code to be integrated passes the test; when the target code to be integrated passes the test, the unfreezing operation is executed on the target code to be integrated, so that the system integration is continued, and the target code to be integrated at the current moment is frozen every other timing test time in the process of the system integration until the system integration is completed.
Under the method, based on the test flow improvement technology, the timing test time can be determined based on the integration speed of the initial code to be integrated in the process of system integration, so that the system integration is realized while the test is performed, and the integration can be continued only when the test is passed, thereby ensuring that the finally completed system integration passes the test in the real system integration environment, and having high accuracy.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention as claimed.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the invention. Rather, they are merely examples of apparatus and methods consistent with aspects of the invention as detailed in the accompanying claims.
The implementation environment of the invention can be a portable mobile device, such as a smart phone, a tablet computer, a desktop computer.
FIG. 1 is a schematic diagram of a system integrated device based on test flow improvement, according to an example embodiment. The apparatus 100 may be the portable mobile device described above. As shown in fig. 1, the apparatus 100 may include one or more of the following components: a processing component 102, a memory 104, a power supply component 106, a multimedia component 108, an audio component 110, a sensor component 114, and a communication component 116.
The processing component 102 generally controls overall operation of the device 100, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations, among others. The processing component 102 may include one or more processors 118 to execute instructions to perform all or part of the steps of the methods described below. Further, the processing component 102 can include one or more modules to facilitate interactions between the processing component 102 and other components. For example, the processing component 102 may include a multimedia module for facilitating interaction between the multimedia component 108 and the processing component 102.
The memory 104 is configured to store various types of data to support operations at the apparatus 100. Examples of such data include instructions for any application or method operating on the device 100. The Memory 104 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as static random access Memory (Static Random Access Memory, SRAM), electrically erasable Programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), erasable Programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), programmable Read-Only Memory (PROM), read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk. Also stored in the memory 104 are one or more modules configured to be executed by the one or more processors 118 to perform all or part of the steps in the methods shown below.
The power supply assembly 106 provides power to the various components of the device 100. The power components 106 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 100.
The multimedia component 108 includes a screen between the device 100 and the user that provides an output interface. In some embodiments, the screen may include a liquid crystal display (Liquid Crystal Display, LCD for short) and a touch panel. If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. The screen may also include an organic electroluminescent display (Organic Light Emitting Display, OLED for short).
The audio component 110 is configured to output and/or input audio signals. For example, the audio component 110 includes a Microphone (MIC) configured to receive external audio signals when the device 100 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 104 or transmitted via the communication component 116. In some embodiments, the audio component 110 further comprises a speaker for outputting audio signals.
The sensor assembly 114 includes one or more sensors for providing status assessment of various aspects of the device 100. For example, the sensor assembly 114 may detect an on/off state of the device 100, a relative positioning of the assemblies, the sensor assembly 114 may also detect a change in position of the device 100 or a component of the device 100, and a change in temperature of the device 100. In some embodiments, the sensor assembly 114 may also include a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 116 is configured to facilitate communication between the apparatus 100 and other devices in a wired or wireless manner. The device 100 may access a Wireless network based on a communication standard, such as WiFi (Wireless-Fidelity). In one exemplary embodiment, the communication component 116 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 116 further includes a near field communication (Near Field Communication, NFC) module for facilitating short range communications. For example, the NFC module may be implemented based on radio frequency identification (Radio Frequency Identification, RFID) technology, infrared data association (Infrared Data Association, irDA) technology, ultra Wideband (UWB) technology, bluetooth technology, and other technologies.
In an exemplary embodiment, the apparatus 100 may be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviated ASIC), digital signal processors, digital signal processing devices, programmable logic devices, field programmable gate arrays, controllers, microcontrollers, microprocessors or other electronic components for executing the methods described below.
FIG. 2 is a flow chart illustrating a method of system integration based on test flow improvement according to an example embodiment. As shown in fig. 2, the method comprises the steps of:
and 201, when a system integration instruction is detected, integrating the initial code to be integrated according to the system integration instruction, and acquiring the integration speed of integrating the initial code to be integrated.
In the embodiment of the invention, the system integration instruction is used for indicating to integrate the initial code to be integrated, and the system integration process is a continuous integration process, namely, the code to be integrated under different time is different code versions, and the initial code to be integrated is the code version of the initial version. Specifically, when the initial code to be integrated is integrated according to the system integration instruction, the integration speed of the testing environment at the current moment for integrating the initial code to be integrated can be obtained.
Step 202, determining the timing test time of system integration according to the integration speed.
In the embodiment of the invention, the timing test time integrated by the system can be determined according to the integration speed, when the integration speed is higher, the timing test time is higher, when the integration speed is lower, the timing test time is lower, and the timing test time is automatically set in a manner that the integration speed is in direct proportion to the timing test time, so that the correctness of setting the timing test time is ensured.
And 203, freezing the target code to be integrated at the current moment every other time test time in the process of system integration, wherein the target code to be integrated and the initial code to be integrated are different versions of codes to be integrated under different time.
And step 204, starting a target test script to test the target code to be integrated, judging whether the target code to be integrated passes the test, and if so, executing step 205.
In the embodiment of the invention, the target test script is used for testing the target code to be integrated, a test result can be obtained after the test, and when the test result indicates that the target code to be integrated passes the test, the thawing operation can be executed on the target code to be integrated so as to continue the system integration.
And 205, executing a defrosting operation on the target code to be integrated to continue the system integration, and executing the process of the system integration, wherein the target code to be integrated at the current moment is frozen every other time test time until the system integration is completed.
Under the method, based on the test flow improvement technology, the timing test time can be determined based on the integration speed of the initial code to be integrated in the process of system integration, so that the system integration is realized while the test is performed, and the integration can be continued only when the test is passed, so that the finally completed system integration is ensured to pass the test in the real system integration environment, and the accuracy is high.
FIG. 3 is a flow chart illustrating another system integration method based on test flow improvement according to an example embodiment. As shown in fig. 3, the method comprises the steps of:
step 301, when a system integration instruction is detected, integrating the initial code to be integrated according to the system integration instruction, and obtaining the integration speed of integrating the initial code to be integrated.
Step 302, determining the timing test time of system integration according to the integration speed.
Step 303, freezing the target code to be integrated at the current moment every a fixed test time in the process of system integration, wherein the target code to be integrated and the initial code to be integrated are different versions of codes to be integrated under different time.
Step 304, determining the service node covered by the target code to be integrated.
As an alternative embodiment, after determining the service node to be covered by the integrated code, the following steps may be performed:
inquiring a service association system with a service relation with a service node in a preset service association database;
and sending prompt information for prompting the service function corresponding to the suspended service node to the service association system.
By implementing the alternative implementation mode, corresponding prompt information can be sent to the service association systems with service relations with the service nodes covered by the target codes to be integrated, so that the service association systems pause corresponding service functions according to the prompt information, and the probability of abnormal function access conditions caused by system integration is reduced.
In the embodiment of the invention, the number of the service nodes covered by the target code to be integrated may be one or more, the embodiment of the invention is not limited, and a service association system with a service relationship of each service node is stored in a preset service association database. For example, when the service node is a service for a certain financial product, the preset service association database stores a plurality of systems having a service relationship with the financial product service, wherein the systems can handle the service related to the financial product service. At this time, a prompt message for suspending the service function corresponding to the service node can be sent to the service association system, so that the probability of occurrence of access abnormality caused by invalid access is reduced.
Step 305, generating a target test script for testing the service node.
As an alternative embodiment, generating the target test script for testing the service node may include:
acquiring a target programming language category matched with a target code to be integrated;
and generating a target test script of the service node according to the target service class and the target programming language class of the service node.
By implementing the alternative implementation mode, the test script can be generated according to the target programming language type matched with the target code to be integrated, so that the test script generation of different programming language types is realized, and the intelligent degree of the test script generation is improved.
As another alternative embodiment, generating the target test script for the service node from the target service class and the target programming language class of the service node may include:
judging whether an initial test script matched with a target service class of a service node exists in a preset test script database, wherein the preset test script database comprises the service class and the test script which are correspondingly stored;
when judging that the initial test script exists in the preset test script database, judging whether the programming language type of the initial test script is a target programming language type;
when the programming language type of the initial test script is judged to be the target programming language type, determining the initial test script as the target test script;
and when judging that the programming language type of the initial testing script is not the target programming language type, performing programming language conversion on the initial testing script to obtain the target testing script with the programming language type being the target programming language type.
By implementing the alternative implementation mode, the initial test script matched with the target service class of the service node can be queried in the preset test script database, and if the programming language class of the initial test script is not the target programming language class, the programming language conversion can be performed on the initial test script, so that the target test script with the programming language class being the target programming language class is obtained. The process realizes the conversion of the test scripts of different programming language types, thereby improving the intelligent degree of the test script generation.
And step 306, starting a target test script to test the service node to be covered by the integrated codes.
Step 307, determining whether the target code to be integrated passes the test, if yes, executing step 308, and if no, executing steps 309 to 310.
And 308, when the target code to be integrated passes the test, storing the target code to be integrated as a backtracking code to be integrated, and executing a defrosting operation on the target code to be integrated to continue the system integration, and executing the process of the system integration, wherein the target code to be integrated at the current moment is frozen every time of the test time until the system integration is completed.
And step 309, determining the modified code according to the target code to be integrated and the backtracking code to be integrated.
In the embodiment of the invention, the code of the current target code to be integrated, which passes the test last time, is the backtracking code to be integrated, and the modified code with the difference between the code of the current test and the code of the last test can be determined according to the modification between the current target code to be integrated and the backtracking code to be integrated.
Step 310, judging whether the target problem reason matched with the change code exists in the test problem database, if yes, executing step 311, and if not, ending the flow.
In the embodiment of the invention, the test problem database comprises the corresponding stored problem reasons and corresponding codes.
And 311, outputting the target problem reason so that the developer changes the target code to be integrated according to the target problem reason.
Under the method, based on the test flow improvement technology, the timing test time can be determined based on the integration speed of the initial code to be integrated in the process of system integration, so that the system integration is realized while the test is performed, and the integration can be continued only when the test is passed, so that the finally completed system integration is ensured to pass the test in the real system integration environment, and the accuracy is high.
The following are device embodiments of the present invention.
FIG. 4 is a block diagram illustrating a system integration device based on test flow improvement, according to an example embodiment. As shown in fig. 4, the apparatus includes:
the acquiring unit 401 is configured to integrate the initial code to be integrated according to the system integration instruction when the system integration instruction is detected, and acquire an integration speed of integrating the initial code to be integrated.
In the embodiment of the invention, the system integration instruction is used for indicating to integrate the initial code to be integrated, and the system integration process is a continuous integration process, namely, the code to be integrated under different time is different code versions, and the initial code to be integrated is the code version of the initial version. Specifically, when the initial code to be integrated is integrated according to the system integration instruction, the integration speed of the testing environment at the current moment for integrating the initial code to be integrated can be obtained.
A determining unit 402, configured to determine a timing test time of system integration according to the integration speed.
In the embodiment of the invention, the timing test time integrated by the system can be determined according to the integration speed, when the integration speed is higher, the timing test time is higher, when the integration speed is lower, the timing test time is lower, and the timing test time is automatically set in a manner that the integration speed is in direct proportion to the timing test time, so that the correctness of setting the timing test time is ensured.
And the freezing unit 403 is configured to freeze, during system integration, the target code to be integrated at the current moment every a fixed test time, where the target code to be integrated and the initial code to be integrated are different versions of codes to be integrated at different times.
And the judging unit 404 is used for starting the target test script to test the target code to be integrated and judging whether the target code to be integrated passes the test.
In the embodiment of the invention, the target test script is used for testing the target code to be integrated, a test result can be obtained after the test, and when the test result indicates that the target code to be integrated passes the test, the thawing operation can be executed on the target code to be integrated so as to continue the system integration.
As an alternative embodiment, the determining unit 404 starts the target test script to test the target code to be integrated may include:
the judging unit 404 determines a service node covered by the target code to be integrated;
the judging unit 404 generates a target test script for testing the service node;
the judging unit 404 starts the target test script to test the service node to be covered by the integrated code.
By implementing the alternative implementation mode, corresponding prompt information can be sent to the service association systems with service relations with the service nodes covered by the target codes to be integrated, so that the service association systems pause corresponding service functions according to the prompt information, and the probability of abnormal function access conditions caused by system integration is reduced.
In the embodiment of the invention, the number of the service nodes covered by the target code to be integrated may be one or more, the embodiment of the invention is not limited, and a service association system with a service relationship of each service node is stored in a preset service association database. For example, when the service node is a service for a certain financial product, the preset service association database stores a plurality of systems having a service relationship with the financial product service, wherein the systems can handle the service related to the financial product service. At this time, a prompt message for suspending the service function corresponding to the service node can be sent to the service association system, so that the probability of occurrence of access abnormality caused by invalid access is reduced.
As another alternative embodiment, the generating, by the determining unit 404, the target test script for testing the service node may include:
the judging unit 404 obtains a target programming language class matched with the target code to be integrated;
the judging unit 404 generates a target test script of the service node according to the target service class and the target programming language class of the service node.
By implementing the alternative implementation mode, the test script can be generated according to the target programming language type matched with the target code to be integrated, so that the test script generation of different programming language types is realized, and the intelligent degree of the test script generation is improved.
As another alternative embodiment, the determining unit 404 may generate the target test script of the service node according to the target service class and the target programming language class of the service node, which may include:
the judging unit 404 judges whether an initial test script matched with the target service class of the service node exists in a preset test script database, and the preset test script database comprises the service class and the test script which are correspondingly stored;
when it is determined that the initial test script exists in the preset test script database, the determination unit 404 determines whether the programming language class of the initial test script is the target programming language class;
when it is determined that the programming language class of the initial test script is the target programming language class, the determination unit 404 determines the initial test script as the target test script;
when it is determined that the programming language class of the initial test script is not the target programming language class, the determining unit 404 performs programming language conversion on the initial test script to obtain a target test script whose programming language class is the target programming language class.
By implementing the alternative implementation mode, the initial test script matched with the target service class of the service node can be queried in the preset test script database, and if the programming language class of the initial test script is not the target programming language class, the programming language conversion can be performed on the initial test script, so that the target test script with the programming language class being the target programming language class is obtained. The process realizes the conversion of the test scripts of different programming language types, thereby improving the intelligent degree of the test script generation.
And the defrosting unit 405 is configured to execute a defrosting operation on the target code to be integrated when it is determined that the target code to be integrated passes the test, and is configured to continue system integration, trigger the freezing unit 403 to perform the above-described process of system integration, and freeze the target code to be integrated at the current moment every time a regular test time until the system integration is completed.
Therefore, by implementing the system integration device based on the test flow improvement described in fig. 4, based on the test flow improvement technology, the timing test time can be determined based on the integration speed of the code to be integrated initially in the process of system integration, so as to realize the system integration while testing, and only when the test is passed, the integration can be continued, so as to ensure that the finally completed system integration has passed the test in the real system integration environment, and the accuracy is high.
FIG. 5 is a block diagram of another system integration device based on test flow improvement, according to an example embodiment. FIG. 5 is an optimized view of FIG. 4, and the improved system-on-test-flow-based integrated device of FIG. 5 may further include:
and a querying unit 406, configured to query, after the determining unit 402 determines that the target service node to be covered by the integrated code, a service association system having a service relationship with the service node in a preset service association database.
Specifically, after the determining unit 402 determines the service node covered by the target code to be integrated, the determining unit 402 sends a trigger instruction to the querying unit 406 to trigger the querying unit 406 to query the service association system having a service relationship with the service node in the preset service association database.
A sending unit 407, configured to send, to the service association system, a prompting message for prompting to suspend a service function corresponding to the service node.
The storage unit 408 is configured to store the target code to be integrated as the backtracking code to be integrated after the determining unit 404 determines that the target code to be integrated passes the test.
In the embodiment of the invention, the code of the current target code to be integrated, which passes the test last time, is the backtracking code to be integrated, and the modified code with the difference between the code of the current test and the code of the last test can be determined according to the modification between the current target code to be integrated and the backtracking code to be integrated.
As an alternative embodiment, after the judging unit 404 judges that the target code to be integrated fails the test, the judging unit 404 is further configured to:
determining a modified code according to the target code to be integrated and the backtracking code to be integrated;
judging whether a target problem reason matched with the changed code exists in a test problem database, wherein the test problem database comprises the corresponding stored problem reason and the corresponding code;
and outputting the target problem reason when judging that the target problem reason matched with the changed code exists in the test problem database, so that a developer changes the target code to be integrated according to the target problem reason.
Therefore, by implementing the system integration device based on the test flow improvement described in fig. 5, based on the test flow improvement technology, the timing test time can be determined based on the integration speed of the code to be integrated initially in the process of system integration, so as to realize the system integration while testing, and only when the test is passed, the integration can be continued, so as to ensure that the finally completed system integration has passed the test in the real system integration environment, and the accuracy is high.
The invention also provides an electronic device, comprising:
a processor;
and a memory having stored thereon computer readable instructions which, when executed by the processor, implement the improved system integration device based on test flow as previously described.
The electronic device may be the system-in-package apparatus 100 shown in fig. 1, which is modified based on a test procedure.
In an exemplary embodiment, the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the improved system integration method based on test flow as previously shown.
It is to be understood that the invention is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the invention is limited only by the appended claims.