CN108121658A - Method based on WINDOWS ends testing tool test LINUX ends tested software - Google Patents
Method based on WINDOWS ends testing tool test LINUX ends tested software Download PDFInfo
- Publication number
- CN108121658A CN108121658A CN201711228114.1A CN201711228114A CN108121658A CN 108121658 A CN108121658 A CN 108121658A CN 201711228114 A CN201711228114 A CN 201711228114A CN 108121658 A CN108121658 A CN 108121658A
- Authority
- CN
- China
- Prior art keywords
- linux
- tested software
- windows
- testing tool
- test
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
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 a kind of methods based on WINDOWS ends testing tool test LINUX ends tested software, first in LINUX ends configuration file shared cell and remote access unit, then at LINUX ends, modification configuration file allows the computer at WINDOWS ends to run the instruction on the computer of LINUX ends, pass through explorer mapping network disk at WINDOWS ends, WINDOWS ends testing tool is allow to accord with the tested software and test result file for accessing LINUX ends by hard disk, the method for the present invention has the characteristics that configuration is simple, do not influence to test basic procedure.
Description
Technical field
The present invention relates to one kind based on WINDOWS ends testing tool test LINUX ends tested software method, suitable for operation
The unit testing of C language embedded software under LINUX environment.
Background technology
Software unit testing is a substance of software test.In the higher neck of the security requirements such as space flight, aviation
Domain, higher requirement is proposed to software unit testing, and (such as on the basis of function accuracy is met, sentence covering rate divides
Branch coverage rate reaches 100% etc.).
Software unit testing tool kind is more at present, but is all only to support a kind of running environment, i.e., or
It runs under WINDOWS environment or is run under LINUX environment.Due to environment versatility etc., constituent parts use at present
Software unit testing instrument is mostly based on WINDOWS running environment, unit testing work of the less use based on LINUX environment
Tool.But have some tested softwares that can only be compiled under LINUX environment in engineering practice, unit is carried out to these softwares
Test needs to purchase the unit test tool of individual LINUX environment, but this had not only needed additional business models, but also needs certain
Procurement cycle.
The content of the invention
The technology of the present invention solves the problems, such as:To overcome the shortcomings of the existing technology, it proposes a kind of based on the survey of WINDOWS ends
Trial work tool test LINUX ends tested software method carries out unit with tested software under being realized at WINDOWS ends to LINUX environment
Test and coverage rate analysis.
The present invention technical solution be:
Based on the method for WINDOWS ends testing tool test LINUX ends tested software, testing tool include compilation unit,
Input unit, expected results setting unit are tested, is as follows:
(1) in LINUX ends configuration file shared cell so that the file at LINUX ends can be accessed from WINDOWS ends;
LINUX ends configure remote access unit so that the instruction at LINUX ends can be remotely performed from WINDOWS ends;
(2) set to specify the configuration of the computer ip addresses that can be remotely accessed and user name literary at LINUX ends
Part so that the WINDOWS ends computer that set ip addresses and user name are consistent from configuration file can perform
Instruction on the computer of LINUX ends;
(3) it is network magnetic by the map paths that tested software is stored in LINUX ends by explorer at WINDOWS ends
Disk, after WINDOWS ends testing tool is allow to accord with the tested software for accessing LINUX ends and tested software execution by network disk
The test result file of generation;
(4) according to the requirement of tested software design documentation, set by the test input unit of WINDOWS ends testing tool
Input data is tested, the expection of tested software is set by expected results setting unit according to the requirement of tested software design documentation
Test result, the compilation unit of modification WINDOWS ends testing tool, increases capable of making remote access on the basis of former compilation unit
The ip addresses of LINUX ends computer and user name, form amended compilation unit, allow WINDOWS ends testing tool remote
The Complied executing instruction at Cheng Zhihang LINUX ends;
(5) tested software for reading LINUX ends is accorded with by network disk using WINDOWS ends testing tool, calls modification
Compilation unit afterwards carrys out the long-range Complied executing instruction for performing LINUX ends, and tested software and test input data are compiled
It performs, and test result file is generated at LINUX ends, read test knot is accorded with from WINDOWS ends testing tool by network disk
Fruit file, and be compared with the expected test result in step 4, if it is inconsistent, illustrating tested software existing defects;Such as
Fruit unanimously then enters step 6;
(6) test result file read in step 5 is analyzed using WINDOWS ends testing tool, analysis is wherein
Sentence covering rate, branch covering rate, if the two coverage rate is not up to 100%, enter step 5, set according to tested software
Counting the requirement of document increases new test input data, if the two coverage rate reaches 100%, illustrates that tested software meets and wants
It asks, if the two coverage rate is not up to 100%, illustrates tested software existing defects.
In step 6 when increasing new test input data, according in tested software design documentation to testing input data
The requirement of scope inputted.
In step 6 when increasing new test input data, according in tested software design documentation to testing input data
Area requirement beyond data inputted.
Compilation unit in step 4 can the compiler according to used in tested software make choice configuration, to ensure to survey
The compiler that trial work tool uses is consistent with the compiler that tested software uses.
Using testing tool anolytic sentence coverage rate, the accumulated value of branch covering rate, sentence covering rate and branch in step 6
Coverage rate reaches 100% and sentence all in tested software and branch is required to be performed.
The present invention compared with prior art the advantages of be:
(1) present invention is solved carries out unit testing based on WINDOWS environment testing tool to LINUX ends tested software
Problem can access the tested software and test result file at LINUX ends by configuring from WINDOWS ends testing tool,
And LINUX ends are implemented to remotely access, and have the characteristics that configuration is simple, do not influence to test basic procedure, to extend existing survey
Trial work tool application range provides simple and practical method;
(2) present invention allows to test from WINDOWS ends by changing the compilation unit of WINDOWS ends testing tool
Instrument remotely performs the Complied executing instruction at LINUX ends, and test data input process, expected results setting up procedure exist
WINDOWS ends carry out, and on the basis of being verified to tested software function accuracy, then meet sentence covering rate and branch's covering
Rate requirement;
(3) application range of WINDOWS ends testing tool can be expanded using this method, used by the method for the present invention across
Platform idea and method, which can expand to other WINDOWS ends softwares, to be needed to access the file at LINUX ends or operation LINUX
The scene during program at end, and on original testing process without influence.
Description of the drawings
Fig. 1 is the flow chart of the method for the present invention.
Specific embodiment
As shown in Figure 1, the present invention is based on WINDOWS ends testing tool test LINUX ends tested software method, by configuration text
Part shared cell and remote access unit modification LINUX end remote access configuration files, mapping LINUX ends storage tested software road
Footpath is network disk, sets test input data and expected results data, changes the compilation unit of WINDOWS ends testing tool,
The tested software for reading LINUX ends is accorded with by network disk, is held by changing compilation unit come the long-range compiling for performing LINUX ends
Row instruction accords with read test destination file by network disk, test result file is compared with expected test result, right
Test result file carries out the processes composition such as sentence covering rate and branch covering rate analysis.Wherein Complied executing instruction content be
Compiler is called to be compiled, perform to tested software and generate test result file.
Standard unit testing process is as follows under WINDOWS environment:Tested software is read using testing tool, sets test defeated
Enter data and expected results data, operation Complied executing instruction are compiled execution and obtain to test input data and tested software
Test result file is compared test result file with expected test result, and test result file is covered into line statement
Rate and branch covering rate analysis.Wherein the content of Complied executing instruction is compiled tested software, performs for calling compiler
And generate test result file.
From the above process as can be seen that since tested software source code and test result file are respectively positioned in the present invention
LINUX ends, it is necessary first to solve the problems, such as how from WINDOWS ends to read LINUX ends file;Secondly need solve how from
The problem of WINDOW ends operation LINUX ends Complied executing instruction.The above problem can be by LINUX ends configuration file shared cell
It is solved with remote access unit.
Configuration file shared cell and remote access unit
Firstly the need of solving the problems, such as to read LINUX ends file from WINDOWS ends, this passes through configuration file shared cell
(installation and operating file shared cell software at LINUX ends) is completed.
Secondly need to solve the Complied executing instruction issue for performing LINUX ends from the testing tool at WINDOWS ends, this is first
Remote access unit (installed at LINUX ends and run remote access unit software) is needed to configure, is changed again on this basis
WINDOWS ends are used for the configuration file remotely accessed.
Modification remote access configuration file process is as follows:
Change the .rhosts files at LINUX ends so that the computer at WINDOWS ends can run LINUX ends computer
On RSH orders, specific method is increases following code in .rhosts files:WINDOWS ends computer ip address root
(user name);.
Change WINDOWS ends testing tool compilation unit
Compiling, it is necessary to WINDOWS ends testing tool has been configured after configuration file shared cell and remote access unit
Unit is modified, and concrete mode is as follows:Increase the LINUX ends computer remotely accessed on the basis of former compilation unit
Ip addresses and user name, form amended compilation unit:It is long-range the purpose is to pass through WINDOWS ends testing tool
Access the Complied executing instruction at operation LINUX ends.
It is tested using WINDOWS ends testing tool after modification compilation unit
Complete it is above-mentioned with postponing, using the WINDOWS ends testing tool after modification compilation unit, according to aforesaid standards unit
Test process carries out unit testing, and detailed process is:Tested software is read from WINDOWS ends testing tool, sets test defeated
Enter data and expected results data, operation Complied executing instruction are compiled and are tested to test input data and tested software
Destination file, test result file is compared with expected test result, to test result file carry out sentence covering rate and
Branch covering rate is analyzed.
The present invention is allowed to by changing the compilation unit of WINDOWS ends testing tool from WINDOWS ends testing tool
It is instructed by the Complied executing for remotely accessing operation LINUX ends, test data input process, expected results setting up procedure exist
WINDOWS ends carry out, and on the basis of being verified to tested software function accuracy, then meet sentence covering rate and branch's covering
Rate requirement;
The application range of WINDOWS ends testing tool can be expanded using this method, the method for the present invention is used across flat
Platform idea and method, which can expand to other WINDOWS ends softwares, to be needed to access the file at LINUX ends or runs LINUX ends
Scene during program, and on original testing process without influence.
The content not being described in detail in description of the invention belongs to the known technology of those skilled in the art.
Claims (5)
1. based on the method for WINDOWS ends testing tool test LINUX ends tested software, testing tool includes compilation unit, surveys
Try input unit, expected results setting unit, which is characterized in that be as follows:
(1) in LINUX ends configuration file shared cell so that the file at LINUX ends can be accessed from WINDOWS ends;In LINUX
End configuration remote access unit so that the instruction at LINUX ends can be remotely performed from WINDOWS ends;
(2) set for specifying the configuration file of the computer ip addresses that can be remotely accessed and user name, make at LINUX ends
LINUX ends can be performed by obtaining the consistent WINDOWS ends computer in ip addresses and user name set from configuration file
Instruction on computer;
(3) LINUX ends are stored as network disk by explorer by the map paths of tested software at WINDOWS ends, made
WINDOWS ends testing tool generates after the tested software at access LINUX ends and tested software execution can be accorded with by network disk
Test result file;
(4) according to the requirement of tested software design documentation, test is set by the test input unit of WINDOWS ends testing tool
Input data sets the expected test of tested software by expected results setting unit according to the requirement of tested software design documentation
As a result, the compilation unit of modification WINDOWS ends testing tool, increases capable of making remote access on the basis of former compilation unit
The ip addresses of LINUX ends computer and user name, form amended compilation unit, allow WINDOWS ends testing tool remote
The Complied executing instruction at Cheng Zhihang LINUX ends;
(5) tested software for reading LINUX ends is accorded with by network disk using WINDOWS ends testing tool, is called amended
Compilation unit carrys out the long-range Complied executing instruction for performing LINUX ends, and execution is compiled to tested software and test input data,
And test result file is generated at LINUX ends, accord with read test result text from WINDOWS ends testing tool by network disk
Part, and be compared with the expected test result in step 4, if it is inconsistent, illustrating tested software existing defects;If one
Cause then enters step 6;
(6) test result file read in step 5 is analyzed using WINDOWS ends testing tool, analyzes language therein
Sentence coverage rate, branch covering rate, if the two coverage rate is not up to 100%, enter step 5, and text is designed according to tested software
The requirement of shelves increases new test input data, if the two coverage rate reaches 100%, illustrates that tested software is met the requirements,
If the two coverage rate is not up to 100%, illustrate tested software existing defects.
2. the method according to claim 1 based on WINDOWS ends testing tool test LINUX ends tested software, special
Sign is:In step 6 when increasing new test input data, according in tested software design documentation to test input data
The requirement of scope is inputted.
3. the method according to claim 1 based on WINDOWS ends testing tool test LINUX ends tested software, special
Sign is:In step 6 when increasing new test input data, according in tested software design documentation to test input data
Data beyond area requirement are inputted.
4. the method according to claim 1 based on WINDOWS ends testing tool test LINUX ends tested software, special
Sign is:Compilation unit in step 4 can the compiler according to used in tested software make choice configuration, to ensure to test
The compiler that instrument uses is consistent with the compiler that tested software uses.
5. the method according to claim 1 based on WINDOWS ends testing tool test LINUX ends tested software, special
Sign is:Using testing tool anolytic sentence coverage rate, the accumulated value of branch covering rate, sentence covering rate and branch in step 6
Coverage rate reaches 100% and sentence all in tested software and branch is required to be performed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711228114.1A CN108121658B (en) | 2017-11-29 | 2017-11-29 | Method for testing LINUX end tested software based on WINDOWS end testing tool |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711228114.1A CN108121658B (en) | 2017-11-29 | 2017-11-29 | Method for testing LINUX end tested software based on WINDOWS end testing tool |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108121658A true CN108121658A (en) | 2018-06-05 |
CN108121658B CN108121658B (en) | 2020-11-20 |
Family
ID=62228635
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711228114.1A Active CN108121658B (en) | 2017-11-29 | 2017-11-29 | Method for testing LINUX end tested software based on WINDOWS end testing tool |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108121658B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109376525A (en) * | 2018-09-14 | 2019-02-22 | 网宿科技股份有限公司 | Reminding method, Linux server and the computer readable storage medium of Linux server |
CN112416773A (en) * | 2020-11-23 | 2021-02-26 | 通号万全信号设备有限公司 | Cross-platform data visualization method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130276053A1 (en) * | 2012-04-11 | 2013-10-17 | Mcafee, Inc. | System asset repository management |
CN103631704A (en) * | 2012-08-23 | 2014-03-12 | 上海斐讯数据通信技术有限公司 | Automatic testing system and method of communication equipment |
CN104978275A (en) * | 2015-07-16 | 2015-10-14 | 北京航空航天大学 | DO-178C software test process orientated object verification and evidence model extracting method |
CN105487974A (en) * | 2015-11-25 | 2016-04-13 | 普华基础软件股份有限公司 | Software stability test method |
CN106161143A (en) * | 2016-07-22 | 2016-11-23 | 浪潮电子信息产业股份有限公司 | A kind of network performance test method based on ARM server and device |
-
2017
- 2017-11-29 CN CN201711228114.1A patent/CN108121658B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130276053A1 (en) * | 2012-04-11 | 2013-10-17 | Mcafee, Inc. | System asset repository management |
CN103631704A (en) * | 2012-08-23 | 2014-03-12 | 上海斐讯数据通信技术有限公司 | Automatic testing system and method of communication equipment |
CN104978275A (en) * | 2015-07-16 | 2015-10-14 | 北京航空航天大学 | DO-178C software test process orientated object verification and evidence model extracting method |
CN105487974A (en) * | 2015-11-25 | 2016-04-13 | 普华基础软件股份有限公司 | Software stability test method |
CN106161143A (en) * | 2016-07-22 | 2016-11-23 | 浪潮电子信息产业股份有限公司 | A kind of network performance test method based on ARM server and device |
Non-Patent Citations (1)
Title |
---|
ZHUIFENG1024: "《windows访问Linux共享的文件》", 《CSDN博客》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109376525A (en) * | 2018-09-14 | 2019-02-22 | 网宿科技股份有限公司 | Reminding method, Linux server and the computer readable storage medium of Linux server |
CN109376525B (en) * | 2018-09-14 | 2020-11-03 | 网宿科技股份有限公司 | Prompting method of Linux server, Linux server and computer readable storage medium |
CN112416773A (en) * | 2020-11-23 | 2021-02-26 | 通号万全信号设备有限公司 | Cross-platform data visualization method |
Also Published As
Publication number | Publication date |
---|---|
CN108121658B (en) | 2020-11-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10691419B2 (en) | Reconstructing a high level compilable program from an instruction trace | |
CN102831060B (en) | Modification influence analysis based regression test case updating method of part software | |
US9141350B2 (en) | Embedded system performance | |
US7861217B2 (en) | Non-graphical model dependencies in graphical modeling environments | |
CN112270149B (en) | Verification platform automatic integration method and system, electronic equipment and storage medium | |
CN104424093A (en) | Compatibility testing method and system | |
Brunei et al. | Turnus: A design exploration framework for dataflow system design | |
CN107015841B (en) | Preprocessing method for program compiling and program compiling device | |
JP7262818B2 (en) | Software environment for controlling engine debugging, testing, calibration and tuning | |
CN104268310A (en) | Method for calling UVM verification environment through special graphical interface | |
Essawy et al. | A taxonomy for reproducible and replicable research in environmental modelling | |
CN104572463A (en) | Method and device for testing interface information | |
CN102722438B (en) | Kernel debugging method and equipment | |
Goli et al. | AIBA: an Automated Intra-cycle Behavioral Analysis for SystemC-based design exploration | |
CN104834600A (en) | Method for testing Android application controls | |
CN104317715A (en) | Simulator based automatic functional test implementation method for central processing unit instruction sets | |
Stoppe et al. | Data extraction from SystemC designs using debug symbols and the SystemC API | |
CN111338925A (en) | Applet test method, device and system, electronic equipment and storage medium | |
CN104699523A (en) | Debugging method and system used for application programs developed by hardware platform | |
CN109933770A (en) | A kind of test report generation method, system and electronic equipment and storage medium | |
CN108121658A (en) | Method based on WINDOWS ends testing tool test LINUX ends tested software | |
JP2017162130A (en) | Hardware/software cooperative verification device and hardware/software cooperative verification method | |
US10223077B2 (en) | Determination of signals for readback from FPGA | |
CN113360373A (en) | Test method for full traversal of Activity page of mobile application | |
Rashid | An efficient cycle accurate performance estimation model for hardware software co-design |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |