CN109726127B - A kind of automatic extending method based on single set test environment - Google Patents

A kind of automatic extending method based on single set test environment Download PDF

Info

Publication number
CN109726127B
CN109726127B CN201811629708.8A CN201811629708A CN109726127B CN 109726127 B CN109726127 B CN 109726127B CN 201811629708 A CN201811629708 A CN 201811629708A CN 109726127 B CN109726127 B CN 109726127B
Authority
CN
China
Prior art keywords
configuration
related system
timing related
new environment
timing
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
CN201811629708.8A
Other languages
Chinese (zh)
Other versions
CN109726127A (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.)
Sichuan XW Bank Co Ltd
Original Assignee
Sichuan XW Bank 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 Sichuan XW Bank Co Ltd filed Critical Sichuan XW Bank Co Ltd
Priority to CN201811629708.8A priority Critical patent/CN109726127B/en
Publication of CN109726127A publication Critical patent/CN109726127A/en
Application granted granted Critical
Publication of CN109726127B publication Critical patent/CN109726127B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The present invention relates to computer software fields, provide a kind of based on single automatic extending method for covering test environment.Its purport is to solve a large amount of timing test assignments execution feasibility problems and efficiency, major programme include: 1: extracting timing related system A, and configuration association configuration template B2;2: establishing rapid deployment standard, dynamic rapid deployment new environment timing related system A ' as needed;3: new environment being generated according to rapid deployment standard and has configuration template C1 by oneself, and the associated configuration that configuration template C1 adds new environment automatically is had by oneself by new environment, completes new environment timing related system A ' and upstream and downstream system relationship;4: new environment timing related system A ', which carries out data from timing related system A, synchronizes, it is different according to date field data in timing task execution plan, it is assigned randomly to the execution task of each new environment timing related system A ', and according to the task of execution, matching executes the data of corresponding date field.

Description

