CN107229481A - A kind of testing method and tool based on Excel - Google Patents
A kind of testing method and tool based on Excel Download PDFInfo
- Publication number
- CN107229481A CN107229481A CN201710591850.7A CN201710591850A CN107229481A CN 107229481 A CN107229481 A CN 107229481A CN 201710591850 A CN201710591850 A CN 201710591850A CN 107229481 A CN107229481 A CN 107229481A
- Authority
- CN
- China
- Prior art keywords
- application server
- return
- file
- excel
- receiving
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/20—Software design
- G06F8/22—Procedural
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3664—Environments for testing or debugging software
Abstract
The invention provides a kind of method of testing based on Excel, including:VBA language is write in Excel, wherein, VBA language is the programming language that general automation task is performed in multipad;The VBS scripts carried based on the VBA language call operating systems write, wherein, VBS scripts are the script based on VB programming languages;The component that the offer communication interface that operating system is carried is loaded in VBS scripts carries out packet sending and receiving.The present invention can realize that tester carries out the tissue of test packet, transmission in Excel, reception, preserves re-multiplexing, have the advantages that convenient, directly perceived, sustainability.The invention also discloses a kind of testing tool based on Excel.
Description
Technical field
The present invention relates to system testing technical field, more specifically to a kind of method of testing and work based on Excel
Tool.
Background technology
At present, when doing on-line transaction test, the data item of message does not have concrete meaning, and it is right one by one that configuration sends data
According to change certain field value needs to compare interface, and it is slower that group sends message;Meanwhile, existing instrument is to the message that receives
As a big character string display in receiving box, it is impossible to intuitively show the value of each field;And existing instrument can only be by
The content of transmission is stored in text or binary file with character string or binary form, during subsequent reuse,
It is extremely inconvenient if change certain field.Therefore, tissue sends report when how effectively to solve to do on-line transaction test
It is a urgent problem to be solved that literary and reception response message is not convenient enough, directly perceived, be difficult to preservation multiplexing.
The content of the invention
In view of this, it is an object of the invention to provide a kind of method of testing based on Excel, tester can be realized
The tissue of progress test packet, transmission, reception, preservation re-multiplexing, excellent with convenient, directly perceived, sustainability etc. in Excel
Point.
To achieve the above object, the present invention provides following technical scheme:
A kind of method of testing based on Excel, including:
VBA language is write in the Excel, wherein, the VBA language is general to be performed in multipad
The programming language of automation task;
The VBS scripts carried based on the VBA language call operating systems write, wherein, the VBS scripts be based on
The script of VB programming languages;
The component that the offer communication interface that the operating system is carried is loaded in the VBS scripts carries out packet sending and receiving.
Preferably, the component that the offer communication interface that the operating system is carried is loaded in the VBS scripts enters
Row packet sending and receiving includes:
Read the configuration parameter of application server;
Each field value in the Excel is sent into message binary word according to type composition to throttle;
Binary word throttling is written in file;
The VBS scripts are called, the configuration parameter of the application server is transferred to the VBS scripts;
Judge whether to exceed the online stand-by period;
When not less than the online stand-by period, whether there is return file under scanning assigned catalogue;
When there is return file under scanning assigned catalogue, the file is read, the byte stream in the file is read in interior
Deposit, shown according to receiving message format and disassembling the byte and flow to corresponding Excel fields.
Preferably, when it is no to scan the result for whether having return file under assigned catalogue, wait after the first preset time
Return judges whether to exceed the online stand-by period.
Preferably, the component that the offer communication interface that the operating system is carried is loaded in the VBS scripts enters
Row packet sending and receiving also includes:
Receive the configuration parameter of the application server;
Test whether the corresponding port of the application server communicates normally;
When the port communication of the application server is normal, reads and send file, byte stream will be sent and read in internal memory;
The byte stream is sent to the port of the application server;
The application server is waited to return;
Judge whether the time for waiting the application server to return is overtime;
When having not timed out the time for waiting the application server to return, judge whether to receive the application server
Return;
When receiving the return of the application server, the byte stream received is written to specified file.
Preferably, when not receiving the return of the application server, wait and judgement etc. is returned after the second preset time
Treat whether the time that the application server is returned is overtime.
A kind of testing tool based on Excel, including:
Module is write, for writing VBA language in the Excel, wherein, the VBA language is in desktop application journey
The programming language of general automation task is performed in sequence;
Calling module, for the VBS scripts carried based on the VBA language call operating systems write, wherein, it is described
VBS scripts are the script based on VB programming languages;
Load-on module, the component for loading the offer communication interface that the operating system is carried in the VBS scripts
Carry out packet sending and receiving.
Preferably, the load-on module includes:
Reading unit, the configuration parameter for reading application server;
Component units, throttle for each field value in the Excel to be sent into message binary word according to type composition;
First writing unit, for binary word throttling to be written in file;
Transfer unit, for calling the VBS scripts, the VBS is transferred to by the configuration parameter of the application server
Script;
First judging unit, for judging whether to exceed the online stand-by period;
Scanning element, for when not less than the online stand-by period, whether having return file under scanning assigned catalogue;
Processing unit, for when there is return file under scanning assigned catalogue, the file being read, by the file
Byte stream reads in internal memory, is shown according to receiving message format and disassembling the byte and flow to corresponding Excel fields.
Preferably, when it is no to scan the result for whether having return file under assigned catalogue, in addition to:
First waits unit, judges whether to exceed the online stand-by period for waiting returning after the first preset time.
Preferably, the load-on module also includes:
Receiving unit, the configuration parameter for receiving the application server;
Test cell, for testing whether the corresponding port of the application server communicates normally;
Unit is read in, for when the port communication of the application server is normal, reading and sending file, byte will be sent
Stream reads in internal memory;
Transmitting element, the port for the byte stream to be sent to the application server;
Unit is waited, for waiting the application server to return;
Whether the second judging unit, the time for judging to wait the application server to return is overtime;
3rd judging unit, for when having not timed out the time for waiting the application server to return, judging whether to receive
To the return of the application server;
Second writing unit, for when receiving the return of the application server, the byte stream received to be write
To specified file.
Preferably, when not receiving the return of the application server, in addition to:
Second waits unit, for wait returned after the second preset time judge to wait the application server to return when
Between whether time-out.
As shown from the above technical solution, a kind of method of testing based on Excel is present embodiments provided, when needing to be handed over
During Easy Test, VBA language is write in Excel first, wherein, VBA language be performed in multipad it is general from
The programming language of dynamicization task, is then based on the VBS scripts that VBA language call operating systems are carried write, wherein, VBS pin
This is the script based on VB programming languages;The offer communication interface that operating system is carried finally is provided in VBS scripts
Component carries out packet sending and receiving.It can realize that tester carries out the tissue of test packet, transmission in Excel, reception, preserved again
Multiplexing, has the advantages that convenient, directly perceived, sustainability.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of method flow diagram of the method for testing embodiment 1 based on Excel disclosed by the invention;
Fig. 2 is a kind of method flow diagram of the method for testing embodiment 2 based on Excel disclosed by the invention;
Fig. 3 is a kind of method flow diagram of the method for testing embodiment 3 based on Excel disclosed by the invention;
Fig. 4 is a kind of structural representation of the testing tool embodiment 1 based on Excel disclosed by the invention;
Fig. 5 is a kind of structural representation of the testing tool embodiment 2 based on Excel disclosed by the invention;
Fig. 6 is a kind of structural representation of the testing tool embodiment 3 based on Excel disclosed by the invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, it is all other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
As shown in figure 1, being a kind of flow chart of the method for testing embodiment 1 based on Excel disclosed by the invention, this method
Comprise the following steps:
S101, VBA language is write in Excel, wherein, VBA language be performed in multipad it is general from
The programming language of dynamicization task;
When needing to do on-line transaction test, the Excel file for having finished writing VBA programs is opened, application service has been configured
The address and port of device and send and receive message field (MFLD) and fill out the corresponding value of transmission message field (MFLD).Wherein, VBA full name
For Visual Basic for Applications, it is a kind of Visual Basic macrolanguage, is that Microsoft is developed at it
The programming language of general automation task is performed in multipad.
S102, the VBS scripts carried based on the VBA language call operating systems write, wherein, VBS scripts are based on VB
The script of programming language;
Then according to the VBS scripts that VBA language call operating systems are carried are write in Excel, wherein VBS full name is
It is that Microsoft Visual Basic Script Editon, VBS are the scripts based on Visual Basic.
S103, the offer communication interface that operating system is carried in VBS scripts component progress packet sending and receiving.
After have invoked the VBS scripts that operating system is carried, load what operating system was carried in VBS scripts
Mswinsck.ocx components, the communication interface message for calling the component to provide sends and receives.Wherein, mswinsck.ocx
It is the socket programming associated documents of Visual Basic language.
In summary, in the above-described embodiments, when needing to be traded test, opening has finished writing VBA programs
Excel file, has configured the address and port of application server and has sent and received message field (MFLD) and fill out transmission message word
The corresponding value of section.Wherein, VBA language is the programming language that general automation task is performed in multipad, then
The VBS scripts carried based on the VBA language call operating systems write, wherein, VBS scripts are the script based on VB programming languages
Language;The component that the offer communication interface that operating system is carried finally is loaded in VBS scripts carries out packet sending and receiving.It can realize
Tester carries out the tissue of test packet, transmission in Excel, reception, re-multiplexing is preserved, with convenient, directly perceived, sustainable
The advantages of change.
Specifically, the one of which implementation of the step S103 in above-described embodiment is as shown in Fig. 2 including following step
Suddenly:
S201, the configuration parameter for reading application server;
When the component that the offer communication interface that operating system is carried is loaded in VBS scripts carries out packet sending and receiving, reading should
With the configuration parameter of server, wherein, the configuration parameter of application server includes server address, port, time-out time etc..
S202, the field value of each in Excel is sent into message binary word according to type composition throttled;
Then each field value tester in Excel filled in, message binary system byte is sent according to type composition
Stream.
S203, by binary word throttling be written in file;
Then the binary word throttling of composition is written in file.
S204, VBS scripts are called, the configuration parameter of application server is transferred to VBS scripts;
Then VBS scripts are called, while application server address, port, time-out time are passed into the VBS scripts.
S205, judge whether exceed the online stand-by period;
Then judge whether to exceed the online stand-by period, wherein the online stand-by period can be carried out flexibly according to the actual requirements
Setting.
S206, when not less than the online stand-by period, scanning assigned catalogue under whether have return file;
When judging not less than the online stand-by period, further whether there is return file under scanning assigned catalogue;Work as judgement
During more than the online stand-by period, time-out is received, tester is returned and receives time-out information.
S207, when scan assigned catalogue under whether have return file result for it is no when, wait the first preset time after return
Return S205;
When judging under assigned catalogue without file is returned, wait after the first preset time, return continues to determine whether to surpass
The online stand-by period is spent, wherein, the first preset time can flexibly be set according to the actual requirements.
S208, when scan assigned catalogue under have return file when, read file, by file byte stream read in internal memory,
Shown according to receiving message format and disassembling the byte and flow to corresponding Excel fields.
When judging to have under assigned catalogue return file, file is read, by the byte stream reading internal memory in file, and according to
Receive message format and disassemble byte and flow to corresponding field and be shown.
Specifically, the one of which implementation of the step S103 in above-described embodiment is as shown in figure 3, including following step
Suddenly:
S301, the configuration parameter for receiving application server;
When the component that the offer communication interface that operating system is carried is loaded in VBS scripts carries out packet sending and receiving, receiving should
With the configuration parameter of server, wherein, the configuration parameter of application server includes server address, port, time-out time etc..
Whether S302, the corresponding port of test application server communicate normally;
Then judge whether the corresponding port of application server communicates normally.
S303, when the port communication of application server is normal, read send file, by send byte stream read in internal memory;
When the port communication of application server is normal, connection is further determined whether, when judging not connect, generation connects
The error information of failure is connect, when judging connection, further determines whether to be loaded with mswinsck.ocx components, if do not had
There is loading then to be loaded, after the completion of loading, read and send file, byte stream will be sent and read in internal memory.
S304, the port that byte stream is sent to application server;
Then byte stream is sent to the port of corresponding application server.
S305, wait application server are returned;
S306, judge wait application server return time it is whether overtime;
S307, when wait application server return time have not timed out when, judge whether to receive returning for application server
Return;
S308, when not receiving the return of application server, wait the second preset time after return to S306;
S309, when receiving the return of the application server, the byte stream received is written to specified file.
In summary, the present invention is based on Excel instruments, has used office VBA scripts and operating system
VBS scripts, which form one and can quickly organize bag, communication, gives out a contract for a project and the function such as decomposition data bag, group packet function read by VBA,
Splice data to realize, fixed length, LEN+DATA, the bag of 8583 types can be organized;Carried when giving out a contract for a project by call operation system
Mswinsck.ocx components realize the communication with network, are realized by VBA by the script perform function of operating system
The registration of WINSOCK controls and call, so as to realize the transmission and reception of data;The data of reception are write in specified file, VBA
Packet in file is included in Excel forms by field interception.
As shown in figure 4, be a kind of structural representation of the testing tool embodiment 1 based on Excel disclosed by the invention, this
Testing tool can include:
Module 401 is write, for writing VBA language in Excel, wherein, VBA language is to be held in multipad
The programming language of the general automation task of row;
When needing to do on-line transaction test, the Excel file for having finished writing VBA programs is opened, application service has been configured
The address and port of device and send and receive message field (MFLD) and fill out the corresponding value of transmission message field (MFLD).Wherein, VBA full name
For Visual Basic for Applications, it is a kind of Visual Basic macrolanguage, is that Microsoft is developed at it
The programming language of general automation task is performed in multipad.
Calling module 402, for the VBS scripts carried based on the VBA language call operating systems write, wherein, VBS pin
This is the script based on VB programming languages;
Then according to the VBS scripts that VBA language call operating systems are carried are write in Excel, wherein VBS full name is
It is that Microsoft Visual Basic Script Editon, VBS are the scripts based on Visual Basic.
Load-on module 403, the component for the offer communication interface that operating system is carried in VBS scripts carries out message receipts
Hair.
After have invoked the VBS scripts that operating system is carried, load what operating system was carried in VBS scripts
Mswinsck.ocx components, the communication interface message for calling the component to provide sends and receives.Wherein, mswinsck.ocx
It is the socket programming associated documents of Visual Basic language.
In summary, in the above-described embodiments, when needing to be traded test, opening has finished writing VBA programs
Excel file, has configured the address and port of application server and has sent and received message field (MFLD) and fill out transmission message word
The corresponding value of section.Wherein, VBA language is the programming language that general automation task is performed in multipad, then
The VBS scripts carried based on the VBA language call operating systems write, wherein, VBS scripts are the script based on VB programming languages
Language;The component that the offer communication interface that operating system is carried finally is loaded in VBS scripts carries out packet sending and receiving.It can realize
Tester carries out the tissue of test packet, transmission in Excel, reception, re-multiplexing is preserved, with convenient, directly perceived, sustainable
The advantages of change.
Specifically, the one of which implementation of load-on module in above-described embodiment as shown in figure 5, including:
Reading unit 501, the configuration parameter for reading application server;
When the component that the offer communication interface that operating system is carried is loaded in VBS scripts carries out packet sending and receiving, reading should
With the configuration parameter of server, wherein, the configuration parameter of application server includes server address, port, time-out time etc..
Component units 502, throttle for the field value of each in Excel to be sent into message binary word according to type composition;
Then each field value tester in Excel filled in, message binary system byte is sent according to type composition
Stream.
First writing unit 503, for binary word throttling to be written in file;
Then the binary word throttling of composition is written in file.
Transfer unit 504, for calling VBS scripts, VBS scripts are transferred to by the configuration parameter of application server;
Then VBS scripts are called, while application server address, port, time-out time are passed into the VBS scripts.
First judging unit 505, for judging whether to exceed the online stand-by period;
Then judge whether to exceed the online stand-by period, wherein the online stand-by period can be carried out flexibly according to the actual requirements
Setting.
Scanning element 506, for when not less than the online stand-by period, whether having return file under scanning assigned catalogue;
When judging not less than the online stand-by period, further whether there is return file under scanning assigned catalogue;Work as judgement
During more than the online stand-by period, time-out is received, tester is returned and receives time-out information.
First waits unit 507, for when scan whether have under assigned catalogue return the result of file for it is no when, wait the
Returned after one preset time and judge whether to exceed the online stand-by period;
When judging under assigned catalogue without file is returned, wait after the first preset time, return continues to determine whether to surpass
The online stand-by period is spent, wherein, the first preset time can flexibly be set according to the actual requirements.
Processing unit 508, for when there is return file under scanning assigned catalogue, file being read, by the byte in file
Stream reads in internal memory, is shown according to receiving message format and disassembling the byte and flow to corresponding Excel fields.
When judging to have under assigned catalogue return file, file is read, by the byte stream reading internal memory in file, and according to
Receive message format and disassemble byte and flow to corresponding field and be shown.
Specifically, the one of which implementation of the load-on module in above-described embodiment is as shown in fig. 6, including following step
Suddenly:
Receiving unit 601, the configuration parameter for receiving application server;
When the component that the offer communication interface that operating system is carried is loaded in VBS scripts carries out packet sending and receiving, receiving should
With the configuration parameter of server, wherein, the configuration parameter of application server includes server address, port, time-out time etc..
Test cell 602, for testing whether the corresponding port of application server communicates normally;
Then judge whether the corresponding port of application server communicates normally.
Unit 603 is read in, for when the port communication of application server is normal, reading and sending file, byte will be sent
Stream reads in internal memory;
When the port communication of application server is normal, connection is further determined whether, when judging not connect, generation connects
The error information of failure is connect, when judging connection, further determines whether to be loaded with mswinsck.ocx components, if do not had
There is loading then to be loaded, after the completion of loading, read and send file, byte stream will be sent and read in internal memory.
Transmitting element 604, the port for byte stream to be sent to application server;
Then byte stream is sent to the port of corresponding application server.
Unit 605 is waited, for waiting application server to return;
Whether the second judging unit 606, the time for judging to wait application server to return is overtime;
3rd judging unit 607, for when having not timed out the time for waiting application server to return, judging whether to receive
The return of application server;
3rd judging unit 608, for when not receiving the return of application server, being returned after waiting the second preset time
Return and wait application server to return;
Second writing unit 609, for when receiving the return of the application server, the byte stream received to be write
Enter to specified file.
In summary, the present invention is based on Excel instruments, has used office VBA scripts and operating system
VBS scripts, which form one and can quickly organize bag, communication, gives out a contract for a project and the function such as decomposition data bag, group packet function read by VBA,
Splice data to realize, fixed length, LEN+DATA, the bag of 8583 types can be organized;Carried when giving out a contract for a project by call operation system
Mswinsck.ocx components realize the communication with network, are realized by VBA by the script perform function of operating system
The registration of WINSOCK controls and call, so as to realize the transmission and reception of data;The data of reception are write in specified file, VBA
Packet in file is included in Excel forms by field interception.
In order to more specifically emphasize the independence implemented, this specification is related to number of modules or unit.For example, mould
Block or unit can be realized that the hardware circuit includes special VLSI circuits OR gate array, such as logic chip, crystal by hardware circuit
Pipe, or other components.Module or unit can also realize that such as field is imitated programmable gate array, can compiled in programmable computer hardware
Journey array logic, programmable logic device etc..
Module or unit can also be realized in by the software performed by various forms of processors.Such as, one can hold
Row code module may include one or more entities or logic computer instruction block, and the block is formed into, such as,
Object, program or function.However, the executable part of identification module or unit need not physically be put together, but can be by
The different instruction for being stored in diverse location is constituted, when combining in logic, is formed module or unit and is reached the module
Or the purpose required by unit.
In fact, executable code module or unit can be a single instruction or multiple instruction, it might even be possible to which distribution is in place
In several different code sections of different programs, and across several storage devices.Similarly, peration data can be identified and
It is shown in this module or unit, and can implements in any suitable form and in any suitable data structure form
Tissue.Peration data can assemble single data set, or can be distributed in the different positions with different storage devices, and
A system or network are only present in electronic signal mode at least in part.
" embodiment " or similar term mentioned by this specification represent characteristic, structure or the feature relevant with embodiment,
In at least embodiment for being included in the present invention.Therefore, this specification occurs term " in one embodiment ", " implementing
Example in " and similar term may but be not necessarily all sensing phase be the same as Example.
Furthermore, characteristic of the present invention, structure or feature can be combined in one or more embodiments in any way.
Explanation will provide many specific details below, such as programming, software module, user's selection, network trading, database are looked into
The examples such as inquiry, database structure, hardware module, hardware circuit, hardware chip, to provide the understanding to the embodiment of the present invention.So
And those of ordinary skill in the related art will be seen that the present invention, though wherein one or more specific details are not utilized, or profit
It can also be implemented with other methods, component, material etc..On the other hand, it is the present invention that avoids confusion, known structure, material or behaviour
Do not have a detailed description.
The embodiment of each in this specification is described by the way of progressive, what each embodiment was stressed be with it is other
Between the difference of embodiment, each embodiment identical similar portion mutually referring to.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or using the present invention.
A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention
The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one
The most wide scope caused.
Claims (10)
1. a kind of method of testing based on Excel, it is characterised in that including:
VBA language is write in the Excel, wherein, the VBA language be performed in multipad it is general automatic
The programming language of change task;
The VBS scripts carried based on the VBA language call operating systems write, wherein, the VBS scripts are to be compiled based on VB
Cheng Yuyan script;
The component that the offer communication interface that the operating system is carried is loaded in the VBS scripts carries out packet sending and receiving.
2. according to the method described in claim 1, it is characterised in that described to load the operating system in the VBS scripts
The component of the offer communication interface carried, which carries out packet sending and receiving, to be included:
Read the configuration parameter of application server;
Each field value in the Excel is sent into message binary word according to type composition to throttle;
Binary word throttling is written in file;
The VBS scripts are called, the configuration parameter of the application server is transferred to the VBS scripts;
Judge whether to exceed the online stand-by period;
When not less than the online stand-by period, whether there is return file under scanning assigned catalogue;
When there is return file under scanning assigned catalogue, the file is read, the byte stream in the file is read in into internal memory, pressed
Shown according to receiving message format and disassembling the byte and flow to corresponding Excel fields.
3. method according to claim 2, it is characterised in that when the result for whether having return file under scanning assigned catalogue
For it is no when, wait the first preset time after return judge whether exceed the online stand-by period.
4. method according to claim 3, it is characterised in that described to load the operating system in the VBS scripts
The component of the offer communication interface carried, which carries out packet sending and receiving, also to be included:
Receive the configuration parameter of the application server;
Test whether the corresponding port of the application server communicates normally;
When the port communication of the application server is normal, reads and send file, byte stream will be sent and read in internal memory;
The byte stream is sent to the port of the application server;
The application server is waited to return;
Judge whether the time for waiting the application server to return is overtime;
When having not timed out the time for waiting the application server to return, judge whether to receive returning for the application server
Return;
When receiving the return of the application server, the byte stream received is written to specified file.
5. method according to claim 3, it is characterised in that when not receiving the return of the application server, etc.
Judge whether the time that the wait application server is returned is overtime after being returned after the second preset time.
6. a kind of testing tool based on Excel, it is characterised in that including:
Module is write, for writing VBA language in the Excel, wherein, the VBA language is in multipad
Perform the programming language of general automation task;
Calling module, for the VBS scripts carried based on the VBA language call operating systems write, wherein, the VBS
Script is the script based on VB programming languages;
Load-on module, the component for loading the offer communication interface that the operating system is carried in the VBS scripts is carried out
Packet sending and receiving.
7. testing tool according to claim 6, it is characterised in that the load-on module includes:
Reading unit, the configuration parameter for reading application server;
Component units, throttle for each field value in the Excel to be sent into message binary word according to type composition;
First writing unit, for binary word throttling to be written in file;
Transfer unit, for calling the VBS scripts, the VBS scripts are transferred to by the configuration parameter of the application server;
First judging unit, for judging whether to exceed the online stand-by period;
Scanning element, for when not less than the online stand-by period, whether having return file under scanning assigned catalogue;
Processing unit, for when there is return file under scanning assigned catalogue, the file being read, by the byte in the file
Stream reads in internal memory, is shown according to receiving message format and disassembling the byte and flow to corresponding Excel fields.
8. testing tool according to claim 7, it is characterised in that return to file when whether having under scanning assigned catalogue
When being as a result no, in addition to:
First waits unit, judges whether to exceed the online stand-by period for waiting returning after the first preset time.
9. testing tool according to claim 8, it is characterised in that the load-on module also includes:
Receiving unit, the configuration parameter for receiving the application server;
Test cell, for testing whether the corresponding port of the application server communicates normally;
Unit is read in, for when the port communication of the application server is normal, reading and sending file, byte stream will be sent and read
Enter internal memory;
Transmitting element, the port for the byte stream to be sent to the application server;
Unit is waited, for waiting the application server to return;
Whether the second judging unit, the time for judging to wait the application server to return is overtime;
3rd judging unit, for when having not timed out the time for waiting the application server to return, judging whether to receive institute
State the return of application server;
Second writing unit, for when receiving the return of the application server, the byte stream received to be written into finger
Determine file.
10. testing tool according to claim 9, it is characterised in that when the return for not receiving the application server
When, in addition to:
3rd judging unit, judges that the time that the wait application server is returned is for waiting returning after the second preset time
No time-out.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710591850.7A CN107229481A (en) | 2017-07-19 | 2017-07-19 | A kind of testing method and tool based on Excel |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710591850.7A CN107229481A (en) | 2017-07-19 | 2017-07-19 | A kind of testing method and tool based on Excel |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107229481A true CN107229481A (en) | 2017-10-03 |
Family
ID=59956510
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710591850.7A Pending CN107229481A (en) | 2017-07-19 | 2017-07-19 | A kind of testing method and tool based on Excel |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107229481A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110262789A (en) * | 2019-06-26 | 2019-09-20 | 扬州大学 | A kind of Excel data statistical approach using statistics mathematic(al) function |
CN111177005A (en) * | 2019-12-31 | 2020-05-19 | 中国银行股份有限公司 | Service application testing method, device, server and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101944025A (en) * | 2010-09-16 | 2011-01-12 | 福建鑫诺通讯技术有限公司 | Automatic TCP/UDP (Transmission Control Protocol/User Datagram Protocol) data packing and unpacking method based on PYTHON language |
CN102609341A (en) * | 2011-07-08 | 2012-07-25 | 李康 | Hardware equipment automation testing system and testing method thereof |
CN102446090B (en) * | 2010-10-09 | 2014-01-29 | 金蝶软件(中国)有限公司 | Method and device for automatically generating test script |
CN106155906A (en) * | 2016-07-05 | 2016-11-23 | 中国银行股份有限公司 | A kind of bank main close beta system and method |
-
2017
- 2017-07-19 CN CN201710591850.7A patent/CN107229481A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101944025A (en) * | 2010-09-16 | 2011-01-12 | 福建鑫诺通讯技术有限公司 | Automatic TCP/UDP (Transmission Control Protocol/User Datagram Protocol) data packing and unpacking method based on PYTHON language |
CN102446090B (en) * | 2010-10-09 | 2014-01-29 | 金蝶软件(中国)有限公司 | Method and device for automatically generating test script |
CN102609341A (en) * | 2011-07-08 | 2012-07-25 | 李康 | Hardware equipment automation testing system and testing method thereof |
CN106155906A (en) * | 2016-07-05 | 2016-11-23 | 中国银行股份有限公司 | A kind of bank main close beta system and method |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110262789A (en) * | 2019-06-26 | 2019-09-20 | 扬州大学 | A kind of Excel data statistical approach using statistics mathematic(al) function |
CN111177005A (en) * | 2019-12-31 | 2020-05-19 | 中国银行股份有限公司 | Service application testing method, device, server and storage medium |
CN111177005B (en) * | 2019-12-31 | 2024-04-16 | 中国银行股份有限公司 | Service application testing method, device, server and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108334387B (en) | Dynamic interface rendering method and device | |
US7739693B2 (en) | Generic application program interface for native drivers | |
CN102164050B (en) | Log parsing method and log parsing node device | |
CN101431809B (en) | OBEX protocol bug excavation method and system | |
CN100367253C (en) | Method and system for expanding peripherals | |
CN101120323A (en) | System and method for testing devices | |
US20080155330A1 (en) | Methods and apparatus for debugging a workflow process | |
US7908522B2 (en) | Network card testing method | |
CN103003808A (en) | System and method for accessing resources of a PCI Express compliant device | |
CN111858296A (en) | Interface test method, device, equipment and storage medium | |
CN109726020A (en) | System docking method, system docking equipment, storage medium and device | |
CN107229481A (en) | A kind of testing method and tool based on Excel | |
US6105080A (en) | Host adapter DMA controller with automated host reply capability | |
CN115168341A (en) | Service processing method, system, medium and equipment | |
CN109635016A (en) | Data transfer device, device, equipment and computer readable storage medium | |
US6336590B1 (en) | Electronic funds transfer network test system | |
US20080021695A1 (en) | ROM emulator and ROM testing method using the same | |
Wheatcraft | 9.2. 2 everything you wanted to know about interfaces, but were afraid to ask | |
JP3422734B2 (en) | How to operate smart cards and card applications | |
CN112581257A (en) | Dispute service management method, system, device and medium supporting different card organizations | |
CN114969175A (en) | Method for butting insurance platform and external system and related equipment | |
CN111865726B (en) | Service message testing method, device, computer system and storage medium | |
CN1932760B (en) | System and method for execution of application program | |
CN112261072B (en) | Service calling method, device, equipment and storage medium | |
CN113392002A (en) | Test system construction method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171003 |
|
RJ01 | Rejection of invention patent application after publication |