CN105373409B - Test case distributed test method based on Hadoop and system - Google Patents

Test case distributed test method based on Hadoop and system Download PDF

Info

Publication number
CN105373409B
CN105373409B CN201510908046.8A CN201510908046A CN105373409B CN 105373409 B CN105373409 B CN 105373409B CN 201510908046 A CN201510908046 A CN 201510908046A CN 105373409 B CN105373409 B CN 105373409B
Authority
CN
China
Prior art keywords
test
test case
hadoop
list
node machine
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.)
Active
Application number
CN201510908046.8A
Other languages
Chinese (zh)
Other versions
CN105373409A (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.)
DMS Corp.
Original Assignee
Shanghai Feixun Data Communication 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201510908046.8A priority Critical patent/CN105373409B/en
Publication of CN105373409A publication Critical patent/CN105373409A/en
Application granted granted Critical
Publication of CN105373409B publication Critical patent/CN105373409B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention provides a kind of test case distributed test method and system based on Hadoop, includes the following steps:Step S1, test case list is downloaded;Step S2, the CPU and memory source of every node machine are calculated using Hadoop platform, it will test case list parallel in distribution at most platform node machine;Step S3, more node machines execute test case thereon parallel, and generate test report and daily record.Test case distributed test method and the system parallel distribution and execution based on Hadoop platform realization test case based on Hadoop of the present invention;Automatic test can be concurrently carried out, testing efficiency is greatly improved.

Description

Test case distributed test method based on Hadoop and system
Technical field
The present invention relates to a kind of test method and systems, distributed more particularly to a kind of test case based on Hadoop Test method and system.
Background technology
Automatic test is a kind of process for the behavioral test taking human as driving being converted into machine execution.In general, setting Counted test case and by evaluation after, test is executed by regulation of the tester described in test case step by step, Obtain the comparison of actual result and expected result.
As the automatically working of a product deepens continuously, test case accumulated number used by automatic test is held It is continuous to increase.The overwhelming majority has no the test case of dependence due to serially running, and the test execution time is caused to reach hour grade Not, it and is not easy to optimize.In addition, test case seizes mutual exclusion to machine resources at runtime, lead to the shakiness for running machine The problems such as determining also is gradually expanded.
In the prior art, most test cases are all serially to execute, inefficiency;And when a test case is blocked When, the execution of subsequent test case may be influenced.
Hadoop is a distributed system architecture developed by Apache funds club.User can not know about In the case of distributed low-level details, distributed program is developed, the power of cluster is made full use of to carry out high-speed computation and storage.Tool Body, Hadoop realizes a distributed file system (Hadoop Distributed File System, HDFS).HDFS There is the characteristics of high fault tolerance, and is designed to be deployed on cheap hardware;And it provides high-throughput to access application The data of program are suitble to those to have the application program of super large data set.HDFS relaxes the requirement of POSIX, can be with stream Form accesses the data in file system.The design that the frame of Hadoop is most crucial is exactly:HDFS and MapReduce.HDFS is The data of magnanimity provide storage, then MapReduce provides calculating for the data of magnanimity.
Therefore, Hadoop has the following advantages:
1) Hadoop is an open source projects, has extraordinary technical support;
2) Hadoop has ripe distributed scheduling algorithm, can be very good CPU and memory money using every machine Source reaches the optimum allocation of computing resource;
3) Hadoop programs are easy to write, convenient for safeguarding.
Therefore, if the distributed testing of test case can be realized using Hadoop, existing survey will be can solve Bottleneck during example use on probation.
Invention content
In view of the foregoing deficiencies of prior art, the test that the purpose of the present invention is to provide a kind of based on Hadoop is used Example distributed test method and system can realize the parallel distribution and execution of test case, to simultaneously based on Hadoop platform Automatic test is carried out capablely, greatly improves testing efficiency.
In order to achieve the above objects and other related objects, it is distributed to provide a kind of test case based on Hadoop by the present invention Test method includes the following steps:Step S1, test case list is downloaded;Step S2, using Hadoop platform to every node The CPU and memory source of machine are calculated, will be in test case list parallel distribution at most platform node machine;Step S3, more Platform node machine executes test case thereon parallel, and generates test report and daily record.
In one embodiment of the invention, in the step S1, downloaded from test case library by SVN servers needed for Test case list.
In one embodiment of the invention, the step S2 includes the following steps:
21) number of slots of the available task tracker of every node machine is obtained;
22) the test case list in every node machine is generated.
In one embodiment of the invention, in the step 22), tested in the test case list in every node machine Use-case quantity is the ratio of the sum and the number of slots of task tracker of test case.
In one embodiment of the invention, the step S3 includes the following steps:
31) setup test use-case list;
32) test case is downloaded according to test case list;
33) libraries installation lib;
34) test environment is installed;
35) implementation of test cases;
36) test report is pushed.
Meanwhile the present invention also provides a kind of test case distributed test system based on Hadoop, including download module, Distribution module and execution module;
The download module is for downloading test case list;
The distribution module is used to calculate the CPU and memory source of every node machine using Hadoop platform, It will be in test case list parallel distribution at most platform node machine;
The execution module is used in the more parallel implementations of test cases of node machine, and generates test report and daily record.
In one embodiment of the invention, needed for the download module is downloaded by SVN servers from test case library Test case list.
In one embodiment of the invention, the distribution module passes through following steps allocation for test use-case list:
21) number of slots of the available task tracker of every node machine is obtained;
22) the test case list in every node machine is generated.
In one embodiment of the invention, in the step 22), tested in the test case list in every node machine Use-case quantity is the ratio of the sum and the number of slots of task tracker of test case.
In one embodiment of the invention, the execution module passes through following steps implementation of test cases:
31) setup test use-case list;
32) test case is downloaded according to test case list;
33) libraries installation lib;
34) test environment is installed;
35) implementation of test cases;
36) test report is pushed.
As described above, the test case distributed test method and system based on Hadoop of the present invention, has with following Beneficial effect:
(1) the parallel distribution and execution of test case are realized based on Hadoop platform;
(2) automatic test can be concurrently carried out, testing efficiency is greatly improved.
Description of the drawings
Fig. 1 is shown as the flow chart of the test case distributed test method based on Hadoop of the present invention;
Fig. 2 is shown as the block schematic illustration of the test case distributed test method based on Hadoop of the present invention;
Fig. 3 is shown as the structural schematic diagram of the test case distributed test system based on Hadoop of the present invention.
Component label instructions
1 download module
2 distribution modules
3 execution modules
Specific implementation mode
Illustrate that embodiments of the present invention, those skilled in the art can be by this specification below by way of specific specific example Disclosed content understands other advantages and effect of the present invention easily.The present invention can also pass through in addition different specific realities The mode of applying is embodied or practiced, the various details in this specification can also be based on different viewpoints with application, without departing from Various modifications or alterations are carried out under the spirit of the present invention.It should be noted that in the absence of conflict, following embodiment and implementation Feature in example can be combined with each other.
It should be noted that the diagram provided in following embodiment only illustrates the basic structure of the present invention in a schematic way Think, component count, shape and size when only display is with related component in the present invention rather than according to actual implementation in schema then Draw, when actual implementation kenel, quantity and the ratio of each component can be a kind of random change, and its assembly layout kenel It is likely more complexity.
The test case distributed test method based on Hadoop and system of the present invention is in automatization test system Business Logic introduces Hadoop distributed processing platforms, includes two parts, i.e. local part and distributed node machine altogether Device part.Specifically, the phase downloads test case list by SVN servers before testing, is disposed, then calls Hadoop Platform calculates the CPU and memory source of every machine, and the reasonable distribution of resource is carried out according to the demand of concurrent testing, is finally executed And generate test report and daily record.
Referring to Figures 1 and 2, the test case distributed test method of the invention based on Hadoop includes the following steps:
Step S1, test case (case) list is downloaded.
Wherein, required test case list is downloaded from test case library by SVN servers.
Step S2, the CPU and memory source of every node machine are calculated using Hadoop platform, by test case List is parallel in distribution at most platform node machine.
Wherein, the local portion of the corresponding test case distributed test method based on Hadoop for being the present invention of the step Point.
Specifically, step S2 includes the following steps:
21) number of slots of the available task tracker (tasktracker) of every node machine is obtained.
Wherein, Tasktracker is the child node of Hadoop computing systems.Slot position is the minimum of computation of tasktracker Allocation unit, a slot position can correspond to a map task, one tasktracker of a machine startup.In general, according to machine The CPU core number of device comes distributing trough position.In general, the number of slots of tasktracker subtracts 1 equal to CPU core number.
22) the test case list in every node machine is generated.
Wherein, sum and slot position of the test case quantity for test case in the test case list in every node machine Several ratio.
Specifically, in Hadoop platform, by the top control module Jobtracker of Hadoop computing systems in distribution When executing test assignment, unified allocation of resources resource distributes resource, controls implementation procedure, returns to test report.Jobtracker is to connect Connect local part and the bridge of node section.
When controlling implementation procedure, Jobtracker executes following operation:
A, control operation layer executes self-defining operation.
For example, the program or configuration that are needed when operation layer test execution obtain.
B, the work (job) of Hadoop is configured.
Wherein, job include test case list input, test case list output, execute job needed for file or pressure Contracting packet etc..
C, test job is executed.
D, summarize the operation result of every node machine, and send out report.
Step S3, more node machines execute test case thereon parallel, and generate test report and daily record.
Wherein, the distribution of the corresponding test case distributed test method based on Hadoop for being the present invention of the step Node machine part.
Specifically, step S3 includes the following steps:
31) setup test use-case list.
Wherein, test case list is obtained from the test case list importation of map tasks.
32) test case is downloaded according to test case list.
Wherein, the test case for being similar to local standalone version here obtains.The source of test case is still SVN servers Or test case library.
33) libraries installation lib.
34) test environment is installed.
35) implementation of test cases.
36) test report is pushed.
With reference to Fig. 3, the test case distributed test system of the invention based on Hadoop includes download module, distribution mould Block and execution module.
Download module is for downloading test case list.
Wherein, download module downloads required test case list by SVN servers from test case library.
Distribution module is connected with download module, for the CPU and memory money using Hadoop platform to every node machine Source is calculated, will be in test case list parallel distribution at most platform node machine.
Wherein, the local portion of the corresponding test case distributed test system based on Hadoop for being the present invention of the step Point.
Specifically, distribution module carries out test case list distribution by following steps:
21) number of slots of the available tasktracker of every node machine is obtained.
Wherein, Tasktracker is the child node of Hadoop computing systems.Slot position is the minimum of computation of tasktracker Allocation unit, a slot position can correspond to a map task, one tasktracker of a machine startup.In general, according to machine The CPU core number of device comes distributing trough position.In general, the number of slots of tasktracker subtracts 1 equal to CPU core number.
22) the test case list in every node machine is generated.
Wherein, sum and slot position of the test case quantity for test case in the test case list in every node machine Several ratio.
Specifically, in Hadoop platform, by the top control module Jobtracker of Hadoop computing systems in distribution When executing test assignment, unified allocation of resources resource distributes resource, controls implementation procedure, returns to test report.Jobtracker is to connect Connect local part and the bridge of node section.
When controlling implementation procedure, Jobtracker executes following operation:
A, control operation layer executes self-defining operation.
For example, the program or configuration that are needed when operation layer test execution obtain.
B, the work (job) of Hadoop is configured.
Wherein, job include test case list input, test case list output, execute job needed for file or pressure Contracting packet etc..
C, test job is executed.
D, summarize the operation result of every node machine, and send out report.
Execution module is connected with distribution module, is used in the more parallel implementations of test cases of node machine, and generate test Report and daily record.
Wherein, the distribution of the corresponding test case distributed test system based on Hadoop for being the present invention of the step Node machine part.
Specifically, execution module carries out the execution of test case by following steps:
31) setup test use-case list.
Wherein, test case list is obtained from the test case list importation of map tasks.
32) test case is downloaded according to test case list.
Wherein, the test case for being similar to local standalone version here obtains.The source of test case is still SVN servers Or test case library.
33) libraries installation lib.
34) test environment is installed.
35) implementation of test cases.
36) test report is pushed.
In conclusion the test case distributed test method based on Hadoop and system of the present invention are flat based on Hadoop Platform realizes the parallel distribution and execution of test case;Automatic test can be concurrently carried out, testing efficiency is greatly improved. So the present invention effectively overcomes various shortcoming in the prior art and has high industrial utilization.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripe The personage for knowing this technology can all carry out modifications and changes to above-described embodiment without violating the spirit and scope of the present invention.Cause This, institute is complete without departing from the spirit and technical ideas disclosed in the present invention by those of ordinary skill in the art such as At all equivalent modifications or change, should by the present invention claim be covered.

