CN106874191B - Intelligent database execution method and system - Google Patents

Intelligent database execution method and system Download PDF

Info

Publication number
CN106874191B
CN106874191B CN201710001948.2A CN201710001948A CN106874191B CN 106874191 B CN106874191 B CN 106874191B CN 201710001948 A CN201710001948 A CN 201710001948A CN 106874191 B CN106874191 B CN 106874191B
Authority
CN
China
Prior art keywords
test
script
execution
test script
intelligent database
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
CN201710001948.2A
Other languages
Chinese (zh)
Other versions
CN106874191A (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.)
Shenzhen Dashu Xinke Technology Co ltd
Original Assignee
Shenzhen Qianhai Dashu Finance Service 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 Qianhai Dashu Finance Service Co ltd filed Critical Shenzhen Qianhai Dashu Finance Service Co ltd
Priority to CN201710001948.2A priority Critical patent/CN106874191B/en
Publication of CN106874191A publication Critical patent/CN106874191A/en
Application granted granted Critical
Publication of CN106874191B publication Critical patent/CN106874191B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The invention relates to an intelligent database execution method and system. The method comprises the following steps: s1: starting a test, and judging whether an execution plan exists in the execution step; s2, if there is execution plan, the execution step automatically acquires the needed test script from the test script set of the project through the script acquisition method based on the mapping relation; if the execution plan does not exist, selecting a required test script from the test script set of the project; s3, executing the test script according to the test script obtained in the step S2; in step S2, the method further includes the following steps: s2.1, marking the test scripts which belong to the execution plan in the test script set; s2.2, when the execution plan exists, the execution step directly runs the marked test script. Has the advantages that: the invention has the advantages of convenient maintenance, high reusability and efficiency and the like.

Description

Intelligent database execution method and system
Technical Field
The invention belongs to the field of software testing, and particularly relates to an intelligent database execution method and system.
Background
The automatic test is a process of converting a test behavior driven by human into machine execution, the test is executed step by step according to the description of a test case, the actual result is compared with the expected result, and in the test process, manual operation is needed for intervention test, so that the efficiency is very low.
In order to solve the above-mentioned problems and improve the test operation efficiency, a long search has been made, and for example, chinese patent discloses a memory card testing apparatus [ application No.: cn200810215712.x ], which comprises: a host for accessing a memory card; a database for maintaining a plurality of test script files, wherein each test script file comprises at least one test item and a communication protocol, the test item depends on a device identification value corresponding to a device to be tested, and the communication protocol is associated with the memory card; a processing unit, coupled to the database, for selecting a test item from a test script file; and an interface, connect to the processing unit and the host computer, in order to make the host computer carry out at least a memory card order to the memory card according to the test item, wherein, the processing unit is through comparing a test result and the script file of the test of the memory card, in order to confirm whether to finish the test item.
As another example, a regression test automation system and method [ application No.: CN200810135124.5], including a test environment unit, the test environment unit includes a device under test and a test instrument, and is characterized by further including a test management execution unit and a test database, the test management execution unit includes: the device comprises a test case management module, a test set management module, a test environment management module, a regression test management module, a test operation scheduler and a test operation engine; the test database includes: the system comprises a test plan library, a test case library, a regression test library and an operation statistical library;
the test case management module is used for managing and maintaining the test cases and sending the test cases in the test case library to the test case management module according to the request of the test case management module; the test set management module is used for acquiring a test set construction framework from the regression test management module, constructing a test set construction strategy, extracting test cases from the test case library through the test case management module according to the test set construction strategy, and constructing a regression test set and submitting the regression test set to the regression test library; the test environment management module is used for managing the test environment unit, generating test environment configuration and environment topology and storing the test environment configuration and environment topology into the regression test library; and for allocation and scheduling of test equipment resources; the regression test management module is used for managing and configuring a test plan library, extracting a test plan frame from the test plan library, generating a test suite construction frame, storing the test suite construction frame into the test plan library, and sending the test suite construction frame to the test suite management module; the test system is also used for detecting a test plan and starting a test operation scheduler; the test operation scheduler is used for informing the test environment management module to detect the test environment and apply for test resources; the test system is also used for dispatching a regression test suite through the test suite management module and starting a test running engine according to the instruction of the regression test management module; and the test operation engine is used for executing the regression test suite and outputting a test execution result to the operation result statistical library.
In the test process of the scheme, manual actions are reduced, the test script is mainly installed by a machine for execution, and a large amount of human resources can be saved through the automatic test.
The test script has very important low level for automatic test, which determines the efficiency of test operation, but in the two schemes, sometimes the state of the mobile phone needs to be tested according to the items (mobile phone model classification) or the performance of the mobile phone in the test process, but in the two cases, the test script between the two schemes is repeated, and when the tester writes the test script normally and respectively, the test script belongs to each item or the performance list of the mobile phone; the scripts written in this way are relatively complex, high in repeatability and not good in maintenance, as shown in fig. 1, the test scripts are stored below the paths of the project and the execution plan respectively, however, the content of the test script set 1 actually contains the content of the test script 1, the content of the test script set 2 contains the content of the test script 2, and the content of the test script set 3 contains the content of the test script 3, so that the test scripts are various, not easy to arrange and maintain, and not high in test efficiency.
Disclosure of Invention
The invention aims to solve the problems and provides an intelligent database execution method capable of improving script test efficiency.
Another object of the present invention is to provide a system using an intelligent database execution method, which can improve the efficiency of script testing.
In order to achieve the purpose, the invention adopts the following technical scheme:
the intelligent database execution method comprises the following steps:
s1: starting a test, and judging whether an execution plan exists in the execution step;
s2, if there is an execution plan,
the execution step automatically acquires the required test script from the test script set of the project through a script acquisition method based on the mapping relation;
if there is no execution plan present,
selecting a required test script from a test script set of the project;
and S3, executing the test script according to the test script obtained in the step S2.
In the above intelligent database execution method, in step S2, the mapping relation-based script obtaining method includes the following steps:
s2.1, marking the test scripts which belong to the execution plan in the test script set;
s2.2, when the execution plan exists, the execution step directly runs the marked test script.
In the above method for executing the intelligent database, in step S2.1, the method for testing the script tag includes: by prepending at least one flag bit to a test script belonging to the execution plan in the test script set.
In the above-mentioned intelligent database execution method, in step S2.2, when there is an execution plan, the execution step directly runs the test script containing the flag bit in front of the execution plan, and the other test scripts not containing the flag bit do not run.
In the above-described intelligent database execution method, in step S2, when there is no execution plan, the tester manually selects a desired test scenario from the test scenario set of the project.
In the above method for executing an intelligent database, the items include any one or more of a functional test item, a compatibility test item, a cross test item, an installation and uninstallation test item, and a stress test item.
In the above-mentioned intelligent database execution method, before step S1, a test script is placed in the test script set under the path of the project.
In the above-mentioned intelligent database execution method, in step S2, the test script includes any one or more combination of a linear script, a structured script, a shared script, a data-driven script, and a keyword-driven script.
In the above method for executing the intelligent database, the linear script includes any one or more combinations of keystrokes, function keys, arrows, control keys for controlling the test software, and number keys for inputting data.
The invention also discloses an intelligent database execution system adopting the intelligent database execution method.
Compared with the prior art, the invention has the advantages of convenient operation, high reusability, high efficiency and the like, and is beneficial to script maintenance.
Drawings
FIG. 1 is a schematic diagram of a prior art database implementation;
fig. 2 is a flowchart of a first embodiment of the present invention.
Detailed Description
The following are preferred embodiments of the present invention and are further described with reference to the accompanying drawings, but the present invention is not limited to these embodiments.
Example one
The intelligent database execution method comprises the following steps:
s1: starting a test, and judging whether an execution plan exists in the execution step;
s2, if there is an execution plan,
the execution step automatically acquires the required test script from the test script set of the project through a script acquisition method based on the mapping relation;
if there is no execution plan present,
selecting a required test script from a test script set of the project;
the execution planning method for querying the sentences stored in the project comprises the following sentences:
Figure BDA0001201832480000051
and S3, executing the test script according to the test script obtained in the step S2.
And in step S2, the method for obtaining a script based on a mapping relation includes the following steps:
s2.1, marking the test scripts which belong to the execution plan in the test script set;
s2.2, when the execution plan exists, the execution step directly runs the marked test script.
Specifically, in step S2.1, the method of testing the script flag includes: at least one flag bit is added in front of the test scripts belonging to the execution plan in the test script set, that is, two flag bits or three flag bits and the like can be added to improve the flag accuracy.
Further, when an execution plan exists, the execution step directly runs the test script containing the zone bit in front of the execution plan, and other test scripts not containing the zone bit do not run. This is an automated testing process.
And when the execution plan does not exist, the tester selects the required test script from the test script set of the project in a manual mode. At the moment, the automatic testing process is changed into a manual testing process, a worker manually searches the script and directly utilizes the script according to own judgment or carries out testing after editing and changing.
The automatic testing method combines manual testing and automatic testing, uses some basic and weak-logic operations for automatic testing, such as regression testing, and uses some manual testing operations which are difficult to realize or have higher cost for automatic testing, namely testing scripts with mark positions, and has the advantages of being simple in operation, avoiding repeated writing of scripts, better utilizing resources, improving testing efficiency, reducing investment of manual testing, avoiding errors and the like by adopting automatic testing; the following details are provided to illustrate which cases are more suitable for automation:
1. aiming at the conditions that some modules in the project are relatively stable and some modules are in great demand variability, the relatively stable modules can be automatically tested, and manual testing is still used when the variability is large;
2. the project cycle is long, and the determination of the automatic test requirement, the design of the automatic test framework and the compiling and debugging of the test script all need a long time to complete. Such a process is itself a development process of test software, and takes a long time to complete. If the period of the project is short and there is insufficient time to support such a process, the automated testing loses its original meaning.
3. The automatic test script can be reused, and particularly, the reuse of the automatic test script is considered from three aspects, namely whether the tested items have large differences (such as differences of a C/S system and a B/S system); whether the selected test tool accommodates such discrepancies; finally, the tester has the ability to develop an automated test framework that accommodates such differences.
The stability of the test script determines the maintenance cost of the automated test, if the software requirement changes too frequently, a tester needs to update the test case and the related test script according to the changed requirement, the maintenance of the script is a code development process, needs to be modified and debugged, and if necessary, the framework of the automated test needs to be modified.
In addition, some operations with strong logic are left for manual testing, and the manual testing operation is carried out directly by searching for a proper test script in the project or after editing, so that the problems can be considered from different angles in the testing process.
This embodiment adopts the mode that both combine, can accomplish 100% and cover the software function, reduces the cost of labor, and with some cycle time long, reusability is high, and relatively stable test script full play its convenience, quick, high-efficient, effect such as accurate, can exert the advantage of manual test again simultaneously.
In the above intelligent database execution method, the items include any one or more of a functional test item, a compatibility test item, a cross test item, an installation and uninstallation test item, and a stress test item, in order to ensure the integrity of the test, the items of the embodiment include all the items described above, wherein,
functional test items: the method comprises the steps of analyzing function items of a function module, testing whether each function item can be realized, specifically testing specific function points one by one according to a Test Case (Test Case) or the flow of software, and ensuring that each point can correctly realize corresponding functions;
compatibility test items: the method is used for testing the mainstream equipment installation application in the market to ensure normal operation, and meanwhile, the compatibility between SIM/PIM cards of different brands of mobile phones, different networks, different brands and different capacities is tested by taking short messages as an example: the PHS of China telecom receives the short message sent from China Mobile or China Unicom GSM, and receives, displays and replies whether the functions are normal or not;
cross-testing items: also called event or conflict testing, the test item is very important, and can find potential performance problems in many applications, specifically, a test in which one function is in the process of execution, and another event or operation interferes with the process. For example, when a short message is received or a call is made, a collision event that should be interfered is executed, so that the mobile phone does not crash or screen-splash and other serious problems, for the running application, if the running application enters the conditions of response of other software such as a short message, a telephone and the like, the tested application is not influenced, and the application can be ensured to run correctly.
Installing and uninstalling test items: the method is characterized in that the application can be correctly installed and uninstalled and can be correctly operated (including an application upgrading test, namely the states of the application before and after upgrading);
stress test items: the test process still performs related operations on the software when the maximum capacity, the boundary value or the maximum bearing limit of a certain software function is reached, especially performs pressure test on an application interface with large user quantity and high interactivity, and ensures that the application can normally run under the condition of large user quantity, such as continuously receiving and sending short messages, the number of the short messages exceeds the maximum number which can be stored in an inbox and a PIM card, and the short messages are still received or sent so as to detect the performance of the software under the abnormal condition and evaluate whether the software can be received by a user.
Certainly, for the problem of application flash back with a high probability on the mobile phone, the test item of the embodiment may also be a test item, and the test item returns to access a certain module (a module for acquiring data at any time), and the switching of applications, repeated submission, incoming call interaction, and the like are all reasons for the high probability of flash back, so that the test breadth and depth are improved.
Further, prior to step S1, a test script is placed within the set of test scripts under the path of the project.
And in step S2, the test script includes any one or more combination of linear script, structured script, shared script, data-driven script, and keyword-driven script, and the test script of the present embodiment adopts a set of all the aforementioned scripts, wherein,
linear script: the method comprises the steps of recording a script obtained by a manually executed test case;
structuring the script: similar to structured programming, the structured script contains instructions for controlling script design, and the instructions are either control structures or calling structures;
sharing the script: scripts may be used by multiple test cases;
data-driven scripts: storing the test input in a separate file, rather than in a script;
keyword-driven scripts: a logical extension of more complex data driven technologies.
The linear script includes any one or more combinations of a keystroke, a function key, an arrow, a control key for controlling the test software, and a numeric key for inputting data.
Example two
The embodiment is an intelligent database execution system adopting the intelligent database execution method in the first embodiment, and the database execution system comprises a project path module, an execution plan module, an automatic test module and a manual test module, wherein the project path module comprises a plurality of test script set modules, each script set module comprises a plurality of test script units, and the test script units belonging to the execution plan module comprise flag bits; and if the data is not found, manual operation is carried out. The method has the advantages of convenience in operation, high test reusability and efficiency, contribution to script maintenance, capability of better utilizing resources and the like.
The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.
Although the terms script set, flag, execution plan project, etc. are used more often herein, the possibility of using other terms is not excluded. These terms are used merely to more conveniently describe and explain the nature of the present invention; they are to be construed as being without limitation to any additional limitations that may be imposed by the spirit of the present invention.

