CN109491916A - A kind of test method of operating system, device, equipment, system and medium - Google Patents

A kind of test method of operating system, device, equipment, system and medium Download PDF

Info

Publication number
CN109491916A
CN109491916A CN201811341673.8A CN201811341673A CN109491916A CN 109491916 A CN109491916 A CN 109491916A CN 201811341673 A CN201811341673 A CN 201811341673A CN 109491916 A CN109491916 A CN 109491916A
Authority
CN
China
Prior art keywords
test
test case
case
module
host
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
CN201811341673.8A
Other languages
Chinese (zh)
Other versions
CN109491916B (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.)
BEIJING KEYIN JINGCHENG TECHNOLOGY Co Ltd
Kyland Technology Co Ltd
Original Assignee
BEIJING KEYIN JINGCHENG TECHNOLOGY Co Ltd
Kyland 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 BEIJING KEYIN JINGCHENG TECHNOLOGY Co Ltd, Kyland Technology Co Ltd filed Critical BEIJING KEYIN JINGCHENG TECHNOLOGY Co Ltd
Priority to CN201811341673.8A priority Critical patent/CN109491916B/en
Publication of CN109491916A publication Critical patent/CN109491916A/en
Application granted granted Critical
Publication of CN109491916B publication Critical patent/CN109491916B/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/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 embodiment of the invention discloses the test method of operating system, device, equipment, system and media, the test method of the operating system includes: the operating system testing component that host is selected according to user, the store path of the corresponding test case of search operation system testing component and exploitation environment in database server in configuration file obtains test case and exploitation environment from database server according to store path;Wherein, configuration file saves store path of the corresponding test case of every type operating system component in database server;Executable file of the host based on exploitation environment and test case building test case;The executable file of test case is issued to target machine by host, receives the test result of target machine feedback.The technical solution of the embodiment of the present invention can be realized the automatic high-efficiency test to operating system.

Description