Claims (8)

1. a kind of test case distributed test method based on Hadoop, it is characterised in that:Include the following steps:
Step S1, test case list is downloaded;
Step S2, the CPU and memory source of every node machine are calculated using Hadoop platform, by test case list In parallel distribution at most platform node machine;
Step S3, more node machines execute test case thereon parallel, and generate test report and daily record;
The step S2 includes the following steps:
21) number of slots of the available task tracker of every node machine is obtained;
22) the test case list in every node machine is generated.
2. the test case distributed test method according to claim 1 based on Hadoop, it is characterised in that:The step In rapid S1, required test case list is downloaded from test case library by SVN servers.
3. the test case distributed test method according to claim 1 based on Hadoop, it is characterised in that:The step It is rapid 22) in, in the test case list in every node machine test case quantity be test case sum with task track The ratio of the number of slots of device.
4. the test case distributed test method according to claim 1 based on Hadoop, it is characterised in that:The step Rapid S3 includes the following steps:
31) setup test use-case list;
32) test case is downloaded according to test case list;
33) libraries installation lib;
34) test environment is installed;
35) implementation of test cases;
36) test report is pushed.
5. a kind of test case distributed test system based on Hadoop, it is characterised in that:Including download module, distribution module And execution module;
The download module is for downloading test case list;
The distribution module is used to calculate the CPU and memory source of every node machine using Hadoop platform, will survey Example list on probation is parallel in distribution at most platform node machine;
The execution module is used in the more parallel implementations of test cases of node machine, and generates test report and daily record;
The distribution module passes through following steps allocation for test use-case list:
21) number of slots of the available task tracker of every node machine is obtained;
22) the test case list in every node machine is generated.
6. the test case distributed test system according to claim 5 based on Hadoop, it is characterised in that:Under described It carries module and downloads required test case list from test case library by SVN servers.
7. the test case distributed test system according to claim 5 based on Hadoop, it is characterised in that:The step It is rapid 22) in, in the test case list in every node machine test case quantity be test case sum with task track The ratio of tank digit.
8. the test case distributed test system according to claim 5 based on Hadoop, it is characterised in that:It is described to hold Row module passes through following steps implementation of test cases:
31) setup test use-case list;
32) test case is downloaded according to test case list;
33) libraries installation lib;
34) test environment is installed;
35) implementation of test cases;
36) test report is pushed.
CN201510908046.8A 2015-12-09 2015-12-09 Test case distributed test method based on Hadoop and system Active CN105373409B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510908046.8A CN105373409B (en) 2015-12-09 2015-12-09 Test case distributed test method based on Hadoop and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510908046.8A CN105373409B (en) 2015-12-09 2015-12-09 Test case distributed test method based on Hadoop and system

Publications (2)

Publication Number Publication Date
CN105373409A CN105373409A (en) 2016-03-02
CN105373409B true CN105373409B (en) 2018-09-28

Family

ID=55375636

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510908046.8A Active CN105373409B (en) 2015-12-09 2015-12-09 Test case distributed test method based on Hadoop and system

Country Status (1)

Country Link
CN (1) CN105373409B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885834B (en) * 2017-11-09 2021-07-20 浪潮云信息技术股份公司 Hadoop big data assembly unified verification system
CN109871308B (en) * 2017-12-04 2024-03-19 中兴通讯股份有限公司 Automatic test method and device, terminal equipment and computer readable storage medium
CN109800138B (en) * 2018-12-18 2022-07-08 平安科技(深圳)有限公司 CPU testing method, electronic device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252471A (en) * 2008-03-20 2008-08-27 中兴通讯股份有限公司 Distributed automatization test system and method
CN102841846A (en) * 2012-08-27 2012-12-26 北京邮电大学 Software testing method, device and system based on Hadoop
CN103678098A (en) * 2012-09-06 2014-03-26 百度在线网络技术(北京)有限公司 HADOOP program testing method and system
CN103902447A (en) * 2012-12-27 2014-07-02 百度在线网络技术(北京)有限公司 Distributed system testing method and device
CN104077218A (en) * 2013-03-29 2014-10-01 百度在线网络技术(北京)有限公司 Test method and device of MapReduce distributed system
CN104182347A (en) * 2014-09-05 2014-12-03 上海斐讯数据通信技术有限公司 Test requirement automatic analysis method based on automatic test platform

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252471A (en) * 2008-03-20 2008-08-27 中兴通讯股份有限公司 Distributed automatization test system and method
CN102841846A (en) * 2012-08-27 2012-12-26 北京邮电大学 Software testing method, device and system based on Hadoop
CN103678098A (en) * 2012-09-06 2014-03-26 百度在线网络技术(北京)有限公司 HADOOP program testing method and system
CN103902447A (en) * 2012-12-27 2014-07-02 百度在线网络技术(北京)有限公司 Distributed system testing method and device
CN104077218A (en) * 2013-03-29 2014-10-01 百度在线网络技术(北京)有限公司 Test method and device of MapReduce distributed system
CN104182347A (en) * 2014-09-05 2014-12-03 上海斐讯数据通信技术有限公司 Test requirement automatic analysis method based on automatic test platform

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Hadoop作业调度本地性的研究与优化;陈若飞;《中国优秀硕士学位论文全文数据库 信息科技辑》;20151015(第10期);I138-7 第7页 *
基于云计算的并行测试方案设计与实现;黄晓玲;《计算机工程》;20121231;第38卷(第24期);附图3 *

