CN110175131A - A kind of script management method and system based on PyQt kit - Google Patents

A kind of script management method and system based on PyQt kit Download PDF

Info

Publication number
CN110175131A
CN110175131A CN201910627378.7A CN201910627378A CN110175131A CN 110175131 A CN110175131 A CN 110175131A CN 201910627378 A CN201910627378 A CN 201910627378A CN 110175131 A CN110175131 A CN 110175131A
Authority
CN
China
Prior art keywords
script
module
pressure test
pyqt
function
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
CN201910627378.7A
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.)
HEFEI YIDUAN COMMUNICATION TECHNOLOGY Co Ltd
Original Assignee
HEFEI YIDUAN COMMUNICATION 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 HEFEI YIDUAN COMMUNICATION TECHNOLOGY Co Ltd filed Critical HEFEI YIDUAN COMMUNICATION TECHNOLOGY Co Ltd
Publication of CN110175131A publication Critical patent/CN110175131A/en
Pending legal-status Critical Current

Links

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/3684Test management for test design, e.g. generating new test cases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of script management methods and system based on PyQt kit, belong to script administrative skill field, comprising the following steps: S1: selecting module to be measured and script;S2: it reads parameter and modifies parameter value;S3: pressure test is carried out;S4: pressure test is completed;S5: printing test report.Present invention uses classes and function to be packaged to individual feature, by institute function package formation function library in multiple files in need, substantially increases code utilization rate and function versatility;And signaling mechanism is introduced to script, end signal is received automatically, and count to pressure test implementing result, format output as needed keeps the statistical work to pressure testing results more convenient;Graphic interface is also made based on pyqt, carries out monitoring in real time and state capable of being printed on interface in pressure test sequence, intuitive real-time monitoring script operating status and executor can be fed back in this way.

Description

