CN109522213A - A kind of test method and device based on customized test script - Google Patents

A kind of test method and device based on customized test script Download PDF

Info

Publication number
CN109522213A
CN109522213A CN201811174095.3A CN201811174095A CN109522213A CN 109522213 A CN109522213 A CN 109522213A CN 201811174095 A CN201811174095 A CN 201811174095A CN 109522213 A CN109522213 A CN 109522213A
Authority
CN
China
Prior art keywords
test case
script
test
ironpython
user
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
CN201811174095.3A
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.)
RADIOSKY (BEIJING) TECHNOLOGY Co.,Ltd.
THE STATE RADIO MONITORING CENTER TESTING CENTER
Original Assignee
Tianwei Signal (beijing) 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 Tianwei Signal (beijing) Technology Co Ltd filed Critical Tianwei Signal (beijing) Technology Co Ltd
Priority to CN201811174095.3A priority Critical patent/CN109522213A/en
Publication of CN109522213A publication Critical patent/CN109522213A/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/3664Environments for testing or debugging software
    • 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/368Test management for test version control, e.g. updating test cases to a new software version
    • 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

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)
  • Debugging And Monitoring (AREA)

Abstract

The present invention provides a kind of test method and device based on customized test script, which comprises the parameter configuration is dynamically loaded into the user interface of C# exploitation software by the parameter configuration that test case is described based on JSON document;User is received by the user interface and modifies the instruction of the parameter configuration, and is modified according to parameter information of the described instruction to the test case;It provides the corresponding IronPython test case script of the test case to edit for user, according to the instruction of the user received the customized modification IronPython test case script, modify to IronPython test case script;The test case parameter information is transmitted to the IronPython by test case enforcement engine and tests case script;The IronPython test case script is executed according to the test case parameter information received to execute the test case.Based on scheme provided by the invention, the customized modification test case script of user may be implemented, substantially increase flexibility, the ease for use of test case script.

Description

