CN109783368A - Trapezoidal pattern programming software testing system and method - Google Patents
Trapezoidal pattern programming software testing system and method Download PDFInfo
- Publication number
- CN109783368A CN109783368A CN201811563422.4A CN201811563422A CN109783368A CN 109783368 A CN109783368 A CN 109783368A CN 201811563422 A CN201811563422 A CN 201811563422A CN 109783368 A CN109783368 A CN 109783368A
- Authority
- CN
- China
- Prior art keywords
- test
- trapezoidal pattern
- programming software
- ladder diagram
- pattern programming
- 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
Abstract
The present invention provides a kind of trapezoidal pattern programming software testing system and methods, the system includes test case library, trapezoidal pattern programming software interface test module, ladder diagram functional test module, at least one test profile and at least one test configurations module, test case library, trapezoidal pattern programming software interface test module, ladder diagram functional test module are stored on the server, and test profile and test configurations module are stored on numerical control device and store a test profile and a test configurations module on every numerical control device;It include multiple trapezoidal pattern programming software interface test cases and multiple ladder diagram functional test use-cases in the test case library;It include test-types and test case name in the test profile.The present invention improves test job efficiency, ensure that software quality, solves and utilizes the problems such as test of manual test bring is not comprehensive, test job amount is big, test result is inaccurate merely.
Description
Technical field
The present invention relates to fields of numeric control technique more particularly to a kind of trapezoidal pattern programming software testing system and methods.
Background technique
As digital control system is intelligent, web development, trapezoidal pattern programming software is played the part of increasingly heavier in digital control system
The effect wanted.The reliability of trapezoidal pattern programming software directly determines safety when user uses digital control system, once ladder diagram
The reliability of programming software, which goes wrong, may generate serious safety accident.Therefore any trapezoidal pattern programming software version exists
Before publication, it is necessary to carry out abundant, effective trapezoidal pattern programming modular testing.
Current trapezoidal pattern programming module testing needs tester to wait in test equipment substantially by manually completing
Preceding execution operations.This brings several difficult points to test job: test job amount is big, and test period is long;Everyone is for function
It can understand, inconsistent phenomenon occurs in failure-description;When digital control system trapezoidal pattern programming module increases new function, will do it a large amount of
Retest work.For test, even if putting into a large amount of manpower and material resources, many times covering surface is inadequate.
Existing maturation automatic test software is mostly the software under windows environment, and cannot be compiled to ladder diagram
Journey module is tested, and still belongs to the market vacancy for embedded automatic test software, is especially lacked on numerical control device
Trapezoidal pattern programming automatization test system, this brings very big difficulty to trapezoidal pattern programming test job.
Summary of the invention
The purpose of the present invention is to provide a kind of trapezoidal pattern programming software testing system and methods, it is intended to existing for solving
Trapezoidal pattern programming module testing by manually completing, test not comprehensively, test job amount is big, test result is inaccurate asks
Topic, to fill up the blank of trapezoidal pattern programming software automated testing.
The present invention is implemented as follows:
On the one hand, the present invention provides a kind of trapezoidal pattern programming software testing system, including test case library, trapezoidal pattern programming
Software interface test module, ladder diagram functional test module, at least one test profile and at least one test configurations mould
Block, the test case library, the trapezoidal pattern programming software interface test module, the ladder diagram functional test module are stored
On the server, the test profile and the test configurations module are stored on numerical control device and every numerical control fills
Set one test profile of storage and a test configurations module;
It include that multiple trapezoidal pattern programming software interface test cases and multiple ladder diagram functions are surveyed in the test case library
Example on probation;
It include test-types and test case name in the test profile;
The trapezoidal pattern programming software interface test module is used to obtain trapezoidal pattern programming software from test profile
Interface detection use-case name successively sequentially executes trapezoidal pattern programming software from test case library according to test case name and its sequence
Interface detection use-case, after the completion of all trapezoidal pattern programming software interface testing cases, statistical test is as a result, and be written test
Destination file;
The ladder diagram functional test module is used to obtain ladder diagram functional test use-case name, root from test profile
According to test case name and its sequence, ladder diagram functional test use-case, all ladder diagram function are successively sequentially executed from test case library
After the completion of energy testing case, statistical test is as a result, and be written test result file;
The test configurations module is used for read test configuration file, when wherein test-types are trapezoidal pattern programming software circle
When face is tested, trapezoidal pattern programming software interface test module is downloaded from server and is run, test result file is generated;When wherein
When test-types are ladder diagram functional test, ladder diagram functional test module is downloaded from server and is run, test result is generated
File.
Further, each trapezoidal pattern programming software interface test case includes the test of trapezoidal pattern programming software interface
Use-case title, trapezoidal pattern programming software interface test script and trapezoidal pattern programming software interface data check file;
The trapezoidal pattern programming software interface test module executes trapezoidal pattern programming software interface test case and specifically includes:
The trapezoidal pattern programming software interface test script in trapezoidal pattern programming software interface test case is parsed, every parsing a line obtains
Marking keys symbol and delay time, and it is sent to digital control system, digital control system carries out not according to different marking keys symbols
Same processing pauses set delay time after each marking keys symbol operation, identifies subsequently into next keyboard
The processing of symbol;The processing result of digital control system is received, trapezoidal pattern programming software interface data check file is compareed, compares inspection line by line
Look into item correspond to parameter actual value and theoretical value it is whether identical, if all the same, be successfully tested, otherwise test crash, and will
Test result file is written in test result.
Further, each ladder diagram functional test use-case includes ladder diagram functional test use-case title, ladder diagram function
Test script and ladder diagram functional test data check file;
The ladder diagram functional test module executes ladder diagram functional test use-case and specifically includes: by ladder diagram functional test
Script is loaded into digital control system, and sends operating instruction to digital control system, runs ladder diagram functional test foot by digital control system
This;The processing result of digital control system is received, compares ladder diagram functional test data check file, comparand register value is current line by line
Actual value it is whether identical as corresponding theoretical value, if all the same, be successfully tested, otherwise test crash, and will test knot
Test result file is written in fruit.
Further, the test result of the trapezoidal pattern programming software interface test module statistics includes the ladder of this test
Shape figure programming software interface detection use-case number, successful trapezoidal pattern programming software interface test case number, failure it is trapezoidal
Figure programming software interface detection use-case number, the trapezoidal pattern programming software interface test case title and success rate of failure;
The test result of the ladder diagram functional test module statistics includes the ladder diagram functional test use-case of this test
Number, successful ladder diagram functional test use-case number, the ladder diagram functional test use-case number of failure, the ladder diagram function to fail
It can test case title and success rate.
It further, further include mobile terminal, for receiving the test result of server transport.
On the other hand, the present invention also provides a kind of trapezoidal pattern programming method for testing software should based on above-mentioned test macro
Method the following steps are included:
S1, test configurations module read test configuration file, when wherein test-types are the survey of trapezoidal pattern programming software interface
When examination, trapezoidal pattern programming software interface test module is downloaded from server and executes step S2, when wherein test-types are trapezoidal
When figure functional test, ladder diagram functional test module is downloaded from server and executes step S3;
S2, trapezoidal pattern programming software interface test module obtain the survey of trapezoidal pattern programming software interface from test profile
Example name on probation successively sequentially executes trapezoidal pattern programming software interface from test case library and surveys according to test case name and its sequence
Example on probation;After the completion of all trapezoidal pattern programming software interface testing cases, statistical test is as a result, and be written test result text
Part;
S3, ladder diagram functional test module obtains ladder diagram functional test use-case name from test profile, according to survey
Example name and its sequence on probation, successively sequentially execute ladder diagram functional test use-case from test case library;All ladder diagram functions are surveyed
After the completion of example test on probation, statistical test is as a result, and be written test result file.
Further, in the step S2, trapezoidal pattern programming software interface test module executes trapezoidal pattern programming software circle
Face test case specifically includes:
Parse the trapezoidal pattern programming software interface test script in trapezoidal pattern programming software interface test case, every parsing one
Row obtains marking keys symbol and delay time, and is sent to digital control system, and digital control system is accorded with according to different marking keys
Different processing is carried out, pauses set delay time after each marking keys symbol operation, is pressed subsequently into next keyboard
The processing of key identifier;
The processing result of digital control system is received, trapezoidal pattern programming software interface data check file is compareed, compares inspection line by line
Look into item correspond to parameter actual value and theoretical value it is whether identical, if all the same, be successfully tested, otherwise test crash, and will
Test result file is written in test result.
Further, in the step S3, ladder diagram functional test module executes ladder diagram functional test use-case and specifically wraps
It includes:
Ladder diagram functional test script is loaded into digital control system, and sends operating instruction to digital control system, by numerical control
System runs ladder diagram functional test script;
The processing result of digital control system is received, compares ladder diagram functional test data check file, line by line comparand register
It is whether identical as corresponding theoretical value to be worth current actual value, if all the same, is successfully tested, otherwise test crash, and will
Test result file is written in test result.
Further, the test result of the trapezoidal pattern programming software interface test module statistics includes the ladder of this test
Shape figure programming software interface detection use-case number, successful trapezoidal pattern programming software interface test case number, failure it is trapezoidal
Figure programming software interface detection use-case number, the trapezoidal pattern programming software interface test case title and success rate of failure;
The test result of the ladder diagram functional test module statistics includes the ladder diagram functional test use-case of this test
Number, successful ladder diagram functional test use-case number, the ladder diagram functional test use-case number of failure, the ladder diagram function to fail
It can test case title and success rate.
Further, this method is further comprising the steps of: test result file passes to server after generating, and server is again
Test result is transferred to mobile terminal.
Compared with prior art, the invention has the following advantages:
This trapezoidal pattern programming software testing system provided by the invention and method, using the typing of test case, automatically
It tests, automatically record result to realize the test detection of the various functions of trapezoidal pattern programming software, improve test coverage, shorten and survey
Try the time;Trapezoidal pattern programming software interface related content is tested by trapezoidal pattern programming software interface test case, is realized certainly
The test of dynamicization trapezoidal pattern programming software interface;Ladder diagram function related content is tested by ladder diagram functional test use-case, it is real
Now automate ladder diagram functional test;Induction and conclusion can be carried out to test content and result, the statistical information of test can be direct
The functionality of the current digital control system of concise reflection, correctness, stability;Side is provided for the subsequent test analysis of tester
It helps, tester can be allowed fast and accurately to position error situation, shorten the period solved the problems, such as;Improve test job effect
Rate ensure that software quality, solve merely using the test of manual test bring is not comprehensive, test job amount is big, test knot
The problems such as fruit is inaccurate.
Detailed description of the invention
Fig. 1 is a kind of structural schematic diagram of trapezoidal pattern programming software testing system provided in an embodiment of the present invention;
Fig. 2 is trapezoidal pattern programming software interface test module operational flowchart provided in an embodiment of the present invention;
Fig. 3 is ladder diagram functional test module operational flowchart provided in an embodiment of the present invention;
Fig. 4 is terraced schema compiler exemplary diagram one provided in an embodiment of the present invention;
Fig. 5 is terraced schema compiler exemplary diagram two provided in an embodiment of the present invention;
Fig. 6 is terraced schema compiler exemplary diagram three provided in an embodiment of the present invention;
Fig. 7 is terraced schema compiler exemplary diagram four provided in an embodiment of the present invention;
Fig. 8 is terraced schema compiler exemplary diagram five provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts all other
Embodiment shall fall within the protection scope of the present invention.
As shown in Figure 1, the embodiment of the present invention provides a kind of trapezoidal pattern programming software testing system, including test case library,
Trapezoidal pattern programming software interface test module, ladder diagram functional test module, at least one test profile and at least one
Test configurations module, the test case library, the trapezoidal pattern programming software interface test module, the ladder diagram functional test
Module is stored on the server, and the test profile and the test configurations module are stored on numerical control device and every
A test profile and a test configurations module are stored on the numerical control device;
It include that multiple trapezoidal pattern programming software interface test cases and multiple ladder diagram functions are surveyed in the test case library
Example on probation;
It include test-types and test case name in the test profile;
The trapezoidal pattern programming software interface test module is used to obtain trapezoidal pattern programming software from test profile
Interface detection use-case name successively sequentially executes trapezoidal pattern programming software from test case library according to test case name and its sequence
Interface detection use-case, after the completion of all trapezoidal pattern programming software interface testing cases, statistical test is as a result, and be written test
Destination file;
The ladder diagram functional test module is used to obtain ladder diagram functional test use-case name, root from test profile
According to test case name and its sequence, ladder diagram functional test use-case, all ladder diagram function are successively sequentially executed from test case library
After the completion of energy testing case, statistical test is as a result, and be written test result file;
The test configurations module is used for read test configuration file, when wherein test-types are trapezoidal pattern programming software circle
When face is tested, trapezoidal pattern programming software interface test module is downloaded from server and is run, test result file is generated;When wherein
When test-types are ladder diagram functional test, ladder diagram functional test module is downloaded from server and is run, test result is generated
File.
This trapezoidal pattern programming software testing system provided in an embodiment of the present invention, using the typing of test case, automatically
It tests, automatically record result to realize the test detection of the various functions of trapezoidal pattern programming software, improve test coverage, shorten and survey
Try the time;Trapezoidal pattern programming software interface related content is tested by trapezoidal pattern programming software interface test case, is realized certainly
The test of dynamicization trapezoidal pattern programming software interface;Ladder diagram function related content is tested by ladder diagram functional test use-case, it is real
Now automate ladder diagram functional test;Induction and conclusion can be carried out to test content and result, the statistical information of test can be direct
The functionality of the current digital control system of concise reflection, correctness, stability;Side is provided for the subsequent test analysis of tester
It helps, tester can be allowed fast and accurately to position error situation, shorten the period solved the problems, such as;Improve test job effect
Rate ensure that software quality, solve merely using the test of manual test bring is not comprehensive, test job amount is big, test knot
The problems such as fruit is inaccurate.
Test profile is described in detail below.Test profile is stored with the format of text file, including
Test-types and test case name, test-types are divided into the test of trapezoidal pattern programming software interface and ladder diagram functional test.Work as survey
Trapezoidal pattern programming software when examination type is that trapezoidal pattern programming software interface is tested, in the entitled test case library of test case
Interface detection use-case title or multiple tactic trapezoidal pattern programming software interface test case titles;When test-types are ladder
A ladder diagram functional test use-case title or multiple sequences when shape figure functional test, in the entitled test case library of test case
The ladder diagram functional test use-case title of arrangement.
Trapezoidal pattern programming software interface test case is described in detail below.Each trapezoidal pattern programming software circle
Face test case includes trapezoidal pattern programming software interface test case title, trapezoidal pattern programming software interface test script and trapezoidal
Figure programming software interface data verifies file.
Trapezoidal pattern programming software interface test script is stored with the format of text file, the test of trapezoidal pattern programming software interface
Script includes multirow, and every row record format is as follows:
Marking keys symbol, delay time;
Marking keys symbol is character string, indicates keypress function;Delay time is to respond the time paused after button operation, single
Position is millisecond, is set arbitrarily by user;
The trapezoidal pattern programming software interface function that tester tests as needed, according to trapezoidal pattern programming software interface
Marking keys symbol and delay time are input in trapezoidal pattern programming software interface test script, true mould by operating procedure line by line
The environment of quasi- manual testing.
Trapezoidal pattern programming software interface data check file is stored with the format of text file, trapezoidal pattern programming software interface
Data check file includes multirow, and every row record format is as follows:
Line number, check item, parameter, theoretical value;
Wherein, line number is the row serial number of the every row of trapezoidal pattern programming software interface test script;Check item be following items it
One: variable, register, alarm;Parameter is corresponding with the project in check item, has different definition;Theoretical value is trapezoidal pattern programming
Software interface test script corresponds to the theoretical value of the parameter after executing.
Based on above-mentioned trapezoidal pattern programming software interface test case, the trapezoidal pattern programming software interface test module is held
Row trapezoidal pattern programming software interface test case specifically includes: the ladder diagram in parsing trapezoidal pattern programming software interface test case
Programming software interface detection script, every parsing a line obtain marking keys symbol and delay time, and are sent to numerical control system
It unites, digital control system carries out different processing according to different marking keys symbols, after each marking keys symbol operation set by pause
Delay time, subsequently into the processing of next keyboard identifier;The processing result of digital control system is received, is compareed trapezoidal
Figure programming software interface data verify file, line by line audit by comparison item correspond to parameter actual value and theoretical value it is whether identical, such as
Fruit is all the same, then is successfully tested, otherwise test crash, and test result file is written in test result.
Ladder diagram functional test use-case is described in detail again below, each ladder diagram functional test use-case includes trapezoidal
Figure functional test use-case title, ladder diagram functional test script and ladder diagram functional test data check file.
Ladder diagram functional test script is stored with text file format, and ladder diagram functional test script includes multirow, every row
Record one or more ladder diagram instructions;
Ladder diagram data check file is stored with the format of text file, and ladder diagram data check file includes multirow, often
Row record format is as follows:
Line number, line number, primary element working condition, functional module execute state, status word macro-variable count value;
Wherein, line number is the row serial number of every row in ladder diagram functional test script, the row with ladder diagram functional test script
Serial number is corresponding, line number, primary element working condition, and functional module executes state, and status word macro-variable count value is respectively to execute
Numerically-controlled machine tool line number after the every row ladder diagram instruction of ladder diagram functional test script, primary element working condition, functional module are held
Row state, the theoretical coordinate value of status word macro-variable count value.
Based on above-mentioned ladder diagram functional test use-case, the ladder diagram functional test module executes ladder diagram functional test
Use-case specifically includes: ladder diagram functional test script is loaded into digital control system, and sends operating instruction to digital control system, by
Digital control system runs ladder diagram functional test script;The processing result of digital control system is received, ladder diagram functional test data are compareed
File is verified, whether the current actual value of comparand register value is identical as corresponding theoretical value line by line, if all the same, tests
Succeed, otherwise test crash, and test result file is written into test result.
As the preferred of the present embodiment, the test result of the trapezoidal pattern programming software interface test module statistics includes this
The trapezoidal pattern programming software interface test case number of secondary test, successful trapezoidal pattern programming software interface test case number,
Failure trapezoidal pattern programming software interface test case number, failure trapezoidal pattern programming software interface test case title and
Success rate;The test result of the ladder diagram functional test module statistics includes the ladder diagram functional test use-case of this test
Several, successful ladder diagram functional test use-case number, the ladder diagram functional test use-case number of failure, the ladder diagram function of failure
Test case title and success rate.By above-mentioned test result, induction and conclusion can be carried out to test content and result, test
Statistical information can be directly concise the functionality of the current digital control system of reflection, correctness, stability;It is subsequent for tester
Test analysis help is provided, tester can be allowed fast and accurately to position error situation, shorten the period solved the problems, such as.
As the preferred of the present embodiment, trapezoidal pattern programming software to be tested is deposited in server, the test configurations
Network connection where module is also used to establish between numerical control device and server, and trapezoidal pattern programming software is downloaded from server
And where being loaded on numerical control device.
As the preferred of the present embodiment, which further includes mobile terminal, such as smart phone or IPAD etc., for receiving
The test result of server transport can specifically be received by way of wired or wifi.
In one embodiment, in the trapezoidal pattern programming software interface test script, marking keys symbol and keypress function
Corresponding relationship is as shown in table 1:
Table 1
In one embodiment, in the trapezoidal pattern programming software interface data check file, the parameter of every row record with
Project corresponding relationship in check item is as shown in table 2:
Table 2.
As the preferred of the present embodiment, the system further include the PLC module test case data library deposited in server,
PLC programming instruction/element test use-case library and PLC status word and control word test case library are respectively used to realize PLC module
Test, PLC programming instruction/element test and PLC status word and control word test, content and test method and ladder diagram are compiled
Journey software interface test case with ladder diagram functional test use-case be it is similar, details are not described herein.
The embodiment of the present invention also provides a kind of trapezoidal pattern programming method for testing software, based on above-mentioned trapezoidal pattern programming software
Test macro, since the principle that this method solves the problems, such as is similar to the test macro of above-described embodiment, therefore the implementation of this method can
With referring to the implementation of above system, overlaps will not be repeated.
Shown in referring to figs. 2 and 3, method includes the following steps:
S1, test configurations module read test configuration file, when wherein test-types are the survey of trapezoidal pattern programming software interface
When examination, trapezoidal pattern programming software interface test module is downloaded from server and executes step S2, when wherein test-types are trapezoidal
When figure functional test, ladder diagram functional test module is downloaded from server and executes step S3;
S2, trapezoidal pattern programming software interface test module obtain the survey of trapezoidal pattern programming software interface from test profile
Example name on probation successively sequentially executes trapezoidal pattern programming software interface from test case library and surveys according to test case name and its sequence
Example on probation;After the completion of all trapezoidal pattern programming software interface testing cases, statistical test is as a result, and be written test result text
Part;
S3, ladder diagram functional test module obtains ladder diagram functional test use-case name from test profile, according to survey
Example name and its sequence on probation, successively sequentially execute ladder diagram functional test use-case from test case library;All ladder diagram functions are surveyed
After the completion of example test on probation, statistical test is as a result, and be written test result file.
Shown in Figure 2, in one embodiment, in the step S2, trapezoidal pattern programming software interface test module is held
Row trapezoidal pattern programming software interface test case specifically includes:
Parse the trapezoidal pattern programming software interface test script in trapezoidal pattern programming software interface test case, every parsing one
Row obtains marking keys symbol and delay time, and is sent to digital control system, and digital control system is accorded with according to different marking keys
Different processing is carried out, pauses set delay time after each marking keys symbol operation, is pressed subsequently into next keyboard
The processing of key identifier;
The processing result of digital control system is received, trapezoidal pattern programming software interface data check file is compareed, compares inspection line by line
Look into item correspond to parameter actual value and theoretical value it is whether identical, if all the same, be successfully tested, otherwise test crash, and will
Test result file is written in test result.
Shown in Figure 3, in one embodiment, in the step S3, the ladder diagram functional test module executes ladder
Shape figure functional test use-case specifically includes:
Ladder diagram functional test script is loaded into digital control system, and sends operating instruction to digital control system, by numerical control
System runs ladder diagram functional test script;
The processing result of digital control system is received, compares ladder diagram functional test data check file, line by line comparand register
It is whether identical as corresponding theoretical value to be worth current actual value, if all the same, is successfully tested, otherwise test crash, and will
Test result file is written in test result.
As the preferred of the present embodiment, the test result of the trapezoidal pattern programming software interface test module statistics includes this
The trapezoidal pattern programming software interface test case number of secondary test, successful trapezoidal pattern programming software interface test case number,
Failure trapezoidal pattern programming software interface test case number, failure trapezoidal pattern programming software interface test case title and
Success rate;The test result of the ladder diagram functional test module statistics includes the ladder diagram functional test use-case of this test
Several, successful ladder diagram functional test use-case number, the ladder diagram functional test use-case number of failure, the ladder diagram function of failure
Test case title and success rate.
As the preferred of the present embodiment, before the step S1 further include: numerical control where the test configurations module is established
Network connection between device and server, and download trapezoidal pattern programming software from server and be loaded into place numerical control device
On.
As the preferred of the present embodiment, this method is further comprising the steps of: test result file passes to service after generating
Test result is transferred to mobile terminal by way of wired or wifi again by device, server.
The present invention is from system building to the whole work process tested are as follows:
(1) File Transfer Protocol (FTP) is established in server end, and the username and password of numerical control device access is set,
Transmission for the file between server and more numerical control devices;
(2) according to test request, trapezoidal pattern programming software interface test case or ladder diagram functional test use-case are made,
And it is stored in test case library;
(3) test profile, the test-types of setting this time test, test case name are write;
(4) after numerical control device is switched on, test configurations module is executed, trapezoidal pattern programming software is downloaded from server and is added
It is downloaded on numerical control device, read test configuration file, downloads trapezoidal pattern programming software interface test module or trapezoidal from server
Figure functional test module, and execute;
(5) after the completion of all testing cases, the test result of this time test is generated.
Below in conjunction with specific example, invention is further explained.
The present embodiment includes:
(1) according to test request, test case library is made, test case library includes that a trapezoidal pattern programming software interface is surveyed
Example on probation and a ladder diagram functional test use-case
One trapezoidal pattern programming software interface test case content includes:
The entitled test1 of trapezoidal pattern programming software interface test case
Trapezoidal pattern programming software interface test script is as follows:
Trapezoidal pattern programming software interface data check file is as follows:
1, register, 2562,0
2, register, 2562,1
3, register, 2562,7
4, register, 2562,2
One M code function test case content includes:
The entitled test2 of M code tester use-case
M code function test script is as follows:
M00 (pause of M program in machine code)
M01 (pause of M Code Selection)
Ladder diagram data check file is as follows:
1.B40 feeding keeps R register that number is connected, and is counted by B40;
Number is connected in the R register of the MGET module output of B41M00, is counted by B41;
Terraced schema compiler is referring to fig. 4.
2. using COIN (comparison of coherence module) in ladder diagram
B40 is compared with 4;B41 (M01 at M00,1 at 3 in reason program) compared with 3
The operation test of 2.1 programs is system report under the premise of 4, B40 is not 4 when program has run a B40 normal value
It is alert: G3012.11;It is 3, under the premise of being not 3 when program has run B41 normal value, system is still alarmed G3012.11;When being
When system is alarmed, program stopped operation
2.2 trapezoidal schema compilers: after normal program operation is complete primary, 0 is assigned a value of to B40 and B41 numerical value using M63;
2.3 when system is alarmed, and can check that corresponding numerical value determination is that feeding keeps being not carried out by B40 or B41
Or M00 is not carried out;
Terraced schema compiler is as follows:
(1) B40 and B41 compares value consistency using COIN, referring to figs. 5 and 6.
(2) B40 or B41 numerical value and fiducial value are inconsistent, system alarm: G3012.11, referring to Fig. 7.
(3) M63 is assigned a value of 0 to B40 and B41, referring to Fig. 8.
Numerical control device 1 carries out the test of trapezoidal pattern programming software interface function, writes its test profile, setting test
Type is the test of trapezoidal pattern programming software interface, the entitled test1 of test file;Numerical control device 2 carries out ladder diagram functional test, compiles
Its test profile is write, sets test-types as ladder diagram functional test, the entitled test2 of test file;
After numerical control device 1 is switched on, test configurations module is executed, download trapezoidal pattern programming software from server and is loaded into number
It controls on device, read test configuration file, downloads trapezoidal pattern programming software interface test module from server, and execute;Numerical control
After device 2 is switched on, test configurations module is executed, download trapezoidal pattern programming software from server and is loaded on numerical control device, is read
Test profile is taken, downloads ladder diagram functional test module from server, and execute;
After the completion of numerical control device 1 is tested, test result is as follows for generation:
Use-case name: test1
As a result: success
Trapezoidal pattern programming software interface test case number: 1
Successful trapezoidal pattern programming software interface test case number: 1
The trapezoidal pattern programming software interface test case number of failure: 0
Success rate: 100%
After the completion of numerical control device 2 is tested, test result is as follows for generation:
Use-case name: test2
As a result: success
Ladder diagram functional test use-case number: 1
Successful ladder diagram functional test use-case number: 1
The ladder diagram functional test use-case number of failure: 0
Success rate: 100%
After the completion of numerical control device 3 is tested, test result is as follows for generation:
Use-case name: test3
As a result: success
Ladder diagram functional test use-case number: 1
Successful ladder diagram functional test use-case number: 1
The ladder diagram functional test use-case number of failure: 0
Success rate: 100%
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of embodiment is can to lead to
Program is crossed to instruct relevant hardware and complete, which can be stored in a computer readable storage medium, storage medium
It may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access
Memory), disk or CD etc..
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Within mind and principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.
Claims (10)
1. a kind of trapezoidal pattern programming software testing system, it is characterised in that: including test case library, trapezoidal pattern programming software interface
Test module, ladder diagram functional test module, at least one test profile and at least one test configurations module, the survey
On probation example library, the trapezoidal pattern programming software interface test module, the ladder diagram functional test module are stored in server
On, the test profile and the test configurations module are stored on numerical control device and store on every numerical control device
One test profile and a test configurations module;
It include that multiple trapezoidal pattern programming software interface test cases and multiple ladder diagram functional tests are used in the test case library
Example;
It include test-types and test case name in the test profile;
The trapezoidal pattern programming software interface test module is used to obtain trapezoidal pattern programming software interface from test profile
Test case name successively sequentially executes trapezoidal pattern programming software interface from test case library according to test case name and its sequence
Test case, after the completion of all trapezoidal pattern programming software interface testing cases, statistical test is as a result, and be written test result
File;
The ladder diagram functional test module is used to obtain ladder diagram functional test use-case name from test profile, according to survey
Example name and its sequence on probation successively sequentially execute ladder diagram functional test use-case from test case library, and all ladder diagram functions are surveyed
After the completion of example test on probation, statistical test is as a result, and be written test result file;
The test configurations module is used for read test configuration file, when wherein test-types are the survey of trapezoidal pattern programming software interface
When examination, trapezoidal pattern programming software interface test module is downloaded from server and is run, test result file is generated;When wherein testing
When type is ladder diagram functional test, ladder diagram functional test module is downloaded from server and is run, test result file is generated.
2. trapezoidal pattern programming software testing system as described in claim 1, it is characterised in that:
Each trapezoidal pattern programming software interface test case includes trapezoidal pattern programming software interface test case title, trapezoidal
Figure programming software interface detection script and trapezoidal pattern programming software interface data check file;
The trapezoidal pattern programming software interface test module executes trapezoidal pattern programming software interface test case and specifically includes: parsing
Trapezoidal pattern programming software interface test script in trapezoidal pattern programming software interface test case, every parsing a line obtain key
Identifier and delay time, and it is sent to digital control system, digital control system carries out different according to different marking keys symbols
Processing pauses set delay time after each marking keys symbol operation, subsequently into next keyboard identifier
Processing;The processing result of digital control system is received, compares trapezoidal pattern programming software interface data check file, line by line audit by comparison item
Whether the actual value and theoretical value of corresponding parameter are identical, if all the same, are successfully tested, otherwise test crash, and will test
As a result test result file is written.
3. trapezoidal pattern programming software testing system as described in claim 1, it is characterised in that:
Each ladder diagram functional test use-case includes ladder diagram functional test use-case title, ladder diagram functional test script and trapezoidal
Figure functional test data check file;
The ladder diagram functional test module executes ladder diagram functional test use-case and specifically includes: by ladder diagram functional test script
It is loaded into digital control system, and sends operating instruction to digital control system, ladder diagram functional test script is run by digital control system;It connects
The processing result of digital control system is received, compares ladder diagram functional test data check file, line by line the current reality of comparand register value
Whether actual value is identical as corresponding theoretical value, if all the same, is successfully tested, otherwise test crash, and test result is write
Enter test result file.
4. trapezoidal pattern programming software testing system as described in claim 1, it is characterised in that:
The test result of the trapezoidal pattern programming software interface test module statistics includes the trapezoidal pattern programming software of this test
Interface detection use-case number, successful trapezoidal pattern programming software interface test case number, trapezoidal pattern programming software circle to fail
Face test case number, the trapezoidal pattern programming software interface test case title and success rate of failure;
The test result of ladder diagram functional test module statistics include this test ladder diagram functional test use-case number,
Successful ladder diagram functional test use-case number, the ladder diagram functional test use-case number of failure, the ladder diagram function of failure are surveyed
Example title and success rate on probation.
5. trapezoidal pattern programming software testing system as described in claim 1, it is characterised in that: further include mobile terminal, be used for
Receive the test result of server transport.
6. a kind of trapezoidal pattern programming method for testing software, which is characterized in that based on any test system of claim 1-5
System, method includes the following steps:
S1, test configurations module read test configuration file, when wherein test-types are that trapezoidal pattern programming software interface is tested,
Trapezoidal pattern programming software interface test module is downloaded from server and executes step S2, when wherein test-types are ladder diagram function
When test, ladder diagram functional test module is downloaded from server and executes step S3;
S2, trapezoidal pattern programming software interface test module obtain the test of trapezoidal pattern programming software interface from test profile and use
Example name successively sequentially executes the test of trapezoidal pattern programming software interface from test case library and uses according to test case name and its sequence
Example;After the completion of all trapezoidal pattern programming software interface testing cases, statistical test is as a result, and be written test result file;
S3, ladder diagram functional test module obtain ladder diagram functional test use-case name from test profile, are used according to test
Example name and its sequence successively sequentially execute ladder diagram functional test use-case from test case library;All ladder diagram functional tests are used
After the completion of example test, statistical test is as a result, and be written test result file.
7. trapezoidal pattern programming method for testing software as claimed in claim 6, which is characterized in that in the step S2, ladder diagram
Programming software interface detection module executes trapezoidal pattern programming software interface test case and specifically includes:
Trapezoidal pattern programming software interface test script in parsing trapezoidal pattern programming software interface test case, every parsing a line,
Obtain marking keys symbol and delay time, and be sent to digital control system, digital control system according to different marking keys accord with into
The different processing of row pauses set delay time after each marking keys symbol operation, subsequently into next keyboard
The processing of identifier;
The processing result of digital control system is received, compares trapezoidal pattern programming software interface data check file, line by line audit by comparison item
Whether the actual value and theoretical value of corresponding parameter are identical, if all the same, are successfully tested, otherwise test crash, and will test
As a result test result file is written.
8. trapezoidal pattern programming method for testing software as claimed in claim 6, which is characterized in that in the step S3, ladder diagram
Functional test module executes ladder diagram functional test use-case and specifically includes:
Ladder diagram functional test script is loaded into digital control system, and sends operating instruction to digital control system, by digital control system
Run ladder diagram functional test script;
The processing result of digital control system is received, compares ladder diagram functional test data check file, comparand register value is worked as line by line
Whether preceding actual value is identical as corresponding theoretical value, if all the same, is successfully tested, otherwise test crash, and will test
As a result test result file is written.
9. trapezoidal pattern programming method for testing software as claimed in claim 6, it is characterised in that:
The test result of the trapezoidal pattern programming software interface test module statistics includes the trapezoidal pattern programming software of this test
Interface detection use-case number, successful trapezoidal pattern programming software interface test case number, trapezoidal pattern programming software circle to fail
Face test case number, the trapezoidal pattern programming software interface test case title and success rate of failure;
The test result of ladder diagram functional test module statistics include this test ladder diagram functional test use-case number,
Successful ladder diagram functional test use-case number, the ladder diagram functional test use-case number of failure, the ladder diagram function of failure are surveyed
Example title and success rate on probation.
10. trapezoidal pattern programming method for testing software as claimed in claim 6, which is characterized in that further comprising the steps of: test
Destination file passes to server after generating, and test result is transferred to mobile terminal again by server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811563422.4A CN109783368A (en) | 2018-12-20 | 2018-12-20 | Trapezoidal pattern programming software testing system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811563422.4A CN109783368A (en) | 2018-12-20 | 2018-12-20 | Trapezoidal pattern programming software testing system and method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109783368A true CN109783368A (en) | 2019-05-21 |
Family
ID=66497345
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811563422.4A Pending CN109783368A (en) | 2018-12-20 | 2018-12-20 | Trapezoidal pattern programming software testing system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109783368A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111078575A (en) * | 2019-12-30 | 2020-04-28 | 武汉华中数控股份有限公司 | System and method for testing numerical control cutting instruction operation software |
WO2022141745A1 (en) * | 2020-12-29 | 2022-07-07 | 福州富昌维控电子科技有限公司 | Ladder diagram-based plc instruction quality detection method, and terminal |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102541045A (en) * | 2010-12-31 | 2012-07-04 | 镇江灵芯软件实验室有限公司 | Method for automatically testing programmable logic controller program |
CN103019936A (en) * | 2012-12-06 | 2013-04-03 | 武汉华中数控股份有限公司 | Numerical control software testing system |
CN104160344A (en) * | 2012-12-17 | 2014-11-19 | 三菱电机株式会社 | Program-analysis support device and control device |
CN104516818A (en) * | 2014-12-29 | 2015-04-15 | 北京四方继保自动化股份有限公司 | Automatic testing system and method both applicable to compiler in logical configuration software |
CN108333153A (en) * | 2017-01-20 | 2018-07-27 | 上海溯源生物技术有限公司 | Project testing system and project testing method |
JP2018132875A (en) * | 2017-02-14 | 2018-08-23 | 株式会社キーエンス | Programmable logic control system, programmable logic controller, communication test support device, communication test support method, and computer program executable on the communication test support device |
-
2018
- 2018-12-20 CN CN201811563422.4A patent/CN109783368A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102541045A (en) * | 2010-12-31 | 2012-07-04 | 镇江灵芯软件实验室有限公司 | Method for automatically testing programmable logic controller program |
CN103019936A (en) * | 2012-12-06 | 2013-04-03 | 武汉华中数控股份有限公司 | Numerical control software testing system |
CN104160344A (en) * | 2012-12-17 | 2014-11-19 | 三菱电机株式会社 | Program-analysis support device and control device |
CN104516818A (en) * | 2014-12-29 | 2015-04-15 | 北京四方继保自动化股份有限公司 | Automatic testing system and method both applicable to compiler in logical configuration software |
CN108333153A (en) * | 2017-01-20 | 2018-07-27 | 上海溯源生物技术有限公司 | Project testing system and project testing method |
JP2018132875A (en) * | 2017-02-14 | 2018-08-23 | 株式会社キーエンス | Programmable logic control system, programmable logic controller, communication test support device, communication test support method, and computer program executable on the communication test support device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111078575A (en) * | 2019-12-30 | 2020-04-28 | 武汉华中数控股份有限公司 | System and method for testing numerical control cutting instruction operation software |
WO2022141745A1 (en) * | 2020-12-29 | 2022-07-07 | 福州富昌维控电子科技有限公司 | Ladder diagram-based plc instruction quality detection method, and terminal |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103150249B (en) | A kind of method and system of automatic test | |
CN105094783B (en) | method and device for testing stability of android application | |
CN109683899B (en) | Software integration method and device | |
CN103365770B (en) | Mobile terminal software test macro and method for testing software | |
US7895565B1 (en) | Integrated system and method for validating the functionality and performance of software applications | |
CN111459794A (en) | Communication network testing method, device, computer equipment and storage medium | |
CN111240973B (en) | Equipment testing method and system based on simulation and readable storage medium | |
CN105787364B (en) | Automatic testing method, device and system for tasks | |
CN111124919A (en) | User interface testing method, device, equipment and storage medium | |
CN106961362A (en) | Automated testing method and mobile cloud test system | |
CN107463362A (en) | The method and system of lasting deployment based on multiple Jenkins | |
CN105786695B (en) | Data test method and system | |
CN103530209B (en) | A kind of code keypad automated testing method | |
CN108228407A (en) | Apparatus function test method, apparatus and readable storage medium storing program for executing | |
CN109186666A (en) | Detection method, device, computer equipment and the storage medium of equipment | |
CN109783368A (en) | Trapezoidal pattern programming software testing system and method | |
CN103049374B (en) | Automatic testing method and device | |
CN111309581A (en) | Application performance detection method and device in database upgrading scene | |
CN112583663B (en) | Automatic network performance testing method based on domestic operating system | |
CN111444109B (en) | Mobile terminal UI automatic test method and system | |
CN110750453A (en) | HTML 5-based intelligent mobile terminal testing method, system, server and storage medium | |
CN109426612B (en) | Automatic use case development system based on intelligent machine learning | |
CN111242445A (en) | Method, device and readable storage medium for testing products based on configuration production line | |
CN115833964A (en) | Performance test method and performance test system of dual-mode communication module | |
CN109558321B (en) | Android equipment testing method and device |
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: 20190521 |
|
RJ01 | Rejection of invention patent application after publication |