A kind of script management method and system based on PyQt kit
Technical field
The present invention relates to script administrative skill fields, and in particular to a kind of script management method based on PyQt kit and System.
Background technique
Existing script does not have special management tool to be managed, can only when needing to carry out pressure test every time Perform script is gone in turn manually, intuitive real-time monitoring script operating status and executor cannot be fed back to, also without graphical Interface operates bothersome;And it writes and is confined to one file of a script, code redundancy is serious, and utilization rate is low, only simply It realizes the function that pressure test needs, programming count is not carried out to the result that pressure test terminates, it is also necessary to artificial statistics;Most Afterwards, as soon as multiple scripts need this function that directly Code copying is gone over, versatility when there is new demand to be increased by a function Difference, for this purpose, proposing a kind of script management method and system based on PyQt kit.
Summary of the invention
Technical problem to be solved by the present invention lies in: how the Manage Scripts of convenience and high-efficiency, provide one kind and be based on The script management method of PyQt kit.
The present invention be by the following technical programs solution above-mentioned technical problem, the present invention the following steps are included:
S1: module to be measured and script are selected
Start script management tool, select module to be measured, clicks button on graphic interface according to prompt from script bank Or script is selected in specified path;
S2: it reads parameter and modifies parameter value
After script selects, the parameter for needing to be arranged in script is read, module to be measured is suitble to according to parameter name modification Parameter value, script is written into parameter value after modification, script can be shown in selected list after write-in;
S3: pressure test is carried out
Click starts, and executes selected script, and pressure test starts, while being supervised in real time to pressure test sequence Control introduces signaling mechanism to script, receives end signal automatically, and count to pressure test implementing result, as needed Format output, keeps the statistical work to pressure testing results more convenient;
S4: pressure test is completed
After the completion of pressure test work, end signal is received by the signaling mechanism of script automatically, pressure test is held Row result is counted;
S5: printing test report
Test report is printed on graphic interface.
Preferably, in the step S1, script bank includes multiple scripts, and the script is by calling the letter in function library Number is simultaneously formed after needing to be combined function by the logic that different pressures are tested,
Preferably, the function library is to be packaged by class and function to individual feature and seal institute's function in need It is formed in corresponding file, individual feature is packaged using class and function, institute's function package in need is existed Formation function library in multiple files, script need some function to be introduced directly into function library calling function, substantially increase generation Code utilization rate and function versatility.
Preferably, in the step S1, script management tool is a kind of graphic interface management work based on PyQt production Tool carries out multiple pressure tests for controlling multiple modules to be measured simultaneously, and for the letter to each pressure test implementation procedure Breath is monitored in real time, and the information of real time monitoring includes pressure progress test information and exception monitoring information, in this way can be straight The real-time monitoring script operating status of sight simultaneously feeds back to executor, operates also easier.
Preferably, in the step S2, multiple pressure test work if desired are carried out to module to be measured, successively from script bank Or select specified script in specified path, read its parameter and script is written after modifying, the script specified after write-in can be shown In selected list, timing when clicking after starting by selection executes automatically.
Preferably, in the step S3, pressure test is the repetitive operation that perform script later carries out module to be measured.
Preferably, in the step S1, script management tool is also used to carry out AccessPort work, the AccessPort work Make process the following steps are included:
A: baud rate is arranged in selection serial port;
B: opening serial ports, sends instruction according to return value and carries out debugging efforts to selected module.
A kind of script management system based on PyQt kit, comprising:
Selecting module, for selecting module to be measured and selecting script from script bank or specified path;
Parameter processing module is suitble to mould to be measured according to parameter name modification for reading the parameter for needing to be arranged in script The parameter value of block, is written script for parameter value after modification;
Monitoring module, for being monitored in real time to pressure test sequence;
Signaling module counts for automatic capture end signal and to pressure test implementing result, prints to figure Change on interface;
AccessPort module, for completing the debugging efforts to specified serial ports;
Print module is reported, for printing test report to graphic interface;
The selecting module, parameter processing module, signaling module, report print module, AccessPort module with monitoring Module electrical connection.
The present invention has the advantage that the script management method based on PyQt kit compared with prior art, firstly, making Individual feature is packaged with class and function, by institute function package formation function library in multiple files in need, foot This needs some function to be introduced directly into function library calling function, substantially increases code utilization rate and function versatility, has New demand is directly increased newly in function library, needs the script of the function that can repeatedly call, and no longer needs to newly-increased code;Its It is secondary, signaling mechanism is introduced to script, receives end signal automatically, and count to pressure test implementing result, as needed Format output, keeps the statistical work to pressure testing results more convenient;Finally, making graphic interface based on pyqt, execute It is more efficient and convenient when pressure test, multiple modules to be measured can be controlled simultaneously and execute multiple pressure tests, in pressure test Carry out monitoring in real time and state capable of being printed on interface in journey, in this way can intuitive real-time monitoring script operating status simultaneously Executor is fed back to, is operated also easier.
Detailed description of the invention
Fig. 1 is workflow schematic block diagram of the invention;
Fig. 2 is the tree-shaped schematic diagram of function library product process of the invention;
Fig. 3 is the tree-shaped schematic diagram of script bank workflow of the invention.
Specific embodiment
It elaborates below to the embodiment of the present invention, the present embodiment carries out under the premise of the technical scheme of the present invention Implement, the detailed implementation method and specific operation process are given, but protection scope of the present invention is not limited to following implementation Example.
Embodiment one
As shown in Figure 1-3, the present embodiment provides a kind of technical solutions: a kind of script manager based on PyQt kit Method, comprising the following steps:
S1: module to be measured and script are selected
Start script management tool, select a module to be measured, clicks the button on graphic interface according to prompt from foot Select script in this library or specified path, script bank includes multiple scripts, script be by call function in function library and by The logic of different pressures test is formed after needing to be combined function, function library be by class and function to individual feature into Row encapsulation and by function package in need formed in corresponding file, script needs some function to be introduced directly into function Function is called in library, substantially increases code utilization rate and function versatility, has new demand to carry out directly in function library It is newly-increased, it needs the script of the function that can repeatedly call, no longer needs to newly-increased code;
S2: it reads parameter and modifies parameter value
After script selects, the parameter for needing to be arranged in script is read, module to be measured is suitble to according to parameter name modification Parameter value, script is written into parameter value after modification, script can be shown in selected list after write-in, if desired be treated It surveys module and carries out multiple pressure test work, specified script is successively selected from script bank or specified path, reads its parameter And script is written after modifying, the script specified after write-in can be shown in selected list;
S3: pressure test is carried out
Timing when clicking after starting by selection executes selected script automatically, and pressure test starts, while to pressure Test process is monitored in real time;
S4: pressure test is completed
After the completion of pressure test work, end signal is received by the signaling mechanism of script automatically, pressure test is held Row result is counted, and is introduced signaling mechanism to script, is received end signal automatically, and unite to pressure test implementing result Meter;
S5: printing test report
After all script executions, test report is disposably printed into graphical boundary by way of text or figure On face.
Script management tool be it is a kind of based on PyQt production graphic interface management tool, for simultaneously control it is multiple to It surveys module and carries out multiple pressure tests, and for being monitored in real time to the information of each pressure test implementation procedure, supervise in real time The information of control includes pressure progress test information and exception monitoring information.
The present embodiment additionally provides a kind of script management system based on PyQt kit, comprising:
Selecting module, for selecting module to be measured and selecting script from script bank or specified path;
Parameter processing module is suitble to mould to be measured according to parameter name modification for reading the parameter for needing to be arranged in script The parameter value of block, is written script for parameter value after modification;
Monitoring module, for being monitored in real time to pressure test sequence;
Signaling module counts for automatic capture end signal and to pressure test implementing result, prints to figure Change on interface;
AccessPort module, for completing the debugging efforts to specified serial ports;
Print module is reported, for printing test report to graphic interface;
The selecting module, parameter processing module, signaling module, report print module, AccessPort module with monitoring Module electrical connection.
It should be noted that class and function in python language, realize that the code block of specified function uses specified grammer It puts together as packaged function, multiple functions are put together using specified grammer as class;In one python file There are one or more classes, multiple python file, that is, component function libraries;Pyqt is the third party library of python, for making figure Change interface, after interface manufacture, click button according to prompt selection serial ports and script, selection, which finishes click and starts to execute, have been selected The script selected, monitoring script executive condition, prints on the interface made;Pressure test is perform script later to mould to be measured The repetitive operation that block carries out.
Embodiment two
In the present embodiment, the difference with embodiment one is: in step sl, the multiple modules to be measured of simultaneous selection carry out pressure Test job;In step s 5, after a script execution, executor suspends subsequent pressure by manually mode The test report for the script that has currently been finished is printed to graphic interface by way of text or figure by test job On, after printing, manually boot subsequent pressure test work.Printing test report in batches can meet execution well Requirement of the people to test report.Remaining embodiment in the present embodiment is identical as the embodiment in embodiment one.
Embodiment three
Difference in the present embodiment, with embodiment one are as follows: unusual condition or serial ports occur in pressure test sequence has tune In the case where examination demand, script management tool can also be used to carry out AccessPort work, and AccessPort workflow includes following Step:
A: baud rate is arranged in selection serial port;
B: opening serial ports, sends instruction according to return value and carries out debugging efforts to selected module, and above-metioned instruction can be with For ADB instruction or AT instruction etc..
Remaining embodiment in the present embodiment is identical as the embodiment in embodiment one.
In conclusion the script management method based on PyQt kit of three groups of embodiments, has used class and function to list A function is packaged, and by institute function package formation function library in multiple files in need, script needs some function straight It connects and imports function library calling function, there is new demand directly to be increased newly in function library, need the script of the function can Repeatedly to call, newly-increased code is no longer needed to, code utilization rate and function versatility are substantially increased;And semaphore is introduced to script System, receives end signal, and count to pressure test implementing result automatically, and format output as needed makes to survey pressure The statistical work of test result is more convenient;Graphic interface has also been made based on pyqt, has executed more quick side when pressure test Just, multiple modules to be measured can be controlled simultaneously and execute multiple pressure tests, monitor in real time in pressure test sequence simultaneously energy State is printed on interface, intuitive real-time monitoring script operating status and executor can be fed back in this way, operated It is easier.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.