A kind of test method and device based on customized test script
Technical field
The present invention relates to software testing technology fields, more particularly to a kind of test method based on customized test script And device.
Background technique
Test case is the basic unit of measuring instrumentss, is the man-machine interface opened to user.Test case script is to realize tool The entity of body test case test process, content cover the communication with bottom measurement module, and test case configuration parameter obtains, measurement The logic control of process, crawl/calculating/analysis of measurement result and judgement/output of measurement result.Measuring instrumentss use Person can verify the function and performance indicator of equipment under test by running good test case script prepared in advance, can also according to Family demand adjustment test case script.Realize that the flexibility for testing case script, friendly, dynamic expansion are to measure a measuring instrumentss Device is convenient for exploitation and the important indicator used.
In the prior art, the traditional measurement instrument based on C/C++ .net Framework language or other compiling class exploitations Table is merely able to that fixed test case script is supported to add a part of parameter open, meets the selection of different test conditions, often not enough Flexibly, scalability is poor.In addition, communicating presence with user side equipment under test since partial test scrnario testing demand differenceization is big It customizes, also has the demand of adjustment test case script test logic, the instrument of versatility does not have ability of second development at present, no The customized test script of energy, it will be difficult to meet user's use demands.And development difficulty is big, the development cycle is long.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind The test method and device based on customized test script of problem are stated, required for realizing that user customizes itself according to self-demand Script, substantially increase the ease for use of measuring device.
The present invention provides a kind of test methods based on customized test script, comprising:
The parameter configuration is dynamically loaded into C# exploitation software by the parameter configuration that test case is described based on Json document In user interface;
The instruction that user modifies the parameter configuration is received by the user interface, and according to described instruction to institute The parameter information for stating test case is modified;
It provides the corresponding IronPython test case script of the test case to edit for user, according to the use received The instruction of the customized modification in the family IronPython test case script, repairs IronPython test case script Change;
The test case parameter information is transmitted to the IronPython by test case enforcement engine and tests case script;
It is described to execute that the IronPython test case script is executed according to the test case parameter information received Test case.
Optionally, the instruction that the parameter configuration is modified by user interface reception user, and according to Described instruction modifies to the parameter information of the test case, comprising:
The script file under the catalogue of the current program for executing test is searched, traversal reads the script file Under preset test case Json file, obtain the test case information and test case parameter information in the Json file;
According to the name information of the test case in the test case information, the test case is successively added to test case column In table;
The instruction that user modifies the parameter configuration is received by user interface, and is modified respectively according to described instruction Test case parameter information in Json file simultaneously saves.
Optionally, increase control for the test case parameter information dynamic in the corresponding Json file of each test case, and initial Change the control;
The instruction that user modifies the parameter configuration is received by the control in the user interface, according to the finger It enables and modifies the test case parameter information and save.
Optionally, the finger of the user that the basis the receives customized modification IronPython test case script It enables, modifies to IronPython test case script, comprising:
Any one test case is chosen in the test case list;
The corresponding Json file of the test case is searched and chosen under the Script file, according to the Json text Part is searched and obtains corresponding IronPython test case script;
According to the instruction of the user received the customized modification IronPython test case script, to described IronPython test case script is modified.
Optionally, described to be searched under the Script file and choose the corresponding Json file of the test case, root According to the Json file search and obtain corresponding IronPython test case script, comprising:
It is searched under the Script file and chooses the corresponding Json file of the test case, in the Json file The middle method attribute value read under measureItem;
According to the method attribute value, is searched in method file and obtain the entitled method attribute of file Value extends the IronPython test case script of entitled py.
Optionally, the test case parameter information that the basis receives executes the IronPython and tests case script To execute the test case, comprising:
It is communicated by the communication interface that C# is encapsulated with measurement module, equipment under test;
According to the test case parameter information received, the measurement module is controlled to described by the communication interface Equipment under test executes the IronPython test case script and is measured with executing the test case, and reads measurement data.
Optionally, the communication interface that the IronPython test case script encapsulate by C# and measurement module are tested and set After being communicated, further includes:
The connection status of the measurement module Yu the equipment under test is verified by the communication interface that the C# is encapsulated;
Determine the state between the measurement module and the equipment under test for connection.
Optionally, described that the test case parameter is transmitted to by the IronPython test case by test case enforcement engine Before script, further includes:
The running environment that the IronPython tests case script is initialized by the test case enforcement engine.
According to another aspect of the present invention, a kind of test device based on customized test script is additionally provided, comprising:
Loading module, suitable for describing the parameter configuration of test case based on Json document, by the parameter configuration dynamically load Into the user interface of C# exploitation software;
First modified module, suitable for receiving the instruction that user modifies the parameter configuration by the user interface, And it is modified according to parameter information of the described instruction to the test case;
Second modified module is adapted to provide for the corresponding IronPython test case script of the test case and compiles for user Volume, according to the instruction of the user received the customized modification IronPython test case script, to described IronPython test case script is modified.
Transmission module, suitable for the test case parameter information is transmitted to the IronPython by test case enforcement engine Test case script;
Execution module, suitable for executing the IronPython test case foot according to the test case parameter information received This is to execute the test case.
According to a further aspect of the invention, a kind of computer storage medium, the computer storage medium are additionally provided It is stored with computer program code, when the computer program code is run on the computing device, leads to the calculating equipment Execute the test method described in any of the above embodiments based on customized test script.
The present invention provides a kind of test method and device based on customized test script are described based on Jason document Test case parameter, and parameter configuration is dynamically loaded into the user interface of C# exploitation software, allow to according to reception The user arrived modifies the instruction of test case parameter configuration, modifies to the test parameter;Additionally, it is provided test case is corresponding IronPython tests case script, can participate in when user has the demand of custom script without instrument developer, user is certainly Row carries out secondary development.Meanwhile the test case script based on default, user can rapid customization oneself script, and carry out hand Dynamic debugging, substantially increases the ease for use of measuring device.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
According to the following detailed description of specific embodiments of the present invention in conjunction with the accompanying drawings, those skilled in the art will be brighter The above and other objects, advantages and features of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 is the test method flow chart according to an embodiment of the invention based on customized test script;
Fig. 2 is the flow chart of the modification test case parameter information of an alternative embodiment according to the present invention;
Fig. 3 is the Json document schematic diagram that an alternative embodiment describes test case parameter configuration according to the present invention;
Fig. 4 is the flow chart of the modification IronPython test case script of an alternative embodiment according to the present invention;
Fig. 5 is the schematic structural diagram of testing device according to an embodiment of the invention based on customized test script;
Fig. 6 is the test device structural representation based on customized test script of an alternative embodiment according to the present invention Figure;
Fig. 7 is the test device structural representation based on customized test script of another alternative embodiment according to the present invention Figure.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.It should be noted that under the premise of not conflicting, the embodiment of the present invention and preferably Technical characteristic in embodiment can be combined with each other.
Inflexible caused by fixed test case script, expansion can only be supported in order to solve measuring instrumentss in the prior art The problem of malleability difference, the embodiment of the invention provides a kind of test methods based on customized test script, can be according to user The customized test script of demand substantially increases scalability, the flexibility of Survey Software entirety.Below by specific embodiment It is described in detail.
Fig. 1 is the test method flow chart according to an embodiment of the invention based on customized test script, such as Fig. 1 institute Show, the test method according to an embodiment of the present invention based on customized test script includes:
Step S102: describing the parameter configuration of test case based on Json document, and parameter configuration is dynamically loaded into C# exploitation In the user interface of software;
Step S104: the instruction that user modifies parameter configuration is received by user interface, and according to the instruction to survey The parameter information of examination example is modified;
Step S106: the corresponding IronPython test case script of test case is provided and is edited for user, according to reception The instruction of the customized modification IronPython test case script of the user arrived, repairs IronPython test case script Change;
Step S108: test case parameter information is transmitted to by IronPython by test case enforcement engine and tests case script;
Step S110: IronPython test case script is executed to execute test according to the test case parameter information received Example.
The embodiment of the invention provides a kind of test methods based on customized test script, are described based on Jason document The parameter configuration of test case, and parameter configuration is dynamically loaded into the user interface of C# exploitation software, allow to root The instruction that test case parameter configuration is modified according to the user received, modifies to the test parameter;Additionally, it is provided test case Corresponding IronPython tests case script, can participate in when user has the demand of custom script without instrument developer, User can voluntarily carry out secondary development.Meanwhile the test case script based on default, user can rapid customization oneself script, And debugged manually, substantially increase the ease for use of measuring device.
Fig. 2 is the flow chart of the modification test case parameter information of an alternative embodiment according to the present invention, as shown in Fig. 2, In one alternate embodiment, above-mentioned steps S104 is specifically included:
S202: searching the script file under the catalogue of the current program for executing test, and traversal reads script file The Json file of preset test case under folder obtains test case information and test case parameter information in Json file;
S204: according to the name information of the test case in test case information, the test case is successively added to test case In list;
S206: user is received by user interface and modifies the instruction of the parameter configuration, and is repaired according to described instruction Change the test case parameter information in each Json file and saves.
In conjunction with Fig. 3 it is found that measureItem (metering under the corresponding Json file of test case under Script file Project) in include test case information, test case information includes the name (name information) and id (attribute information) of test case.Json Include test case parameter information in params (variable element) under file, includes multiple object arrays, circulation time under params Each object array is gone through, there is 7 attributes, including id (unique identification) under each object array, name (parameter name), Whether value (parameter value), selectItem (option), type (control type), enable are (can operate), and visible (is No display).Firstly, dynamically increasing control from top to bottom in interface according to these information, wherein type type is input increasing Add input frame, increases drop-down list box for select.And increasing lable control before control, content is name attribute value.Its It is secondary, control initialization is carried out, Input control initialization data is value attribute value, and select control needs first to recycle addition SelectItem with ";" value of segmentation chooses and initialized into drop-down list box, then according to value attribute value.In addition, also Whether can operate, can show if being respectively set according to two attribute values of enable, visible.
By the way that above-mentioned control is arranged, allows to receive user according to the control in user interface and modify test case ginseng The instruction of number configuration, and test case parameter information is modified and saved according to described instruction, realize test case parameter letter The visual edit of breath.
Fig. 4 is the flow chart of the modification IronPython test case script of an alternative embodiment according to the present invention, such as Fig. 4 Shown, above-mentioned steps S106 is specifically included:
S402: any one test case is chosen in test case list;
S404: searching under Script file and chooses the corresponding Json file of the test case, according to the Json file It searches and obtains corresponding IronPython test case script;
S406: the customized instruction for modifying IronPython test case script of user based on the received, to this IronPython test case script is modified.
In one alternate embodiment, the detailed process of step S404 is: searching and selects under the Script file Described in the corresponding Json file of test case, in Json file read measureItem under method attribute value;According to institute Method attribute value is stated, the entitled method attribute value of file is searched and obtained in method file, extends entitled py IronPython test case script.
Above-mentioned test program using C# language exploitation desktop application it is professional on the basis of, increasing Python can The mode of the ability of customized test case script, C# and Python hybrid programming improves the extension of metering device software entirety Property, flexibility and adaptability so that participated in when user has the demand of custom script without instrument developer, user can from Row carries out secondary development.Meanwhile the test case script user based on default can rapid customization oneself script, and carry out manual Debugging, substantially increases the ease for use of measuring device.
In one alternate embodiment, above-mentioned steps S110 includes: the communication interface and measurement module, quilt by C# encapsulation Measurement equipment is communicated;Measurement module is controlled by communication interface according to the test case parameter information received to hold equipment under test Row IronPython test case script is measured with executing correspondingly test case, and reads measurement data.
Wherein, since IronPython script will be communicated with equipment under test, measurement module, interface is preferably included GPIB, USB, serial ports, four kinds of network interface are unified to these four types of interfaces to carry out based on the advantage that C# supports various I/O read-write Encapsulation is reduced to open, close, four kinds of reading and writing operations, and the library C# that these encapsulation are quoted in IronPython can be led to Letter, encapsulates general I/O communication interface, increases new communication module, without carrying out adaptation exploitation to new module, save exploitation The operation of personnel.
After being communicated above by the communication interface that C# is encapsulated with measurement module, equipment under test further include: pass through institute The communication interface for stating C# encapsulation verifies the connection status of the measurement module and equipment under test;Determine the measurement module with it is described State between equipment under test is connection.
Wherein, however, it is determined that the state between measurement module and equipment under test is connection, then is controlled by above-mentioned communication interface Measurement module executes above-mentioned IronPython test case script to the equipment under test and is measured with executing above-mentioned test case.
If it is determined that the state between measurement module and equipment under test be it is not connected, then generate warning message, prompt in connection Equipment under test and measurement module are stated, and then equipment under test is measured.
After measurement, corresponding test data is read, calculates and whether judgement equipment under test measures and pass through, and will measurement Result shown back to interface.
According to same inventive concept, the embodiment of the invention also provides a kind of, and the test based on customized test script is filled It sets.Fig. 5 shows the structural schematic diagram of the test device according to an embodiment of the invention based on customized test script, ginseng See Fig. 5, the test device 500 based on customized test script includes at least: loading module 510, the first modified module 520, Two modified modules 530, transmission module 540, execution module 550.
First introduce each composition of the test device 500 based on customized test script of the embodiment of the present invention or the function of device Connection relationship between energy and each section:
Loading module 510 is added the parameter configuration dynamic suitable for being described the parameter configuration of test case based on Json document It is downloaded in the user interface of C# exploitation software;
First modified module 520, couples with loading module 510, repairs suitable for receiving user by the user interface Change the instruction of the parameter configuration, and is modified according to described instruction to the test case parameter information;
Second modified module 530 couples with the first modified module 520, it is corresponding to be adapted to provide for the test case IronPython test case script is edited for user, according to the customized modification IronPython of the user received The instruction for testing case script modifies to IronPython test case script.
Transmission module 540 is coupled with the second modified module 530, is suitable for passing through test case enforcement engine for the test case Parameter information is transmitted to the IronPython test case script;
Execution module 550 is coupled with transmission module 540, suitable for being executed according to the test case parameter information received The IronPython test case script is to execute the test case.
Based on the test device provided in this embodiment based on customized test script, user can be according to itself to test The customized IronPython of the demand of process tests case script, substantially increases the flexibility of test case script, ease for use.
Fig. 6 is the test device structural representation based on customized test script of an alternative embodiment according to the present invention Figure, as shown in fig. 6, in an alternate embodiment of the present invention, above-mentioned first modified module 520, comprising:
Searching unit 521 is coupled with loading module 510, under the catalogue suitable for searching the current program for executing test Script file, traversal read the Json file of test case preset under the script file, obtain the Json text Test case information and test case parameter information in part;
Adding unit 522 is coupled with searching unit 521, suitable for the title according to the test case in the test case information The test case is successively added in test case list by information;
Storage unit 523 is modified, is coupled with adding unit 522, is suitable for receiving user by user interface and modifies institute The instruction of parameter configuration is stated, and the test case parameter information in each Json file is modified according to described instruction and is saved.
In one alternate embodiment, above-mentioned modification storage unit 523 is particularly adapted to: for the corresponding Json text of each test case Test case parameter information dynamic in part increases control, and initializes the control;
The instruction that user modifies the parameter configuration is received by the control in the user interface, according to the finger It enables and modifies the test case parameter information and save.
Fig. 7 is the test device structural representation based on customized test script of another alternative embodiment according to the present invention Figure, as shown in fig. 7, in one alternate embodiment, above-mentioned second modified module 530 includes:
Selection unit 531 is coupled with the first modified module 520, suitable for choosing any one in the test case list Test case;
Acquiring unit 532 is searched, is coupled with selection unit 531, suitable for searching and choosing under the Script file The corresponding Json file of the test case, according to the Json file search and obtains corresponding IronPython test case foot This;
Unit 533 is modified, is coupled with acquiring unit 532 is searched, suitable for according to the customized modification institute of user received The instruction for stating IronPython test case script modifies to IronPython test case script.
In one alternate embodiment, above-mentioned lookup acquiring unit 532 is particularly adapted to: looking under the Script file It looks for and chooses the corresponding Json file of the test case, the method read under measureItem in the Json file belongs to Property value;
According to the method attribute value, is searched in method file and obtain the entitled method attribute of file Value extends the IronPython test case script of entitled py.
In one alternate embodiment, above-mentioned execution module 550 is particularly adapted to: the communication interface and measurement encapsulated by C# Module, equipment under test are communicated;
According to the test case parameter information received, the measurement module is controlled to described by the communication interface Equipment under test executes the IronPython test case script and is measured with executing the test case, and reads measurement data.
In one alternate embodiment, above-mentioned execution module 550 is specifically further adapted for: the communication interface encapsulated by the C# Verify the connection status of the measurement module and equipment under test;
Determine the state between the measurement module and the equipment under test for connection.
In one alternate embodiment, above-mentioned transmission module 540 is further adapted for: being initialized by the test case enforcement engine The running environment of the IronPython test case script.
Another aspect according to the present invention additionally provides a kind of computer storage medium, computer storage medium storage There is computer program code, when computer program code is run on the computing device, causes calculating equipment to execute above-mentioned any The test method based on customized test script in embodiment.
The embodiment of the invention provides a kind of test method and device based on customized test script, are mentioned based on the present invention The method of confession describes the parameter configuration of test case based on Json document, and the parameter configuration is dynamically loaded into user's interaction circle In face;So that can receive the instruction that user modifies the parameter configuration by the user interface, and according to described Instruction carries out visualization modification to the parameter information of the test case;There is provided the test case corresponding IronPython test case Script is edited for user, according to the finger of the user received the customized modification IronPython test case script It enables, modifies to IronPython test case script, allow the customized test case script of user, substantially increase Test the flexibility of case script, ease for use;It is communicated by the communication interface that C# is encapsulated with measurement module, equipment under test, nothing New communication module need to be increased, without carrying out adaptation exploitation to new module, save corresponding personnel's investment, in addition only open test Case script source code, so that entire software version is able to maintain unanimously.On it is apparent to those skilled in the art that The system of description, the specific work process of device and unit are stated, can refer to corresponding processes in the foregoing method embodiment, for letter For the sake of clean, this will not be repeated here.
In addition, each functional unit in each embodiment of the present invention can be physically independent, can also two or More than two functional units integrate, and can be all integrated in a processing unit with all functional units.It is above-mentioned integrated Functional unit both can take the form of hardware realization, can also be realized in the form of software or firmware.
Those of ordinary skill in the art will appreciate that: if the integrated functional unit is realized and is made in the form of software It is independent product when selling or using, can store in a computer readable storage medium.Based on this understanding, Technical solution of the present invention is substantially or all or part of the technical solution can be embodied in the form of software products, The computer software product is stored in a storage medium comprising some instructions, with so that calculating equipment (such as Personal computer, server or network equipment etc.) various embodiments of the present invention the method is executed when running described instruction All or part of the steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM), random access memory Device (RAM), the various media that can store program code such as magnetic or disk.
Alternatively, realizing that all or part of the steps of preceding method embodiment can be (all by the relevant hardware of program instruction Such as personal computer, the calculating equipment of server or network equipment etc.) it completes, described program instruction can store in one In computer-readable storage medium, when described program instruction is executed by the processor of calculating equipment, the calculating equipment is held The all or part of the steps of row various embodiments of the present invention the method.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Present invention has been described in detail with reference to the aforementioned embodiments for pipe, those skilled in the art should understand that: at this Within the spirit and principle of invention, it is still possible to modify the technical solutions described in the foregoing embodiments or right Some or all of the technical features are equivalently replaced;And these are modified or replaceed, and do not make corresponding technical solution de- From protection scope of the present invention.

