CN106201867A - Customizable automatic unit method of testing and system under a kind of Linux platform - Google Patents

Customizable automatic unit method of testing and system under a kind of Linux platform Download PDF

Info

Publication number
CN106201867A
CN106201867A CN201610499184.XA CN201610499184A CN106201867A CN 106201867 A CN106201867 A CN 106201867A CN 201610499184 A CN201610499184 A CN 201610499184A CN 106201867 A CN106201867 A CN 106201867A
Authority
CN
China
Prior art keywords
file
unit
folder
testing
configuration information
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.)
Granted
Application number
CN201610499184.XA
Other languages
Chinese (zh)
Other versions
CN106201867B (en
Inventor
郑伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Urumqi Bangbangjun Technology Co ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201610499184.XA priority Critical patent/CN106201867B/en
Publication of CN106201867A publication Critical patent/CN106201867A/en
Application granted granted Critical
Publication of CN106201867B publication Critical patent/CN106201867B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses customizable automatic unit method of testing under a kind of Linux platform, relate to software automatic test field, including the configuration information obtained in predefined configuration file, configuration information includes needing the file or folder title, corresponding document or the file that are monitored the need of carrying out unit testing and corresponding document or the mapping address of each self-corresponding unit testing use-case of file;Obtain, according to configuration information, the file or folder list needing to be monitored and monitor in real time;After monitoring modification information, judge that the file or folder that change occurs, the need of carrying out unit testing, and is searched according to the mapping address of corresponding unit testing use-case and acquiring unit test case perform the unit testing of all files or file according to configuration information.The present invention can automatically search unit testing use-case and test with performance element.The invention also discloses customizable automatic unit test system under a kind of Linux platform.

Description

Customizable automatic unit method of testing and system under a kind of Linux platform
Technical field
The present invention relates to software automatic test field, be specifically related to customizable automatic unit under a kind of Linux platform and survey Method for testing and system.
Background technology
In order to control software code quality, preferably evade the appearance of program error, it is however generally that need updating software Before or after function code, the unit testing use-case corresponding to the written in code updated, perform list after the most more fresh code Unit's test case, verification software the most correctly runs, thus evades the appearance of program error.Existing way is typically to monitor After code update, the artificial unit testing use-case searching correspondence is also manually started performance element test;After unit testing terminates, people Work point analysis test structure is the most all passed through.The method defect be can not customization units test case, need manually the most single Unit's test case is searched, takes time and effort;Effective informing mechanism is lacked for test result, needs manually test result to be carried out Analyze, find out unsanctioned unit testing.
Summary of the invention
For defect present in prior art, it is an object of the invention to provide under a kind of Linux platform customizable Automatic unit method of testing and system, can automatically search unit testing use-case and test with performance element.
For reaching object above, the present invention adopts the technical scheme that: customizable automatic unit under a kind of Linux platform Method of testing, obtains the configuration information in predefined configuration file, and described configuration information includes the literary composition needing to be monitored Part or Folder Name, corresponding document or file are the need of carrying out unit testing and corresponding document or file is the most right The mapping address of the unit testing use-case answered;The file or folder list needing to be monitored is obtained according to configuration information, real Time monitor the modification information of file or folder in described list;After monitoring modification information, judge to occur according to configuration information The file or folder of change is the need of carrying out unit testing, and the file or folder carrying out unit testing as required exists The mapping address of unit testing use-case corresponding in configuration information is searched and acquiring unit test case, then with the unit obtained Test case performs all to occur to change and need to carry out the unit testing of the file or folder of unit testing.
On the basis of technique scheme, comprise the following steps:
S1, obtains the configuration information in predefined configuration file;
S2, obtains the file or folder list needing to be monitored according to configuration information;
S3, monitors the modification information of file or folder in described list in real time;
According to configuration information, S4, after monitoring modification information, judges that the file or folder that change occurs is the need of entering Row unit testing;If so, step S5 is entered;If it is not, be directly entered step S7;
S5, carries out file or folder unit testing use-case of correspondence in configuration information of unit testing as required Mapping address is searched and acquiring unit test case;
S6, performs change all occurs and need to carry out the file or folder of unit testing with the unit testing use-case obtained Unit testing;
S7, whole unit testings are finished, print result, terminate.
On the basis of technique scheme, described configuration file has been pre-defined by developer.
On the basis of technique scheme, described configuration information includes the file or folder name needing to be monitored Title, corresponding document or file are the need of carrying out unit testing and corresponding document or each self-corresponding unit testing of file The mapping address of use-case.
On the basis of technique scheme, described step S7 also includes:
S701, whole unit testings are finished, it may be judged whether all files or file pass through unit testing;If it is not, Enter step S702;If so, step S703 it is directly entered;
S702, sends mail notification developer not by the file or folder result of unit testing;
S703, print result.
Present invention additionally comprises customizable automatic unit test system under a kind of Linux platform, including: real-time files monitors Module, test case search module and unit testing performs module, wherein:
Described real-time files monitoring module for obtaining the file needing to be monitored according to predefined configuration information Or Folder List;Monitor the modification information of file or folder described in described list in real time;Modification information is sent to institute State test case and search module;
Described test case is searched module and is used for receiving after described real-time files monitoring module monitors modification information, root Judge that the file or folder that change occurs, the need of carrying out unit testing, and carries out unit survey as required according to configuration information The file or folder of examination is searched and acquiring unit test case at the mapping address of unit testing use-case corresponding to configuration information;
Described unit testing performs module for searching, with described test case, the unit testing use-case execution that module obtains All there is to change and need to carry out the unit testing of the file or folder of unit testing.
On the basis of technique scheme, described configuration information includes the file or folder name needing to be monitored Title, corresponding document or file are the need of carrying out unit testing and corresponding document or each self-corresponding unit testing of file The mapping address of use-case.
On the basis of technique scheme, automatic unit test system also includes test result reporting module, described survey Test result reporting module is for sending mail notification developer not by the file or folder result of unit testing.
Compared with prior art, it is an advantage of the current invention that:
1, whole unit testing process is without manual intervention, saves human cost, and real-time is high.
2, it is file and file customization units test case in advance, automatically searches according to the mapping address in configuration information Corresponding unit testing use-case carries out unit testing.
3, automatically by the test result of the file or folder of unsanctioned unit testing with mail notification developer, make Developer learns in time and repairs problem that may be present in code.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of customizable automatic unit method of testing under Linux platform in the embodiment of the present invention;
Fig. 2 is that in the embodiment of the present invention, under Linux platform, the flow process of customizable automatic unit method of testing step S7 is shown It is intended to;
Fig. 3 is that in the embodiment of the present invention, under Linux platform, customizable automatic unit tests the structural representation of system.
In figure: 1-real-time files monitoring module, 2-test case searches module, and 3-unit testing performs module, and 4-tests Result reporting module.
Detailed description of the invention
Below in conjunction with drawings and Examples, the present invention is described in further detail.
Shown in Figure 1, the embodiment of the present invention provides customizable automatic unit method of testing one under a kind of Linux platform Plant customizable automatic unit method of testing under Linux platform, including: obtain the configuration letter in predefined configuration file Breath, configuration file has been pre-defined by developer.File or folder title that configuration information includes needing being monitored, Corresponding document or file are the need of carrying out unit testing and corresponding document or file each self-corresponding unit testing use The mapping address of example;The file or folder list needing to be monitored, real-time watch-list Chinese is obtained according to configuration information Part or the modification information of file;After monitoring modification information, judge to occur the file or folder of change according to configuration information The need of carrying out unit testing, and carry out file or folder list of correspondence in configuration information of unit testing as required The mapping address of unit's test case is searched and acquiring unit test case, then performs all to send out with the unit testing use-case obtained Change more and the unit testing of file or folder of unit testing need to be carried out.
Comprise the following steps:
S1, obtains the configuration information in predefined configuration file;Configuration information includes the file needing to be monitored Or Folder Name, corresponding document or file are the need of carrying out unit testing and corresponding document or file is the most corresponding The mapping address of unit testing use-case.
S2, obtains the file or folder list needing to be monitored according to configuration information;
S3, the modification information of file or folder in real-time watch-list;
According to configuration information, S4, after monitoring modification information, judges that the file or folder that change occurs is the need of entering Row unit testing;If so, step S5 is entered;If it is not, be directly entered step S7;Step S4 judging, whether file or folder needs The criterion of unit testing to be carried out is: be set to need the file or folder carrying out unit testing be in configuration information It is to enter step S5;It is no for being set to the file or folder without carrying out unit testing in configuration information, is directly entered step S7。
S5, carries out file or folder unit testing use-case of correspondence in configuration information of unit testing as required Mapping address is searched and acquiring unit test case;
S6, performs change all occurs and need to carry out the file or folder of unit testing with the unit testing use-case obtained Unit testing;
S7, whole unit testings are finished, print result, terminate.
Shown in Figure 2, step S7 also includes:
S701, whole unit testings are finished, it may be judged whether all files or file pass through unit testing;If it is not, Enter step S702;If so, step S703 it is directly entered;
S702, sends mail notification developer not by the file or folder result of unit testing;
S703, print result.
Shown in Figure 3, the invention also discloses customizable automatic unit test system, bag under a kind of Linux platform Include: real-time files monitoring module 1, test case search module 2 and unit testing performs module 3, wherein: real-time files monitoring mould Block 1 for obtaining the file or folder list needing to be monitored according to the configuration information in predefined configuration file; The modification information of file or folder in watch-list in real time;Modification information is sent to test case lookup module 2;Test is used Example is searched module 2 and is used for receiving after real-time files monitoring module 1 monitors modification information, judges to become according to configuration information File or folder more is the need of carrying out unit testing, and the file or folder carrying out unit testing as required is being joined The mapping address of the unit testing use-case that confidence breath is corresponding is searched and acquiring unit test case;Unit testing performs module 3 and uses In searching unit testing use-case execution all generation changes that module 2 obtains and the file that unit testing need to be carried out with test case Or the unit testing of file.Configuration information includes needing the file or folder title being monitored, the file or folder are No needs carries out unit testing and the mapping address of each self-corresponding unit testing use-case of file or folder.Automatic unit is surveyed Test system also includes that test result reporting module 4, test result reporting module 4 are used for sending mail notification developer and do not pass through The file or folder result of unit testing.
The present invention is not limited to above-mentioned embodiment, for those skilled in the art, without departing from On the premise of the principle of the invention, it is also possible to make some improvements and modifications, these improvements and modifications are also considered as the protection of the present invention Within the scope of.The content not being described in detail in this specification belongs to prior art known to professional and technical personnel in the field.

Claims (8)

1. customizable automatic unit method of testing under a Linux platform, it is characterised in that:
Obtaining the configuration information in predefined configuration file, described configuration information includes file or the literary composition needing to be monitored Part folder title, corresponding document or file are the need of carrying out unit testing and corresponding document or each self-corresponding list of file The mapping address of unit's test case;
Obtain the file or folder list needing to be monitored according to configuration information, monitor file or literary composition in described list in real time The modification information of part folder;
After monitoring modification information, judge that the file or folder that change occurs is the need of carrying out unit survey according to configuration information Examination, and carry out the mapping ground of file or folder unit testing use-case of correspondence in configuration information of unit testing as required Location is searched and acquiring unit test case, then performs change all occurs and need to carry out unit with the unit testing use-case obtained The unit testing of the file or folder of test.
2. customizable automatic unit method of testing under a kind of Linux platform as claimed in claim 1, it is characterised in that: bag Include following steps:
S1, obtains the configuration information in predefined configuration file;
S2, obtains the file or folder list needing to be monitored according to configuration information;
S3, monitors the modification information of file or folder in described list in real time;
According to configuration information, S4, after monitoring modification information, judges that the file or folder that change occurs is the need of carrying out list Unit's test;If so, step S5 is entered;If it is not, be directly entered step S7;
S5, carries out file or folder mapping of the unit testing use-case of correspondence in configuration information of unit testing as required Address search acquiring unit test case;
S6, performs all to occur to change and need to carry out the list of the file or folder of unit testing with the unit testing use-case obtained Unit's test;
S7, whole unit testings are finished, print result, terminate.
3. customizable automatic unit method of testing under a kind of Linux platform as claimed in claim 2, it is characterised in that: institute State configuration file to have been pre-defined by developer.
4. customizable automatic unit method of testing under a kind of Linux platform as claimed in claim 3, it is characterised in that: institute State configuration information to include needing the file or folder title, corresponding document or the file that are monitored the need of carrying out unit Test and corresponding document or the mapping address of each self-corresponding unit testing use-case of file.
5. customizable automatic unit method of testing under a kind of Linux platform as claimed in claim 4, it is characterised in that: institute State step S7 also to include:
S701, whole unit testings are finished, it may be judged whether all files or file pass through unit testing;If it is not, enter Step S702;If so, step S703 it is directly entered;
S702, sends mail notification developer not by the file or folder result of unit testing;
S703, print result.
6. customizable automatic unit test system under a Linux platform, it is characterised in that including: real-time files monitoring mould Block (1), test case search module (2) and unit testing performs module (3), wherein:
Described real-time files monitoring module (1) for obtain according to predefined configuration information need the file that is monitored or Folder List;Monitor the modification information of file or folder described in described list in real time;Modification information is sent to described Test case searches module (2);
Described test case is searched module (2) and is used for receiving after described real-time files monitoring module (1) monitors modification information, File or folder according to configuration information judgement generation change is the need of carrying out unit testing, and carries out unit as required The file or folder of test is searched and acquiring unit test is used at the mapping address of unit testing use-case corresponding to configuration information Example;
Described unit testing performs module (3) and holds for the unit testing use-case obtained with described test case lookup module (2) All there is to change and need to carry out the unit testing of the file or folder of unit testing in row.
7. customizable automatic unit test system under a Linux platform as claimed in claim 6, it is characterised in that: described Configuration information includes needing the file or folder title, corresponding document or the file that are monitored the need of carrying out unit survey Examination and corresponding document or the mapping address of each self-corresponding unit testing use-case of file.
8. customizable automatic unit test system under a Linux platform as claimed in claim 6, it is characterised in that: automatically Unit test system also includes that test result reporting module (4), described test result reporting module (4) are used for sending mail notification Developer is not by the file or folder result of unit testing.
CN201610499184.XA 2016-06-29 2016-06-29 Customized automatic unit test method and system under a kind of Linux platform Active CN106201867B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610499184.XA CN106201867B (en) 2016-06-29 2016-06-29 Customized automatic unit test method and system under a kind of Linux platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610499184.XA CN106201867B (en) 2016-06-29 2016-06-29 Customized automatic unit test method and system under a kind of Linux platform

Publications (2)

Publication Number Publication Date
CN106201867A true CN106201867A (en) 2016-12-07
CN106201867B CN106201867B (en) 2019-01-29

Family

ID=57463443

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610499184.XA Active CN106201867B (en) 2016-06-29 2016-06-29 Customized automatic unit test method and system under a kind of Linux platform

Country Status (1)

Country Link
CN (1) CN106201867B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111078481A (en) * 2019-12-19 2020-04-28 哈尔滨安天科技集团股份有限公司 Method and device for acquiring configuration check list, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567164A (en) * 2011-12-23 2012-07-11 中国科学院自动化研究所 Instruction set batch testing device and method for processor
CN103152215A (en) * 2011-12-06 2013-06-12 鸿富锦精密工业(深圳)有限公司 Testing system and testing method of data center
CN104077213A (en) * 2013-03-26 2014-10-01 腾讯科技(深圳)有限公司 Webkit unit test method and webkit unit test device
US9021458B1 (en) * 2014-06-25 2015-04-28 Chef Software, Inc. Vertically integrated continuous delivery of an application
CN104750611A (en) * 2015-03-27 2015-07-01 北京奇虎科技有限公司 Method and device for achieving testing task submitting

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103152215A (en) * 2011-12-06 2013-06-12 鸿富锦精密工业(深圳)有限公司 Testing system and testing method of data center
CN102567164A (en) * 2011-12-23 2012-07-11 中国科学院自动化研究所 Instruction set batch testing device and method for processor
CN104077213A (en) * 2013-03-26 2014-10-01 腾讯科技(深圳)有限公司 Webkit unit test method and webkit unit test device
US9021458B1 (en) * 2014-06-25 2015-04-28 Chef Software, Inc. Vertically integrated continuous delivery of an application
CN104750611A (en) * 2015-03-27 2015-07-01 北京奇虎科技有限公司 Method and device for achieving testing task submitting

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111078481A (en) * 2019-12-19 2020-04-28 哈尔滨安天科技集团股份有限公司 Method and device for acquiring configuration check list, electronic equipment and storage medium
CN111078481B (en) * 2019-12-19 2023-12-26 安天科技集团股份有限公司 Method, device, electronic equipment and storage medium for acquiring configuration checklist

Also Published As

Publication number Publication date
CN106201867B (en) 2019-01-29

Similar Documents

Publication Publication Date Title
CN108563214B (en) Vehicle diagnosis method, device and equipment
CN111241154B (en) Storage battery fault early warning method and system based on big data
CN106610854B (en) Model updating method and device
CN107229827A (en) Data checking early warning method and device for autoimmune disease detection and analysis
CN110288007B (en) Data labeling method and device and electronic equipment
US20130086556A1 (en) System for ensuring comprehensiveness of requirements testing of software applications
CN105446878A (en) Continuous program automated testing method
CN109143094B (en) Abnormal data detection method and device for power battery
KR102124990B1 (en) Elevator remote maintenance support system, and elevator remote maintenance support method
US20220270419A1 (en) Vehicle diagnosis method and apparatus and storage medium
JP6525366B2 (en) Elevator remote maintenance support system
CN107918629A (en) The correlating method and device of a kind of alarm failure
CN110968873A (en) System and method for automatic penetration test based on artificial intelligence
CN113838013A (en) Blade crack real-time detection method and device in aero-engine operation and maintenance based on YOLOv5
CN112100137A (en) Unmanned aerial vehicle anomaly detection method based on multi-log collaborative analysis
CN105335599A (en) Vehicle failure diagnosis rate detection method and system
CN116795572A (en) Method, device, medium and equipment for rapidly processing faults of automobile diagnosis software
JPWO2021079792A5 (en)
CN106201867A (en) Customizable automatic unit method of testing and system under a kind of Linux platform
CN114460519A (en) On-site and terminal fusion management system and method based on power transformer inspection
CN117275644B (en) Detection result mutual recognition method, system and storage medium based on deep learning
CN116319081B (en) Electronic signature security management system based on big data cloud platform
CN110782721B (en) Teaching method, system and vehicle diagnosis equipment
CN112465793A (en) Train fault detection method, device, equipment and storage medium
CN208315019U (en) A kind of teaching experimental data acquisition and monitoring system

Legal Events

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

Effective date of registration: 20240304

Address after: 830000, Room 17A, Building 17, Block A, Times Square Community, No. 59 Guangming Road, Tianshan District, Urumqi, Xinjiang Uygur Autonomous Region BD00244

Patentee after: Urumqi Bangbangjun Technology Co.,Ltd.

Country or region after: China

Address before: 430000 Wuhan Donghu Development Zone, Wuhan, Hubei Province, No. 1 Software Park East Road 4.1 Phase B1 Building 11 Building

Patentee before: WUHAN DOUYU NETWORK TECHNOLOGY Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right