CN111782447A - Batch test updating method and device based on SSH service and computer equipment - Google Patents

Batch test updating method and device based on SSH service and computer equipment Download PDF

Info

Publication number
CN111782447A
CN111782447A CN202010614056.1A CN202010614056A CN111782447A CN 111782447 A CN111782447 A CN 111782447A CN 202010614056 A CN202010614056 A CN 202010614056A CN 111782447 A CN111782447 A CN 111782447A
Authority
CN
China
Prior art keywords
test
script
program
batch
ssh service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010614056.1A
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.)
Shenzhen Union Memory Information System Co Ltd
Original Assignee
Shenzhen Union Memory Information System 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 Shenzhen Union Memory Information System Co Ltd filed Critical Shenzhen Union Memory Information System Co Ltd
Priority to CN202010614056.1A priority Critical patent/CN111782447A/en
Publication of CN111782447A publication Critical patent/CN111782447A/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/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The application relates to a batch test updating method, a batch test updating device, computer equipment and a storage medium based on SSH service, wherein the method comprises the following steps: the control machine acquires a batch test updating request based on SSH service, and traverses all test machines in the network terminal to acquire an effective IP address; remotely connecting to a plurality of corresponding test machines through the obtained effective IP addresses according to the batch test updating request based on the SSH service; remotely calling a test script or a test program corresponding to the server side in a background of the tester; executing corresponding test tasks through test scripts or test programs called from the server; if the test script and the test program need to be updated, only the test script or the test program of the server end needs to be updated. The invention greatly improves the speed of startup and update in the process of batch testing and ensures the consistency of the test machine.

Description