Claims (9)

1. An intelligent database execution method, comprising:
s1: starting a test, and judging whether an execution plan exists in the execution step;
s2, if there is execution plan, the execution step automatically acquires the needed test script from the test script set of the project through the script acquisition method based on the mapping relation;
if the execution plan does not exist, selecting a required test script from the test script set of the project;
s3, executing the test script according to the test script obtained in the step S2;
in step S2, the method for acquiring a script based on a mapping relationship includes the following steps:
s2.1, marking the test scripts which belong to the execution plan in the test script set;
s2.2, when the execution plan exists, the execution step directly runs the marked test script.
2. The intelligent database execution method of claim 1, wherein in step S2.1, the method of testing script flags comprises: by prepending at least one flag bit to a test script belonging to the execution plan in the test script set.
3. The intelligent database execution method of claim 2, wherein in step S2.2, when there is an execution plan, the execution step directly runs the test script containing the flag bit in front of it, and the other test scripts not containing the flag bit do not run.
4. The intelligent database execution method of any one of claims 1-3, wherein in step S2, when there is no execution plan, a required test script is manually selected from the test script set of the project.
5. The intelligent database execution method of claim 4, wherein the items comprise any one or more of functional test items, compatibility test items, cross test items, installation and uninstallation test items and stress test items.
6. The intelligent database execution method of claim 4, wherein before step S1, the test script is placed in the test script set under the path of the project.
7. The intelligent database execution method of claim 6, wherein in step S2, the test script comprises any one or more combination of a linear script, a structured script, a shared script, a data-driven script and a keyword-driven script.
8. The intelligent database execution method of claim 7, wherein the linear script comprises any one or more of a combination of keystrokes, function keys, arrows, control keys for controlling the test software and numeric keys for inputting data.
9. An intelligent database execution system employing the intelligent database execution method of any one of claims 1-8.
CN201710001948.2A 2017-01-03 2017-01-03 Intelligent database execution method and system Active CN106874191B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710001948.2A CN106874191B (en) 2017-01-03 2017-01-03 Intelligent database execution method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710001948.2A CN106874191B (en) 2017-01-03 2017-01-03 Intelligent database execution method and system