A kind of automatic extending method based on single set test environment
Technical field
The present invention relates to computer software fields, and in particular to testing field provides a kind of based on single set test environment Automatic extending method.
Background technique
In software test business function test need with test environment for rely on carry out, operational trials task amount not really It is qualitative that high requirement is proposed to test environment, especially in the case where considerable task is concurrent.
Timing task: test point has stronger dependence to the time, for example certain test assignment can only be executed at No. 10, Xia Yiren Business can only be executed at No. 20.For example the day in banks testing cuts batch testing.Timing task is very high to test environmental requirement, The same environment of synchronization can only support one.A set of test environment usually contains multiple operation systems that are mutually related.
Feasibility and imeliness problem are tested to solve a large amount of timing tasks.When current solution is a large amount of in the prior art There are mainly two types of the existing schemes of sequence task test.
Scheme one: each timing sequence test task is successively lined up by time requirement, is executed by serial manner, is come below Test assignment need etc. front task execution complete and corresponding verification after could execute next task.If front test assignment is sent out The defects of task needs behind existing defect is just able to verify that after solving.Though so solving the problems, such as to execute in feasibility, it is bound to Will cause each test assignment interdepend mutually wait, waste the plenty of time, if task is more also to will cause each test assignment Between data interfere with each other, increase test validation difficulty, it is time-consuming to further increase test.
Scheme two: according to the quantity of timing sequence test task, establishing the test environment of corresponding tricks, ideally each to appoint It is engaged in corresponding to set of environmental, so just can solve multiple timings task execution feasibility problems and test assignment executes timeliness and asks Topic.But a set of test environment is often made of dozens of operation system, a large amount of ring can be expended by establishing excessive test environment Border resource and human resources.And due to the uncertainty of timing sequence test task amount, a degree of environmental resource waste will cause, Higher challenge is also proposed to the dynamic management of test environment simultaneously.
Though both the above scheme can solve a large amount of timing test assignments and execute feasibility problems, have more tight Weight accessory problem.
Compared with both the above scheme, this programme optimizes execution time-consuming and environmental resource on the basis of solving feasibility Waste problem.System relevant with timing can be combed out in multiple related systems for a large amount of timing sequence test task this programme, Only related system is expanded, remaining system can be associated by way of automatically configuring, and form more set virtual environments, number It is synchronized according between primal environment and virtual environment, effect identical with more set physical surroundings are built can be reached in use.
Summary of the invention
It is an object of the invention to solve a large amount of timing test assignments to execute feasibility problems and efficiency, provide A method of it not needing to be arranged multiple environment test can be realized and expand.
The present invention uses following technical scheme to achieve the above object:
A kind of automatic extending method based on single set test environment, which comprises the following steps:
Step 1: extracting timing related system A, and matched according to the privately owned configuration variables B1 configuration association of timing related system A Set template B2;
Step 2: establishing rapid deployment standard, dynamic rapid deployment new environment timing related system A ' as needed;
Specific standards are as follows:
A system application catalogue is unified: application is placed on unified file directory,
The name of A system Apply Names is unified: using the natural number of former application name+incremental as new opplication name,
It is unified that file configuration is arranged in A system: unified configuration configuration center address, new opplication name one establish application in configuration The corresponding relationship of the heart.
By the application deployment canonical form at configuration script, this can be repeated when user inputs the number of contexts needed The more sets of script deployment.
Step 3: new environment being generated according to rapid deployment standard and has configuration template C1 by oneself, and passes through the own configuration mould of new environment Plate C1 adds the associated configuration of new environment automatically, completes new environment timing related system A ' and upstream and downstream system relationship;
Step 4: new environment timing related system A ' carries out data from the timing related system A described in step 1 and synchronizes, according to Date field data are different in timing task execution plan, and the execution for being assigned randomly to each new environment timing related system A ' is appointed Business, and according to the task of execution, matching executes the data of corresponding date field.
In above-mentioned technical proposal, step 1 the following steps are included:
Step 1.1: extracting timing related system A relevant with timing task execution;
Step 1.2: associated configuration between combing timing related system A and upstream and downstream system, by associated configuration with key-value pair Form is stored, and associated configuration includes common configuration and privately owned configuration;The contents extraction changed in privately owned configuration is come out into shape At privately owned configuration variables B1, by publicly-owned configuration name, publicly-owned Configuration Values, privately owned configuration name, privately owned configuration variables B1 stores shape one by one At associated configuration template B2;
In above-mentioned technical proposal, step 2 is the following steps are included: the application of unified timing related system A and the portion of database Administration's standard, can be according to timing mission requirements Dynamical Deployment timing related system A.
In above-mentioned technical proposal, step 3 the following steps are included:
Step 3.1: on the basis of step 2, the privately owned configuration obtained automatically in associated configuration template B2 by code becomes The correlation for measuring B1, obtains the privately owned configuration variables actual value B1 ' of new environment timing related system A ' by string-concatenation, The privately owned configuration variables B1 of privately owned configuration variables actual value B1 ' replacement associated configuration template B2 obtains new environment timing related system The own configuration template C1 of A '.
Step 3.2: being automatically new environment timing related system by way of API Access in global configuration centring system Configuration item in the own configuration template C1 of A ' establishes cluster, the corresponding cluster of each new environment timing related system A ', It adds the configuration item in C1 one by one in corresponding cluster, completes new environment timing related system A ' and upstream and downstream system relationship.
In above-mentioned technical proposal, step 4 the following steps are included:
Step 4.1: new environment timing related system A ' data are first from timing related system A by data synchronization gain It first obtains the size D1 of database data amount and needs the quantity in synchronous library, and data-quantity threshold is set according to actual needs D2;
Step 4.2: using Multi-thread synchronization to improve synchronous efficiency, instead if data volume D1 is greater than data-quantity threshold D2 It is then synchronous using single thread, data volume size determines and method of synchronization switching is all made of code and executes automatically;
Step 4.3: it is different according to date field data in timing task execution plan, it is assigned to each new environment at random The execution task of timing related system A ', and according to the task of execution, matching executes the data of corresponding date field.
The present invention is because by adopting the above technical scheme, have following effect:
1, in terms of environmental structure, only expansion builds timing related system and can save environment compared with building a whole set of environment Resource saves the environmental structure time.
2, environment is whole-process automatic builds, and accomplishes normalized template for building, build it is more efficient, also be conducive to environment dynamic Maintenance.
3, in terms of test assignment, operation is cut a large amount of days by serially executing and becomes parallel execution, reduces the phase between test assignment It mutually influences mutually to wait, improves test accuracy, reduces data contamination.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 is the method for the present invention flow diagram;
Fig. 2 is present system schematic diagram.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention, i.e., described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is logical The component for the embodiment of the present invention being often described and illustrated herein in the accompanying drawings can be arranged and be designed with a variety of different configurations.
Therefore, the detailed description of the embodiment of the present invention provided in the accompanying drawings is not intended to limit below claimed The scope of the present invention, but be merely representative of selected embodiment of the invention.Based on the embodiment of the present invention, those skilled in the art Member's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
It should be noted that the relational terms of term " first " and " second " or the like be used merely to an entity or Operation is distinguished with another entity or operation, and without necessarily requiring or implying between these entities or operation, there are any This actual relationship or sequence.Moreover, the terms "include", "comprise" or its any other variant be intended to it is non-exclusive Property include so that include a series of elements process, method, article or equipment not only include those elements, but also Further include other elements that are not explicitly listed, or further include for this process, method, article or equipment it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described There is also other identical elements in the process, method, article or equipment of element.
Embodiment 1
A kind of automatic extending method based on single set test environment, which comprises the following steps:
Step 1: extracting timing related system A, and matched according to the privately owned configuration variables B1 configuration association of timing related system A Set template B2;
Step 2: establishing rapid deployment standard, dynamic rapid deployment new environment timing related system A ' as needed;
Step 3: new environment being generated according to rapid deployment standard and has configuration template C1 by oneself, and passes through the own configuration mould of new environment Plate C1 adds the associated configuration of new environment automatically, completes new environment timing related system A ' and upstream and downstream system relationship;
Step 4: new environment timing related system A ' carries out data from the timing related system A described in step 1 and synchronizes, according to Date field data are different in timing task execution plan, and the execution for being assigned randomly to each new environment timing related system A ' is appointed Business, and according to the task of execution, matching executes the data of corresponding date field.
In above-mentioned technical proposal, step 1 the following steps are included:
Step 1.1: extracting timing related system A relevant with timing task execution;
Step 1.2: associated configuration between combing timing related system A and upstream and downstream system, by associated configuration with key-value pair Form is stored, and associated configuration includes common configuration and privately owned configuration;The contents extraction changed in privately owned configuration is come out into shape At privately owned configuration variables B1, by publicly-owned configuration name, publicly-owned Configuration Values, privately owned configuration name, privately owned configuration variables B1 stores shape one by one At associated configuration template B2;
In above-mentioned technical proposal, step 2 is the following steps are included: the application of unified timing related system A and the portion of database Administration's standard, can be according to timing mission requirements Dynamical Deployment timing related system A.
In above-mentioned technical proposal, step 3 the following steps are included:
Step 3.1: on the basis of step 2, the privately owned configuration obtained automatically in associated configuration template B2 by code becomes The correlation for measuring B1, obtains the privately owned configuration variables actual value B1 ' of new environment timing related system A ' by string-concatenation, The privately owned configuration variables B1 of privately owned configuration variables actual value B1 ' replacement associated configuration template B2 obtains new environment timing related system The own configuration template C1 of A '.
Privately owned configuration variables actual value B1 ' for obtaining new environment timing related system A ' by string-concatenation is lifted Example:
For example my privately owned configuration variables are named as path, the actual value of this variable is http:192.168.1.1, my institute The string-concatenation of value just refers in " http: " and " 192.168.1.1 " splicing.It is to add http or add as each variable Other front and backs are sewed or how to be spliced, this rule is that each variable is different, and rule should be the configuration there are step 1 In template.
Step 3.2: being automatically new environment timing related system by way of API Access in global configuration centring system Configuration item in the own configuration template C1 of A ' establishes cluster, the corresponding cluster of each new environment timing related system A ', It adds the configuration item in C1 one by one in corresponding cluster, completes new environment timing related system A ' and upstream and downstream system relationship.