Claims (10)

1. a kind of test method based on customized test script characterized by comprising
The parameter configuration is dynamically loaded into the user of C# exploitation software by the parameter configuration that test case is described based on Json document In interactive interface;
The instruction that user modifies the parameter configuration is received by the user interface, and according to described instruction to the survey The parameter information of examination example is modified;
It provides the corresponding IronPython test case script of the test case to edit for user, certainly according to the user received The instruction of the modification of the definition IronPython test case script, modifies to IronPython test case script;
The test case parameter information is transmitted to the IronPython by test case enforcement engine and tests case script;
The IronPython test case script is executed according to the test case parameter information received to execute the test Example.
2. the method according to claim 1, wherein described receive user's modification by the user interface The instruction of the parameter configuration, and modified according to parameter information of the described instruction to the test case, comprising:
The script file under the catalogue of the current program for executing test is searched, traversal reads pre- under the script file The Json file for the test case set obtains test case information and test case parameter information in the Json file;
According to the name information of the test case in the test case information, the test case is successively added to test case list In;
The instruction that user modifies the parameter configuration is received by user interface, and each Json text is modified according to described instruction Test case parameter information in part simultaneously saves.
3. according to the method described in claim 2, it is characterized in that, described received described in user's modification by user interface The instruction of parameter configuration, and the test case parameter information in each Json file is modified according to described instruction and is saved, comprising:
Increase control for the test case parameter information dynamic in the corresponding Json file of each test case, and initializes the control;
The instruction that user modifies the parameter configuration is received by the control in the user interface, is repaired according to described instruction Change the test case parameter information and saves.
4. according to the method in claim 2 or 3, which is characterized in that the customized modification of the user that the basis receives The instruction of the IronPython test case script modifies to IronPython test case script, comprising:
Any one test case is chosen in the test case list;
The corresponding Json file of the test case is searched and chosen under the Script file, is looked into according to the Json file It looks for and obtains corresponding IronPython test case script;
According to the instruction of the user received the customized modification IronPython test case script, to described IronPython test case script is modified.
5. according to the method described in claim 4, it is characterized in that, described search under the Script file and choose institute The corresponding Json file of test case is stated, according to the Json file search and obtains corresponding IronPython test case script, Include:
The corresponding Json file of the test case is searched and chosen under the Script file, is read in the Json file Take the method attribute value under measureItem;
According to the method attribute value, the entitled method attribute value of file is searched and obtained in method file, Extend the IronPython test case script of entitled py.
6. the method according to claim 1, wherein the test case parameter information that the basis receives is held The row IronPython test case script is to execute the test case, comprising:
It is communicated by the communication interface that C# is encapsulated with measurement module, equipment under test;
According to the test case parameter information received, the measurement module is controlled to described tested by the communication interface Equipment executes the IronPython test case script and is measured with executing the test case, and reads measurement data.
7. according to the method described in claim 6, it is characterized in that, it is described by C# encapsulation communication interface and measurement module, After equipment under test is communicated, further includes:
The connection status of the measurement module Yu the equipment under test is verified by the communication interface that the C# is encapsulated;
Determine the state between the measurement module and the equipment under test for connection.
8. the method according to claim 1, wherein described joined the test case by test case enforcement engine Number is transmitted to before the IronPython test case script, further includes:
The running environment that the IronPython tests case script is initialized by the test case enforcement engine.
9. a kind of test device based on customized test script characterized by comprising
The parameter configuration is dynamically loaded into C# suitable for describing the parameter configuration of test case based on Json document by loading module It develops in the user interface of software;
First modified module, suitable for receiving the instruction that user modifies the parameter configuration, and root by the user interface It modifies according to described instruction to the test case parameter information;
Second modified module is adapted to provide for the corresponding IronPython test case script of the test case and edits for user, According to the instruction of the user received the customized modification IronPython test case script, the IronPython is surveyed Examination case script is modified.
Transmission module is tested suitable for the test case parameter information is transmitted to the IronPython by test case enforcement engine Case script;
Execution module, suitable for according to the test case parameter information that receives execute the IronPython test case script with Execute the test case.
10. a kind of computer storage medium, the computer storage medium is stored with computer program code, when the computer When program code is run on the computing device, the calculating equipment perform claim is caused to require 1-8 described in any item based on certainly Define the test method of test script.
CN201811174095.3A 2018-10-09 2018-10-09 A kind of test method and device based on customized test script Pending CN109522213A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811174095.3A CN109522213A (en) 2018-10-09 2018-10-09 A kind of test method and device based on customized test script

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811174095.3A CN109522213A (en) 2018-10-09 2018-10-09 A kind of test method and device based on customized test script

