CN103019936B - Numerical control software testing system - Google Patents

Numerical control software testing system Download PDF

Info

Publication number
CN103019936B
CN103019936B CN201210524866.3A CN201210524866A CN103019936B CN 103019936 B CN103019936 B CN 103019936B CN 201210524866 A CN201210524866 A CN 201210524866A CN 103019936 B CN103019936 B CN 103019936B
Authority
CN
China
Prior art keywords
test
case
code
testing
interface detection
Prior art date
Application number
CN201210524866.3A
Other languages
Chinese (zh)
Other versions
CN103019936A (en
Inventor
周会成
邹捷
李峥辉
周星
刘涛
Original Assignee
武汉华中数控股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 武汉华中数控股份有限公司 filed Critical 武汉华中数控股份有限公司
Priority to CN201210524866.3A priority Critical patent/CN103019936B/en
Publication of CN103019936A publication Critical patent/CN103019936A/en
Application granted granted Critical
Publication of CN103019936B publication Critical patent/CN103019936B/en

Links

Abstract

The invention relates to a numerical control software testing system, which belongs to the technical field of numerical control and solves the problems of incomplete effect, great testing workload and inaccurate testing results of the existing manual testing to fill the blank of the numerical control software automation. The numerical control software testing system comprises a testing case library, an interface testing module, a G code function testing module, N testing configuration files and N testing configuration modules, wherein the testing case library, the interface testing module, the G code function testing module and tested object numerical control system software are stored on a server, and a testing configuration file and a testing configuration module are respectively stored on each numerical control device of N numerical control devices. The numerical control software testing system has the advantages that the testing detection of various functions of the numerical control software can be automatically realized, the testing coverage rate is improved, the testing time is shortened, the testing contents and results can be summarized, the help is provided for the subsequent testing analysis of testing personnel, the period for solving the problem is shortened, the testing work efficiency is improved, and the software quality is ensured.

Description

A kind of numerical control software test macro

Technical field

The invention belongs to fields of numeric control technique, be specifically related to a kind of numerical control software test macro, for the automatic test of numerical control software.

Background technology

Along with digital control system is intelligent, web development, numerical control software plays the part of more and more important effect in digital control system.The reliability of numerical control software directly determines processing correctness, once the reliability of numerical control software goes wrong may produce serious security incident.Therefore any numerical control software version is before issue, must carry out abundant, effective numerical control software test.

Current numerical control software test is basic by completing manually, needs tester to wait for and perform operations before testing apparatus.This brings several difficult point to test job: test job amount is large, and test period is long; Everyone understands for function, inconsistent phenomenon appears in failure-description; For numerical control software version updating, a large amount of repeated test work can be carried out.For test, even if drop into a large amount of manpower and materials, many times coverage rate is inadequate.

Existing ripe automatic test software is mostly the software under windows environment, and can not test numerical control software, also the market vacancy is belonged to for embedded automatic test software, especially lack the automatization test system for the numerical control software on numerical control device, this brings very large difficulty to numerical control software test job.

Summary of the invention

The invention provides a kind of numerical control software test macro, solve existingly to test manually comprehensively, test job amount is large, the inaccurate problem of test result, to fill up the blank of numerical control software robotization.

A kind of numerical control software test macro provided by the present invention, comprises test case library, interface detection module, G code functional test module, N number of test profile and N number of test configurations module; Test case library, interface detection module, G code functional test module and tested object cnc system software are deposited on the server; In N platform numerical control device, every platform numerical control device all deposits a test profile and a test configurations module, N be equal to or greater than 1 integer, it is characterized in that:

A. test case library: comprise multiple interface detection use-case and multiple G code functional test use-case, each interface detection use-case comprises interface detection use-case title, interface detection script and interface data verification file; Each G code functional test use-case comprises G code functional test use-case title, G code functional test script and G code data check file;

A1. interface detection script: interface detection script stores with the form of text, interface detection script comprises multirow, and every line item form is as follows:

Marking keys accords with, time delay,

Marking keys symbol is character string, represents keypress function; Time delay is the time of pausing after response button operation, and unit is millisecond, is set arbitrarily by user;

The interface function that tester tests as required, according to the operation steps at interface, accords with marking keys and is input to line by line time delay in interface detection script, the environment of real simulation manual testing;

A2. interface data verification file: interface data verification file stores with the form of text, interface data verification file comprises multirow, and every line item form is as follows:

Line number, check item, parameter, theoretical value,

Wherein, line number is the line order number that interface detection script is often gone; Check item comprises one of following items: cutter, variable, register, warning; Parameter is corresponding with the project in check item, has different definition; Theoretical value is the theoretical value of corresponding described parameter after interface detection script performs;

A3.G code function test script: G code functional test script stores with text file format, G code functional test script comprises multirow, the one or more G code instruction of every line item, and multirow forms the job sequence run in digital control system;

A4.G code data verification file: G code data check file stores with the form of text, G code data check file comprises multirow, and every line item form is as follows:

Line number, X-coordinate, Y-coordinate, Z coordinate,

Wherein, line number is the line order number of often going in G code test script, number corresponding with the line order of G code functional test script, X-coordinate, Y-coordinate, Z coordinate are respectively the theoretical coordinate value performing the numerically-controlled machine X-axis of G code functional test script often after the instruction of row G code, Y-axis, Z axis;

B. interface detection module performs following operation:

B1. from test profile, obtain test case name, according to test case name and order thereof, read interface detection use-case from test case library successively order;

B2. the interface detection script in resolution interface test case, often resolve a line, obtain marking keys symbol and time delay, and they are delivered to digital control system, digital control system carries out different process according to different marking keys symbol, time delay set by pausing after the operation of each marking keys symbol, then enter the process of next keyboard identifier;

B3. receive the result of digital control system, contrast interface data verification file, whether the actual value of the corresponding parameter of audit by comparison item is identical with theoretical value line by line, if all identical, then tests successfully, otherwise test crash, and test result is write test result file;

B4. after the process of all interface detection use-cases completes, add up the interface detection use-case number of this test, successfully interface detection use-case number, failed interface detection use-case number, failed interface detection use-case title and success ratio, and write test result file;

C.G code function test module performs following operation:

C1. from test profile, obtain test case name, according to test case name and order thereof, perform G code functional test use-case from test case library successively order;

C2. G code functional test script is loaded in digital control system, the cooked mode of digital control system is switched to single hop pattern, and send operating instruction to digital control system, run G code functional test script by digital control system;

C3. receive the result of digital control system, contrast G code data check file, compares the current actual coordinate value of X, Y, Z axis whether identical with corresponding theoretical coordinate value line by line, if all identical, then test successfully, otherwise test crash, and test result is write test result file;

C4. after all G code functional test use-cases have been tested, add up the G code functional test use-case number of this test, successfully G code functional test use-case number, failed G code functional test use-case number, failed G code functional test use-case title and success ratio, and write test result file;

D. test profile: test profile stores with the form of text, comprises test-types and test case name, and test-types is divided into interface detection and G code functional test,

When test-types is interface detection, test case is called an interface detection use-case title in test case library or multiple tactic interface detection use-case title;

When test-types is G code functional test, test case is called a G code functional test use-case title in test case library or multiple tactic G code functional test use-case title;

E. test configurations module performs following operation:

E1. set up place numerical control device to be connected with the network between server;

E2. download cnc system software from server and be loaded into the numerical control device of place;

E3. read test configuration file, when wherein test-types is interface detection, performs step e 4, when wherein test-types is G code functional test, performs step e 5;

E4. download interface detection module from server and run, generating test result file;

E5. download G code functional test module from server and run, generating test result file.

Described numerical control software test macro, is characterized in that:

In described interface detection script, marking keys symbol and keypress function corresponding relation as shown in table 1:

Table 1

Sequence number Marking keys accords with Definition 1 i Reset 2 q Automatically 3 Prog Program 4 Set Arrange 5 MDI Manual input runs 6 Oft Cutter is mended 7 Dgn Diagnosis 8 Pos Position

9 Run Loop start 10 Hold Feeding keeps 11 PgUp Upwards page turning 12 PgDn Downward page turning 13 End Ending 14 Home Original position 15 Left Left 16 Up Upwards 17 Right To the right 18 Down Downwards 19 Ins Insert 20 Del Clash 21 F1 Function key 1 22 F2 Function key 2 23 F3 Function key 3 24 F4 Function key 4 25 F5 Function key 5 26 F6 Function key 6 27 F7 Function key 7 28 F8 Function key 8 29 F9 Function key 9 30 F10 Function key 10 31 F11 Function key 11 32 F12 Function key 12 33 kbNoKey Dead key 34 Space Space

35 Back Backspace 36 Tab Tab 37 Enter Carriage return 38 Pause Suspend 39 Esc Exit 40 A-Z Capitalization A-Z 41 a-z Lowercase character a-z 42 0-9 Numeral 0-9 43 CtrlF1-CtrlF12 The Macintosh of Ctrl and function 44 CtrlA-CtrlZ The Macintosh of Ctrl and letter 45 AltF1-AltF12 The Macintosh of Alt and function 46 AltA-AltZ The Macintosh of Alt and letter 47 ShiftF1-ShiftF12 The Macintosh of Shift and function 48 ShiftA-ShiftZ The Macintosh of Shift and letter

Described numerical control software test macro, is characterized in that:

In described interface data verification file, the project corresponding relation in the parameter of every line item and check item is as shown in table 2:

Table 2.

The course of work of the present invention is:

(1) set up file transfer protocol (FTP) (FTP) at server end, and the username and password of numerical control device access is set, for the transmission of the file between server and multiple stage numerical control device;

(2) according to test request, make interface detection use-case or G code functional test use-case, and be stored in test case library.

(3) test profile is write, the test-types of setting this time test, test case name.

(4) when after numerical control device start, perform test configurations module, from server, download cnc system software and be loaded on numerical control device, read test configuration file, download interface detection module or G code functional test module from server, and perform;

(5), after all testing cases complete, the test result of this time test is generated.

The present invention utilizes the typing of test case, automatically test, automatically record result to detect to the test realizing the various function of numerical control software, improves test coverage, shortens the test duration; Carry out test interface related content by interface detection script and interface data verification file, realize automatic interface test; Driven the test of G code function by G code test case and G code data check file, realize the functional test of robotization G code; Induction and conclusion can be carried out, functional, correctness, the stability of the digital control system that the reflection that the statistical information of test can be directly simple and clear is current to content measurement and result; The test analysis follow-up for tester is offered help, and can allow tester's Wrong localization situation fast and accurately, shortens the cycle of dealing with problems; Improve test job efficiency, ensure that software quality, solve the problems such as the test utilizing merely manual test to bring is comprehensive, test job amount is large, test result is inaccurate,

Accompanying drawing explanation

Fig. 1 is embodiment of the present invention schematic diagram;

Fig. 2 is interface detection module operation process flow diagram;

Fig. 3 is G code functional test module operation process flow diagram.

Embodiment

Below in conjunction with drawings and Examples, the present invention is further described.

The applied environment of the embodiment of the present invention comprises server and two numerical control devices, by network, server is connected each numerical control device respectively;

As shown in Figure 1, embodiments of the invention, comprise test case library, interface detection module, G code functional test module, 2 test profile and 2 test configurations modules; Test case library, interface detection module, G code functional test module and tested object cnc system software are deposited on the server; In 2 numerical control devices, every platform numerical control device all deposits a test profile and a test configurations module.

In the present embodiment,

(1) according to test request, make test case library, test case library comprises an interface detection use-case and a G code functional test use-case,

An interface detection use-case, comprises interface detection use-case title, interface detection script and interface data verification file;

Interface detection use-case name is called test1,

Interface detection script is as follows:

Interface data verification file is as follows:

1, register, 2560,0

2, register, 2560,1

3, register, 2560,7

4, register, 2560,2

A G code functional test use-case, comprises G code functional test use-case title, G code functional test script and G code data check file;

G code test case name is called test2,

G code functional test script is as follows:

G02X20R10 is along circle

The inverse circle of G03X10R5

G code data check file is as follows:

1,20,0,0

2,10,0,0

(2) numerical control device 1 carries out the test of interface function, writes its test profile, and setting test-types is interface detection, and test file is called test1; Numerical control device 2 carries out G code functional test, writes its test profile, and setting test-types is G code functional test, and test file is called test2;

(3) after numerical control device 1 is started shooting, perform test configurations module, download cnc system software from server and be loaded into numerical control device, read test configuration file, download interface detection module from server, and perform; After numerical control device 2 is started shooting, perform test configurations module, download cnc system software from server and be loaded into numerical control device, read test configuration file, download G code functional test module from server, and perform;

(4), after numerical control device 1 has been tested, test result is generated as follows:

Test case name: test1,

Result: success,

Interface detection use-case number: 1,

Successful interface detection use-case number: 1,

Failed interface detection use-case number: 0,

Success ratio: 100%;

After numerical control device 2 has been tested, generate test result as follows:

Test case name: test2,

Result: success,

G code functional test use-case number: 1,

Successful G code functional test use-case number: 1,

Failed G code functional test use-case number: 0,

Success ratio: 100%.

Claims (3)

1. a numerical control software test macro, comprises test case library, interface detection module, G code functional test module, N number of test profile and N number of test configurations module; Test case library, interface detection module, G code functional test module and tested object cnc system software are deposited on the server; In N platform numerical control device, every platform numerical control device all deposits a test profile and a test configurations module, N be equal to or greater than 1 integer, it is characterized in that:
A. test case library: comprise multiple interface detection use-case and multiple G code functional test use-case, each interface detection use-case comprises interface detection use-case title, interface detection script and interface data verification file; Each G code functional test use-case comprises G code functional test use-case title, G code functional test script and G code data check file;
A1. interface detection script: interface detection script stores with the form of text, interface detection script comprises multirow, and every line item form is as follows:
Marking keys accords with, time delay,
Marking keys symbol is character string, represents keypress function; Time delay is the time of pausing after response button operation, and unit is millisecond, is set arbitrarily by user;
The interface function that tester tests as required, according to the operation steps at interface, accords with marking keys and is input to line by line time delay in interface detection script, the environment of real simulation manual testing;
A2. interface data verification file: interface data verification file stores with the form of text, interface data verification file comprises multirow, and every line item form is as follows:
Line number, check item, parameter, theoretical value,
Wherein, line number is the line order number that interface detection script is often gone; Check item comprises one of following items: cutter, variable, register, warning; Parameter is corresponding with the project in check item, has different definition; Theoretical value is the theoretical value of corresponding described parameter after interface detection script performs;
A3.G code function test script: G code functional test script stores with text file format, G code functional test script comprises multirow, the one or more G code instruction of every line item, and multirow forms the job sequence run in digital control system;
A4.G code data verification file: G code data check file stores with the form of text, G code data check file comprises multirow, and every line item form is as follows:
Line number, X-coordinate, Y-coordinate, Z coordinate,
Wherein, line number is the line order number of often going in G code test script, number corresponding with the line order of G code functional test script, X-coordinate, Y-coordinate, Z coordinate are respectively the theoretical coordinate value performing the numerically-controlled machine X-axis of G code functional test script often after the instruction of row G code, Y-axis, Z axis;
B. interface detection module performs following operation:
B1. from test profile, obtain test case name, according to test case name and order thereof, read interface detection use-case from test case library successively order;
B2. the interface detection script in resolution interface test case, often resolve a line, obtain marking keys symbol and time delay, and they are delivered to digital control system, digital control system carries out different process according to different marking keys symbol, time delay set by pausing after the operation of each marking keys symbol, then enter the process of next keyboard identifier;
B3. receive the result of digital control system, contrast interface data verification file, whether the actual value of the corresponding parameter of audit by comparison item is identical with theoretical value line by line, if all identical, then tests successfully, otherwise test crash, and test result is write test result file;
B4. after the process of all interface detection use-cases completes, add up the interface detection use-case number of this test, successfully interface detection use-case number, failed interface detection use-case number, failed interface detection use-case title and success ratio, and write test result file;
C.G code function test module performs following operation:
C1. from test profile, obtain test case name, according to test case name and order thereof, perform G code functional test use-case from test case library successively order;
C2. G code functional test script is loaded in digital control system, the cooked mode of digital control system is switched to single hop pattern, and send operating instruction to digital control system, run G code functional test script by digital control system;
C3. receive the result of digital control system, contrast G code data check file, compares the current actual coordinate value of X, Y, Z axis whether identical with corresponding theoretical coordinate value line by line, if all identical, then test successfully, otherwise test crash, and test result is write test result file;
C4. after all G code functional test use-cases have been tested, add up the G code functional test use-case number of this test, successfully G code functional test use-case number, failed G code functional test use-case number, failed G code functional test use-case title and success ratio, and write test result file;
D. test profile: test profile stores with the form of text, comprises test-types and test case name, and test-types is divided into interface detection and G code functional test,
When test-types is interface detection, test case is called an interface detection use-case title in test case library or multiple tactic interface detection use-case title;
When test-types is G code functional test, test case is called a G code functional test use-case title in test case library or multiple tactic G code functional test use-case title;
E. test configurations module performs following operation:
E1. set up place numerical control device to be connected with the network between server;
E2. download cnc system software from server and be loaded into the numerical control device of place;
E3. read test configuration file, when wherein test-types is interface detection, performs step e 4, when wherein test-types is G code functional test, performs step e 5;
E4. download interface detection module from server and run, generating test result file;
E5. download G code functional test module from server and run, generating test result file.
2. numerical control software test macro as claimed in claim 1, is characterized in that:
In described interface detection script, marking keys symbol and keypress function corresponding relation as shown in table 1:
Table 1
Sequence number Marking keys accords with Definition 1 i Reset 2 q Automatically 3 Prog Program 4 Set Arrange
5 MDI Manual input runs 6 Oft Cutter is mended 7 Dgn Diagnosis 8 Pos Position 9 Run Loop start 10 Hold Feeding keeps 11 PgUp Upwards page turning 12 PgDn Downward page turning 13 End Ending 14 Home Original position 15 Left Left 16 Up Upwards 17 Right To the right 18 Down Downwards 19 Ins Insert 20 Del Clash 21 F1 Function key 1 22 F2 Function key 2 23 F3 Function key 3 24 F4 Function key 4 25 F5 Function key 5 26 F6 Function key 6 27 F7 Function key 7 28 F8 Function key 8 29 F9 Function key 9 30 F10 Function key 10
31 F11 Function key 11 32 F12 Function key 12 33 kbNoKey Dead key 34 Space Space 35 Back Backspace 36 Tab Tab 37 Enter Carriage return 38 Pause Suspend 39 Esc Exit 40 A-Z Capitalization A-Z 41 a-z Lowercase character a-z 42 0-9 Numeral 0-9 43 CtrlF1-CtrlF12 The Macintosh of Ctrl and function 44 CtrlA-CtrlZ The Macintosh of Ctrl and letter 45 AltF1-AltF12 The Macintosh of Alt and function 46 AltA-AltZ The Macintosh of Alt and letter 47 ShiftF1-ShiftF12 The Macintosh of Shift and function 48 ShiftA-ShiftZ The Macintosh of Shift and letter
3. numerical control software test macro as claimed in claim 1, is characterized in that:
In described interface data verification file, the project corresponding relation in the parameter of every line item and check item is as shown in table 2:
Table 2.
CN201210524866.3A 2012-12-06 2012-12-06 Numerical control software testing system CN103019936B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210524866.3A CN103019936B (en) 2012-12-06 2012-12-06 Numerical control software testing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210524866.3A CN103019936B (en) 2012-12-06 2012-12-06 Numerical control software testing system

Publications (2)

Publication Number Publication Date
CN103019936A CN103019936A (en) 2013-04-03
CN103019936B true CN103019936B (en) 2015-07-22

Family

ID=47968561

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210524866.3A CN103019936B (en) 2012-12-06 2012-12-06 Numerical control software testing system

Country Status (1)

Country Link
CN (1) CN103019936B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103218293B (en) * 2013-04-12 2016-01-20 深圳市汇川控制技术有限公司 A kind of PLC on-line debugging system and method
CN105446874B (en) * 2014-09-25 2019-03-15 北京畅游天下网络技术有限公司 A kind of detection method and device of resource distribution file
CN105446767A (en) * 2015-10-27 2016-03-30 深圳市科陆电子科技股份有限公司 Method and system for upgrading terminal software in production test of rear installation of intelligent platform
CN105607995A (en) * 2015-11-11 2016-05-25 北汽福田汽车股份有限公司 Software test system, method and apparatus
CN105679375A (en) * 2015-12-31 2016-06-15 浪潮(北京)电子信息产业有限公司 Automatic test system of storage equipment, and method thereof
CN108009093A (en) * 2017-12-22 2018-05-08 北京远特科技股份有限公司 A kind of method for testing software, apparatus and system
CN108183962A (en) * 2018-01-04 2018-06-19 上海瀚之友信息技术服务有限公司 A kind of simulated testing system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101758422A (en) * 2009-12-10 2010-06-30 华中科技大学 Detection analysis device for technical indexes of numerical control device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101758422A (en) * 2009-12-10 2010-06-30 华中科技大学 Detection analysis device for technical indexes of numerical control device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
RTEMS任务级别调试技术研究;党建勋等;《单片机与嵌入式系统应用》;20090331(第3期);第8页到第10页 *
嵌入式数控系统人机界面及系统软件研究与开发;陆巍;《中国优秀硕士学位论文全文数据库工程科技I辑》;20061215;全文 *

Also Published As

Publication number Publication date
CN103019936A (en) 2013-04-03

Similar Documents

Publication Publication Date Title
Jan et al. An innovative approach to investigate various software testing techniques and strategies
US9846638B2 (en) Exposing method related data calls during testing in an event driven, multichannel architecture
US9424167B2 (en) Automated testing of an application system
CN102033803B (en) Method and device for testing web application across browsers
US20150135100A1 (en) Visual state comparator
CN101620564B (en) Method for automatically testing recording playback mode of terminal system
US8549478B2 (en) Graphical user interface input element identification
CN101369249B (en) Method and apparatus for marking GUI component of software
JP6621204B2 (en) Systems and methods for model-based techniques and processes for safety-oriented software development
WO2016095554A1 (en) Test method, device and system for application
US20140132571A1 (en) Automated testing of gesture-based applications
US7093238B2 (en) Automated software testing and validation system
CN101672878B (en) Chip testing device and chip testing method
US9075911B2 (en) System and method for usage pattern analysis and simulation
US8219548B2 (en) Data processing method and data analysis apparatus
CN101135989A (en) Automatization test method and device for Web applied system
Gojare et al. Analysis and design of selenium webdriver automation testing framework
CN103744784A (en) Method and system for automatically testing mobile phone applications
US9841826B2 (en) Automatic test system and test method for computer, record medium, and program product
CN103078745A (en) Logon authentication code based on picture
US9152542B2 (en) Automatic generation of test scripts
CN104035867A (en) Android-based application function traverse test method
CN103226485A (en) Code publishing method, machine and system
CN102662828A (en) A method and device for achieving software automatic testing
EP3152650B1 (en) High-speed application for installation on mobile devices for permitting remote configuration of such mobile devices

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20170508

Address after: 528000, Taoyuan Road, Songgang Pine Industrial Park, Foshan Town, Nanhai District, Guangdong, China (B workshop)

Patentee after: FOSHAN HUASHU ROBOT CO, LTD.

Address before: 430223 Hubei city of Wuhan province East Lake Development Zone China Science and Technology Park

Patentee before: Wuhan Huazhong Numerical Control Co., Ltd.