In embodiment, project needs the process using automatized script to the project after completion for the first time or subsequent modification
It is tested accordingly, automatized script can successively be tested according to the sequence of node each in project.Wherein, project operation
When, i.e., during data transmitted one of user's input, test macro needs to carry out data the detection of different aspect,
The Data Detection point of these different aspects is node, has corresponding succession between each node.It is automatic in the present embodiment
Change includes normal direction flow and reversed process in script.Wherein, normal direction flow is using positive case testing process item destination field
Scape needs to meet input mode, the input data of project demand, and the test data for meeting process project demand is positive case
Example;Reversed process be the scene using reversed case testing process project, and the input mode and input data when test are discontented with
Sufficient project demand, the test data for being unsatisfactory for process project demand is reversed case.For example, system is wanted when tying up card operation
The effective card number for the bank for asking one system of input to support is bound, if the card number number and card number of the bank card of input
Length it is correct, then the input process is positive to process;If the card number number of the bank card of input or the length of card number
In have any difference, then the input process be reversed process.It include multiple nodes in process project, each node has sequence
Property, putting in order for each node is preset by developer.For test macro when testing process project, operation should
The corresponding automatized script of process project, while the process project is obtained according to the succession of each node and currently needs to carry out
The node to be measured of detection.Test macro needs to record the detection completeness of each node, shape when testing project
It is recorded at detection, to judge whether each node completes the detection of automatized script, i.e., whether node has used reversed process
Detection is completed, and is detection node by the vertex ticks for completing detection.Therefore, test macro can by inquiry detection record
Directly to judge whether current node to be measured is detection node.If the node to be measured is in detection record without corresponding
Detection data, then it is that detection node, this destination node have not carried out reversed process inspection also that test macro, which judges node to be measured not,
It surveys.Test macro calls the reversed process of automatized script, and reversed case is input in node to be measured and is tested.It is inputting
After reversed case, the node to be measured of project can respond reversed case and export corresponding feedback information, i.e., the first current response message.
Test macro is transferred the current node to be measured of the project from response database and corresponding first default is rung in reversed process
Information is answered, and it is compared with the first current response message, whether the content to judge the two is consistent.Wherein, first is pre-
If response message is the feedback information that the preset node to be measured of developer executes reversed process output.If current
Node to be measured be provided with multiple reversed sub-processes, then test macro needs simultaneously to believe response of each reversed sub-process
Breath, is compared with default response message corresponding in response database.If wherein there is one or more response to believe
Breath comparison is inconsistent, then it is abnormal to determine that node to be measured occurs.For example, system requirements inputs one and is when carrying out tying up card operation
The effective card number for the bank that system is supported is bound, if the card number number of the bank card of input is incorrect, the first default sound
Answer information for output: " correct card number please be re-enter ", and the first current response message are as follows: " directly pop-up bank card ".First
Current response message and the first default response message are inconsistent, then illustrate the node to be measured of the project after receiving reversed case
Made response is different from the expection of developer, which may be modified or be occurred others in the content of node to be measured
Mistake, developer need to be adjusted correspondingly project or automatized script as the case may be.For example, if it is to be measured
The default response message of the first of node is modified, then needs to adjust automatized script, and developer can be automated by modification
The first default response message of current node to be measured, makes the first default response message and the first current response message one in script
It causes, so that current node to be measured will not be judged to exception occur when carrying out automatic test;If it is project itself
Process occur mistake, then need to be adjusted project.If the first current response message and the first default response message one
It causes, then illustrates that the response made when executing reversed process of the current node to be measured of project is identical as expection.Test macro hair
Play detection request again, recirculate operation automatized script from the start node of the project, to each node of project according to
Sequence is successively detected, and is detection node by current vertex ticks to be measured, so as in loop test process next time
Middle operation normal direction flow.Wherein, start node is the first node of project.
Further, it is described judge the node to be measured whether be detection node the step of after, comprising:
S6: it if detection node, then calls the corresponding normal direction flow of the node to be measured to test the node to be measured, obtains
To the second current response message;
S7: judge whether the described second current response message is consistent with the second default response message, wherein described second is pre-
If response message is the feedback information that the preset node to be measured of developer executes normal direction flow output;
S8: if consistent with the second default response message, according to the succession of each node, judge the node to be measured
Whether be the process project end node, the end node be developer in advance in the process successful project bidding
The last one node detected of note;
S9: if the end node of the process project, then terminate to test.
In the present embodiment, test macro can record whether the node to be measured that directly judgement is current is to have detected by detection
Node.If node to be measured has corresponding detection data in detection record, test macro judges the node to be measured to have examined
Node is surveyed, and the normal direction flow of automatized script is called to detect node to be measured, positive case is input to node to be measured
In tested.After inputting positive case, the node to be measured of project can respond positive case and export corresponding feedback information, i.e.,
Second current response message.Test macro transfers the current node to be measured of the project in normal direction flow pair from response database
The default response message of second answered, and it is compared with the second current response message, with the content that both judges whether one
It causes.Wherein, the second default response message is the feedback letter that the preset node to be measured of developer executes normal direction flow output
Breath.If the second current response message and the second default response message are inconsistent, illustrate that the node to be measured of the project is being run
Made response is different from the expection of developer when normal direction flow, and others may be modified or be occurred to the content of the project
Mistake needs to be adjusted correspondingly project or automatized script as the case may be.For example, if it is the sound of node to be measured
It answers information to be modified, then needs to adjust automatized script;If it is project itself process occur mistake, then need to project into
Row adjustment.If the second current response message is consistent with the second default response message, descriptive item purpose node to be measured is being run
Made response is identical as expection when normal direction flow, and the node to be measured is normal.After test macro determines that node to be measured is normal, need
Judge node to be measured whether be the process project end node.Wherein, in process project of the end node for this,
The last one node detected that developer marks in advance.Since automatized script is detected to project
When, it is successively to be tested according to the sequence of node each in project.Meanwhile because the reversed process of automatized script to item
Destination node needs to initiate detection request again after being detected, therefore the first node in project is first to run automatized script
Reversed process after rerun normal direction flow, request is re-initiated again after completing reversed process, into next round detection.If
Test macro detects that current node to be measured is the end node of the project, then explanation is currently completed all to entire project
The test of positive, the reversed process of node, can terminate to test.If current node to be measured is not the end section of the project
Point then continues to run automatized script and detects to next node, guarantees automatized script in next node to be measured with this
All it is operation normal direction flow before, does not need to initiate detection request again, can run to next node to be measured, carries out reversed
The test of process.
Further, described to call the corresponding step for presetting node to be measured described in reversed flow testing of the node to be measured
Suddenly, comprising:
S301: judge whether the node to be measured is previously provided with more than one reversed sub-process, the reversed subflow
Journey is the automatized script in the difference of the node to be measured setting and negative testing process arranged side by side;
S302: if being previously provided with more than one reversed sub-process, each reversed sub-process is passed through into list respectively
Only thread detects the node to be measured, obtains the corresponding current response sub-information of each reversed sub-process;
S303: according to each current response sub-information, the first current response message is generated.
In the present embodiment, the respective nodes in project are provided with multiple regions module, and each region module can be held simultaneously
The different reversed case of row, i.e. node division have multiple reversed sub-processes.Each regions module is inputted for different reversed cases
When, according to being previously provided with different response modes.For example, when card is tied up in user's application, according to the process of project, in node to be measured
Card situation can be tied up in operating system background query, obtain different scenes: 1, not tying up card;2, it has tied up card but has tied up card not successfully;3,
Card is tied up.According to different scenes, the node to be measured of project has different response modes: 1, prompt operation user not yet ties up
Card;2, prompt operation user, which checks to tie up, snaps past whether journey malfunctions;3, prompt operation user has tied up card and has asked whether to enter next
Process.Therefore, according to the different response modes of item nodes, automatized script is provided with corresponding reversed sub-process, and to be measured
The different response modes of node are corresponding.Since automatized script is just write after the completion of project, test macro can
Directly to judge whether automatized script has divided more than one reversely in current node to be measured according to the information of preparatory typing
Sub-process.If test macro determines that automatized script has more than one reversed sub-process in node division to be measured, adjust simultaneously
With each reversed sub-process by corresponding individual threads, corresponding reversed sub- case is input in node to be measured, is obtained
Obtain the corresponding current response sub-information of each reversed sub-process.Test macro generates first and currently rings according to each response sub-information
Answer information.For example first include: response sub-information A, response sub-information B and response sub-information C in current response message, it is each to respond
Sub-information exists side by side.
Further, it is described judge the described first current response message whether the step identical as the first default response message
Later, comprising:
S10: if inconsistent with the first default response message, the exploitation information and test note of the node to be measured are obtained
Record;
S11: warning message is generated according to the exploitation information and test record, and the warning message is output to display
Interface.
In the present embodiment, test macro determines that the first current response message and the first default response message are inconsistent, then says
The response made when running reversed process of the current node to be measured of bright project is different from the expection of developer, the project
Other mistakes may be modified or be occurred to content, need to carry out process project or automatized script as the case may be corresponding
Adjustment.Therefore, test macro screens according to the exploitation information of the process project of preparatory typing and obtains current node to be measured
Corresponding exploitation information.For example, developer's information of the project, such as a total of 5 nodes of the project, wherein node to be measured
Developer for No. 3 nodes, and responsible No. 3 nodes is C, then test macro can export the corresponding information of developer C, such as
Contact method.Meanwhile test macro can obtain the test record of this test of node to be measured, then according to exploitation information and test
Record generates warning message, and warning message is output to the display interface of test macro, so that tester carries out accordingly
Processing.Further, test macro can send the warning message to current node pair to be measured according to developer's information
The mobile terminal of the developer answered, so that developer understands the test case of the current node to be measured of the project in time.
Further, the succession according to each node obtains the current node to be measured of the process project
The step of before, comprising:
S12: the project number of the process project is obtained;
S13: obtaining the corresponding automatized script of the project number from the script database constructed in advance, will be described
Automatized script is used for the detection of the process project, is stored with automatized script and project number in the script database
Mapping table.
Default script bank is built in the present embodiment, in test macro.Wherein, it presets in script bank and is stored with automation foot
Sheet and project number mapping table, to show each automatized script being associated between respective items purpose project number respectively
Relationship, so that the later period can call directly corresponding automatized script according to project number when testing.For example, No. 1 item
Mesh is associated with No. 1 automatized script.Test macro needs to obtain the item of the project before testing process project
Mesh number, then matches from default script bank according to project number and obtains corresponding automatized script, by automatized script
For the detection of the process project,
Further, after the step of end is tested, comprising:
S14: the corresponding test record of each node in the process project is obtained;
S15: each test record of parsing obtains the corresponding runnability of each node in the process project.
In the present embodiment, after test macro is completed to the test of all nodes of project, it can run certainly according to each node
The various data such as response message and response speed when dynamicization script form the test record to entire project.Wherein, test note
Test data when record includes normal direction flow and reversed process in each node operation automatized script.Test macro is according to test
Record can automatically analyze out the test performance of each node in project, for example, the response message of the normal direction flow of No. 1 node is just
Really, during response speed is, the response message of reversed process is correct, and response speed is slow;The response of the normal direction flow of No. 2 nodes is believed
Cease mistake, response speed be it is slow, the response message of reversed process is correct, and response speed is fast.Tester can be according to test
The test performance of each node after network analysis judges whether to need to link up with the developer of the project, to each node
It is adjusted correspondingly.For example, the response speed of the normal direction flow of No. 1 node be it is slow, need developer to modify it
Adjustment, make its response speed be at least in.
Further, the test record includes mistake letter of the node to be measured when running the automatized script
Breath, after the described the step of warning message is output to display interface, comprising:
S16: the errors number of the node to be measured is updated according to the error message;
S17: judge whether the errors number is greater than preset times;
S18: if more than preset times, then the corresponding test record of node to be measured and updated errors number are sent out
It is sent to default terminal.
In the present embodiment, test macro determine the first current response message and the first default response message it is inconsistent there are two types of
Situation, one is developers to have modified first default response message of the current node to be measured when running reversed process, leads
Cause test macro obtains when running automatized script the first current response message and the first default response message inconsistent;Separately
It is a kind of, it is the internal data error of current node to be measured, automatized script operation will lead to whole system at this time everywhere and block
It can not continue to run down, test macro will record the error message of the node to be measured at this time.There is each record in test macro
The corresponding errors number of node can automatically update current when including error message in the warning message of test macro output
The corresponding errors number of node to be measured.Meanwhile test macro calls preset times, which is set by tester oneself
It is fixed, need the relevant test data by node to be measured to be sent to default terminal for judging whether.Test macro is by node to be measured
Updated errors number is compared with preset times, to judge size relation between the two.If updated mistake
Number is greater than preset times, then by the test file of node to be measured, errors number is sent to default terminal to test macro.Its
In, default terminal has tester to preset, and can be the connection terminal of the technical adviser of the project, so as in node to be measured
It can be adjusted in time after there is repeatedly mistake.
A kind of process project testing method based on automatized script provided in this embodiment, wherein automatized script
In be provided with normal direction flow and reversed process.When testing process project process, before current node to be measured
Remaining node executes normal direction flow, and current node to be measured executes reversed process, and re-initiates survey after executing reversed process
Examination request.After remaining node not detected for circuiting sequentially traversal process project, realize automatized script to whole flow process
Property item nodes complete covering improve the complete of item detection so that each node can complete the detection of forward and reverse process
Property, corresponding modification is carried out according to the change of item nodes convenient for the later period.
Referring to Fig. 2, a kind of process project testing dress based on automatized script is additionally provided in one embodiment of the application
It sets, the automatized script includes reversed process and normal direction flow, and the reversed process is to test the stream using reversed case
The scene of journey project, the normal direction flow are the scene that the process project is tested using positive case, the reversed case
Example is not meet the test data of the process project demand, and the forward direction case is to meet the process project demand
Test data, the process project include multiple nodes, and each node has succession, and the test device includes:
First obtains module 1, for the succession according to each node, obtains current to be measured of the process project
Node;
First judgment module 2, for judging whether the node to be measured is that detection node, the detection node have been to make
The node of detection is completed with the reversed process, the first current response message is that the node to be measured is transported according to reversed process
The feedback information exported after row;
First test module 3 is obtained for calling node to be measured described in the corresponding reversed flow testing of the node to be measured
First current response message;
Second judgment module 4, for judging whether the described first current response message is identical as the first default response message,
Wherein, the described first default response message is that the preset node to be measured of developer executes the anti-of reversed process output
Feedforward information;
Mark module 5, for being detected since the start node of the process project, and by the vertex ticks to be measured
For detection node, wherein the start node is developer in advance in first need of process successful project bidding note
The node detected.
In embodiment, project needs the process using automatized script to the project after completion for the first time or subsequent modification
It is tested accordingly, automatized script can successively be tested according to the sequence of node each in project.Wherein, project operation
When, i.e., during data transmitted one of user's input, test macro needs to carry out data the detection of different aspect,
The Data Detection point of these different aspects is node, has corresponding succession between each node.It is automatic in the present embodiment
Change includes normal direction flow and reversed process in script.Wherein, normal direction flow is using positive case testing process item destination field
Scape needs to meet input mode, the input data of project demand, and the test data for meeting process project demand is positive case
Example;Reversed process be the scene using reversed case testing process project, and the input mode and input data when test are discontented with
Sufficient project demand, the test data for being unsatisfactory for process project demand is reversed case.For example, system is wanted when tying up card operation
The effective card number for the bank for asking one system of input to support is bound, if the card number number and card number of the bank card of input
Length it is correct, then the input process is positive to process;If the card number number of the bank card of input or the length of card number
In have any difference, then the input process be reversed process.It include multiple nodes in process project, each node has sequence
Property, putting in order for each node is preset by developer.For test macro when testing process project, operation should
The corresponding automatized script of process project, while the process project is obtained according to the succession of each node and currently needs to carry out
The node to be measured of detection.Test macro needs to record the detection completeness of each node, shape when testing project
It is recorded at detection, to judge whether each node completes the detection of automatized script, i.e., whether node has used reversed process
Detection is completed, and is detection node by the vertex ticks for completing detection.Therefore, test macro can by inquiry detection record
Directly to judge whether current node to be measured is detection node.If the node to be measured is in detection record without corresponding
Detection data, then it is that detection node, this destination node have not carried out reversed process inspection also that test macro, which judges node to be measured not,
It surveys.Test macro calls the reversed process of automatized script, and reversed case is input in node to be measured and is tested.It is inputting
After reversed case, the node to be measured of project can respond reversed case and export corresponding feedback information, i.e., the first current response message.
Test macro is transferred the current node to be measured of the project from response database and corresponding first default is rung in reversed process
Information is answered, and it is compared with the first current response message, whether the content to judge the two is consistent.Wherein, if worked as
Preceding node to be measured is provided with multiple reversed sub-processes, then test macro needs simultaneously to believe response of each reversed sub-process
Breath, is compared with default response message corresponding in response database.If wherein there is one or more response to believe
Breath comparison is inconsistent, then it is abnormal to determine that node to be measured occurs.For example, system requirements inputs one and is when carrying out tying up card operation
The effective card number for the bank that system is supported is bound, if the card number number of the bank card of input is incorrect, the first default sound
Answer information for output: " correct card number please be re-enter ", and the first current response message are as follows: " directly pop-up bank card ".First
Current response message and the first default response message are inconsistent, then illustrate the node to be measured of the project after receiving reversed case
Made response is different from the expection of developer, which may be modified or be occurred others in the content of node to be measured
Mistake, developer need to be adjusted correspondingly project or automatized script as the case may be.For example, if it is to be measured
The default response message of the first of node is modified, then needs to adjust automatized script, and developer can be automated by modification
The first default response message of current node to be measured, makes the first default response message and the first current response message one in script
It causes, so that current node to be measured will not be judged to exception occur when carrying out automatic test;If it is project itself
Process occur mistake, then need to be adjusted project.If the first current response message and the first default response message one
It causes, then illustrates that the response made when executing reversed process of the current node to be measured of project is identical as expection.Test macro hair
Play detection request again, recirculate operation automatized script from the start node of the project, to each node of project according to
Sequence is successively detected, and is detection node by current vertex ticks to be measured, so as in loop test process next time
Middle operation normal direction flow.Wherein, start node is the first node of project.
Further, the test device further include:
Second test module 6 is obtained for calling the corresponding normal direction flow of the node to be measured to test the node to be measured
Second current response message;
Third judgment module 7, for judging whether the described second current response message is consistent with the second default response message,
Wherein, the described second default response message is that the preset node to be measured of developer executes the anti-of normal direction flow output
Feedforward information;
4th judgment module 8 judges whether the node to be measured is the stream for the succession according to each node
The end node of journey project, the end node be developer in advance the process successful project bidding note the last one
The node detected;
Module 9 is terminated, for terminating test.
In the present embodiment, test macro can record whether the node to be measured that directly judgement is current is to have detected by detection
Node.If node to be measured has corresponding detection data in detection record, test macro judges the node to be measured to have examined
Node is surveyed, and the normal direction flow of automatized script is called to detect node to be measured, positive case is input to node to be measured
In tested.After inputting positive case, the node to be measured of project can respond positive case and export corresponding feedback information, i.e.,
Second current response message.Test macro transfers the current node to be measured of the project in normal direction flow pair from response database
The default response message of second answered, and it is compared with the second current response message, with the content that both judges whether one
It causes.If the second current response message and the second default response message are inconsistent, illustrate that the node to be measured of the project is being run
Made response is different from the expection of developer when normal direction flow, and others may be modified or be occurred to the content of the project
Mistake needs to be adjusted correspondingly project or automatized script as the case may be.For example, if it is the sound of node to be measured
It answers information to be modified, then needs to adjust automatized script;If it is project itself process occur mistake, then need to project into
Row adjustment.If the second current response message is consistent with the second default response message, descriptive item purpose node to be measured is being run
Made response is identical as expection when normal direction flow, and the node to be measured is normal.After test macro determines that node to be measured is normal, need
Judge node to be measured whether be the process project end node.Wherein, in process project of the end node for this,
The last one node detected that developer marks in advance.Since automatized script is detected to project
When, it is successively to be tested according to the sequence of node each in project.Meanwhile because the reversed process of automatized script to item
Destination node needs to initiate detection request again after being detected, therefore the first node in project is first to run automatized script
Reversed process after rerun normal direction flow, request is re-initiated again after completing reversed process, into next round detection.If
Test macro detects that current node to be measured is the end node of the project, then explanation is currently completed all to entire project
The test of positive, the reversed process of node, can terminate to test.If current node to be measured is not the end section of the project
Point then continues to run automatized script and detects to next node, guarantees automatized script in next node to be measured with this
All it is operation normal direction flow before, does not need to initiate detection request again, can run to next node to be measured, carries out reversed
The test of process.
Further, first test module 3, comprising:
Judging unit, it is described for judging whether the node to be measured is previously provided with more than one reversed sub-process
Reversed sub-process is the automatized script in the difference of the node setting to be measured and negative testing process arranged side by side;
Detection unit examines the node to be measured for each reversed sub-process to be passed through individual threads respectively
It surveys, obtains the corresponding current response sub-information of each reversed sub-process;
Generation unit, for generating the first current response message according to each current response sub-information.
In the present embodiment, the respective nodes in project are provided with multiple regions module, and each region module can be held simultaneously
The different reversed case of row, i.e. node division have multiple reversed sub-processes.Each regions module is inputted for different reversed cases
When, according to being previously provided with different response modes.For example, when card is tied up in user's application, according to the process of project, in node to be measured
Card situation can be tied up in operating system background query, obtain different scenes: 1, not tying up card;2, it has tied up card but has tied up card not successfully;3,
Card is tied up.According to different scenes, the node to be measured of project has different response modes: 1, prompt operation user not yet ties up
Card;2, prompt operation user, which checks to tie up, snaps past whether journey malfunctions;3, prompt operation user has tied up card and has asked whether to enter next
Process.Therefore, according to the different response modes of item nodes, automatized script is provided with corresponding reversed sub-process, and to be measured
The different response modes of node are corresponding.Since automatized script is just write after the completion of project, test macro can
Directly to judge whether automatized script has divided more than one reversely in current node to be measured according to the information of preparatory typing
Sub-process.If test macro determines that automatized script has more than one reversed sub-process in node division to be measured, adjust simultaneously
With each reversed sub-process by corresponding individual threads, corresponding reversed sub- case is input in node to be measured, is obtained
Obtain the corresponding current response sub-information of each reversed sub-process.Test macro generates first and currently rings according to each response sub-information
Answer information.For example first include: response sub-information A, response sub-information B and response sub-information C in current response message, it is each to respond
Sub-information exists side by side.
Further, the test device further include:
Second obtains module 10, for obtaining the exploitation information and test record of the node to be measured;
Output module 11, for according to the exploitation information and test record generation warning message, and by the alarm signal
Breath is output to display interface.
In the present embodiment, test macro determines that the first current response message and the first default response message are inconsistent, then says
The response made when running reversed process of the current node to be measured of bright project is different from the expection of developer, the project
Other mistakes may be modified or be occurred to content, need to carry out process project or automatized script as the case may be corresponding
Adjustment.Therefore, test macro screens according to the exploitation information of the process project of preparatory typing and obtains current node to be measured
Corresponding exploitation information.For example, developer's information of the project, such as a total of 5 nodes of the project, wherein node to be measured
Developer for No. 3 nodes, and responsible No. 3 nodes is C, then test macro can export the corresponding information of developer C, such as
Contact method.Meanwhile test macro can obtain the test record of this test of node to be measured, then according to exploitation information and test
Record generates warning message, and warning message is output to the display interface of test macro, so that tester carries out accordingly
Processing.Further, test macro can send the warning message to current node pair to be measured according to developer's information
The mobile terminal of the developer answered, so that developer understands the test case of the current node to be measured of the project in time.
Further, the test device further include:
Third obtains module 12, for obtaining the project number of the process project;
4th obtains module 13, corresponding automatic for obtaining the project number from the script database constructed in advance
Change script, the automatized script is used for the detection of the process project, is stored in the script database automatic
Change script and project number mapping table.
Default script bank is built in the present embodiment, in test macro.Wherein, it presets in script bank and is stored with automation foot
Sheet and project number mapping table, to show each automatized script being associated between respective items purpose project number respectively
Relationship, so that the later period can call directly corresponding automatized script according to project number when testing.For example, No. 1 item
Mesh is associated with No. 1 automatized script.Test macro needs to obtain the item of the project before testing process project
Mesh number, then matches from default script bank according to project number and obtains corresponding automatized script.Test macro operation should
Automatized script is tested since the first node of project, automatized script is used for the detection of process project.
Further, the test device further include:
5th obtains module 14, for obtaining the corresponding test record of each node in the process project;
Parsing module 15 obtains the corresponding fortune of each node in the process project for parsing each test record
Row performance.
In the present embodiment, after test macro is completed to the test of all nodes of project, it can run certainly according to each node
The various data such as response message and response speed when dynamicization script form the test record to entire project.Wherein, test note
Test data when record includes normal direction flow and reversed process in each node operation automatized script.Test macro is according to test
Record can automatically analyze out the test performance of each node in project, for example, the response message of the normal direction flow of No. 1 node is just
Really, during response speed is, the response message of reversed process is correct, and response speed is slow;The response of the normal direction flow of No. 2 nodes is believed
Cease mistake, response speed be it is slow, the response message of reversed process is correct, and response speed is fast.Tester can be according to test
The test performance of each node after network analysis judges whether to need to link up with the developer of the project, to each node
It is adjusted correspondingly.For example, the response speed of the normal direction flow of No. 1 node be it is slow, need developer to modify it
Adjustment, make its response speed be at least in.
Further, the test device further include:
Update module 16, for updating the errors number of the node to be measured according to the error message;
5th judgment module 17, for judging whether the errors number is greater than preset times;
Sending module 18, it is pre- for sending the corresponding test record of node to be measured and updated errors number to
If terminal.
In the present embodiment, test macro determine the first current response message and the first default response message it is inconsistent there are two types of
Situation, one is developers to have modified first default response message of the current node to be measured when running reversed process, leads
Cause test macro obtains when running automatized script the first current response message and the first default response message inconsistent;Separately
It is a kind of, it is the internal data error of current node to be measured, automatized script operation will lead to whole system at this time everywhere and block
It can not continue to run down, test macro will record the error message of the node to be measured at this time.There is each record in test macro
The corresponding errors number of node can automatically update current when including error message in the warning message of test macro output
The corresponding errors number of node to be measured.Meanwhile test macro calls preset times, which is set by tester oneself
It is fixed, need the relevant test data by node to be measured to be sent to default terminal for judging whether.Test macro is by node to be measured
Updated errors number is compared with preset times, to judge size relation between the two.If updated mistake
Number is greater than preset times, then by the test file of node to be measured, errors number is sent to default terminal to test macro.Its
In, default terminal has tester to preset, and can be the connection terminal of the technical adviser of the project, so as in node to be measured
It can be adjusted in time after there is repeatedly mistake.
A kind of process project testing device based on automatized script provided in this embodiment, wherein automatized script
In be provided with normal direction flow and reversed process.When testing process project process, before current node to be measured
Remaining node executes normal direction flow, and current node to be measured executes reversed process, and re-initiates survey after executing reversed process
Examination request.After remaining node not detected for circuiting sequentially traversal process project, realize automatized script to whole flow process
Property item nodes complete covering improve the complete of item detection so that each node can complete the detection of forward and reverse process
Property, corresponding modification is carried out according to the change of item nodes convenient for the later period.
Referring to Fig. 3, a kind of computer equipment is also provided in the embodiment of the present application, which can be server,
Its internal structure can be as shown in Figure 3.The computer equipment includes processor, the memory, network connected by system bus
Interface and database.Wherein, the processor of the Computer Design is for providing calculating and control ability.The computer equipment is deposited
Reservoir includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program
And database.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.
The database of the computer equipment is for storing the data such as script database.The network interface of the computer equipment is used for and outside
Terminal by network connection communication.To realize a kind of stream based on automatized script when the computer program is executed by processor
Journey project testing method.
Above-mentioned processor executes the step of above-mentioned process project testing method based on automatized script: the automation
Script includes reversed process and normal direction flow, and the reversed process is to test the process item destination field using reversed case
Scape, the normal direction flow are the scene that the process project is tested using positive case, and the reversed case is does not meet
The test data of process project demand is stated, the forward direction case is to meet the test data of the process project demand, institute
Stating process project includes multiple nodes, and each node has succession, and the test method includes:
S1: according to the succession of each node, the current node to be measured of the process project is obtained;
S2: judge whether the node to be measured is that detection node, the detection node have been to use the reversed process
Complete the node of detection;
S3: if not detection node, then call node to be measured described in the corresponding reversed flow testing of the node to be measured,
Obtain the first current response message, the first current response message is the node to be measured according to exporting after reversed process flow operation
Feedback information;
S4: judge whether the described first current response message is identical as the first default response message, wherein described first is pre-
If response message is the feedback information that the preset node to be measured of developer executes reversed process output;
S5: if identical as the first default response message, detecting since the start node of the process project, and will
The vertex ticks to be measured is detection node, wherein the start node is developer in advance in the process project
First node detected of middle label.
Further, it is described judge the node to be measured whether be detection node the step of after, comprising:
S6: it if detection node, then calls the corresponding normal direction flow of the node to be measured to test the node to be measured, obtains
To the second current response message;
S7: judge whether the described second current response message is consistent with the second default response message, wherein described second is pre-
If response message is the feedback information that the preset node to be measured of developer executes normal direction flow output;
S8: if consistent with the second default response message, according to the succession of each node, judge the node to be measured
Whether be the process project end node, the end node be developer in advance in the process successful project bidding
The last one node detected of note;
S9: if the end node of the process project, then terminate to test.
Further, described to call the corresponding step for presetting node to be measured described in reversed flow testing of the node to be measured
Suddenly, comprising:
S301: judge whether the node to be measured is previously provided with more than one reversed sub-process, the reversed subflow
Journey is the automatized script in the difference of the node to be measured setting and negative testing process arranged side by side;
S302: if being previously provided with more than one reversed sub-process, each reversed sub-process is passed through into list respectively
Only thread detects the node to be measured, obtains the corresponding current response sub-information of each reversed sub-process;
S303: according to each current response sub-information, the first current response message is generated.
Further, it is described judge the described first current response message whether the step identical as the first default response message
Later, comprising:
S10: if inconsistent with the first default response message, the exploitation information and test note of the node to be measured are obtained
Record;
S11: warning message is generated according to the exploitation information and test record, and the warning message is output to display
Interface.
Further, the succession according to each node obtains the current node to be measured of the process project
The step of before, comprising:
S12: the project number of the process project is obtained;
S13: obtaining the corresponding automatized script of the project number from the script database constructed in advance, will be described
Automatized script is used for the detection of the process project, is stored with automatized script and project number in the script database
Mapping table.
Further, after the step of end is tested, comprising:
S14: the corresponding test record of each node in the process project is obtained;
S15: each test record of parsing obtains the corresponding runnability of each node in the process project.
Further, the test record includes mistake letter of the node to be measured when running the automatized script
Breath, after the described the step of warning message is output to display interface, comprising:
S16: the errors number of the node to be measured is updated according to the error message;
S17: judge whether the errors number is greater than preset times;
S18: if more than preset times, then the corresponding test record of node to be measured and updated errors number are sent out
It is sent to default terminal.
One embodiment of the application also provides a kind of computer readable storage medium, is stored thereon with computer program, calculates
Machine program realizes a kind of process project testing method based on automatized script when being executed by processor, specifically: it is described from
Dynamicization script includes reversed process and normal direction flow, and the reversed process is to test the process project using reversed case
Scene, the normal direction flow are the scene that the process project is tested using positive case, and the reversed case is not meet
The test data of the process project demand, the forward direction case is to meet the test data of the process project demand,
The process project includes multiple nodes, and each node has succession, and the test method includes:
S1: according to the succession of each node, the current node to be measured of the process project is obtained;
S2: judge whether the node to be measured is that detection node, the detection node have been to use the reversed process
Complete the node of detection;
S3: if not detection node, then call node to be measured described in the corresponding reversed flow testing of the node to be measured,
Obtain the first current response message, the first current response message is the node to be measured according to exporting after reversed process flow operation
Feedback information;
S4: judge whether the described first current response message is identical as the first default response message, wherein described first is pre-
If response message is the feedback information that the preset node to be measured of developer executes reversed process output;
S5: if identical as the first default response message, detecting since the start node of the process project, and will
The vertex ticks to be measured is detection node, wherein the start node is developer in advance in the process project
First node detected of middle label.
Further, it is described judge the node to be measured whether be detection node the step of after, comprising:
S6: it if detection node, then calls the corresponding normal direction flow of the node to be measured to test the node to be measured, obtains
To the second current response message;
S7: judge whether the described second current response message is consistent with the second default response message, wherein described second is pre-
If response message is the feedback information that the preset node to be measured of developer executes normal direction flow output;
S8: if consistent with the second default response message, according to the succession of each node, judge the node to be measured
Whether be the process project end node, the end node be developer in advance in the process successful project bidding
The last one node detected of note;
S9: if the end node of the process project, then terminate to test.
Further, described to call the corresponding step for presetting node to be measured described in reversed flow testing of the node to be measured
Suddenly, comprising:
S301: judge whether the node to be measured is previously provided with more than one reversed sub-process, the reversed subflow
Journey is the automatized script in the difference of the node to be measured setting and negative testing process arranged side by side;
S302: if being previously provided with more than one reversed sub-process, each reversed sub-process is passed through into list respectively
Only thread detects the node to be measured, obtains the corresponding current response sub-information of each reversed sub-process;
S303: according to each current response sub-information, the first current response message is generated.
Further, it is described judge the described first current response message whether the step identical as the first default response message
Later, comprising:
S10: if inconsistent with the first default response message, the exploitation information and test note of the node to be measured are obtained
Record;
S11: warning message is generated according to the exploitation information and test record, and the warning message is output to display
Interface.
Further, the succession according to each node obtains the current node to be measured of the process project
The step of before, comprising:
S12: the project number of the process project is obtained;
S13: obtaining the corresponding automatized script of the project number from the script database constructed in advance, will be described
Automatized script is used for the detection of the process project, is stored with automatized script and project number in the script database
Mapping table.
Further, after the step of end is tested, comprising:
S14: the corresponding test record of each node in the process project is obtained;
S15: each test record of parsing obtains the corresponding runnability of each node in the process project.
Further, the test record includes mistake letter of the node to be measured when running the automatized script
Breath, after the described the step of warning message is output to display interface, comprising:
S16: the errors number of the node to be measured is updated according to the error message;
S17: judge whether the errors number is greater than preset times;
S18: if more than preset times, then the corresponding test record of node to be measured and updated errors number are sent out
It is sent to default terminal.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the computer program can store and a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,
Any reference used in provided herein and embodiment to memory, storage, database or other media,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM can by diversified forms
, such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double speed are according to rate SDRAM (SSRSDRAM), increasing
Strong type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, device, article or the method that include a series of elements not only include those elements, and
And further include the other elements being not explicitly listed, or further include for this process, device, article or method institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, device of element, article or method.
The foregoing is merely preferred embodiment of the present application, are not intended to limit the scope of the patents of the application, all utilizations
Equivalent structure or equivalent flow shift made by present specification and accompanying drawing content is applied directly or indirectly in other correlations
Technical field, similarly include in the scope of patent protection of the application.