Publications (1)

Publication Number Publication Date
CN109522213A true CN109522213A (en) 2019-03-26

Family

ID=65772454

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811174095.3A Pending CN109522213A (en) 2018-10-09 2018-10-09 A kind of test method and device based on customized test script

Country Status (1)

Country Link
CN (1) CN109522213A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110175131A (en) * 2019-04-29 2019-08-27 合肥移瑞通信技术有限公司 A kind of script management method and system based on PyQt kit
CN110445690A (en) * 2019-08-16 2019-11-12 北京智芯微电子科技有限公司 The design method of electric power wireless public network communication unit interchangeability test software

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103220186A (en) * 2013-03-21 2013-07-24 大唐联仪科技有限公司 Communication equipment testing method and system
US20140068410A1 (en) * 2012-09-06 2014-03-06 Elena Dolinina User interface for composing test scenarios
US20150339213A1 (en) * 2014-05-21 2015-11-26 Cgi Technologies And Solutions Inc. Automated testing of an application system
CN106775725A (en) * 2016-12-19 2017-05-31 网易(杭州)网络有限公司 A kind of visual configuration edit methods and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140068410A1 (en) * 2012-09-06 2014-03-06 Elena Dolinina User interface for composing test scenarios
CN103220186A (en) * 2013-03-21 2013-07-24 大唐联仪科技有限公司 Communication equipment testing method and system
US20150339213A1 (en) * 2014-05-21 2015-11-26 Cgi Technologies And Solutions Inc. Automated testing of an application system
CN106775725A (en) * 2016-12-19 2017-05-31 网易(杭州)网络有限公司 A kind of visual configuration edit methods and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张娜等: "示波器远程控制方法在瑞萨集成开发环境CubeSuite+中的应用", 《电子产品世界》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110175131A (en) * 2019-04-29 2019-08-27 合肥移瑞通信技术有限公司 A kind of script management method and system based on PyQt kit
CN110445690A (en) * 2019-08-16 2019-11-12 北京智芯微电子科技有限公司 The design method of electric power wireless public network communication unit interchangeability test software