Also Published As

Publication number Publication date
CN105373409A (en) 2016-03-02

Similar Documents

Publication Publication Date Title
Singh et al. Container-based microservice architecture for cloud applications
US9672065B2 (en) Parallel simulation using multiple co-simulators
US11614927B2 (en) Off-load servers software optimal placement method and program
CN105373409B (en) Test case distributed test method based on Hadoop and system
Rad et al. Benchmarking bare metal cloud servers for HPC applications
US8959498B2 (en) Parallelization method, system and program
Turin et al. A formal model of the kubernetes container framework
EP3724776A1 (en) Method, function manager and arrangement for handling function calls
Weerasinghe et al. An exploratory evaluation of replacing ESB with microservices in service-oriented architecture
CN110659061B (en) FPGA dynamic reconfiguration method, device, equipment and readable storage medium
Bae et al. Automated deployment of SmartX IoT-cloud services based on continuous integration
Schor et al. EURETILE design flow: Dynamic and fault tolerant mapping of multiple applications onto many-tile systems
Lebre et al. Vmplaces: A generic tool to investigate and compare vm placement algorithms
Fekry et al. Towards seamless configuration tuning of big data analytics
US20230065994A1 (en) Offload server, offload control method, and offload program
Dindokar et al. Adaptive partition migration for irregular graph algorithms on elastic resources
Khaitan et al. Parallelizing power system contingency analysis using D programming language
De Munck et al. Design and performance evaluation of a conservative parallel discrete event core for GES
Liu et al. A concurrent approach for improving the efficiency of Android CTS testing
CN112052035A (en) Version packaging method and device based on bank back-line system
CN104731603A (en) System self-adaptation dynamic evolution method facing complex environment
Straesser et al. Kubernetes-in-the-Loop: Enriching Microservice Simulation Through Authentic Container Orchestration
Merkouche et al. TERA-Scheduler for a Dependency-based Orchestration of Microservices
Quintin et al. WSCOM: Online task scheduling with data transfers
US20230066594A1 (en) Offload server, offload control method, and offload program

Legal Events

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

Effective date of registration: 20201105

Address after: 318015 no.2-3167, zone a, Nonggang City, no.2388, Donghuan Avenue, Hongjia street, Jiaojiang District, Taizhou City, Zhejiang Province

Patentee after: Taizhou Jiji Intellectual Property Operation Co.,Ltd.

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210831

Address after: 321, floor 3, building 8, Zhongguancun Software Park, No. 8, Dongbeiwang West Road, Haidian District, Beijing 100089

Patentee after: DMS Corp.

Address before: 318015 no.2-3167, area a, nonggangcheng, 2388 Donghuan Avenue, Hongjia street, Jiaojiang District, Taizhou City, Zhejiang Province

Patentee before: Taizhou Jiji Intellectual Property Operation Co.,Ltd.