A kind of test method of operating system, device, equipment, system and medium
Technical field
The present embodiments relate to computer system measuring technology more particularly to a kind of test methods of operating system, dress It sets, equipment, system and medium.
Background technique
Software test under normal conditions, tester needs to design reasonable test case first, according to presumptive test Planning procedures realize the software test based on test case and obtain test result, be finally compared with expected results, formed Software test conclusion.
Embedded software Automated Black Box Testing mainly uses Simulation Test Environment at present, i.e., embedded software running is in place In the non-genuine hardware environment of host, true hardware environment is replaced by emulator.Not with general embedded software Together, running environment of the operating system as application software, one of critical function are exactly the hardware such as CPU management, memory, peripheral hardware money Source, therefore when carrying out operating system Black-box Testing, test environment should use true hardware environment.Industrial service device operation system System is when carrying out Black-box Testing, and other than close hardware-dependent, related, at present embedding is also configured with specific application partition Enter formula software automated testing environment to also fail to provide good support.
Summary of the invention
The embodiment of the present invention provides test method, device, equipment, system and the medium of a kind of operating system, with realization pair The automatic high-efficiency of operating system is tested.
In a first aspect, the embodiment of the invention provides the test methods of operating system, comprising:
The operating system testing component that host is selected according to user, it is to be measured to search the operating system in configuration file Store path in database server of the corresponding test case of component and exploitation environment, according to the store path from described Database server obtains the test case and the exploitation environment;Wherein, the configuration file saves every type operating system Store path of the corresponding test case of component in database server;
The host constructs the executable file of the test case based on the exploitation environment and the test case;
The executable file of the test case is issued to target machine by the host, receives the target machine feedback Test result.
Second aspect, the embodiment of the invention provides a kind of test devices of operating system, are configured in host, described Device includes:
Test case obtains module, and the operating system testing component for being selected according to user is searched in configuration file The store path of the corresponding test case of the operating system testing component and exploitation environment in database server, according to institute It states store path and obtains the test case and the exploitation environment from the database server;Wherein, the configuration file Save store path of the corresponding test case of every type operating system component in database server;
Executable file determining module, for constructing the test case based on the exploitation environment and the test case Executable file;
Executable file issues module, for the executable file of the test case to be issued to target machine, receives institute State the test result of target machine feedback.
The third aspect, the embodiment of the invention provides a kind of electronic equipment, comprising:
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes the test method of the operating system as described in any in the embodiment of the present invention.
Fourth aspect, the embodiment of the invention provides the tests of operating system, including host and database server;Its In, the database server is for storing test case;The host is using electronic equipment described in the 5th aspect.
5th aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer Program realizes the test method of the operating system as described in any in the embodiment of the present invention when program is executed by processor.
The embodiment of the invention provides a kind of test method of operating system, device, equipment, system and medium, hosts The operating system testing component selected by user obtains corresponding test case and exploitation environment, place from database server The host executable file based on corresponding exploitation environment and test case building test case, and holding test case again Style of writing part is issued to target machine, receives the test result of target machine feedback, solves in the prior art, embedded software test is only The non-genuine hardware environment for relying on host, does not have real hardware Environmental Support, and the problem that the degree of automation is poor, realizes Improve the testing efficiency of Test Operating System and the effect of the degree of automation.
Detailed description of the invention
Fig. 1 is a kind of flow chart of the test method for operating system that the embodiment of the present invention one provides;
Fig. 2 is a kind of flow chart of the test method of operating system provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of flow chart of the test method for operating system that the embodiment of the present invention three provides;
Fig. 4 is a kind of structural schematic diagram of the test device for operating system that the embodiment of the present invention four provides;
Fig. 5 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present invention five provides;
Fig. 6 a is a kind of structural schematic diagram of the test macro for operating system that the embodiment of the present invention six provides;
Fig. 6 b is a kind of structural schematic diagram of the test macro for operating system that the embodiment of the present invention six provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is a kind of flow chart of the test method for operating system that the embodiment of the present invention one provides, and the present embodiment can fit The case where for testing operating system, typically, the operating system are server operating system, and this method can be by this The test device for the operating system that inventive embodiments provide executes, and the mode which can be used software and/or hardware realizes, It generally can integrate in various general purpose computing devices, and finally apply to the survey of operating system provided in an embodiment of the present invention In test system, as shown in Figure 1, the test method of the operating system of the present embodiment specifically comprises the following steps:
The operating system testing component that step 110, host are selected according to user, the search operation system in configuration file Store path in database server of the corresponding test case of testing component and exploitation environment, according to store path from number Test case and exploitation environment are obtained according to library server;Wherein, configuration file saves the corresponding test of every type operating system component Store path of the use-case in database server.
Wherein, operating system testing component is the test group that user selects from operating system component according to testing requirement Part, operating system testing component is including but not limited to file system, network protocol stack and kernel;Configuration file is stored in place Host local, for saving store path of the corresponding test case of every type operating system component in database server File;In the present embodiment the corresponding test case of operating system component include in target machine at least two application partitions with confidence Breath, the configuration information are answered including but not limited to progress information, thread information and storage space information, at least two of target machine It is at least two real time operating systems that server operating system includes with subregion, for a testing requirement, test case Quantity at least two;Exploitation environment be it is corresponding with test case, for the source file of compiler test use-case, generate executable The environment of file, for example, exploitation environment corresponding with the test case is C when the source file suffix of test case is " .c " Language compilation's environment, the source file that suffix is " .c " can be compiled as suffix using C language translation and compiling environment is holding for " .exe " Style of writing part.
In the present embodiment, the operating system testing component and local profile that host is selected according to user are believed It ceases, corresponding test case and exploitation environment in dispatching database server, during being somebody's turn to do, host passes through Ethernet and data Library server carries out communication interaction.
In database server, test case and test environment are only stored, without storing specific executable file, Setting can reduce the corresponding relationship in storing process in this way, consequently facilitating maintenance and extension to database server.
In a specific example, the operating system testing component that user selects is file system, according to configuration file The information of record determines that test case corresponding in database server has 10, wherein have 7 test cases to need It is compiled under C exploitation environment, there are 7 test case needs to compile under Java development environment, then host obtains this 10 tests Use-case and corresponding C exploitation environment and Java development environment.
The executable file of step 120, host based on exploitation environment and test case building test case.
In the present embodiment, host is according to pending test case, determines that use-case constructs task, and according to from data At least one test case and exploitation environment of server downloading, construct the executable file of at least one test case, and will The executable file of the test case of generation is stored under specified catalogue.
In this way be arranged the reason of be: due in file compilation process there may be it is some will not with file compile terminate and The data of destruction, these data may will affect other test cases, for example, being added to the source file of other test cases In, so executable file is locally constructed in host, rather than constructed in database server side, it is ensured that database clothes The pure property of business device end data.
The executable file of test case is issued to target machine by step 130, host, receives the test of target machine feedback As a result.
It wherein, include the real hardware environment of Test Operating System in target machine, the executable file of test case is in mesh In mark machine when operation, it can achieve the purpose that authentic and valid test with the hardware resource in invocation target machine.
In the present embodiment, host carries out communication interaction by Ethernet and serial ports and target machine, and host will be tested The executable file of use-case is issued to target machine, which runs in target machine, serial ports of the host from target machine Test process information is obtained one by one, as test result.
In the present embodiment, test process output code is provided in test case, test process output code includes string Mouth print statement, for when executed, if implementation procedure parameter meets code setting condition, exporting process knot from serial ports Fruit information, for example, following test process output code is arranged, when meeting test and passing through condition, printing test success flag with And test case title, when be unsatisfactory for test pass through condition when, printing test unsuccessfully identifies and test case title.
If (condition that judgement test passes through)
{
Printf (" * * * Test Pass***%s ", casename);
}
else
{
Printf (" * * * Test Fail***%s ", casename);
}
The embodiment of the invention provides the operating systems that a kind of test method of operating system, host are selected by user Testing component obtains corresponding test case and exploitation environment from database server, and host is based on corresponding exploitation ring again The executable file in border and test case building test case, and the executable file of test case is issued to target machine, it connects The test result for receiving target machine feedback, solves in the prior art, and embedded software test relies only on the non-genuine hard of host Part environment does not have real hardware Environmental Support, and the problem that the degree of automation is poor, realizes the survey for improving Test Operating System Try the effect of efficiency and the degree of automation.
Optionally, host according to store path from database server obtain test case and exploitation environment after, Further include:
Host provides a user the number of all test cases obtained from database server by human-computer interaction interface The title of amount and each test case;
The test case that host is specified by this test that human-computer interaction interface receives user's selection.
Wherein, human-computer interaction interface can be the interactive interface of called other application, for example, passing through invoking web page end Mouthful, use the interactive interface of browser as the human-computer interaction interface in this optional technical solution, it is straight to be also possible to developer The interactive interface of design is connect, for example, loading different controls using VB (Visual Basic, object-based programming language) Part, the human-computer interaction interface designed.
In this optional technical solution, host is shown by human-computer interaction interface to user matched with testing requirement The quantity of all available test cases and the title of each test case, user further choose this according to actual job demand The specified test case of secondary test.
The benefit being arranged in this way is: since software test can be divided into multiple stages, generally comprise: unit testing integrates Test, system testing, functional test, performance test and pressure test etc. can all have different tests in each test phase Use-case, moreover, a specific operating system component is directed to, since its function is not single, for example, the kernel of operating system is main For managing memory, file, peripheral hardware and system resource, all corresponding functional test use-cases are also multiplicity, this is optional Technical solution utilizes human-computer interaction interface, has provided a user all optional test cases, has kept user targeted The test case needed to be implemented is chosen, test resource has on the one hand been saved, has on the other hand improved testing efficiency.
In a specific example, this testing requirement is the performance of Test Operating System kernel dispatching system resource, Host provides a user all tests related with kernel test obtained from database server by human-computer interaction interface Use-case enumerates the title of its quantity and corresponding test case, firstly, user can choose and wherein relate to according to test phase And the test case of performance test is chosen wherein related with schedules system resources further according to the concrete function that test case is realized Test case.
This optional technical solution provides the method that user chooses the specified test case of this test, both saved Testing cost improves testing efficiency again.
Embodiment two
Fig. 2 is a kind of flow chart of the test method of operating system provided by Embodiment 2 of the present invention, and the present embodiment is upper It is further refined on the basis of one embodiment, provides the tool that the executable file of test case is issued to target machine by host Body implementation steps.A kind of test method of operating system provided by Embodiment 2 of the present invention is illustrated below with reference to Fig. 2, is wrapped Include following steps:
The operating system testing component that step 210, host are selected according to user, the search operation system in configuration file Store path in database server of the corresponding test case of testing component and exploitation environment, according to store path from number Test case and exploitation environment are obtained according to library server;Wherein, configuration file saves the corresponding test of every type operating system component Store path of the use-case in database server.
The executable file of step 220, host based on exploitation environment and test case building test case.
The process control module for testing rear end of step 230, host is constructed in the executable file of test case and is completed Afterwards, allocation for test executes task and gives use-case execution module.
In the present embodiment, after the completion of the executable file building of test case, the test rear end use-case of host is constructed The executable file for the test case that building is completed is stored under specified directory by module, the Row control of the test rear end of host Module completes information according to the building that use-case constructs module feedback, and test execution task is assigned to the use of host test rear end In example execution module.
Step 240, use-case execution module determine current test case according to the sequence of test case.
In the present embodiment, host tests the use-case execution module of rear end according to the arrangement of test case in specified directory Sequentially, the test case currently to be executed is determined.
Step 250, use-case execution module issue the executable file of current test case by target machine communication module To target machine.
In the present embodiment, host test rear end use-case execution module and target machine communication module by Ethernet into The executable file of current test case is issued to mesh by target machine communication module after determining that communication is normal by row communication Mark machine.
By target machine communication module, instruction is completed in the test for receiving target machine feedback for step 260, use-case execution module When, instruction is restarted to target machine transmission, and after the completion of target machine is restarted, currently tests use according to the sequential update of test case Example, and return and execute the operation that executable file is issued to target machine, until test terminates.
Wherein, instruction is completed in test is generated by test case, and in the present embodiment, the ending of test case is provided with Serially printing sentence, for when executed, exporting test by serial ports and completing instruction, for example, the ending in test case adds Add following code, for judging whether the test case is finished.
Printf (" * * * Test End***%s ", casename)
In the present embodiment, since the quantity of test case is at least two, then host is in current testing case After completion, and before the executable file of next test case, needs to send to target machine and restart instruction, to target machine After the completion of restarting, current test case is updated, and is issued to target machine and executes until all test cases that this test is specified Until all being executed on target machine.
The benefit that target machine is restarted, which is arranged, is: after the operation of a upper test case, may deposit in target machine system Some temporary files are stayed, or there is the system resource not being released, in this case, if directly executing next survey Example on probation, can have an impact the implementing result of test case, right therefore, it is necessary to after having executed a test case every time Target machine carries out reboot operation, and the environment for guaranteeing that each test case executes is clean, to keep test result accurate.
Step 270, host receive the test result of target machine feedback.
The technical solution of the present embodiment has carried out careful explanation on the basis of a upper embodiment, and host will be tested The executable file of use-case is issued to target machine and is further refined as specific implementation steps, by the current test case of determination, And the executable file of current test case is issued to target machine using use-case execution module, target machine is anti-after the completion of test Instruction is completed in feedback test, is restarted target machine and is entered the test phase of next test case, improves test result Accuracy.
Embodiment three
Fig. 3 is a kind of flow chart of the test method for operating system that the embodiment of the present invention three provides, and the present embodiment is upper It states and further illustrates on the basis of embodiment, the operating system testing component that host is selected according to user is provided, in configuration text The store path of the corresponding test case of search operation system testing component and exploitation environment in database server, root in part Test case is obtained from server according to store path and develops the specific implementation step of environment, below with reference to Fig. 3 to of the invention real The test method for applying a kind of operating system of the offer of example three is illustrated, comprising the following steps:
The test front end of step 310, host calls browser by web module, shows human-computer interaction interface, and lead to Cross the operating system testing component that human-computer interaction interface receives user's selection.
In the present embodiment, the web module of the test front end of host is called by port, utilizes the net of browser application The interaction of host and user is realized in page boundary face, and receive user's selection tests related operating system testing component with this.
Step 320, the web module for testing front end, according to operating system testing component, the inquiry pair in local profile Answer store path of the test case in database server.
Wherein, configuration file saves storage of the corresponding test case of every type operating system component in database server Path, the configuration file need to safeguard with database server synchronization.
In the present embodiment, there are mapping relations between the corresponding test case of operating system testing component, for example, The title of test suite is added in the title of test case, or forms corresponding relationship in the form of number, in this way selected After operating system testing component, so that it may be determined at its corresponding test case, and inquire corresponding survey according to local profile Store path of the example in database server on probation.
Step 330, test front end are based on the store path for inquiring test case, by back end communications module to database Server sends test case acquisition request.
In the present embodiment, test case acquisition request is sent to place by the back end communications module of the test front end of host The connection with database server is realized by the correlation module of host test rear end, to obtain phase in the test rear end of host Close data.
Test case acquisition request task is distributed to by process control module in the test rear end of step 340, host Test the test configurations module of rear end.
In the present embodiment, the test case that the process control module of the test rear end of host will be obtained from test front end Acquisition request distributes to the test configurations module of test rear end in the form of issuing task.
Step 350, test configurations module send test case acquisition request to database server, and from database service Device downloads test case and exploitation environment.
In the present embodiment, the test configurations module of the test rear end of host is according to test case acquisition request, from number Test case and exploitation environment are downloaded by ethernet communication according in the server of library, and by the test case and develop environment It is stored under the locally specified catalogue of host.
Step 360, test configurations module obtain result to process control module feedback test use-case.
In the present embodiment, the test configurations module of the test rear end of host is in downloading test case and exploitation environment Afterwards, it obtains to the process control module feedback test use-case of the test rear end of host as a result, the acquisition result reflects under this Whether load task is fully completed, if being not fully completed, feeds back completed percentage and unfinished reason.
In a specific example, the test case that test configurations module is fed back to process control module obtains result Are as follows:
Download progress 70%;
Test case serial number is not downloaded: 3,7,16;
It does not complete reason: not finding corresponding storage catalogue.
Then according to the feedback information, it can be accurately positioned and not download to test case, and check it is that all will not configure File and database server synchronization safeguard that on the contrary storage catalogue is wrong.
Step 370, host provide a user all tests obtained from database server by human-computer interaction interface The title of the quantity of use-case and each test case.
The specified test case of this test that step 380, host receive user's selection by human-computer interaction interface.
The executable file of step 390, host based on exploitation environment and test case building test case.
In the present embodiment, the process control module of the test rear end of host is according to pending test case, distribution Use-case constructs task and constructs module to the use-case of the test rear end of host;Use-case constructs module and downloads according to from data server At least one test case and exploitation environment, construct the executable file of at least one test case, generate building information, After the completion of building, the executable file of the test case of generation is stored under specified catalogue.
The process control module for testing rear end of step 3100, host, has constructed in the executable file of test case Cheng Hou, allocation for test execute task and give use-case execution module.
Step 3110, use-case execution module determine current test case according to the sequence of test case.
Step 3120, use-case execution module are by the executable file of current test case, by under target machine communication module It is sent to target machine.
By target machine communication module, the test completion for receiving target machine feedback refers to for step 3130, use-case execution module When showing, instruction is restarted to target machine transmission, and after the completion of target machine is restarted, currently test according to the sequential update of test case Use-case, and return and execute the operation that executable file is issued to target machine, until test terminates.
Step 3140, host receive the test result of target machine feedback.
In the present embodiment, the use-case execution module of the test rear end of host, by target machine communication module from target machine Serial ports obtain test process information one by one, feed back to host test rear end process control module as test result; The back end communications module of the test front end of host obtains test process information from process control module;Before the test of host The report generation module at end obtains test process information from back end communications module, and generates test report;Report generation module will Test report is converted into webpage format by the web module of the test front end of host, and browser is called to be shown.
The embodiment of the invention provides a kind of test methods of operating system, in the behaviour that above-mentioned host is selected according to user Make system testing component, the corresponding test case of search operation system testing component and exploitation environment are in data in configuration file Store path in the server of library obtains test case from server according to store path and exploitation environment is further refined as having The implementation steps of body download test case and exploitation from target machine by the test configurations module of the test rear end using host Environment, and acquisition is fed back as a result, realizing real time monitoring downloading process, it ensure that the integrality and accuracy of downloading data.
Optionally, host provides a user all tests obtained from database server by human-computer interaction interface and uses The quantity of example and the title of each test case, the test specified by this test that human-computer interaction interface receives user's selection Use-case, comprising:
Before test case acquisition result is sent to test by back end communications module by the process control module of test rear end The web module at end;
The web module for testing front end is obtained according to test case as a result, the test case title that will acquire passes through man-machine friendship Mutual interface is shown, and determines the target detection use-case that user chooses;
The selection result of target detection use-case is sent to process control module by back end communications module by web module, with Determine pending test case and exploitation environment.
This optional technical solution, by the web module of the test front end using host, back end communications module and survey The process control module for trying rear end, realizes user's selection nominative testing use-case and host receives the nominative testing use-case Technical solution ensure that user can accurately choose test case relevant to testing requirement, survey for subsequent transmission target machine Examination.
Specifically, illustrating the technical side of the present embodiment by taking the multiple thread abilities of the kernel dispatching of Test Operating System as an example Case.The test front end of host calls browser by web module, shows human-computer interaction interface, and pass through human-computer interaction interface Receive the operating system nucleus component of user's selection, the kernel component that web module is selected according to user, in local profile Inquire store path of the corresponding test case in database server, determine store path are as follows: database server root Test case kernel component, test front end be based on the store path, pass through host test front end back end communications module Test case acquisition request is sent to the test rear end of host, the process control module for testing rear end obtains test case Request task distributes to the test configurations module of test rear end, and test configurations module sends test case to database server and obtains Request is taken, after database server responds the request, is stored in above-mentioned store path in this example from database server downloading Under the corresponding exploitation environment of test case and test case, in this downloading task, the number of test case is 20, is related to The kernel thread scheduling use-case of 3 application partitions is tested, corresponding exploitation environment includes C translation and compiling environment and OpenCL (Open Computing Language, open operation language) translation and compiling environment, test configurations module is after the completion of test assignment, Xiang Liucheng Control module feedback test use-case obtains as a result, illustrating in this downloading task, and all test cases and exploitation environment are complete It downloads and is stored under the specified storage catalogue of host entirely, test case is obtained result and led to by rear end by process control module Letter module is sent to web module, and web module is obtained according to test case as a result, the test case title that will acquire is according to 1 to 20 Serial number be arranged on human-computer interaction interface and show, user chooses the target detection use-case of this test, and wherein target detection is used Example is the test case of serial number 1 to 13, and the selection result of target detection use-case is sent to by web module by back end communications module Process control module, with the pending test case of determination and exploitation environment, process control module is used according to pending test Example, distribution use-case building task construct module to the use-case of the test rear end of host, and use-case constructs module and takes according to from data 13 test cases of business device downloading and corresponding exploitation environment, construct the executable file of 13 test cases, generate building The executable file of the test case of generation is stored under the catalogue specified on host, process by information after the completion of building Control module allocation for test executes task to the use-case execution module of test rear end, and use-case execution module is according to the suitable of test case Sequence determines that first test case is current test case, and use-case execution module leads to the executable file of current test case It crosses target machine communication module and is issued to target machine, the executable file of current test case is run under target machine environment.
In test case operational process, since the ending of test case is provided with serially printing sentence, for being held When row, test is exported by serial ports and completes instruction, in this example, tests completion code are as follows: printf (" * * * Test End***%s ", casename), when use-case execution module is by target machine communication module, receive the above-mentioned of target machine feedback When instruction is completed in test, restart instruction to target machine transmission, and after the completion of target machine is restarted, according to test case sequence more New second test case returns as current test case and executes the operation that executable file is issued to target machine, until 13 The executable file of a test case all runs on target machine and finishes.
It further include test process output code, test process is defeated in addition to including test completion code in above-mentioned test case Code includes serially printing sentence out, is used for when executed, if implementation procedure parameter meets code setting condition, from string Mouth output processes result information, in this example, test process output code are as follows:
If (condition that judgement test passes through)
After each test case is finished, use-case execution module passes through string of the target machine communication module from target machine Mouthful test process information is obtained, feed back to process control module as test result, back end communications module is from process control module Middle acquisition test process information, and it is sent to the report generation module of the test front end of host, to 13 test case wholes After only carrying out, test report is generated, report generation module is converted into webpage format by test report, by web module, and Browser is called to show to user.
Example IV
Fig. 4 is a kind of structural schematic diagram of the test device for operating system that the embodiment of the present invention four provides, such as Fig. 4 institute Show, the test device of the operating system includes: that test case obtains module 410, executable file determining module 420 and can It executes file and issues module 430, in which:
Test case obtains module 410, and the operating system testing component for being selected according to user is looked into configuration file It looks for the corresponding test case of operating system testing component and develops store path of the environment in database server, according to storage Path obtains test case and exploitation environment from database server;Wherein, configuration file saves every type operating system component pair Store path of the test case answered in database server;
Executable file determining module 420, for constructing the executable of test case based on exploitation environment and test case File;
Executable file issues module 430, for the executable file of test case to be issued to target machine, receives target The test result of machine feedback.
The embodiment of the invention provides the operating systems that a kind of test device of operating system, host are selected by user Testing component obtains corresponding test case and exploitation environment from database server, and host is based on corresponding exploitation ring again The executable file in border and test case building test case, and the executable file of test case is issued to target machine, it connects The test result for receiving target machine feedback, solves in the prior art, and embedded software test relies only on the non-genuine hard of host Part environment does not have real hardware Environmental Support, and the problem that the degree of automation is poor, realizes the survey for improving Test Operating System Try the effect of efficiency and the degree of automation.
Optionally, after test case acquisition module 410, further includes:
Test case quantity and title provide module, are provided a user by human-computer interaction interface from data for host The quantity for all test cases that library server obtains and the title of each test case;
Nominative testing use-case receiving module receives this test of user's selection for host by human-computer interaction interface Specified test case.
Optionally, test case obtains module 410, comprising:
Testing component receiving unit calls browser by web module, shows man-machine for the test front end of host Interactive interface, and the operating system testing component that user selects is received by human-computer interaction interface;
Store path query unit, according to operating system testing component, is matched for testing the web module of front end locally Set the store path that corresponding test case is inquired in file in database server;
Acquisition request transmission unit is led to for testing front end based on the store path for inquiring test case by rear end Believe that module sends test case acquisition request to database server;
Acquisition request allocation unit is obtained test case by process control module for the test rear end of host Request task distributes to the test configurations module of test rear end;
Test case and exploitation environment download unit send test case to database server for test configurations module Acquisition request, and from database server downloading test case and develop environment;
Result feedback unit is obtained, obtains result to process control module feedback test use-case for test configurations module.
Optionally, test case quantity and title provide module and nominative testing use-case receiving module, comprising:
Result transmission unit is obtained, test case acquisition result is passed through rear end by the process control module for testing rear end Communication module is sent to the web module of test front end;
Target detection use-case determination unit, the web module for testing front end are obtained according to test case as a result, will acquire Test case title shown by human-computer interaction interface, and determine user choose target detection use-case;
Test case and exploitation environment determination unit, after passing through the selection result of target detection use-case for web module End communication module is sent to process control module, with the pending test case of determination and exploitation environment.
Optionally, executable file issues module 430, comprising:
Test execution task allocation unit, the process control module of the test rear end for host, in test case After the completion of executable file building, allocation for test executes task and gives use-case execution module;
Current test case determination unit determines current test for use-case execution module according to the sequence of test case Use-case;
Executable file issuance unit passes through mesh for use-case execution module by the executable file of current test case Mark machine communication module is issued to target machine;
Current test case updating unit receives target machine for use-case execution module by target machine communication module When instruction is completed in the test of feedback, instruction is restarted to target machine transmission, and after the completion of target machine is restarted, according to test case The current test case of sequential update, and return and execute the operation that executable file is issued to target machine, until test terminates.
The test side of operating system provided by any embodiment of the invention can be performed in the test device of aforesaid operations system Method has the corresponding functional module of execution method and beneficial effect.
Embodiment five
Fig. 5 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present invention five provides, as shown in figure 5, the equipment packet Include processor 50 and memory 51;The quantity of processor 50 can be one or more in computer equipment, at one in Fig. 5 For reason device 50;Processor 50 in equipment can be connected with memory 51 by bus or other modes, by total in Fig. 5 For line connection.
Memory 51 is used as a kind of computer readable storage medium, can be used for storing software program, journey can be performed in computer Sequence and module, as the corresponding program instruction/module of the test method of one of embodiment of the present invention operating system (for example, Test case in the test device of operating system obtains module 410, executable file determining module 420 and executable file Issue module 430).Software program, instruction and the module that processor 50 is stored in memory 51 by operation, thereby executing The various function application and data processing of equipment, that is, realize the test method of above-mentioned operating system.
Memory 51 can mainly include storing program area and storage data area, wherein storing program area can store operation system Application program needed for system, at least one function;Storage data area, which can be stored, uses created data etc. according to terminal.This Outside, memory 51 may include high-speed random access memory, can also include nonvolatile memory, for example, at least a magnetic Disk storage device, flush memory device or other non-volatile solid state memory parts.In some instances, memory 51 can be further Including the memory remotely located relative to processor 50, these remote memories can pass through network connection to equipment.It is above-mentioned The example of network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Embodiment six
Fig. 6 a is a kind of structural schematic diagram of the test macro for operating system that the embodiment of the present invention six provides, such as Fig. 6 a institute Show, which includes host 610 and database server 620, between host 610 and database server 620 by with Too Network Communication.Host 610 is a kind of electronic equipment as described in embodiment five, and for realizing human-computer interaction, allocation for test is appointed Business, scheduling tests use-case and exploitation environment, generate the executable file of test case, send test case and obtain test result And generate final test report;Database server 620 is for storing test case and corresponding exploitation environment.
Host 610 includes test front end and test rear end, and test front end is connected with test rear end, and test front end is for real Existing human-computer interaction, i.e. data exchange between host 610 and user;Rear end is tested for realizing host 610 and database Data transmission and scheduling of resource between server 620 and target machine, as shown in Figure 6 b.
The test front end of host 610 includes: web module 611, back end communications module 612 and report generation module 613, in which:
Web module 611 is connected with back end communications module 612, for receive user selection operating system testing component with And the test case that this test is specified, and rear end communication module 612 sends test case acquisition request, and aobvious to user Show final test report.
Back end communications module 612 is connected with web module 611, report generation module 613 and test rear end respectively, for connecing The test case acquisition request that web module 611 is sent is received, and sends this request to test rear end, after being also used to receive test The test result data sent is held, test result data is sent to report generation module 613.
Report generation module 613 is connected with web module 611, the test result data for will receive, and identification test is logical Mark whether mistake generates test report, test report is sent to web module 611.
The test rear end of host 610 includes: process control module 614, test configurations module 615, use-case building module 616 and use-case execution module 617, in which:
Process control module 614 respectively with test front end back end communications module 612, test configurations module 615, use-case structure It models block 616 and use-case execution module 617 is connected, process control module 614 is connected with back end communications module 612, and being used for will The testing progress and test result that test rear end obtains feed back to test front end by back end communications module 612;Row control Module 614 is connected with test configurations module 615, is used for 615 allocation for test use-case acquisition request task of test configurations module;Stream Process control module 614 is connected with use-case building module 616, for distributing use-case and constructing task according to pending test case Module 616 is constructed to use-case;Process control module 614 is connected with use-case execution module 617, in the executable of test case After the completion of file building, allocation for test executes task to use-case execution module 617.
Test configurations module 615 be connected respectively with database server 620 and process control module 614, for number Test case acquisition request is sent according to library server 620, and downloads test case and exploitation environment from database server 620, And result is obtained to 614 feedback test use-case of process control module.
Use-case building module 616 is connected with process control module 614, for according to the survey downloaded from data server 620 Example on probation and exploitation environment, construct executable file, generate building information, and the executable file of the test case of generation is deposited Storage feeds back building progress under specified catalogue, to process control module 614.
Use-case execution module 617 is connected with target machine and process control module 614 respectively, for communicating mould by target machine Block issues the executable file of test case to target machine, controls the operation of target machine and restarts, receives and saves target machine string The information that mouth returns, and the information is fed back into process control module 614.
In the test macro of the operating system of the present embodiment, host 610 and the cooperation of database server 620 are realized and are surveyed Example on probation and the advantageous scheduling for developing environment, run test case in the real hardware environment of target machine, target machine As the hardware test platform of the system, replaced according to testing requirement, between target machine and host by Ethernet and Serial communication.
Embodiment seven
The embodiment of the present invention seven also provides a kind of storage medium comprising computer executable instructions, and the computer can be held Row is instructed when being executed by computer processor for executing a kind of test method of operating system, this method comprises:
The operating system testing component that host is selected according to user, the search operation system testing component in configuration file Store path in database server of corresponding test case and exploitation environment, according to store path from database server Obtain test case and exploitation environment;Wherein, configuration file saves the corresponding test case of every type operating system component in data Store path in the server of library;
Executable file of the host based on exploitation environment and test case building test case;
The executable file of test case is issued to target machine by host, receives the test result of target machine feedback.
It certainly, include the storage medium of computer executable instructions provided by the embodiment of the present invention, computer can be held The method operation that row instruction is not limited to the described above, can also be performed the survey of operating system provided by any embodiment of the invention Relevant operation in method for testing.
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention It can be realized by software and required common hardware, naturally it is also possible to which by hardware realization, but in many cases, the former is more Good embodiment.Based on this understanding, technical solution of the present invention substantially in other words contributes to the prior art Part can be embodied in the form of software products, which can store in computer readable storage medium In, floppy disk, read-only memory (Read-Only Memory, ROM), random access memory (Random such as computer Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions are with so that a computer is set Standby (can be personal computer, server or the network equipment etc.) executes method described in each embodiment of the present invention.
It is worth noting that, in a kind of embodiment of the test device of above-mentioned operating system, included each unit and Module is only divided according to the functional logic, but is not limited to the above division, as long as corresponding functions can be realized ?;In addition, the specific name of each functional unit is also only for convenience of distinguishing each other, the protection being not intended to restrict the invention Range.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (9)

1. a kind of test method of operating system characterized by comprising
The operating system testing component that host is selected according to user searches the operating system testing component in configuration file Store path in database server of corresponding test case and exploitation environment, according to the store path from the data Library server obtains the test case and the exploitation environment;Wherein, the configuration file saves every type operating system component Store path of the corresponding test case in database server;
The host constructs the executable file of the test case based on the exploitation environment and the test case;
The executable file of the test case is issued to target machine by the host, receives the test of the target machine feedback As a result.
2. the method according to claim 1, wherein in the host according to the store path from the number After the library server acquisition test case and the exploitation environment, further includes:
The host provides all tests obtained from the database server to the user by human-computer interaction interface The title of the quantity of use-case and each test case;
The test case that the host is specified by this test that the human-computer interaction interface receives user's selection.
3. the method according to claim 1, wherein the host is to be measured according to the operating system that user selects Component searches the corresponding test case of the operating system testing component and exploitation environment in database service in configuration file Store path in device obtains the test case and the exploitation environment, packet from the server according to the store path It includes:
The test front end of the host calls browser by web module, shows human-computer interaction interface, and pass through man-machine friendship Mutual interface receives the operating system testing component of user's selection;
The web module of the test front end inquires corresponding survey according to the operating system testing component in local profile Store path of the example in database server on probation;
The test front end is based on the store path for inquiring test case, by back end communications module to the database service Device sends test case acquisition request;
Test case acquisition request task is distributed to test rear end by process control module by the test rear end of the host Test configurations module;
The test configurations module sends test case acquisition request to database server, and under the database server Carry test case and exploitation environment;
The test configurations module obtains result to the process control module feedback test use-case.
4. according to the method described in claim 2, it is characterized in that, the host passes through human-computer interaction interface to the user The quantity of all test cases obtained from the database server and the title of each test case are provided, the people is passed through Machine interactive interface receives the test case that this test of user's selection is specified, comprising:
Before test case acquisition result is sent to test by back end communications module by the process control module of the test rear end The web module at end;
The web module of the test front end is obtained according to the test case as a result, the test case title that will acquire passes through people Machine interactive interface is shown, and determines the target detection use-case that user chooses;
The selection result of target detection use-case is sent to process control module by back end communications module by the web module, with Determine pending test case and exploitation environment.
5. the method according to claim 1, wherein the host is by the executable file of the test case It is issued to target machine, comprising:
The process control module of the test rear end of the host, after the completion of the building of the executable file of test case, distribution Test execution task gives use-case execution module;
The use-case execution module determines current test case according to the sequence of test case;
The use-case execution module is issued to target by the executable file of current test case, by target machine communication module Machine;
The use-case execution module is by target machine communication module, when receiving the test completion instruction of target machine feedback, to institute It states target machine transmission and restarts instruction, and after the completion of target machine is restarted, according to the current test case of the sequential update of test case, And return and execute the operation that executable file is issued to target machine, until test terminates.
6. a kind of test device of operating system, which is characterized in that be configured in host, described device includes:
Test case obtains module, the operating system testing component for selecting according to user, in configuration file described in lookup The store path of the corresponding test case of operating system testing component and exploitation environment in database server, is deposited according to described It stores up path and obtains the test case and the exploitation environment from the database server;Wherein, the configuration file saves Store path of the corresponding test case of every type operating system component in database server;
Executable file determining module, for based on the exploitation environment and the test case construct the test case can Execute file;
Executable file issues module, for the executable file of the test case to be issued to target machine, receives the mesh The test result of mark machine feedback.
7. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now such as the test method of operating system as claimed in any one of claims 1 to 5.
8. a kind of test macro of operating system, which is characterized in that including host and database server;Wherein, the number According to library server for storing test case;The host uses electronic equipment as claimed in claim 7.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor The test method such as operating system as claimed in any one of claims 1 to 5 is realized when row.
CN201811341673.8A 2018-11-12 2018-11-12 Test method, device, equipment, system and medium for operating system Active CN109491916B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811341673.8A CN109491916B (en) 2018-11-12 2018-11-12 Test method, device, equipment, system and medium for operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811341673.8A CN109491916B (en) 2018-11-12 2018-11-12 Test method, device, equipment, system and medium for operating system

Publications (2)

Publication Number Publication Date
CN109491916A true CN109491916A (en) 2019-03-19
CN109491916B CN109491916B (en) 2022-03-25

Family

ID=65695675

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811341673.8A Active CN109491916B (en) 2018-11-12 2018-11-12 Test method, device, equipment, system and medium for operating system

Country Status (1)

Country Link
CN (1) CN109491916B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471809A (en) * 2019-07-31 2019-11-19 深圳中电长城信息安全***有限公司 A kind of method and test device of test
CN110750463A (en) * 2019-10-29 2020-02-04 百度在线网络技术(北京)有限公司 Applet testing method, device, system, equipment and medium
CN111159046A (en) * 2019-12-31 2020-05-15 斑马网络技术有限公司 Test method, test device, electronic equipment, test system and storage medium
CN112035346A (en) * 2020-08-25 2020-12-04 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Automatic testing method, system and medium based on embedded DSP operating system
CN112416318A (en) * 2020-11-03 2021-02-26 前海飞算云智软件科技(深圳)有限公司 Micro-service development method and device, storage medium and electronic equipment
CN113191114A (en) * 2021-04-30 2021-07-30 北京百度网讯科技有限公司 Method and apparatus for authenticating a system
CN113342675A (en) * 2021-06-25 2021-09-03 北京紫光展锐通信技术有限公司 Mapping method and device of tested module, and testing method and system
CN114338486A (en) * 2020-09-30 2022-04-12 ***通信有限公司研究院 Network service test deployment method, device, equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170263026A1 (en) * 2016-03-14 2017-09-14 International Business Machines Corporation Increasing readability of visualization nodes
CN107168879A (en) * 2017-05-23 2017-09-15 网易(杭州)网络有限公司 The generation method and device of centralized configuration management System Test Report
CN107688534A (en) * 2017-07-26 2018-02-13 平安科技(深圳)有限公司 Zonal testing method, apparatus, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170263026A1 (en) * 2016-03-14 2017-09-14 International Business Machines Corporation Increasing readability of visualization nodes
CN107168879A (en) * 2017-05-23 2017-09-15 网易(杭州)网络有限公司 The generation method and device of centralized configuration management System Test Report
CN107688534A (en) * 2017-07-26 2018-02-13 平安科技(深圳)有限公司 Zonal testing method, apparatus, computer equipment and storage medium

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471809A (en) * 2019-07-31 2019-11-19 深圳中电长城信息安全***有限公司 A kind of method and test device of test
CN110750463A (en) * 2019-10-29 2020-02-04 百度在线网络技术(北京)有限公司 Applet testing method, device, system, equipment and medium
CN110750463B (en) * 2019-10-29 2023-06-23 百度在线网络技术(北京)有限公司 Method, device, system, equipment and medium for testing small program
CN111159046A (en) * 2019-12-31 2020-05-15 斑马网络技术有限公司 Test method, test device, electronic equipment, test system and storage medium
CN111159046B (en) * 2019-12-31 2024-04-09 斑马网络技术有限公司 Test method, test device, electronic equipment, test system and storage medium
CN112035346A (en) * 2020-08-25 2020-12-04 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Automatic testing method, system and medium based on embedded DSP operating system
CN112035346B (en) * 2020-08-25 2023-09-12 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Automatic test method, system and medium based on embedded DSP operating system
CN114338486A (en) * 2020-09-30 2022-04-12 ***通信有限公司研究院 Network service test deployment method, device, equipment and readable storage medium
CN112416318A (en) * 2020-11-03 2021-02-26 前海飞算云智软件科技(深圳)有限公司 Micro-service development method and device, storage medium and electronic equipment
CN112416318B (en) * 2020-11-03 2021-10-08 前海飞算云智软件科技(深圳)有限公司 Micro-service development method and device, storage medium and electronic equipment
CN113191114B (en) * 2021-04-30 2023-11-10 北京百度网讯科技有限公司 Method and apparatus for validating a system
CN113191114A (en) * 2021-04-30 2021-07-30 北京百度网讯科技有限公司 Method and apparatus for authenticating a system
CN113342675A (en) * 2021-06-25 2021-09-03 北京紫光展锐通信技术有限公司 Mapping method and device of tested module, and testing method and system
CN113342675B (en) * 2021-06-25 2022-09-20 北京紫光展锐通信技术有限公司 Mapping method and device of tested module, and testing method and system

Also Published As

Publication number Publication date
CN109491916B (en) 2022-03-25

Similar Documents

Publication Publication Date Title
CN109491916A (en) A kind of test method of operating system, device, equipment, system and medium
CN105302716B (en) Test method, device under the development mode of interflow
Liu et al. PERTS: A prototyping environment for real-time systems
Eilam et al. Pattern-based composite application deployment
CN109086071A (en) A kind of method and server of management software version information
CN102307369B (en) Device and method for supporting parallel simulation and physical simulation of wireless sensor network
US20080320071A1 (en) Method, apparatus and program product for creating a test framework for testing operating system components in a cluster system
Rose et al. A comparison of model migration tools
CN106970880A (en) A kind of distributed automatization method for testing software and system
CN101393528B (en) Method and system for determining instance object conversion order in dynamic update of software
Hudson et al. libEnsemble users manual
US8381170B2 (en) Test driven architecture enabled process for open collaboration in global
CN109426602A (en) Detection method and equipment used in a kind of application development process
CN104125504A (en) Deployment method, device and system based on continuous integration
CN113050929A (en) Intelligent contract development, operation and maintenance integrated platform based on HyperLegger Fabric
CN109254765A (en) Timing task management method, apparatus, computer equipment and storage medium
CN115860451A (en) Flow operation method and device, electronic equipment and storage medium
CN114595058A (en) Model training method and device based on GPU (graphics processing Unit) resources, electronic equipment and storage medium
Lascu et al. Automatic deployment of component-based applications
CN110134585A (en) System Test Plan generation method and terminal device
CN109408376A (en) A kind of generation method of configuration data, device, equipment and storage medium
CN102144221A (en) Compact framework for automated testing
Balbo et al. On the computation of performance characteristics of concurrent programs using GSPNs
Bertolino et al. Integration of “Components” to test software components
Bettini et al. Formalizing properties of mobile agent systems

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
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20190319

Assignee: Kedong (Guangzhou) Software Technology Co., Ltd

Assignor: Beijing Dongtu Technology Co., Ltd.|Beijing keyin Jingcheng Technology Co., Ltd

Contract record no.: X2020980000255

Denomination of invention: Test method, device, equipment, system and medium for operating system

License type: Exclusive License

Record date: 20200218

EE01 Entry into force of recordation of patent licensing contract
GR01 Patent grant
GR01 Patent grant