Similar Documents

Publication Publication Date Title
CN107844424B (en) Model-based testing system and method
Zwart et al. Graphical programming interface: a development environment for MRI methods
US7340693B2 (en) System for designing re-programmable digital hardware platforms
US8196113B2 (en) Realtime creation of datasets in model based testing
EP2169541B1 (en) Method, system and graphical user interface for configuring a simulator to simulate a plurality of devices
US20050155014A1 (en) Graphical program which includes an I/O node for hardware abstraction
EP2187310B1 (en) Method and system for simulating a plurality of devices
US9417992B2 (en) Web portal API test report generation
US20090288073A1 (en) Edit Time Analyzer in a Loosely Typed Textual Language
CN109918370A (en) A kind of development approach and system of the configurable forms application front end based on WEB
US20100031231A1 (en) Testing a Graphical Program Intended for a Programmable Hardware Element
Baker et al. Foundational concepts for model driven system design
CN106708718A (en) Service framework interface testing method and device
CN106201803A (en) A kind of general automation based on tested object model test system and method
US10216495B2 (en) Program variable convergence analysis
CN110032368B (en) Information configuration method and device
CN104731587A (en) Unit testing data generating method and unit testing data generating system
CN112558942A (en) Operator registration method and related product
CN109522213A (en) A kind of test method and device based on customized test script
CN104915297A (en) APP electricity consumption automatic test method for android device
Shrivastava et al. Dqa: Scalable, automated and interactive data quality advisor
CN109918299A (en) A kind of method of comparison database architectural difference
CN103955425B (en) Webpage (WEB) exploring testing device and method
Chis Moldable tools
US7451358B2 (en) Test executive system with automatic expression logging and parameter logging

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
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Zhu Lin

Inventor after: Wen He

Inventor after: Gu Hailiang

Inventor before: Wen He

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210202

Address after: 100041 China Radio Detection Building, 30 Shixing Street, Shijingshan District, Beijing

Applicant after: RADIOSKY (BEIJING) TECHNOLOGY Co.,Ltd.

Applicant after: THE STATE RADIO MONITORING CENTER TESTING CENTER

Address before: 100041 China Radio Detection Building, 30 Shixing Street, Shijingshan District, Beijing

Applicant before: RADIOSKY (BEIJING) TECHNOLOGY Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190326