Batch test updating method and device based on SSH service and computer equipment
Technical Field
The invention relates to the technical field of computer testing, in particular to a batch testing updating method and device based on SSH service, computer equipment and a storage medium.
Background
With the development of computer technology, computers have become the most powerful practical tools for people to generate, and the safety and stability of computers are essential guarantees for people to work with computers, so that the performance of computers needs to be tested in all directions through test scripts before the computers leave factories.
Currently, in the conventional technology, when test tasks need to be executed on multiple testers of the Windows operating system, test software and test scripts need to be deployed on the testers in advance. In addition, when the test items need to be updated, the scripts or programs of all the test machines need to be updated, which greatly affects the efficiency of the test.
Disclosure of Invention
In view of the foregoing, there is a need to provide a batch test updating method, apparatus, computer device and storage medium based on SSH service, which can implement fast batch startup and update.
A batch test updating method based on SSH service, the method comprises the following steps:
the control machine acquires a batch test updating request based on SSH service, and traverses all test machines in the network terminal to acquire an effective IP address;
according to the batch test updating request based on the SSH service, remotely connecting to a plurality of corresponding test machines through the obtained effective IP addresses;
remotely calling a test script or a test program corresponding to the server side in a background of the tester;
executing corresponding test tasks through test scripts or test programs called from the server;
and if the test script and the test program need to be updated, only the test script or the test program of the server end needs to be updated.
In one embodiment, the step of obtaining, at the controller, a batch test update request based on the SSH service and traversing all the testers in the network end where the controller is located further includes:
SSH service is started on all the testers, and login passwords are set.
In one embodiment, after the step of remotely calling the corresponding test script or test program at the server side in the background of the tester, the method further includes:
judging whether the current test script or test program needs to be updated according to the test task;
if the current test script or test program needs to be updated, sending a script program updating request to the server;
and if the current test script or test program does not need to be updated, directly calling the test script or test program from the server and executing a corresponding test task.
In one embodiment, after the step of sending a script program update request to the server if the current test script or test program needs to be updated, the method further includes:
and when the server acquires the script program updating request, updating the test script or the test program according to the content of the script program updating request.
An SSH service based batch test update apparatus, the apparatus comprising:
the acquisition module is used for the controller to acquire batch test updating requests based on SSH service, traverse all the test machines in the network terminal and acquire effective IP addresses;
the remote connection module is used for remotely connecting the obtained effective IP addresses to the corresponding multiple testing machines according to the batch test updating request based on the SSH service;
the remote calling module is used for remotely calling a test script or a test program corresponding to the server side in a background of the tester;
the test module is used for executing corresponding test tasks through test scripts or test programs called from the server;
and the updating module is used for only updating the test script or the test program of the server side if the test script or the test program needs to be updated.
In one embodiment, the apparatus further includes an SSH service module configured to:
SSH service is started on all the testers, and login passwords are set.
In one embodiment, the apparatus further includes a determining module, configured to:
judging whether the current test script or test program needs to be updated according to the test task;
if the current test script or test program needs to be updated, sending a script program updating request to the server;
and if the current test script or test program does not need to be updated, directly calling the test script or test program from the server and executing a corresponding test task.
In one embodiment, the determining module is further configured to:
and when the server acquires the script program updating request, updating the test script or the test program according to the content of the script program updating request.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of any of the above methods when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of any of the methods described above.
The batch test updating method and device based on the SSH service, the computer equipment and the storage medium acquire a batch test updating request based on the SSH service through the control machine, traverse all the test machines in the network end and acquire an effective IP address; according to the batch test updating request based on the SSH service, remotely connecting to a plurality of corresponding test machines through the obtained effective IP addresses; remotely calling a test script or a test program corresponding to the server side in a background of the tester; executing corresponding test tasks through test scripts or test programs called from the server; and if the test script and the test program need to be updated, only the test script or the test program of the server end needs to be updated. In the invention, the control machine is connected to a plurality of corresponding test machines through SSH, and then the control machine remotely calls the test script or test program of the server end to realize batch starting test. In addition, in the mode of calling the script or the program on the server in the background for testing by using the testing machine as a springboard, if the test script or the test program needs to be updated, only the script or the program at the server end needs to be updated, so that the calling-up and updating speed is greatly improved, and the high consistency on the testing machine is ensured.
Drawings
FIG. 1 is a flowchart illustrating a batch test update method based on SSH service according to an embodiment;
FIG. 2 is a diagram of an application environment of a batch test update method based on SSH service in one embodiment;
FIG. 3 is a flowchart illustrating a batch test update method based on SSH service in another embodiment;
FIG. 4 is a block diagram of an SSH service-based batch test update apparatus according to an embodiment;
FIG. 5 is a block diagram of an SSH service-based batch test update apparatus according to another embodiment;
FIG. 6 is a block diagram showing an SSH service-based batch test update apparatus according to still another embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In one embodiment, as shown in fig. 1, there is provided a batch test updating method based on SSH service, the method including:
step 102, the control machine obtains a batch test updating request based on SSH service, and traverses all test machines in the network terminal to obtain an effective IP address;
104, remotely connecting the obtained effective IP addresses to a plurality of corresponding test machines according to the batch test updating request based on the SSH service;
106, remotely calling a test script or a test program corresponding to the server side in a background of the tester;
step 108, executing corresponding test tasks through test scripts or test programs called from the server;
step 110, if the test script and the test program need to be updated, only the test script or the test program at the server end needs to be updated.
In the embodiment, a batch test updating method based on SSH service is provided, and the method can be applied to the application environment shown in fig. 2. The application environment includes a control machine 210 and a plurality of testing machines 220 remotely connected to the control machine 210, where the control machine 210 is configured to remotely perform testing tasks on the plurality of testing machines simultaneously. Further, the plurality of testers 220 are also connected to a server 230 through a network. The server 230 has a test script or test program for performing a test task. After the control machine 210 is connected to the tester 220 through SSH, a test script or a test program of the server 230 is remotely called, so that a batch test can be realized. The specific implementation process comprises the following steps:
in one embodiment, the step of obtaining a valid IP address before the step of obtaining a batch test update request based on SSH service and traversing all testers in the network side at the control machine includes:
SSH service is started on all the testers, and login passwords are set.
Specifically, SSH is an abbreviation for Secure Shell, as established by the IETF's network group. SSH is a security protocol built on an application layer basis. SSH is a reliable protocol specially used for providing security for remote login session and other network services, and the information leakage problem in the remote management process can be effectively prevented by utilizing the SSH protocol.
And then, the control machine acquires a batch test updating request based on SSH service, and traverses all the test machines in the network terminal to acquire an effective IP address. And the control machine is remotely connected to the corresponding plurality of testers through the obtained effective IP addresses according to the batch test updating request based on the SSH service.
And then, remotely calling a test script or a test program corresponding to the server terminal in the background of the tester. Because the program and the script are located in the server, the program and the script do not need to be deployed in a testing machine in advance, and the corresponding testing task can be executed only through the testing script or the testing program called from the server. If the test script and the test program need to be updated, only the test script or the test program of the server end needs to be updated.
In the embodiment, the control machine acquires the batch test updating request based on the SSH service, and traverses all the test machines in the network end to acquire the effective IP address; remotely connecting to a plurality of corresponding test machines through the obtained effective IP addresses according to the batch test updating request based on the SSH service; remotely calling a test script or a test program corresponding to the server side in a background of the tester; executing corresponding test tasks through test scripts or test programs called from the server; if the test script and the test program need to be updated, only the test script or the test program of the server end needs to be updated. In the scheme, the control machine is connected to the corresponding multiple testing machines through SSH, and then the control machine remotely calls the testing script or the testing program of the server end to realize batch starting testing. In addition, if the test script or the test program needs to be updated, only the script or the program of the server end needs to be updated, so that the speed of calling and updating is greatly improved, and the high consistency on the testing machine is ensured.
In an embodiment, as shown in fig. 3, there is provided a batch test updating method based on SSH service, where after the step of remotely calling a corresponding test script or test program at a server side in a background of a tester, the method further includes:
step 302, judging whether the current test script or test program needs to be updated according to the test task;
step 304, if the current test script or test program needs to be updated, sending a script program updating request to the server;
step 306, when the server acquires the script program updating request, updating the test script or the test program according to the content of the script program updating request;
step 308, if the current test script or test program does not need to be updated, the test script or test program is directly called from the server and the corresponding test task is executed.
In the embodiment, a batch test updating method based on SSH service is provided, in the method, a control machine can be remotely connected to a tester, and a script or a program at a server side is remotely called up in a background of the tester. Since the programs and scripts are located on the server, there is no need to deploy test programs into the tester in advance.
If the current test script or program script needs to be updated, only the script or program of the server end needs to be updated, and each test machine does not need to be reconfigured in sequence, so that the speed of calling and updating is greatly improved, the high consistency on the test machines is ensured, and the problem of inconsistent test versions caused by updating all the test machines in sequence is avoided.
It should be understood that although the various steps in the flow charts of fig. 1-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-3 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in FIG. 4, a batch test update apparatus 400 based on SSH services is provided, the apparatus comprising:
an obtaining module 401, configured to obtain, by the controller, a batch test update request based on the SSH service, traverse all the test machines in the network end where the controller is located, and obtain an effective IP address;
a remote connection module 402, configured to remotely connect to corresponding multiple test machines through the obtained valid IP address according to the batch test update request based on the SSH service;
a remote call module 403, configured to remotely call a test script or a test program corresponding to the server side in the background of the tester;
a test module 404, configured to execute a corresponding test task through a test script or a test program called from the server;
the updating module 405 is configured to update only the test script or the test program at the server side if the test script or the test program needs to be updated.
In one embodiment, as shown in fig. 5, a batch test update apparatus 400 based on SSH service is provided, the apparatus further comprising an SSH service module 406 for:
SSH service is started on all the testers, and login passwords are set.
In one embodiment, as shown in fig. 6, a batch test update apparatus 400 based on SSH service is provided, the apparatus further includes a determining module 407 for:
judging whether the current test script or test program needs to be updated according to the test task;
if the current test script or test program needs to be updated, sending a script program updating request to the server;
and if the current test script or test program does not need to be updated, directly calling the test script or test program from the server and executing a corresponding test task.
In one embodiment, the determining module 407 is further configured to:
and when the server acquires the script program updating request, updating the test script or the test program according to the content of the script program updating request.
For specific limitations of the batch test updating apparatus based on SSH service, reference may be made to the above limitations of the batch test updating method based on SSH service, and details are not repeated here.
In one embodiment, a computer device is provided, the internal structure of which may be as shown in FIG. 7. The computer apparatus includes a processor, a memory, and a network interface connected by a device bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The nonvolatile storage medium stores an operating device, a computer program, and a database. The internal memory provides an environment for the operation device in the nonvolatile storage medium and the execution of the computer program. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a batch test update method based on SSH services.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method embodiments when executing the computer program.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the above respective method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A batch test updating method based on SSH service is characterized by comprising the following steps:
the control machine acquires a batch test updating request based on SSH service, and traverses all test machines in the network terminal to acquire an effective IP address;
according to the batch test updating request based on the SSH service, remotely connecting to a plurality of corresponding test machines through the obtained effective IP addresses;
remotely calling a test script or a test program corresponding to the server side in a background of the tester;
executing corresponding test tasks through test scripts or test programs called from the server;
and if the test script and the test program need to be updated, only the test script or the test program of the server end needs to be updated.
2. The SSH service-based batch test update method according to claim 1, wherein the step of obtaining the valid IP address by obtaining the batch test update request based on the SSH service at the controller and traversing all the testers in the network terminal further includes:
SSH service is started on all the testers, and login passwords are set.
3. The SSH service-based batch test update method according to claim 1 or 2, further comprising, after the step of remotely calling a corresponding test script or test program at the server side in the background of the tester:
judging whether the current test script or test program needs to be updated according to the test task;
if the current test script or test program needs to be updated, sending a script program updating request to the server;
and if the current test script or test program does not need to be updated, directly calling the test script or test program from the server and executing a corresponding test task.
4. The SSH service-based batch test update method according to claim 3, wherein after the step of sending a script update request to the server if the current test script or test program needs to be updated, the method further comprises:
and when the server acquires the script program updating request, updating the test script or the test program according to the content of the script program updating request.
5. An SSH service based batch test update apparatus, the apparatus comprising:
the acquisition module is used for the controller to acquire batch test updating requests based on SSH service, traverse all the test machines in the network terminal and acquire effective IP addresses;
the remote connection module is used for remotely connecting the obtained effective IP addresses to the corresponding multiple testing machines according to the batch test updating request based on the SSH service;
the remote calling module is used for remotely calling a test script or a test program corresponding to the server side in a background of the tester;
the test module is used for executing corresponding test tasks through test scripts or test programs called from the server;
and the updating module is used for only updating the test script or the test program of the server side if the test script or the test program needs to be updated.
6. The SSH service-based batch test update apparatus according to claim 5, wherein the apparatus further comprises an SSH service module, the SSH service module is configured to:
SSH service is started on all the testers, and login passwords are set.
7. The SSH service based batch test update apparatus according to claim 5 or 6, wherein the apparatus further comprises a determination module, the determination module is configured to:
judging whether the current test script or test program needs to be updated according to the test task;
if the current test script or test program needs to be updated, sending a script program updating request to the server;
and if the current test script or test program does not need to be updated, directly calling the test script or test program from the server and executing a corresponding test task.
8. The SSH service-based batch test update apparatus according to claim 7, wherein the determination module is further configured to:
and when the server acquires the script program updating request, updating the test script or the test program according to the content of the script program updating request.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 4 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 4.
CN202010614056.1A 2020-06-30 2020-06-30 Batch test updating method and device based on SSH service and computer equipment Pending CN111782447A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010614056.1A CN111782447A (en) 2020-06-30 2020-06-30 Batch test updating method and device based on SSH service and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010614056.1A CN111782447A (en) 2020-06-30 2020-06-30 Batch test updating method and device based on SSH service and computer equipment