Claims (8)

1. a kind of script management method of the script management based on PyQt kit, which comprises the following steps:
S1: module to be measured and script are selected
Start script management tool, selects module to be measured, and select script from script bank or specified path;
S2: it reads parameter and modifies parameter value
After script selects, the parameter for needing to be arranged in script is read, the ginseng of module to be measured is suitble to according to parameter name modification After modification script is written in parameter value by numerical value, and the script after write-in is shown in selected list;
S3: pressure test is carried out
Click starts, and executes selected script, and pressure test starts, while monitoring in real time to pressure test sequence;
S4: pressure test is completed
After the completion of pressure test work, end signal is received by the signaling mechanism of script automatically, knot is executed to pressure test Fruit is counted;
S5: printing test report
Test report is printed on graphic interface.
2. a kind of script management method based on PyQt kit according to claim 1, it is characterised in that: the step In S1, script bank includes multiple scripts, and the script is by calling the function in function library and patrolling by different pressures test It collects and is generated after needing to be combined function.
3. a kind of script management method based on PyQt kit according to claim 2, it is characterised in that: the function Library is to be packaged by class and function to individual feature and generate institute's function package in need in corresponding file.
4. a kind of script management method based on PyQt kit according to claim 1, it is characterised in that: the step In S1, script management tool is a kind of graphic interface management tool based on PyQt production, multiple to be measured for controlling simultaneously Module carries out multiple pressure tests, and for monitoring in real time to the information of each pressure test implementation procedure, monitors in real time Information include pressure progress test information and exception monitoring information.
5. a kind of script management method based on PyQt kit according to claim 1, it is characterised in that: the step In S2, multiple pressure test work if desired are carried out to module to be measured, are successively selected from script bank or specified path specified Script reads its parameter and script is written after modifying, and the script after write-in is shown in selected list, is clicked after starting by choosing Timing is selected to execute automatically.
6. a kind of script management method based on PyQt kit according to claim 1, it is characterised in that: the step In S3, pressure test is the repetitive operation that perform script later carries out module to be measured.
7. a kind of script management method based on PyQt kit according to claim 1, it is characterised in that: the step In S1, script management tool is also used to carry out AccessPort work, the AccessPort workflow the following steps are included:
A: baud rate is arranged in selection serial port;
B: opening serial ports, sends instruction according to return value and carries out debugging efforts to selected module.
8. a kind of script management system based on PyQt kit characterized by comprising
Selecting module, for selecting module to be measured and selecting script from script bank or specified path;
Parameter processing module is suitble to module to be measured according to parameter name modification for reading the parameter for needing to be arranged in script After modification script is written in parameter value by parameter value;
Monitoring module, for being monitored in real time to pressure test sequence;
Signaling module is counted for automatic capture end signal and to pressure test implementing result;
AccessPort module, for completing the debugging efforts to specified serial ports;
Print module is reported, for printing test report to graphic interface;
The selecting module, parameter processing module, signaling module, report print module, AccessPort module are and monitoring module Electrical connection.
CN201910627378.7A 2019-04-29 2019-07-12 A kind of script management method and system based on PyQt kit Pending CN110175131A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2019103555936 2019-04-29
CN201910355593 2019-04-29

Publications (1)

Publication Number Publication Date
CN110175131A true CN110175131A (en) 2019-08-27

Family

ID=67700031

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910627378.7A Pending CN110175131A (en) 2019-04-29 2019-07-12 A kind of script management method and system based on PyQt kit

Country Status (1)

Country Link
CN (1) CN110175131A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111562910A (en) * 2020-05-08 2020-08-21 上海泛微网络科技股份有限公司 Packaging method and related equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983209A (en) * 2005-12-14 2007-06-20 中兴通讯股份有限公司 System and method for automatically testing software unit
CN101025686A (en) * 2007-03-22 2007-08-29 中兴通讯股份有限公司 Automation test system and test script generating and operating method
CN104268072A (en) * 2014-09-03 2015-01-07 武汉烽火网络有限责任公司 Graphical script editor and method for fast developing communication equipment testing script
US20150212927A1 (en) * 2014-01-24 2015-07-30 Bank Of America Corporation Application Testing Automation
CN105068809A (en) * 2015-08-13 2015-11-18 上海斐讯数据通信技术有限公司 PyQt-based platform for implementing automation project management and case execution
US20160350208A1 (en) * 2013-04-26 2016-12-01 International Business Machines Corporation Generating test scripts through application integration
CN107092558A (en) * 2017-04-12 2017-08-25 东华大学 A kind of cli command set automatization test system and method
CN108572916A (en) * 2018-03-22 2018-09-25 平安科技(深圳)有限公司 Method for testing pressure, device, equipment based on Jmeter and storage medium
CN109522213A (en) * 2018-10-09 2019-03-26 天维讯达(北京)科技有限公司 A kind of test method and device based on customized test script
CN109634253A (en) * 2018-11-13 2019-04-16 武汉精能电子技术有限公司 A kind of automatic flow control method and system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983209A (en) * 2005-12-14 2007-06-20 中兴通讯股份有限公司 System and method for automatically testing software unit
CN101025686A (en) * 2007-03-22 2007-08-29 中兴通讯股份有限公司 Automation test system and test script generating and operating method
US20160350208A1 (en) * 2013-04-26 2016-12-01 International Business Machines Corporation Generating test scripts through application integration
US20150212927A1 (en) * 2014-01-24 2015-07-30 Bank Of America Corporation Application Testing Automation
CN104268072A (en) * 2014-09-03 2015-01-07 武汉烽火网络有限责任公司 Graphical script editor and method for fast developing communication equipment testing script
CN105068809A (en) * 2015-08-13 2015-11-18 上海斐讯数据通信技术有限公司 PyQt-based platform for implementing automation project management and case execution
CN107092558A (en) * 2017-04-12 2017-08-25 东华大学 A kind of cli command set automatization test system and method
CN108572916A (en) * 2018-03-22 2018-09-25 平安科技(深圳)有限公司 Method for testing pressure, device, equipment based on Jmeter and storage medium
CN109522213A (en) * 2018-10-09 2019-03-26 天维讯达(北京)科技有限公司 A kind of test method and device based on customized test script
CN109634253A (en) * 2018-11-13 2019-04-16 武汉精能电子技术有限公司 A kind of automatic flow control method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111562910A (en) * 2020-05-08 2020-08-21 上海泛微网络科技股份有限公司 Packaging method and related equipment

Similar Documents

Publication Publication Date Title
CN110232024B (en) Software automation test framework and test method
AU748588B2 (en) Method for defining durable data for regression testing
CN103150249B (en) A kind of method and system of automatic test
US5045994A (en) Emulation process having several displayed input formats and output formats and windows for creating and testing computer systems
US4766595A (en) Fault diagnostic system incorporating behavior models
CA2391125C (en) Method for computer-assisted testing of software application components
CN107562635A (en) Embedded software test accessory system
CN106294122B (en) A kind of software test platform and its test method of standard
CN1199931A (en) Control system and method for semiconductor integrated circuit test process
US20050044215A1 (en) System for automatic import, analysis, and reporting of network configuration and status information
CN108776278B (en) Topological-associated configuration type relay protection test system and method
CN108536593A (en) CS Framework Softwares automated testing method based on UI and system
CN109783260A (en) Intelligent IT whole process O&M method, apparatus, equipment and readable storage medium storing program for executing
CN109885500A (en) A kind of method and system improving software test coverage rate
CN109491922A (en) One kind being based on model-driven test method and apparatus
CN110175131A (en) A kind of script management method and system based on PyQt kit
CN101594627A (en) A kind of apparatus and method of simulating mobile terminal fault
CN104239217B (en) Method and system for testing railway signal software
CN102111801B (en) Method and system for testing network management interface of third generation mobile communication network
CN116087867A (en) Method for testing operation reliability of intelligent electric energy meter
CN110232013B (en) Test method, test device, controller and medium
CN111767218B (en) Automatic test method, equipment and storage medium for continuous integration
CN113485928A (en) Automatic testing method and device for switch
CN117520184A (en) Test system for developing computer software
CN111597105A (en) Automatic test system and method based on LV environment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190827

RJ01 Rejection of invention patent application after publication