CN107896171B - Code on-line testing method and system - Google Patents

Code on-line testing method and system Download PDF

Info

Publication number
CN107896171B
CN107896171B CN201711121946.3A CN201711121946A CN107896171B CN 107896171 B CN107896171 B CN 107896171B CN 201711121946 A CN201711121946 A CN 201711121946A CN 107896171 B CN107896171 B CN 107896171B
Authority
CN
China
Prior art keywords
code
information
source terminal
target terminal
terminal
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.)
Active
Application number
CN201711121946.3A
Other languages
Chinese (zh)
Other versions
CN107896171A (en
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.)
Beijing Si Tech Information Technology Co Ltd
Original Assignee
Beijing Si Tech Information Technology 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 Beijing Si Tech Information Technology Co Ltd filed Critical Beijing Si Tech Information Technology Co Ltd
Priority to CN201711121946.3A priority Critical patent/CN107896171B/en
Publication of CN107896171A publication Critical patent/CN107896171A/en
Application granted granted Critical
Publication of CN107896171B publication Critical patent/CN107896171B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5061Network service management, e.g. ensuring proper service fulfilment according to agreements characterised by the interaction between service providers and their network customers, e.g. customer relationship management
    • H04L41/5064Customer relationship management
    • 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 

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a code on-line testing method and a system, wherein the method comprises the following steps: receiving a code on-line list, wherein the code on-line list comprises path information and terminal identification information of at least one code to be detected; reading path information and terminal identification information of a code to be detected from a code on-line list; determining source terminal information and target terminal information from a pre-acquired configuration file according to the terminal identification information; and acquiring a code to be tested from the source terminal according to the path information and the source terminal information, controlling the target terminal to test the code to be tested according to the target terminal information, and continuously processing the next code to be tested when the test is finished until all path information in the on-line list of the code is processed. The invention improves the flexibility of code on-line test and improves the test efficiency.

Description

Code on-line testing method and system
Technical Field
The invention belongs to the technical field of data processing, and particularly relates to a code on-line testing method and system.
Background
An online test tool of a mobile CRM system generally acquires a code to be tested from a fixed terminal and uploads the code to be tested to one or more fixed terminals for testing, and online test is poor in flexibility and low in efficiency.
Disclosure of Invention
The invention aims to solve the technical problem of providing a code on-line testing method and system aiming at the defects of the prior art.
The technical scheme for solving the technical problems is as follows: a code on-line testing method comprises the following steps:
s1, receiving a code on-line list, wherein the code on-line list comprises path information and terminal identification information of at least one code to be detected;
s2, reading path information and terminal identification information of a code to be detected from the code on-line list;
s3, determining source terminal information and target terminal information from the pre-acquired configuration file according to the terminal identification information;
and S4, acquiring a code to be tested from the source terminal according to the path information and the source terminal information, controlling the target terminal to test the code to be tested according to the target terminal information, and returning to S2 after the test is finished until all path information in the on-line list of the code is processed.
The invention has the beneficial effects that: the method comprises the steps of receiving a code on-line list, reading path information and terminal identification information of a code to be tested from the list, testing according to user requirements, improving flexibility of on-line testing, rapidly acquiring the code to be tested according to the terminal identification information, a configuration file and the path information, testing the code to be tested, continuously reading the list when testing is completed until all the path information is processed, improving efficiency of on-line testing, and enabling the on-line testing to be simple and easy to operate. When the path information, the terminal identification information and the configuration file are the same, different codes to be tested can be tested, and the maintenance cost of online testing is reduced.
The technical scheme for solving the technical problems is as follows: a code on-line testing system, comprising:
the receiving module is used for receiving a code on-line list, and the code on-line list comprises path information and terminal identification information of at least one code to be detected;
the reading module is used for reading the path information and the terminal identification information of a code to be detected from the code on-line list;
the processing module is used for determining source terminal information and target terminal information from a pre-acquired configuration file according to the terminal identification information;
and the control module is used for acquiring a code to be tested from the source terminal according to the path information and the source terminal information, controlling the target terminal to test the code to be tested according to the target terminal information, and calling the reading module when the test is finished until all path information in the on-line list of the code is processed.
The invention has the beneficial effects that: the method comprises the steps of receiving a code on-line list, reading path information and terminal identification information of a code to be tested from the list, testing according to user requirements, improving flexibility of on-line testing, rapidly acquiring the code to be tested according to the terminal identification information, a configuration file and the path information, testing the code to be tested, continuously reading the list when testing is completed until all the path information is processed, improving efficiency of on-line testing, and enabling the on-line testing to be simple and easy to operate. When the path information, the terminal identification information and the configuration file are the same, different codes to be tested can be tested, and the maintenance cost of online testing is reduced.
Drawings
Fig. 1 is a schematic flow chart of a code on-line testing method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a code on-line testing method according to another embodiment of the present invention;
fig. 3 is a schematic flowchart of a code on-line testing method according to another embodiment of the present invention;
fig. 4 is a schematic structural diagram of a code on-line test system according to an embodiment of the present invention.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth by way of illustration only and are not intended to limit the scope of the invention.
As shown in fig. 1, a code on-line testing method provided in an embodiment of the present invention includes:
and S1, receiving a code on-line list, wherein the code on-line list comprises the path information and the terminal identification information of at least one code to be detected.
And S2, reading the path information and the terminal identification information of the code to be detected from the code on-line list.
Specifically, a jxl. jar packet is used for reading the path information and the terminal identification information of a code to be detected from a code on-line list.
And S3, determining the source terminal information and the target terminal information from the configuration file acquired in advance according to the terminal identification information.
And S4, acquiring a code to be tested from the source terminal according to the path information and the source terminal information, controlling the target terminal to test the code to be tested according to the target terminal information, and returning to S2 after the test is finished until all path information in the on-line list of the code is processed.
The embodiment of the invention describes the process of performing online test on one code to be tested, and certainly, the invention can also realize the online test on a plurality of codes to be tested simultaneously, the test process is the same as the process of performing test on one code to be tested, and the difference between the test process and the test process is only that the processing quantity is different, thereby improving the test efficiency.
According to the code on-line testing method provided by the embodiment of the invention, the code on-line list is received, and the path information and the terminal identification information of the code to be tested are read from the list, so that the testing is performed according to the user requirements, the flexibility of the on-line testing is improved, the code to be tested can be quickly obtained according to the terminal identification information, the configuration file and the path information, the code to be tested is tested, the list is continuously read when the testing is completed until all the path information is processed, the efficiency of the on-line testing is improved, and the on-line testing is simple and easy to operate. When the path information, the terminal identification information and the configuration file are the same, different codes to be tested can be tested, and the maintenance cost of online testing is reduced.
Optionally, as shown in fig. 2, in the embodiment of the present invention, the terminal identification information includes source terminal identification information and target terminal identification information, and S3 includes:
and S31, determining the source terminal information corresponding to the source terminal identification information from the pre-acquired configuration file according to the source terminal identification information.
Specifically, source terminal information corresponding to the source terminal identification information is determined from a pre-acquired configuration file by using a jxl.
And S32, determining target terminal information corresponding to the target terminal identification information from the pre-acquired configuration file according to the target terminal identification information.
Specifically, target terminal information corresponding to the target terminal identification information is determined from a pre-acquired configuration file by using a jxl. The configuration file is stored in the mobile CRM system.
In the above embodiment, the source terminal information and the target terminal information are determined from the configuration file through the source terminal identification information and the target terminal identification information, so that connection between the source terminal and the target terminal is established, the code to be tested is rapidly obtained and tested, and the efficiency of online testing is improved.
Optionally, as shown in fig. 3, in the embodiment of the present invention, acquiring a to-be-tested code from a source terminal according to path information and source terminal information, and controlling a target terminal to test the to-be-tested code according to target terminal information includes:
and S41, establishing connection with the source terminal according to the source terminal information, and acquiring a code to be tested from the source terminal according to the path information after establishing the connection.
And specifically, establishing a connection with the source terminal by using a jsch. When the connection cannot be established, the source terminal information needs to be recorded so as to confirm the accuracy of the source terminal information at a later period.
And S42, establishing connection with the target terminal according to the target terminal information, and controlling the target terminal to test a code to be tested after the connection is established.
And specifically, according to the target terminal, using a jsch. When the connection cannot be established, the target terminal information needs to be recorded so as to confirm the accuracy of the target terminal information at a later stage.
The control target terminal tests a code to be tested and comprises the following steps: backing up the tested code stored in the target terminal from the target terminal; and uploading a code to be tested to the target terminal, and testing at the target terminal. If one code to be tested is tested successfully, the test is finished, and if one code to be tested is tested unsuccessfully, the backed-up tested code is restored to the target terminal, so that a return function is realized, and the experience effect of a user is improved.
In this embodiment, the execution order is: firstly, establishing connection with a source terminal according to source terminal information, and establishing connection with a target terminal according to target terminal information; and then, after the connection is established, acquiring a code to be tested from the source terminal according to the path information, and controlling the target terminal to test the code to be tested. Through the execution sequence, the efficiency of online testing is improved, and excessive memory is not occupied.
In the embodiment, the connection with the source terminal and the connection with the target terminal are respectively established through the source terminal information and the target terminal information, so that the code to be tested can be quickly acquired from the source terminal after the connection is established, the test is performed on the target terminal, and the efficiency of online test is improved.
The code on-line testing method further comprises the following steps: and recording the execution result of each step to form a test log. Wherein, the execution result comprises: whether the connection is established, whether the uploading of the code to be tested fails or whether the test of the code to be tested succeeds, and the like.
In the embodiment, the user can know the online test process by forming the test log, so that the experience degree of the user is improved.
Optionally, in this embodiment of the present invention, the source terminal identification information includes: a source terminal IP address; the target terminal identification information includes: a target terminal IP address; the source terminal information includes: a source terminal user name, a source terminal password and a source terminal IP address; the target terminal information includes: a target terminal user name, a target terminal password and a target terminal IP address.
Specifically, the source terminal can be logged in according to the source terminal user name and the source terminal password in the source terminal information, so that connection with the source terminal is established, and the test safety is improved. And logging in the target terminal according to the target terminal user name and the target terminal password in the target terminal information, so that connection with the target terminal is established, and the safety of online testing is improved.
In the above embodiment, the source terminal information and the target terminal information are quickly determined according to the corresponding IP addresses included in the source terminal identification information and the target terminal identification information, so that the connection between the source terminal and the target terminal is established, the code to be tested is quickly acquired and tested, and the efficiency of online testing is improved. And the safety of the online test is improved through the corresponding user name and password included by the source terminal information and the target terminal information.
As shown in fig. 4, a code on-line testing system provided in an embodiment of the present invention includes:
and the receiving module is used for receiving a code on-line list, and the code on-line list comprises at least one path information of the code to be detected and terminal identification information.
And the reading module is used for reading the path information and the terminal identification information of the code to be detected from the code on-line list.
And the processing module is used for determining the source terminal information and the target terminal information from the pre-acquired configuration file according to the terminal identification information.
And the control module is used for acquiring a code to be tested from the source terminal according to the path information and the source terminal information, controlling the target terminal to test the code to be tested according to the target terminal information, and calling the reading module when the test is finished until all path information in the on-line list of the code is processed.
According to the code on-line test system provided by the embodiment of the invention, the path information and the terminal identification information of the code to be tested are read from the list by receiving the code on-line list, so that the test is carried out according to the user requirement, the flexibility of the on-line test is improved, the code to be tested can be quickly obtained according to the terminal identification information, the configuration file and the path information, the code to be tested is tested, the list is continuously read when the test is finished until all the path information is processed, the efficiency of the on-line test is improved, and the on-line test is simple and easy to operate. When the path information, the terminal identification information and the configuration file are the same, different codes to be tested can be tested, and the maintenance cost of online testing is reduced.
Optionally, in this embodiment of the present invention, the terminal identification information includes source terminal identification information and target terminal identification information, and the processing module is specifically configured to:
and determining source terminal information corresponding to the source terminal identification information from a pre-acquired configuration file according to the source terminal identification information.
And determining target terminal information corresponding to the target terminal identification information from a pre-acquired configuration file according to the target terminal identification information.
In the above embodiment, the source terminal information and the target terminal information are determined from the configuration file through the source terminal identification information and the target terminal identification information, so that connection between the source terminal and the target terminal is established, the code to be tested is rapidly obtained and tested, and the efficiency of online testing is improved.
Optionally, in the embodiment of the present invention, the control module is specifically configured to:
and establishing connection with the source terminal according to the source terminal information, and acquiring a code to be tested from the source terminal according to the path information after the connection is established.
And establishing connection with the target terminal according to the target terminal information, and controlling the target terminal to test a code to be tested after the connection is established.
In the embodiment, the connection with the source terminal and the connection with the target terminal are respectively established through the source terminal information and the target terminal information, so that the code to be tested can be quickly acquired from the source terminal after the connection is established, the test is performed on the target terminal, and the efficiency of online test is improved.
Optionally, in this embodiment of the present invention, the source terminal identification information includes: a source terminal IP address; the target terminal identification information includes: a target terminal IP address; the source terminal information includes: a source terminal user name, a source terminal password and a source terminal IP address; the target terminal information includes: a target terminal user name, a target terminal password and a target terminal IP address.
In the above embodiment, the source terminal information and the target terminal information are quickly determined according to the corresponding IP addresses included in the source terminal identification information and the target terminal identification information, so that the connection between the source terminal and the target terminal is established, the code to be tested is quickly acquired and tested, and the efficiency of online testing is improved. And the safety of the online test is improved through the corresponding user name and password included by the source terminal information and the target terminal information.
The functions executed by the modules of the system have been described in detail in the code on-line testing method in the above embodiment, and are not described again here.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (6)

1. A code on-line testing method is characterized by comprising the following steps:
s1, receiving a code on-line list, wherein the code on-line list comprises path information and terminal identification information of at least one code to be detected;
s2, reading the path information and the terminal identification information of a code to be detected from the code on-line list;
s3, determining source terminal information and target terminal information from a pre-acquired configuration file according to the terminal identification information;
s4, acquiring the code to be tested from a source terminal according to the path information and the source terminal information, controlling a target terminal to test the code to be tested according to the target terminal information, and returning to S2 when the test is finished until all path information in the code on-line list is processed;
the terminal identification information includes source terminal identification information and target terminal identification information, and the S3 includes:
determining source terminal information corresponding to the source terminal identification information from the pre-acquired configuration file according to the source terminal identification information;
and determining target terminal information corresponding to the target terminal identification information from the pre-acquired configuration file according to the target terminal identification information.
2. The method of claim 1, wherein the obtaining the code to be tested from a source terminal according to the path information and the source terminal information, and the controlling a target terminal to test the code to be tested according to the target terminal information comprises:
establishing connection with a source terminal according to the source terminal information, and acquiring the code to be detected from the source terminal according to the path information after establishing the connection;
and establishing connection with a target terminal according to the target terminal information, and controlling the target terminal to test the code to be tested after the connection is established.
3. The method of claim 1, wherein the source terminal identification information comprises: a source terminal IP address; the target terminal identification information includes: a target terminal IP address; the source terminal information includes: a source terminal user name, a source terminal password and a source terminal IP address; the target terminal information includes: a target terminal user name, a target terminal password and a target terminal IP address.
4. A code on-line test system is characterized by comprising:
the system comprises a receiving module, a judging module and a judging module, wherein the receiving module is used for receiving a code on-line list, and the code on-line list comprises path information and terminal identification information of at least one code to be detected;
the reading module is used for reading the path information and the terminal identification information of a code to be detected from the code on-line list;
the processing module is used for determining source terminal information and target terminal information from a pre-acquired configuration file according to the terminal identification information;
the control module is used for acquiring the code to be tested from a source terminal according to the path information and the source terminal information, controlling a target terminal to test the code to be tested according to the target terminal information, and calling the reading module when the test is finished until all path information in the code on-line list is processed; the terminal identification information includes source terminal identification information and target terminal identification information, and the processing module is specifically configured to:
determining source terminal information corresponding to the source terminal identification information from the pre-acquired configuration file according to the source terminal identification information;
and determining target terminal information corresponding to the target terminal identification information from the pre-acquired configuration file according to the target terminal identification information.
5. The system of claim 4, wherein the control module is specifically configured to:
establishing connection with a source terminal according to the source terminal information, and acquiring the code to be detected from the source terminal according to the path information after establishing the connection;
and establishing connection with a target terminal according to the target terminal information, and controlling the target terminal to test the code to be tested after the connection is established.
6. The system of claim 5, wherein the source terminal identification information comprises: a source terminal IP address; the target terminal identification information includes: a target terminal IP address; the source terminal information includes: a source terminal user name, a source terminal password and a source terminal IP address; the target terminal information includes: a target terminal user name, a target terminal password and a target terminal IP address.
CN201711121946.3A 2017-11-14 2017-11-14 Code on-line testing method and system Active CN107896171B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711121946.3A CN107896171B (en) 2017-11-14 2017-11-14 Code on-line testing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711121946.3A CN107896171B (en) 2017-11-14 2017-11-14 Code on-line testing method and system