Claims (4)

1. a kind of based on single automatic extending method for covering test environment, which comprises the following steps:
Step 1: extracting timing related system A, and mould is configured according to the privately owned configuration variables B1 configuration association of timing related system A Plate B2;
Step 2: establishing rapid deployment standard, dynamic rapid deployment new environment timing related system A ' as needed;
Step 3: new environment being generated according to rapid deployment standard and has configuration template C1 by oneself, and configuration template C1 is had by oneself by new environment The associated configuration of automatic addition new environment timing related system A ', completes new environment timing related system A ' and upstream and downstream system is closed Connection;
Step 4: new environment timing related system A ' carries out data from the timing related system A described in step 1 and synchronizes, according to timing Date field data are different in task execution plan, are assigned randomly to the execution task of each new environment timing related system A ', And according to the task of execution, matching executes the data of corresponding date field;
Step 3 the following steps are included:
Step 3.1: on the basis of step 2, obtaining the privately owned configuration variables B1 in associated configuration template B2 automatically by code Correlation, obtain the privately owned configuration variables actual value B1 ' of new environment timing related system A ' by string-concatenation, it is privately owned to match The privately owned configuration variables B1 for setting variable actual value B1 ' replacement associated configuration template B2 obtains oneself of new environment timing related system A ' There is configuration template C1;
Step 3.2: being automatically new environment timing related system A ' by way of API Access in global configuration centring system Configuration item in own configuration template C1 establishes cluster, the corresponding cluster of each new environment timing related system A ', right The configuration item in C1 is added in the cluster answered one by one, completes new environment timing related system A ' and upstream and downstream system relationship.
2. according to claim 1 a kind of based on single automatic extending method for covering test environment, which is characterized in that step 1 The following steps are included:
Step 1.1: extracting timing related system A relevant with timing task execution;
Step 1.2: associated configuration between combing timing related system A and upstream and downstream system, by associated configuration in the form of key-value pair It is stored, associated configuration includes common configuration and privately owned configuration;The contents extraction changed in privately owned configuration is come out and forms private There is configuration variables B1, by publicly-owned configuration name, publicly-owned Configuration Values, privately owned configuration name, privately owned configuration variables B1 stores formation one by one and closes Join configuration template B2.
3. according to claim 1 a kind of based on single automatic extending method for covering test environment, which is characterized in that step 2 The following steps are included: the application of unified timing related system A and the deployment criteria of database, according to timing mission requirements dynamic state part Affix one's name to timing related system A.
4. according to claim 1 a kind of based on single automatic extending method for covering test environment, which is characterized in that step 4 The following steps are included:
Step 4.1: new environment timing related system A ' data obtain first from timing related system A by data synchronization gain It takes the size D1 of database data volume and needs the quantity in synchronous library, and data-quantity threshold D2 is set according to actual needs;
Step 4.2: if data volume D1 is greater than data-quantity threshold D2 use Multi-thread synchronization to improve synchronous efficiency, it is on the contrary then Synchronous using single thread, data volume size determines and method of synchronization switching is all made of code and executes automatically;
Step 4.3: it is different according to date field data in timing task execution plan, it is assigned randomly to each new environment timing phase The execution task of relationship system A ', and according to the task of execution, matching executes the data of corresponding date field.
CN201811629708.8A 2018-12-28 2018-12-28 A kind of automatic extending method based on single set test environment Active CN109726127B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811629708.8A CN109726127B (en) 2018-12-28 2018-12-28 A kind of automatic extending method based on single set test environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811629708.8A CN109726127B (en) 2018-12-28 2018-12-28 A kind of automatic extending method based on single set test environment