Publications (2)

Publication Number Publication Date
CN106874191A CN106874191A (en) 2017-06-20
CN106874191B true CN106874191B (en) 2020-07-14

Family

ID=59164514

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710001948.2A Active CN106874191B (en) 2017-01-03 2017-01-03 Intelligent database execution method and system

Country Status (1)

Country Link
CN (1) CN106874191B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109960645B (en) * 2017-12-22 2022-10-18 迈普通信技术股份有限公司 Script test method and device and script test system
CN113852516B (en) * 2021-08-27 2023-06-02 苏州浪潮智能科技有限公司 Method, system, terminal and storage medium for generating switch diagnostic program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102023861A (en) * 2010-12-08 2011-04-20 中兴通讯股份有限公司 Method and system for generating test script and test suite
CN103077109A (en) * 2009-12-28 2013-05-01 中兴通讯股份有限公司 Method and system for scheduling test plan
CN103500102A (en) * 2013-10-16 2014-01-08 迈普通信技术股份有限公司 Service calling method and device for providing service calling
CN104516908A (en) * 2013-09-29 2015-04-15 华为技术有限公司 Database access method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9514031B2 (en) * 2014-09-22 2016-12-06 International Business Machines Corporation Auto-deployment and testing of system application test cases in remote server environments

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103077109A (en) * 2009-12-28 2013-05-01 中兴通讯股份有限公司 Method and system for scheduling test plan
CN102023861A (en) * 2010-12-08 2011-04-20 中兴通讯股份有限公司 Method and system for generating test script and test suite
CN104516908A (en) * 2013-09-29 2015-04-15 华为技术有限公司 Database access method and device
CN103500102A (en) * 2013-10-16 2014-01-08 迈普通信技术股份有限公司 Service calling method and device for providing service calling

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
02JSP脚本标识;洛兰相遇;《https//blog.csdn.net/qq_29662713/article/details/53966580》;20170101;第1-2页 *

Also Published As

Publication number Publication date
CN106874191A (en) 2017-06-20

Similar Documents

Publication Publication Date Title
CN108920370B (en) Compatibility problem detection method, device and equipment
CN103577308A (en) Method for obtaining log files of mobile device
CN102681938A (en) Memory leakage detecting method and device
CN101295255B (en) Firmware updating system and method
WO2019114209A1 (en) Automatic testing and analysis method, automatic testing and analysis system, application server and computer-readable storage medium
CN1713658A (en) Testing system and method for mobile telephones
CN111475390A (en) Log collection system deployment method, device, equipment and storage medium
CN106874191B (en) Intelligent database execution method and system
CN108255735B (en) Associated environment testing method, electronic device and computer readable storage medium
CN107122203B (en) Configuration file setting method and device
CN110688305B (en) Test environment synchronization method, device, medium and electronic equipment
CN112231206A (en) Script editing method for application program test, computer readable storage medium and test platform
CN102063367B (en) Off-line analysis method and device aiming at computer crash program
CN105404574A (en) Method and apparatus for testing consistency of smart card and mobile terminal
CN110377476B (en) Terminal testing method, terminal and readable storage medium
CN113238901B (en) Multi-device automatic testing method and device, storage medium and computer device
CN112732640B (en) Method and device for detecting leakage of file descriptor
CN110896333B (en) WiFi module testing method and system and storage medium
KR102201845B1 (en) Automation unit test method of multi-task based software and system for the same
CN115202946A (en) Automated testing method, apparatus, device, storage medium, and program product
CN113341300A (en) Matrix key circuit automatic detection method, system, medium and equipment
CN113342600A (en) Method and device for monitoring program dependent plug-in
CN101436139A (en) FPGA downloading method and apparatus
CN106850546B (en) Map module software organization method of radar terminal
CN111737065A (en) Demand model based on server interface test and interface test method and system

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

Address after: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Applicant after: PHICOMM (SHANGHAI) Co.,Ltd.

Address before: 201616 Shanghai City, Songjiang District Road No. 3666

Applicant before: PHICOMM (SHANGHAI) Co.,Ltd.

CB02 Change of applicant information
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200408

Address after: 318015 no.2-3167, zone a, Nonggang City, no.2388, Donghuan Avenue, Hongjia street, Jiaojiang District, Taizhou City, Zhejiang Province

Applicant after: Taizhou Jiji Intellectual Property Operation Co.,Ltd.

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Applicant before: Phicomm (Shanghai) Co.,Ltd.

TA01 Transfer of patent application right

Effective date of registration: 20200605

Address after: 518000 Guangdong city of Shenzhen province Qianhai Shenzhen Hong Kong cooperation zone before Bay Road No. 1 building 201 room A (located in Shenzhen Qianhai business secretary Co. Ltd.)

Applicant after: SHENZHEN QIANHAI DASHU FINANCE SERVICE Co.,Ltd.

Address before: 318015 no.2-3167, zone a, Nonggang City, no.2388, Donghuan Avenue, Hongjia street, Jiaojiang District, Taizhou City, Zhejiang Province

Applicant before: Taizhou Jiji Intellectual Property Operation Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Patentee after: Shenzhen Dashu Xinke Technology Co.,Ltd.

Address before: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Patentee before: SHENZHEN QIANHAI DASHU FINANCE SERVICE Co.,Ltd.

CP01 Change in the name or title of a patent holder