Publications (2)

Publication Number Publication Date
CN107896171A CN107896171A (en) 2018-04-10
CN107896171B true CN107896171B (en) 2020-11-24

Family

ID=61804382

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711121946.3A Active CN107896171B (en) 2017-11-14 2017-11-14 Code on-line testing method and system

Country Status (1)

Country Link
CN (1) CN107896171B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279339A (en) * 2013-04-22 2013-09-04 新浪网技术(中国)有限公司 Code on-line system and method
CN104424088A (en) * 2013-08-21 2015-03-18 腾讯科技(深圳)有限公司 Software testing method and device
CN104424099A (en) * 2013-08-30 2015-03-18 上海复旦微电子集团股份有限公司 Software testing method and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102740328B (en) * 2011-04-13 2015-10-07 中国移动通信集团公司 A kind of remote test method, Apparatus and system
US8914673B2 (en) * 2012-02-20 2014-12-16 Microsoft Corporation Distributed testing within a serial testing infrastructure

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279339A (en) * 2013-04-22 2013-09-04 新浪网技术(中国)有限公司 Code on-line system and method
CN104424088A (en) * 2013-08-21 2015-03-18 腾讯科技(深圳)有限公司 Software testing method and device
CN104424099A (en) * 2013-08-30 2015-03-18 上海复旦微电子集团股份有限公司 Software testing method and system

Also Published As

Publication number Publication date
CN107896171A (en) 2018-04-10

Similar Documents

Publication Publication Date Title
CN103973858B (en) The Auto-Test System of mobile terminal
CN106888060B (en) Anti-interference test method and system for wireless communication module
US7983866B2 (en) Device testing system and test data obtaining method
CN102122184A (en) Temperature and humidity monitoring and supervising method, terminal device and system
CN111199353B (en) Test method and test system
CN108123935B (en) Circuit board testing method and device, storage medium and terminal
US20210373929A1 (en) Offline configuration method and apparatus for intelligent device
CN105786706B (en) A kind of true man test system anti-cheating method and device
CN112566156A (en) Method for automatically testing compatibility of WiFi module and electronic equipment
CN104185139A (en) Fingerprint matching-based wireless positioning method and device
CN106972983B (en) Automatic testing device and method for network interface
CN111506496A (en) Test data acquisition method and device, electronic equipment and storage medium
CN109640266B (en) Communication fault reason judgment method and device and computer readable storage medium
CN107896171B (en) Code on-line testing method and system
CN111210106A (en) Double-random-based supervision and inspection method and system
CN108307414B (en) Wi-Fi connection abnormity processing method and device of application program, terminal and storage medium
CN107645727B (en) Method and device for testing base station
CN110908354A (en) Automatic test detection device and method
CN113538725B (en) Method for testing hardware products and related equipment
US20100120416A1 (en) Method for generating a signal train which can be played back on a tester for testing a mobile radio
CN110704319B (en) Test case risk analysis method and device
CN108536587A (en) A kind of automated testing method and system based on Appium
CN115065510A (en) Login method, device, system, electronic equipment and readable storage medium
US11248990B2 (en) Monitoring terminal, robot, and product testing method
CN104932958B (en) Computer card class equipment interface function automatic detection method

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
GR01 Patent grant
GR01 Patent grant