Publications (1)

Publication Number Publication Date
CN111782447A true CN111782447A (en) 2020-10-16

Family

ID=72761232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010614056.1A Pending CN111782447A (en) 2020-06-30 2020-06-30 Batch test updating method and device based on SSH service and computer equipment

Country Status (1)

Country Link
CN (1) CN111782447A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112433899A (en) * 2020-11-27 2021-03-02 中国建设银行股份有限公司 Cloud server batch detection method, device, equipment and storage medium
CN113094276A (en) * 2021-04-15 2021-07-09 深圳忆联信息系统有限公司 Batch testing method and device based on Linux system and computer equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112433899A (en) * 2020-11-27 2021-03-02 中国建设银行股份有限公司 Cloud server batch detection method, device, equipment and storage medium
CN113094276A (en) * 2021-04-15 2021-07-09 深圳忆联信息系统有限公司 Batch testing method and device based on Linux system and computer equipment

Similar Documents

Publication Publication Date Title
CN109788032B (en) Method and device for acquiring mirror image file, computer equipment and storage medium
CN108763090B (en) Test environment deployment method, device, computer equipment and storage medium
CN111104273A (en) Batch task-based automatic distribution testing method and device and computer equipment
CN107623698B (en) Method and device for remotely debugging network equipment
CN110286998B (en) Virtual machine graphical user interface validation and execution process recording method and device
CN108400978B (en) Vulnerability detection method and device, computer equipment and storage medium
CN111782447A (en) Batch test updating method and device based on SSH service and computer equipment
CN109726134B (en) Interface test method and system
CN108595280B (en) Interface adaptation method and device, computer equipment and storage medium
CN112130871A (en) Method and device for remotely deploying middleware, computer equipment and storage medium
CN110798376A (en) Interface testing method and device, computer equipment and storage medium
CN110618819A (en) Method and device for automatically deploying WINPE system in batches and computer equipment
CN110727935A (en) Single sign-on method, system, computer device and storage medium
CN113986733A (en) Jar package based performance test method, device, equipment and storage medium
CN110769482B (en) Method and device for network connection of wireless equipment and wireless router equipment
CN115422048A (en) Link stability testing method and device, computer equipment and storage medium
CN114385485A (en) Interface test method, device, equipment and storage medium
CN111596964B (en) Method and device for realizing batch deployment of Windows systems based on wireless network
CN111159025B (en) Application program interface testing method and device, computer equipment and storage medium
CN112559352A (en) Interface test method, device, equipment and storage medium
CN111026988A (en) Page loading method, device and system and computer equipment
CN110555017A (en) block chain data cleaning method and device, computer equipment and storage medium
CN111198758A (en) SSH-based Windows software starting method and device and computer equipment
CN113949629A (en) Server substrate management controller initialization method and device and computer equipment
CN109344018B (en) Multi-core CPU test method and device, computer equipment and storage medium

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