Publications (2)

Publication Number Publication Date
CN109726127A CN109726127A (en) 2019-05-07
CN109726127B true CN109726127B (en) 2019-07-23

Family

ID=66297788

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811629708.8A Active CN109726127B (en) 2018-12-28 2018-12-28 A kind of automatic extending method based on single set test environment

Country Status (1)

Country Link
CN (1) CN109726127B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110795445B (en) * 2019-10-29 2022-08-05 北京字节跳动网络技术有限公司 Concurrent task processing method and device, server equipment and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252469A (en) * 2008-03-24 2008-08-27 中兴通讯股份有限公司 Multi-net elements automatization testing method
CN103699479A (en) * 2012-09-27 2014-04-02 百度在线网络技术(北京)有限公司 Sandbox testing environment constitution system and sandbox testing environment constitution method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120253728A1 (en) * 2011-04-01 2012-10-04 Verizon Patent And Licensing Inc. Method and system for intelligent automated testing in a multi-vendor, multi-protocol heterogeneous environment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252469A (en) * 2008-03-24 2008-08-27 中兴通讯股份有限公司 Multi-net elements automatization testing method
CN103699479A (en) * 2012-09-27 2014-04-02 百度在线网络技术(北京)有限公司 Sandbox testing environment constitution system and sandbox testing environment constitution method

Also Published As

Publication number Publication date
CN109726127A (en) 2019-05-07

Similar Documents

Publication Publication Date Title
CN110389900B (en) Distributed database cluster testing method and device and storage medium
CN110603522B (en) Method for containerizing application program on cloud platform
CN107368503B (en) Data synchronization method and system based on button
CN110309161B (en) Data synchronization method and device and server
CN106528070B (en) A kind of data table generating method and equipment
CN104317843A (en) Data synchronism ETL (Extract Transform Load) system
WO2018145559A1 (en) Method and system for generating continuous integration pipeline
CN106533719A (en) Method and system for realizing cluster deployment
CN105847378B (en) A kind of method and system for realizing that big data is synchronous
CN110334077A (en) The method and device of database cross computer room migration
CN107704550A (en) File migration method, apparatus and computer-readable recording medium
CN109726127B (en) A kind of automatic extending method based on single set test environment
CN106294496A (en) A kind of data migration method based on hadoop cluster and instrument
Vanhove et al. Tengu: An experimentation platform for big data applications
CN111435329A (en) Automatic testing method and device
CN110134533A (en) It is a kind of can lot size scheduling data system and method
CN113760952A (en) Data query method and device, storage medium and electronic device
CN109614339A (en) A kind of automatic extending method based on more set test environment
CN102970375A (en) Cluster configuration method and device
CN115495527A (en) Data synchronization management system and method
CN112231217B (en) Method and device for implementing functional test in duplicate mode
CN109446223B (en) Data integration method among multiple systems
CN110609734A (en) Method and device for scheduling timed tasks
CN111930718B (en) Node adjustment method and device for configuration management database
Takahashi et al. Optimizing Schedule for Parallel Software Deployments Based on Profiles of Network Activity and Installation Time in Cloud Environments

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant