CN112100073A - Online development method and device of application program, electronic equipment and storage medium - Google Patents

Online development method and device of application program, electronic equipment and storage medium Download PDF

Info

Publication number
CN112100073A
CN112100073A CN202010976800.2A CN202010976800A CN112100073A CN 112100073 A CN112100073 A CN 112100073A CN 202010976800 A CN202010976800 A CN 202010976800A CN 112100073 A CN112100073 A CN 112100073A
Authority
CN
China
Prior art keywords
test
task
application program
test task
code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010976800.2A
Other languages
Chinese (zh)
Inventor
李秋林
任星旺
仝志钊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JD Digital Technology Holdings Co Ltd
Original Assignee
JD Digital Technology Holdings Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN202010976800.2A priority Critical patent/CN112100073A/en
Publication of CN112100073A publication Critical patent/CN112100073A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Abstract

The disclosure provides an online development method and device of an application program, electronic equipment and a storage medium, and relates to the technical field of computers. The online development method of the application program comprises the following steps: receiving a test request and determining a test task corresponding to the test request; acquiring configuration information for constructing a test task, and constructing the test task to a deployment machine according to the configuration information; multiplexing code attribute information in the configuration information to create a coverage rate task of the test task according to the code attribute information; determining the execution progress of a test task in a deployment machine; and determining the completion of the test task according to the execution progress, and determining the result of the coverage rate task according to the feedback result of the test task. Through the technical scheme disclosed by the invention, the configuration steps of online development are simplified, the execution progress and the creation record of the test task are more visually displayed, and the quality feedback result of the test code can be provided while the application program test is completed.

Description

Online development method and device of application program, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an online development method and apparatus for an application program, an electronic device, and a storage medium.
Background
Existing online development tools often require tedious configuration steps to add test tasks for deploying machines, resulting in inefficient testing due to configuration errors. In addition, research and development personnel can not obtain information of the construction process and the execution process of the test task, and can only determine whether the online development of the application software is completed or not based on the test feedback result.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure is directed to providing an online development method, an online development device, an electronic device, and a storage medium for an application, which overcome, at least to some extent, the problem of low configuration efficiency due to complicated configuration steps in the related art.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to one aspect of the present disclosure, there is provided an online development method of an application program, including: receiving a test request and determining a test task corresponding to the test request; acquiring configuration information for constructing a test task, and constructing the test task to a deployment machine according to the configuration information; multiplexing code attribute information in the configuration information to create a coverage rate task of the test task according to the code attribute information; determining the execution progress of a test task in a deployment machine; and determining the completion of the test task according to the execution progress, and determining the result of the coverage rate task according to the feedback result of the test task.
In one embodiment of the present disclosure, receiving a test request and determining a test task corresponding to the test request includes: receiving a test request sent by a deployment machine; analyzing the test request to determine user name information of the deployment machine; verifying the received user name information; and if the user name information passes the verification, determining a public key-private key pair according to the user name information, and determining a test task contained in the test request.
In one embodiment of the present disclosure, further comprising: feeding back a public key of the public key-private key pair to the deployment machine; creating a data interaction channel with a deployment machine according to the public key-private key pair; and carrying out a test session with the deployment machine through the data interaction channel.
In one embodiment of the present disclosure, multiplexing the code attribute information in the configuration information to create the coverage task of the test task according to the code attribute information includes: determining a source code base address, a code authority and a java code running version according to the code attribute information; and determining the source code for unit testing of the deployment machine according to the source code base address, the code authority and the java code running version, and creating a coverage rate task of the source code.
In one embodiment of the present disclosure, obtaining configuration information for constructing a test task, and constructing the test task to the deployment machine according to the configuration information includes: the source code is used for carrying out unit testing on the deployment machine according to the code attribute information; determining a destination address of a transmission source code according to the configuration information; sending the source code to a deployment machine according to the target address; detecting whether an application program in a test task exists in a deployment machine or not; if the application program is detected to exist, indicating the deployment machine to execute unit testing according to the testing task; and if detecting that no application program exists, indicating the deployment machine to configure the tomcat and the java code operating environment according to the test task, and performing directory initialization so as to execute unit test according to the initialized directory.
In one embodiment of the disclosure, determining the execution progress of the test task at the deployment machine comprises: and acquiring the execution progress of the test task through a websocket protocol and generating prompt information.
According to another aspect of the present disclosure, there is provided a test task construction method of an application program: sending user name information and a test request to an application program server; acquiring a test task fed back by the application program server according to the test request; determining a coverage rate task corresponding to the test task; and executing the unit test according to the test task, and feeding back the result of the unit test to the application program server.
In one embodiment of the present disclosure, performing the unit test according to the test task, and feeding back the result of the unit test to the application server includes: judging whether an application program in the test task exists or not; if the application program is judged to exist, performing unit testing according to the testing task; if the application program does not exist, configuring tomcat and java code operating environment according to the test task, and initializing a directory; and testing the application program which completes the initialization of the directory.
In one embodiment of the disclosure, sending the username information and the test request to the application server comprises: sending user name information to an application program server; judging whether a verification passing instruction fed back by the application program server is received; if the verification passing instruction is received, receiving a public key fed back by the application program server; establishing a data interaction channel with an application program server according to the public key; and carrying out a test session with the application program server through the data interaction channel.
In one embodiment of the present disclosure, further comprising: determining a construction result and/or construction attribute information of the test task; prompting a construction result and/or construction attribute information; and feeding back the construction result and/or the construction attribute information to the application program server.
In one embodiment of the present disclosure, the build result includes at least one of success, coverage, reason for failure.
In one embodiment of the present disclosure, the build attribute information includes at least one of a version number, a builder, a build time, and a duration of the build task.
In one embodiment of the disclosure, the configuration information includes at least one of a test task name, a code base address, a source code branch, a source code authority, a java code runtime version, a tomcat version, a deployment content source path, a service instance name, and a deployment machine identifier.
In one embodiment of the present disclosure, the code attribute information includes at least one of a code library address, a source code branch, a source code authority, and a java code runtime version.
According to another aspect of the present disclosure, there is provided an online development apparatus of an application, including: the response module is used for receiving the test request and determining a test task corresponding to the test request; the acquisition module is used for acquiring configuration information for constructing the test task and constructing the test task to the deployment machine according to the configuration information; the multiplexing module is used for multiplexing the code attribute information in the configuration information so as to establish a coverage rate task of the test task according to the code attribute information; the determining module is used for determining the execution progress of the testing task in the deployment machine; the determining module is further used for determining the completion of the testing task according to the execution progress and determining the result of the coverage rate task according to the feedback result of the testing task.
According to still another aspect of the present disclosure, there is provided an electronic device including: a processor; and a memory for storing executable instructions for the processor; wherein the processor is configured to perform the method for online development of an application program of any of the above via execution of the executable instructions.
According to yet another aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of online development of an application program of any one of the above.
According to the test task construction scheme of the application program, the configuration information for constructing the test task is acquired, and the creation efficiency of the test task is improved. In addition, the coverage rate task is created by multiplexing the code attribute information in the configuration information, and the quality of the codes generated by the coverage rate task can be acquired without additionally setting the coverage rate task by a user.
Further, by determining the execution progress of the test task on the deployment machine and determining the result of the coverage rate task, the related record and progress of the test task are displayed more intuitively.
And finally, the user name is verified, a public key-private key pair corresponding to the user name is determined, the public key is fed back to the deployment machine, and a password-free login channel is established based on the public key-private key pair, so that the safety problem caused by the fact that the user directly operates the deployment machine is avoided.
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 disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
FIG. 1 is a schematic diagram illustrating an architecture of an online development system for an application according to an embodiment of the present disclosure;
FIG. 2 is a flow chart illustrating a method for online development of an application in an embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating another method for online development of an application in an embodiment of the disclosure;
FIG. 4 is a flow chart illustrating a method for online development of another application in an embodiment of the disclosure;
FIG. 5 is a flow chart illustrating a method for online development of another application in an embodiment of the disclosure;
FIG. 6 is a flow chart illustrating a method for online development of another application in an embodiment of the disclosure;
FIG. 7 is a flow chart illustrating a method for online development of an application program according to yet another embodiment of the present disclosure;
FIG. 8 is a flow chart illustrating a method for online development of another application in an embodiment of the present disclosure;
FIG. 9 is a flow chart illustrating a method for online development of another application in an embodiment of the present disclosure;
FIG. 10 is a flow chart illustrating a method for online development of another application in an embodiment of the present disclosure;
FIG. 11 is a flow chart illustrating a method for online development of an application according to another embodiment of the present disclosure;
FIG. 12 is a flow chart illustrating a method for online development of another application in an embodiment of the disclosure;
FIG. 13 is a diagram illustrating a test task build interface for an application in the prior art;
FIG. 14 is a schematic diagram illustrating an apparatus for online development of an application according to an embodiment of the present disclosure;
FIG. 15 shows a schematic view of an electronic device in an embodiment of the disclosure; and
fig. 16 shows a block diagram of a computer device in an embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
According to the scheme, the establishment efficiency of the test task is improved by acquiring the configuration information for constructing the test task. In addition, the coverage rate task is created by multiplexing the code attribute information in the configuration information, and the quality of the codes generated by the coverage rate task can be acquired without additionally setting the coverage rate task by a user.
The scheme provided by the embodiment of the application relates to technologies such as online development and machine automation deployment of application programs, and is specifically described by the following embodiment.
CI (continuousness integration, chinese means persistent integration) is a software development time. The continuous integration emphasizes that the construction and unit testing are performed immediately after the developer submits new code. Based on the test results, the developer can determine whether the new code and the original code can be properly integrated together.
CD (continuous delivery with chinese meaning) is based on continuous integration, and deploys integrated code into a more real-world operating environment (class production environment).
As shown in fig. 1, after the deployment of the machine 106 is completed, the machine 106 sends a login request to the resource manager 102, the resource manager 102 generates a build task request to the application server 104, and the application server 104 deploys a test task to the machine 106 to perform a unit test. After the unit tests are completed, the code may be deployed to more tests in the pre-staging environment of the connected database. If the code has no problems, manual deployment to the production environment can continue.
Specifically, the inventors present the following setup items and execution steps to explain the construction process of the test task:
(1) eexcute shell: executing shell command, wherein the tool is specific to linux environment, and the Windows environment also has a corresponding tool 'Execute Windows base command'. Some commands may need to be executed prior to construction, such as decompression of the compressed packet.
(2) Targets: the operations to be performed are one operational task per row.
(3) properties: set some variables, which can be referenced in the configuration file.
(4) Send files or execute command source SSH (secure shell): sending a file to a remote host or executing a command (script).
(5) Name: name of SSH Server.
(6) source files: a source file is required that is sent to the remote host.
(7) Remove prefix: the previous path is removed. If this parameter is not set, the remote host will automatically create the path that the build source files contains.
(8) Remote direction: a remote host directory.
(9) Exec command: commands executed on a remote host, or scripts executed.
(10) Public cloud PHP Coverage Report: and issuing a file report of an xml (eXtensible Markup Language) format of the code coverage task.
(11) Publish HTML reports: HTML (HyperText Markup Language) reports of code coverage are published.
(12) Report jump: and releasing a code test report.
(13) E-mail Notification: and e, notifying the mail, and sending the mail to a specified mailbox after the construction is finished.
Hereinafter, each step of the online development method of the application program in the present exemplary embodiment will be described in more detail with reference to the drawings and examples.
Fig. 2 shows a flowchart of an online development method of an application program in an embodiment of the present disclosure. The method provided by the embodiment of the present disclosure may be executed by any electronic device with computing processing capability, such as a terminal and/or a server cluster. In the following description, a terminal is taken as an execution subject for illustration.
As shown in fig. 2, the method for the terminal to perform the online development of the application program includes the following steps:
step S202, receiving the test request and determining the test task corresponding to the test request.
And step S204, acquiring configuration information for constructing the test task, and constructing the test task to the deployment machine according to the configuration information.
In the embodiment, the source code to be tested and the test operation are determined by obtaining the configuration information corresponding to the test task, and based on the determination, the test task is constructed for the deployment machine, so that a scheme for intensively and massively setting the configuration information is provided, the operation steps of online development of the application program are simplified, and the test efficiency and the development efficiency are improved.
And step S206, multiplexing the code attribute information in the configuration information to create a coverage rate task of the test task according to the code attribute information.
In the above embodiment, the code attribute information in the configuration information may determine the source code, and may also be used to generate the coverage rate task, and the associated test task and the coverage rate task may be created without the user creating the test task and the coverage rate task, respectively, and the quality of the source code for performing the test is determined by the coverage rate task while the test task feeds back the application program operation result.
And step S208, determining the execution progress of the test task on the deployment machine.
In the above embodiment, by determining the execution progress of the test task and feeding back the execution progress to the user, the research and development staff can know the test information more intuitively, including: "build task name", "warehouse address", "branch", "Jdk version", "Tomcat version", "deploy content original path", "service instance name", "deploy machine IP", "creator", and "build state", etc., but is not limited thereto.
And step S210, determining that the test task is completed according to the execution progress, and determining the result of the coverage rate task according to the feedback result of the test task.
In the embodiment, the completion of the test task is determined by executing the progress, so that research personnel can obtain the result of the coverage rate task in time, and determine the coverage rate of the unit test of the source code based on the result of the coverage rate task to determine the quality of the source code, thereby being beneficial to improving the efficiency and reliability of the online development of the application program.
In summary, the user only needs to add the git account and the matched password thereof in the web page, add the deployment machine and the user name and password thereof, then perform simple filling of a newly-built task form, save the task by the program after saving, and automatically create the corresponding coverage rate task. The user clicks to construct, the zero deployment of the application can be completed, the whole process can be completed only through one main page, the git account number is verified in correctness regularly, the password is expired, an email prompt is provided, and the user can construct a plurality of applications and monitor the construction state and the construction result of the applications at the same time.
As shown in fig. 3, in an embodiment of the present disclosure, the step S202 shown in fig. 2 receives the test request, and determining that the test task corresponding to the test request includes:
step S3022, receiving a test request sent by the deployment machine.
Step S3024, parsing the test request to determine username information of the deployment machine.
Step S3026, the received user name information is verified.
Step S3028, if the user name information passes the verification, determining a public key-private key pair according to the user name information, and determining a test task included in the test request.
In the above embodiment, the public key cryptosystem is divided into three parts, namely a public key, a private key, and an encryption and decryption algorithm, and the encryption and decryption process is as follows:
encryption: and encrypting the content (plaintext) through an encryption algorithm and a public key to obtain a ciphertext. The encryption process requires the use of a public key.
And (3) decryption: and decrypting the ciphertext through a decryption algorithm and a private key to obtain a plaintext. The decryption process requires the use of a decryption algorithm and a private key.
The content encrypted by the public key can only be decrypted by the private key, that is, the content encrypted by the public key cannot be decrypted if the private key is unknown.
The public key and the algorithm of the public key cryptosystem are public (which is why the public key cryptosystem is called), the private key is secret, and the public key is used for encryption in the data interaction process, but only the holder of the private key can decrypt the private key.
Specifically, by entering the username information (account and password) when adding a deployment machine, the program will check the correctness of the username information (account and password) and if not giving a hint, automatically generate the corresponding public-private key pair if the correct program. The server generates a pair of public key and private key according to the user name information, the public key is issued to the deployment machine, and the server locally reserves the private key. Further, the private key is transmitted to the target machine (deployment machine) through ssh (secure shell), so that a permanent connection is established, and even if the target machine modifies the password, the data interaction process is not affected.
On the premise of the steps shown in fig. 2, as shown in fig. 4, the online development method of the application further includes:
step S402, feeding back the public key of the public key-private key pair to the deployment machine.
And S404, creating a data interaction channel with the deployment machine according to the public key-private key pair.
And step S406, carrying out a test session with the deployment machine through the data interaction channel.
In the above embodiment, a data interaction channel is created between the server and the deployment machine based on the public key-private key, that is, the above-mentioned secret-free login channel, for example, the server instructs the deployment machine to perform a test operation, or the server receives a test result and a coverage result fed back by the deployment machine, so that both reliability and security of the test session are significantly improved.
On the premise of the steps shown in fig. 2, as shown in fig. 5, multiplexing the code attribute information in the configuration information to create the coverage task of the test task according to the code attribute information includes:
step S5062, determining the source code library address, the code authority and the java code running version according to the code attribute information.
Step S5064, determining a source code for unit test of the deployment machine according to the source code library address, the code authority and the java code running version, and creating a coverage rate task of the source code.
In the embodiment, the compressed packet of the source code is generated through the address of the source code library, the code authority and the java code running version and is sent to the file of the application program of the deployment machine for unit test, the coverage rate task is generated in a correlated manner without additional setting by a user, and the quality information of the source code is obtained in time through the coverage rate task, so that the efficiency of updating and maintaining the source code by research and development personnel is improved.
Specifically, the building task (test task) is created, and the matched coverage rate task is automatically created at the same time, and may be operated in association with the building task or may be operated separately. The coverage task name is added to-cov (for example, if the construction task name is job1, the coverage task is job1-cov), and the corresponding coverage task can be found according to the construction task.
Wherein, the coverage rate task can realize result presentation by calling sonar (an open platform for code quality management).
On the premise of the steps shown in fig. 2, as shown in fig. 6, acquiring configuration information for constructing a test task, and constructing the test task to the deployment machine according to the configuration information includes:
step S6042, a source code for unit testing is performed on the deployment machine according to the code attribute information.
In step S6044, the destination address of the transmission source code is determined from the configuration information.
Step S6046, the source code is sent to the deployment machine according to the target address.
Step S6048, it is detected whether the deployment machine has an application in the test task.
In step S60410, if the application is detected to exist, the deployment machine is instructed to execute the unit test according to the test task.
Step 60412, if it is detected that the application program does not exist, the deployment machine is instructed to configure tomcat and java code operating environment according to the test task, and directory initialization is performed so as to execute unit testing according to the initialized directory.
In the above embodiment, by detecting whether the deployment machine has the application program in the test task, if the deployment machine does not have a directory corresponding to the application program (a jdk version and a tomcat version required by the application and an application initialization directory are placed under the directory), the deployment machine performs initialization deployment according to the selected jdk and tomcat versions, if the directory of the application program already exists, the jdk and tomcat versions of the application program are checked, and if the directory of the application program already exists, the redk and tomcat versions are modified into the version newly selected by the user.
On the premise of the steps shown in fig. 2, as shown in fig. 7, determining the execution progress of the test task on the deployment machine includes:
step S7082, obtaining the execution progress of the test task through the websocket protocol and generating prompt information.
In the embodiment, the building progress is displayed in a websocket mode, after a user opens a page, the user immediately opens a websocket connection and immediately subscribes the viewed progress information of all building tasks to the background server, and after receiving a building request, the background server sends the progress information to all subscribed front-end browsers in real time through the websocket. And after the user closes the construction task list page, closing the websocket connection.
As shown in fig. 8, according to an embodiment of the present application, there is further provided a test task construction method for an application program:
step S802, user name information and a test request are sent to an application program server.
Step S804, acquiring a test task fed back by the application server according to the test request.
And step S806, determining a coverage rate task corresponding to the test task.
Step S808, performing the unit test according to the test task, and feeding back the result of the unit test to the application server.
In the embodiment, the deployment machine sends the user name information and the test request to the server, and the server obtains the configuration information for constructing the test task after verifying the user name information, so that the creation efficiency of the test task is improved. In addition, the coverage rate task is created by multiplexing the code attribute information in the configuration information, and the quality of the codes generated by the coverage rate task can be acquired without additionally setting the coverage rate task by a user.
On the premise of the steps shown in fig. 8, as shown in fig. 9, the performing the unit test according to the test task and feeding back the result of the unit test to the application server includes:
and step S9082, judging whether the application program in the test task exists, if so, executing step S9084, and if not, executing step S9086.
And step S9084, if the application program is judged to exist, executing unit testing according to the testing task.
And step S9086, if the application program does not exist, configuring tomcat and java code operating environment according to the test task, and initializing the directory.
And step S9088, testing the application program execution unit which completes the initialization of the directory.
In the above embodiment, by detecting whether the deployment machine has the application program in the test task, if the deployment machine does not have a directory corresponding to the application program (a jdk version and a tomcat version required by the application and an application initialization directory are placed under the directory), the deployment machine performs initialization deployment according to the selected jdk and tomcat versions, if the directory of the application program already exists, the jdk and tomcat versions of the application program are checked, and if the directory of the application program already exists, the redk and tomcat versions are modified into the version newly selected by the user.
On the premise of the steps shown in fig. 8, as shown in fig. 10, sending the username information and the test request to the application server includes:
step S1022, the user name information is sent to the application server.
Step S1024, determining whether a verification passing instruction fed back by the application server is received, if yes, performing step S1026, and if not, performing step S1022.
In step S1026, if the verification passing instruction is received, the public key fed back by the application server is received.
Step S1028, establishing a data interaction channel with the application server according to the public key.
Step S10210, a test session is performed with the application server through the data interaction channel.
In the above embodiment, a data interaction channel is created between the server and the deployment machine based on the public key-private key, that is, the above-mentioned secret-free login channel, for example, the server instructs the deployment machine to perform a test operation, or the server receives a test result and a coverage result fed back by the deployment machine, so that both reliability and security of the test session are significantly improved.
On the premise of the steps shown in fig. 8, as shown in fig. 11, the method for developing an application further includes:
step S1102, determining a construction result and/or construction attribute information of the test task.
And step S1104, prompting the construction result and/or the construction attribute information.
Step S1106, feeding back the construction result and/or the construction attribute information to the application server.
In the above embodiment, after the construction is completed, by prompting the construction result and/or the construction attribute information, the user can view the construction result and the construction details, and record the version number, the constructor, the construction time, the construction result, and the construction duration of each construction in detail.
As shown in fig. 12, according to an embodiment of the present application, there is also provided an online development method of an application program, including:
and step S1202, adding a git account and a password thereof.
Step S1204, verify git account and its password.
Step S1206, add the deployment machine and its username password.
And step S1208, using the user name and the password to connect with the deployment machine resume public key/private key in a password-free login manner.
And step S1210, filling in the form, newly adding a construction task, and selecting a git account and a deployment machine.
In step S1212, it is determined whether the deployment machine has an application in the construction task, if yes, step S1214 is executed, and if not, step S1216 is executed.
And step S1214, obtaining a construction task and a matching unit test and coverage rate task thereof.
Step S1216, automatically configuring tomcat environment and java jdk environment, and initializing application directory.
Step S1218, build task/unit test and coverage task.
Step S1220, the construction process is monitored in real time.
In one embodiment of the present disclosure, the build result includes at least one of success, coverage, reason for failure.
In one embodiment of the present disclosure, the build attribute information includes at least one of a version number, a builder, a build time, and a duration of the build task.
In one embodiment of the disclosure, the configuration information includes at least one of a test task name, a code base address, a source code branch, a source code authority, a java code runtime version, a tomcat version, a deployment content source path, a service instance name, and a deployment machine identifier.
In one embodiment of the present disclosure, the code attribute information includes at least one of a code library address, a source code branch, a source code authority, and a java code runtime version.
As shown in fig. 13, an embodiment of the present disclosure further provides an interface of "creating a build application", where the input configuration information includes: "build task name", "repository address URL", "branch name", "git credential", "jdk version", "tomcat version", "deploy content source path", "service instance name", "deploy machine IP", and "description", but is not limited thereto.
The repository address URL, the branch name, the git credential, and the jdk version are code configuration information, and may be used to generate a coverage task.
Specifically, the interface is divided into a construction task and a matched coverage rate (including unit testing and the like) task, and the coverage rate task is automatically created when the construction task is created. Each task in the list can be constructed by clicking, one person can construct, all users who open the page can see the construction state, and meanwhile, the constructors, the construction results and the like can be seen. Similarly, editing and deleting the build task can modify and delete the coverage task at the same time, so that the coverage task is consistent with the build task. The user can use the task name, deploy the machine ip, and filter by the task creator, so that the query is facilitated.
Step A, a user opens a creating and constructing application interface, inputs a task name, a git warehouse address, a source code branch, selects a git certificate, selects a jdk version, a tomcat version, a deploying content source path, a service instance name, a deploying machine ip and the like, but the method is not limited to the steps, the creating and constructing task can be completed by clicking to save, and the system can simultaneously create a matched coverage rate task.
If the git account password does not exist in the drop-down list, the git account password needs to be added, the system can automatically carry out correctness verification after the git account password is added, a prompt is incorrectly given, verification can be carried out every night at 0:00, and a mail prompt can be incorrectly given, so that the git account password is very useful for the situation that a user needs to modify the password again when the password is set to be expired regularly by some git warehouses.
The IP deployment machine is not provided with a pull-down list, needs to be added, needs to input a user name and a password at the same time, can be immediately connected with the machine to generate a public key and private key pair, automatically places the public key on the deployment machine, and establishes a password-free login channel.
If the deployed machine does not have a directory corresponding to the application (a jdk version and a tomcat version required by the application and an application initialization directory are placed in the directory), the system performs initialization deployment according to the selected jdk and tomcat versions, if the application directory exists, the jdk and tomcat versions are checked, and if the application directory does not match, the system is modified to the latest selection of the user.
And B, selecting the newly built construction task or the coverage rate task in the step A by the user, and respectively building, wherein the countdown and the percentage are displayed in the construction process. And a user building, wherein a plurality of users opening the page can synchronously see the progress and the state of the building.
The method comprises the steps that a websocket mode is adopted for displaying the construction progress, after a user opens a page, the user immediately opens a websocket connection, and immediately subscribes the viewed progress information of all construction tasks to a background server, and after receiving a construction request, the background server sends progress information to all subscribed front-end browsers through the websocket in real time. And after the user closes the construction task list page, closing the websocket connection.
And step C, after the construction is completed, the user can check the construction result and the construction details, and the version number, the constructor, the construction time, the construction result, the construction duration and the like of each construction are recorded in detail, but the method is not limited to the above.
An online development apparatus 1400 of an application according to this embodiment of the present invention is described below with reference to fig. 14. The online development device 1400 of the application program shown in fig. 14 is only an example, and should not bring any limitation to the functions and the scope of the application program according to the embodiment of the present invention.
The online development device 1400 for the application is represented in the form of a hardware module. The components of the online development device 1400 of the application program may include, but are not limited to: a receiving module 1402, an obtaining module 1404, a multiplexing module 1406, and a determining module 1408.
The receiving module 1402 is configured to receive a test request and determine a test task corresponding to the test request.
The obtaining module 1404 is configured to obtain configuration information used for constructing the test task, and construct the test task to the deployment machine according to the configuration information.
The multiplexing module 1406 is configured to multiplex the code attribute information in the configuration information to create a coverage task of the test task according to the code attribute information.
The determination module 1408 is configured to determine the execution progress of the test task at the deployment machine.
The determining module 1408 is further configured to determine that the test task is completed according to the execution progress, and determine a result of the coverage task according to a feedback result of the test task.
An electronic device 1500 according to this embodiment of the invention is described below with reference to fig. 15. The electronic device 1500 shown in fig. 15 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 15, electronic device 1500 is in the form of a general purpose computing device. Components of electronic device 1500 may include, but are not limited to: the at least one processing unit 1510, the at least one memory unit 1520, and the bus 1530 that connects the various system components (including the memory unit 1520 and the processing unit 1510).
Where the memory unit stores program code that may be executed by the processing unit 1510 to cause the processing unit 1510 to perform steps according to various exemplary embodiments of the present invention as described in the above-mentioned "exemplary methods" section of this specification. For example, the processing unit 1510 may perform the steps as shown in fig. 2 to 12, and other steps defined in the online development method of the application program of the present disclosure.
The storage unit 1520 may include readable media in the form of volatile storage units, such as a random access memory unit (RAM)15201 and/or a cache memory unit 15202, and may further include a read only memory unit (ROM) 15203.
Storage unit 1520 may also include a program/utility 15204 having a set (at least one) of program modules 15205, such program modules 15205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 1530 may be any bus representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 1500 may also communicate with one or more external devices 1540 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device, and/or any device (e.g., router, modem, etc.) that enables the electronic device 1500 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interface 1550. Also, the electronic device 1500 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 1560. As shown, the network adapter 1560 communicates with the other modules of the electronic device 1500 over the bus 1530. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above-mentioned "exemplary methods" section of the present description, when the program product is run on the terminal device.
Referring to fig. 16, a program product 1600 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (17)

1. An online development method of an application program, comprising:
receiving a test request and determining a test task corresponding to the test request;
acquiring configuration information for constructing the test task, and constructing the test task to a deployment machine according to the configuration information;
multiplexing code attribute information in the configuration information to create a coverage rate task of the test task according to the code attribute information;
determining an execution progress of the test task at the deployment machine;
and determining the completion of the test task according to the execution progress, and determining the result of the coverage rate task according to the feedback result of the test task.
2. The method for on-line development of an application program according to claim 1, wherein receiving a test request and determining a test task corresponding to the test request comprises:
receiving the test request sent by the deployment machine;
parsing the test request to determine username information for the deployment machine;
verifying the received user name information;
and if the user name information passes the verification, determining a public key-private key pair according to the user name information, and determining a test task contained in the test request.
3. The method for on-line development of an application according to claim 2, further comprising:
feeding back a public key of the public-private key pair to the deployment machine;
creating a data interaction channel with the deployment machine according to the public key-private key pair;
and carrying out a test session with the deployment machine through the data interaction channel.
4. The method for on-line development of the application program according to any one of claims 1 to 3, wherein multiplexing the code attribute information in the configuration information to create the coverage task of the test task according to the code attribute information comprises:
determining a source code base address, a code authority and a java code running version according to the code attribute information;
and determining the source code for unit test of the deployment machine according to the source code base address, the code authority and the java code running version, and creating a coverage rate task of the source code.
5. The method for on-line development of the application program according to any one of claims 1 to 3, wherein obtaining configuration information for constructing the test task, and constructing the test task to a deployment machine according to the configuration information comprises:
the source code is used for carrying out unit testing on the deployment machine according to the code attribute information;
determining a target address for sending the source code according to the configuration information;
sending the source code to the deployment machine according to the target address;
detecting whether the deployment machine has an application program in the test task;
if the application program is detected to exist, the deployment machine is instructed to execute the unit test according to the test task;
and if the application program is detected to be absent, instructing the deployment machine to configure tomcat and java code operating environment according to the test task, and performing directory initialization so as to execute the unit test according to the initialized directory.
6. The method for on-line development of the application program according to any one of claims 1-3, wherein determining the execution progress of the test task on the deployment machine comprises:
and acquiring the execution progress of the test task through a websocket protocol and generating prompt information.
7. An online development method of an application program, comprising:
sending user name information and a test request to an application program server;
acquiring a test task fed back by the application program server according to the test request;
determining a coverage rate task corresponding to the test task;
and executing unit test according to the test task, and feeding back the result of the unit test to the application program server.
8. The method for on-line development of an application program according to claim 7, wherein performing a unit test according to the test task and feeding back a result of the unit test to the application program server comprises:
judging whether an application program in the test task exists or not;
if the application program is judged to exist, executing the unit test according to the test task;
if the application program does not exist, configuring tomcat and java code operating environment according to the test task, and initializing a directory;
and executing the unit test on the application program which completes the catalog initialization.
9. The method of on-line development of application programs according to claim 7, wherein sending username information and test request to the application server comprises:
sending the user name information to the application program server;
judging whether a verification passing instruction fed back by the application program server is received;
if the verification passing instruction is received, receiving a public key fed back by the application program server;
establishing a data interaction channel with the application program server according to the public key;
and carrying out a test session with the application program server through the data interaction channel.
10. The method for on-line development of an application program according to claim 7, further comprising:
determining a construction result and/or construction attribute information of the test task;
prompting the construction result and/or the construction attribute information;
and feeding back the construction result and/or the construction attribute information to the application program server.
11. The method for on-line development of an application according to claim 10,
the construction result comprises at least one of success, coverage rate and failure reason.
12. The method for on-line development of an application according to claim 10,
the build attribute information includes at least one of a version number, a builder, a build time, and a duration of a build task.
13. The method for on-line development of an application according to any one of claims 1 to 3 and 7 to 12,
the configuration information comprises at least one of a test task name, a code base address, a source code branch, a source code authority, a java code running version, a tomcat version, a deployment content source path, a service instance name and a deployment machine identifier.
14. The method for on-line development of an application according to any one of claims 1 to 3 and 7 to 12,
the code attribute information includes at least one of a code base address, a source code branch, a source code authority, and a java code runtime version.
15. An apparatus for online development of an application, comprising:
the receiving module is used for receiving a test request and determining a test task corresponding to the test request;
the acquisition module is used for acquiring configuration information for constructing the test task and constructing the test task to a deployment machine according to the configuration information;
the multiplexing module is used for multiplexing the code attribute information in the configuration information so as to create a coverage rate task of the test task according to the code attribute information;
the determining module is used for determining the execution progress of the test task on the deployment machine;
the determining module is further configured to determine that the test task is completed according to the execution progress, and determine a result of the coverage rate task according to a feedback result of the test task.
16. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to execute the method for online development of the application program according to any one of claims 1 to 14 via execution of the executable instructions.
17. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements a method for online development of an application program according to any one of claims 1 to 14.
CN202010976800.2A 2020-09-16 2020-09-16 Online development method and device of application program, electronic equipment and storage medium Pending CN112100073A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010976800.2A CN112100073A (en) 2020-09-16 2020-09-16 Online development method and device of application program, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010976800.2A CN112100073A (en) 2020-09-16 2020-09-16 Online development method and device of application program, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112100073A true CN112100073A (en) 2020-12-18

Family

ID=73758755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010976800.2A Pending CN112100073A (en) 2020-09-16 2020-09-16 Online development method and device of application program, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112100073A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112650686A (en) * 2020-12-30 2021-04-13 北京华胜天成科技股份有限公司 Method and device for obtaining test result, electronic equipment and storage medium
CN114996166A (en) * 2022-08-02 2022-09-02 杭州高达软件系统股份有限公司 Code online debugging method, system and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103336688A (en) * 2013-06-20 2013-10-02 中标软件有限公司 Software integrating method and system oriented to cloud computing software research and development process
CN108062254A (en) * 2017-12-12 2018-05-22 腾讯科技(深圳)有限公司 Job processing method, device, storage medium and equipment
CN108804320A (en) * 2018-05-30 2018-11-13 平安普惠企业管理有限公司 Automated testing method, device, computer equipment and storage medium
CN109542769A (en) * 2018-10-25 2019-03-29 武汉精立电子技术有限公司 A kind of automated testing method of continuous integrating
CN109614341A (en) * 2018-12-29 2019-04-12 微梦创科网络科技(中国)有限公司 A kind of test method and system of code coverage
CN109684221A (en) * 2018-12-27 2019-04-26 江苏满运软件科技有限公司 Test code coverage acquisition method, system, equipment and medium
CN110188048A (en) * 2019-06-05 2019-08-30 北京科摩仕捷科技有限公司 A method of realizing accurate monitor code coverage rate
CN110532189A (en) * 2019-07-18 2019-12-03 中国人民财产保险股份有限公司 A kind of continuous integration system, method and device
CN111131146A (en) * 2019-11-08 2020-05-08 北京航空航天大学 Multi-supercomputing center software system deployment and incremental updating method in wide area environment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103336688A (en) * 2013-06-20 2013-10-02 中标软件有限公司 Software integrating method and system oriented to cloud computing software research and development process
CN108062254A (en) * 2017-12-12 2018-05-22 腾讯科技(深圳)有限公司 Job processing method, device, storage medium and equipment
CN108804320A (en) * 2018-05-30 2018-11-13 平安普惠企业管理有限公司 Automated testing method, device, computer equipment and storage medium
CN109542769A (en) * 2018-10-25 2019-03-29 武汉精立电子技术有限公司 A kind of automated testing method of continuous integrating
CN109684221A (en) * 2018-12-27 2019-04-26 江苏满运软件科技有限公司 Test code coverage acquisition method, system, equipment and medium
CN109614341A (en) * 2018-12-29 2019-04-12 微梦创科网络科技(中国)有限公司 A kind of test method and system of code coverage
CN110188048A (en) * 2019-06-05 2019-08-30 北京科摩仕捷科技有限公司 A method of realizing accurate monitor code coverage rate
CN110532189A (en) * 2019-07-18 2019-12-03 中国人民财产保险股份有限公司 A kind of continuous integration system, method and device
CN111131146A (en) * 2019-11-08 2020-05-08 北京航空航天大学 Multi-supercomputing center software system deployment and incremental updating method in wide area environment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112650686A (en) * 2020-12-30 2021-04-13 北京华胜天成科技股份有限公司 Method and device for obtaining test result, electronic equipment and storage medium
CN114996166A (en) * 2022-08-02 2022-09-02 杭州高达软件系统股份有限公司 Code online debugging method, system and storage medium
CN114996166B (en) * 2022-08-02 2022-10-21 杭州高达软件系统股份有限公司 Code online debugging method, system and storage medium

Similar Documents

Publication Publication Date Title
US20210271472A1 (en) Application Wrapping for Application Management Framework
US10983898B2 (en) Methods for improved web application testing using remote headless browsers and devices thereof
CN104536890B (en) Test system, method and apparatus
WO2023045849A1 (en) Software package processing method, apparatus, system, and device, and medium
US11663347B2 (en) Systems and methods for maintaining immutable data access logs with privacy
CN112100073A (en) Online development method and device of application program, electronic equipment and storage medium
CN112954050B (en) Distributed management method and device, management equipment and computer storage medium
US20210344766A1 (en) Systems and methods for decentralization of blockchain-based processes employing a blockchain-associated front end or blockchain-associated user interface
CN114500614B (en) Satellite telemetry data processing method and device, electronic equipment and readable medium
CN108984202B (en) Electronic resource sharing method and device and storage medium
CN111935092B (en) Information interaction method and device based on third-party application and electronic equipment
Gilmore et al. Choreographing security and performance analysis for web services
CN115567596A (en) Cloud service resource deployment method, device, equipment and storage medium
CN109298869A (en) A kind of generation method and relevant apparatus of target channel packet
CN115407981A (en) Front-end data mock method and system based on middleware adaptation
KR100975508B1 (en) Method and System for Dynamically Changing Module of Program
CN114416169A (en) Data processing method, medium, device and computing equipment based on micro front end
CN117527662A (en) MQTT equipment testing method and device and computer readable storage medium
CN116974569A (en) Method, system and device for acquiring script
CN113342339A (en) Method and device for generating login interface, electronic equipment and storage medium
Bicchierai et al. Validating the BIECO Security Evaluation Methodology within a Smart Grid Monitoring SW
CN115664797A (en) Information transmission method, device, equipment and storage medium
CN113760727A (en) Interface regression testing method and device
CN114448629A (en) Identity authentication method and device, storage medium and electronic equipment
Bakke et al. Authentication in the Internet of Things

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co., Ltd