CN107038227A - The increment synchronization method and system of a kind of script code file - Google Patents

The increment synchronization method and system of a kind of script code file Download PDF

Info

Publication number
CN107038227A
CN107038227A CN201710210464.9A CN201710210464A CN107038227A CN 107038227 A CN107038227 A CN 107038227A CN 201710210464 A CN201710210464 A CN 201710210464A CN 107038227 A CN107038227 A CN 107038227A
Authority
CN
China
Prior art keywords
code file
file
script
test mode
script code
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.)
Withdrawn
Application number
CN201710210464.9A
Other languages
Chinese (zh)
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.)
Wuhan Bill Trading Center Co Ltd
Original Assignee
Wuhan Bill Trading Center Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Bill Trading Center Co Ltd filed Critical Wuhan Bill Trading Center Co Ltd
Priority to CN201710210464.9A priority Critical patent/CN107038227A/en
Publication of CN107038227A publication Critical patent/CN107038227A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2358Change logging, detection, and notification

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a kind of increment synchronization method of script code file and system, method includes:It whether there is newest script code file in S1, in real time inspection code file management storehouse, then generation state-of-the-art record is saved in the script iteration management table of database in this way;S2, acquisition code file management are the first script code file of non-test mode in storehouse, and are synchronized to first object server, and the synchronous regime is stored in daily record;S3, by first object server the first script code file is tested;S4, acquisition code file management are the second script code file of test mode in storehouse, and are synchronized to the second destination server, and the synchronous regime is stored in daily record.The beneficial effects of the invention are as follows:By carrying out increment synchronization to scripted code, the energy and time that developer is synchronously spent by full dose is saved, development efficiency is improved.

Description

The increment synchronization method and system of a kind of script code file
Technical field
The present invention relates to development environment simultaneous techniques field, more particularly to a kind of increment synchronization method of script code file And system.
Background technology
Among actual development process, typically multiple person cooperational development and application program, everyone, which locally sets up, a set of , when script exploitation is nonsynchronous each other, often there is exploitation and stops in development environment, the script exploitation of particularly many databases The problems such as stagnant, inefficiency.
The content of the invention
The invention provides a kind of increment synchronization method of script code file and system, solve prior art script and open The technical problem with inefficiency is stagnated in exploitation caused by sending out asynchronous.
The technical scheme that the present invention solves above-mentioned technical problem is as follows:A kind of increment synchronization method of script code file, Including:
It whether there is newest script code file in S1, in real time inspection code file management storehouse, newest note then generated in this way Record is saved in the script iteration management table of database, and the state-of-the-art record includes:ID, the text of the newest script code file Part title, file storage path, renewal time, file status, the first object server of code tester and final running environment The second destination server, the file status includes:Non- test mode, test mode and issued state;
S2, acquisition are the first script code file of non-test mode in the code file management storehouse, and are synchronized to institute First object server is stated, the synchronous regime is stored in daily record;
S3, by the first object server first script code file is tested, will after being completed The first script code file state is updated to test mode;
S4, acquisition are the second script code file of test mode in the code file management storehouse, and are synchronized to institute The second destination server is stated, the state of second script code file is updated to issued state, and by the synchronous regime It is stored in the daily record.
The beneficial effects of the invention are as follows:By carrying out increment synchronization to scripted code, developer is saved because full dose is same The spent energy and time of step, improves development efficiency.
On the basis of above-mentioned technical proposal, the present invention can also do following improvement.
Preferably, in step S2, the first scripted code text for non-test mode in the code file management storehouse is obtained The method of part is specifically included:
A1, be retrieved as from the script iteration management table non-test mode the first file storage path;
A2, according to the storage path of first file from the code file manage storehouse in obtain first file pair The first script code file answered.
Preferably, in step S4, the second scripted code text for test mode in the code file management storehouse is obtained The method of part is specifically included:
B1, be retrieved as from the script iteration management table test mode the second file storage path;
B2, according to the storage path of second file from the code file manage storehouse in obtain second file pair The second script code file answered.
Preferably, in step S2, server is built by first script code file by version and is synchronized to described the One destination server.
Preferably, in step S4, server is built by the version second script code file is synchronized to institute State the second destination server.
Preferably, when user carries out increment synchronization to the scripted code in local development environment, the increment synchronization side Method also includes:
The scripted code of test mode is retrieved as or from described from the first object server by the client Second destination server is retrieved as the scripted code of issued state;
The scripted code of acquisition is synchronized to local development environment.
Preferably, the daily record includes:Client ip address, ID, synchronizing code filename, lock in time, synchronization And synchronization failure reason as a result.
Preferably, the first object server is test server.
A kind of increment synchronization system of script code file, including:
Module is checked, whether there is newest script code file for checking in real time in code file management storehouse, in this way then Generation state-of-the-art record is saved in the script iteration management table of database, and the state-of-the-art record includes:The newest scripted code ID, file name, file storage path, renewal time, file status, the first object server name of code tester of file With the second destination server title of final running environment, the file status includes:Non- test mode, test mode and Issued state;
First synchronization module, for obtaining the first scripted code text in the code file management storehouse for non-test mode Part, and the first object server is synchronized to, the synchronous regime is stored in daily record;
Test module, for being tested by the first object server first script code file, is surveyed After examination is finished, the state of first script code file is updated to test mode;
Second synchronization module, for obtaining the second scripted code text in the code file management storehouse for test mode Part, and second destination server is synchronized to, the state of second script code file is updated to issued state, and The synchronous regime is stored in the daily record.
Preferably, first synchronization module includes:
First acquisition submodule, the first file for being retrieved as from the script iteration management table non-test mode Deposit path;
Second acquisition submodule, is obtained for the storage path according to first file from code file management storehouse Take corresponding first script code file of first file.
Second synchronization module includes:
3rd acquisition submodule, the second file for being retrieved as from the script iteration management table test mode Deposit path;
4th acquisition submodule, is obtained for the storage path according to second file from code file management storehouse Take corresponding second script code file of second file.
Brief description of the drawings
Fig. 1 is a kind of schematic flow sheet of the increment synchronization method of script code file provided in an embodiment of the present invention;
A kind of structural representation of the increment synchronization system for script code file that Fig. 2 provides for another embodiment of the present invention Figure;
A kind of structural representation of the increment synchronization system for script code file that Fig. 3 provides for another embodiment of the present invention Figure.
Embodiment
The principle and feature of the present invention are described below in conjunction with accompanying drawing, the given examples are served only to explain the present invention, and It is non-to be used to limit the scope of the present invention.
As shown in figure 1, in one embodiment there is provided a kind of increment synchronization method of script code file, including:
It whether there is newest script code file in S1, in real time inspection code file management storehouse, newest note then generated in this way Record is saved in the script iteration management table of database, and state-of-the-art record includes:The ID of newest script code file, file name, File storage path, renewal time, file status, the of the first object server name of code tester and final running environment Two destination server titles, file status includes:Non- test mode, test mode and issued state;
S2, acquisition code file management are the first script code file of non-test mode in storehouse, and are synchronized to the first mesh Server is marked, the synchronous regime is stored in daily record;
S3, by first object server the first script code file is tested, after being completed, by the first script The state of code file is updated to test mode;
S4, acquisition code file management are the second script code file of test mode in storehouse, and are synchronized to the second mesh Server is marked, the state of the second script code file issued state is updated to, and the synchronous regime is stored in daily record.
Specifically, developer local development environment added script file to code file management storehouse (such as svn and Git etc.) in, start the mobile phone automatized sequencing of code file, increased database code script text in code library is checked in real time Part, if latest document, then generates a new record, file path, renewal time etc. is saved in the pin in database In this iteration management table, start code file file distributing automated procedures, found out among database script iteration management table The draft files (file for not detecting state) of each server, copy the testing service specified among code administration storehouse Device, remotely performs the script, and the script is published in corresponding test server, such as server A, B and C, and test is completed Mark is to find out tested files among database script iteration management table afterwards, is copied among code administration storehouse To the server specified, the script is remotely performed, on the server that the script is published to final running environment, for exploit person Member synchronizes.Meanwhile, by whole synchronizing process record in daily record, so as to administrative staff or the synchronous feelings of developer's inquiry Condition, such as synchronization failure reason.
It should be understood that by carrying out increment synchronization to scripted code, saving the essence that developer is synchronously spent by full dose Power and time, improve development efficiency.
Specifically, it is the first script code file of non-test mode in step S2, in acquisition code file management storehouse Method is specifically included:
A1, be retrieved as from script iteration management table non-test mode the first file storage path;
A2, according to the storage path of the first file from code file manage storehouse in obtain corresponding first script of the first file Code file.
Specifically, in step S4, obtain in code file management storehouse as the second script code file of test mode Method is specifically included:
B1, be retrieved as from script iteration management table test mode the second file storage path;
B2, according to the storage path of the second file from code file manage storehouse in obtain corresponding second script of the second file Code file.
Specifically, in step S2, the first script code file is synchronized to by first object by version structure server and taken Business device.
Specifically, in step S4, the second script code file is synchronized to by the second target by version structure server and taken Business device.
Specifically, when user carries out increment synchronization to the scripted code in local development environment, increment synchronization method is also Including:
The scripted code of test mode is retrieved as or from the second destination service from first object server by client Device is retrieved as the scripted code of issued state;
The scripted code of acquisition is synchronized to local development environment.
Developer carries out the synchronous process of full dose at exploitation end to be included:1. deleting local data base, database script, delete Except being locally configured.2. the configuration provided using instrument, is replaced local configuration file 3. and created and the use of destination server equally Family, database table space name.4. the data of the database of destination server are replicated to locally.5. replicate the data of destination server Storehouse script file is to locally.
Developer includes in the process that exploitation end carries out increment synchronization:1. found finally from local script iterative data storehouse The time once updated.2. after last time renewal time is found among server script iterative data storehouse, additional shape State is released and tested script file list.3. obtaining these script files from remote code storehouse, and copy to Local development environment.4. locally issuing these scripts, synchronously finish.Synchronous compared to full dose, increment synchronization more saves the time And energy, substantially increase development efficiency.
Specifically, daily record includes:Client ip address, ID, synchronizing code filename, lock in time, synchronized result And synchronization failure reason.
Specifically, first object server is test server.
As shown in Fig. 2 in another embodiment there is provided a kind of increment synchronization system of script code file, including:
Module 1 is checked, whether there is newest script code file for checking in real time in code file management storehouse, in this way then Generation state-of-the-art record is saved in the script iteration management table of database, and state-of-the-art record includes:The ID of newest script code file, File name, file storage path, renewal time, file status, the first object server name of code tester and final fortune Second destination server title of row environment, file status includes:Non- test mode, test mode and issued state;
First synchronization module 2, for obtaining the first script code file in code file management storehouse for non-test mode, And first object server is synchronized to, the synchronous regime is stored in daily record;
Test module 3, for being tested by first object server the first script code file, is completed Afterwards, the state of the first script code file is updated to test mode;
Second synchronization module 4, for obtaining the second script code file in code file management storehouse for test mode, And it is synchronized to the second destination server, the state of the second script code file is updated to issued state, and by the synchronous shape State is stored in daily record.
Specifically, as shown in figure 3, the first synchronization module 2 includes:
First acquisition submodule 21, the first file for being retrieved as from script iteration management table non-test mode is deposited Put path;
Second acquisition submodule 22, first is obtained for the storage path according to the first file from code file management storehouse Corresponding first script code file of file.
As shown in figure 3, the second synchronization module 4 includes:
3rd acquisition submodule 41, the second file for being retrieved as from script iteration management table test mode is deposited Put path;
4th acquisition submodule 42, second is obtained for the storage path according to the second file from code file management storehouse Corresponding second script code file of file.
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent substitution and improvements made etc. should be included in the scope of the protection.

Claims (10)

1. a kind of increment synchronization method of script code file, it is characterised in that including:
It whether there is newest script code file in S1, in real time inspection code file management storehouse, then generation state-of-the-art record is protected in this way It is stored in the script iteration management table of database, the state-of-the-art record includes:ID, the filename of the newest script code file Claim, file deposits path, renewal time, file status, the first object server name of code tester and final running environment The second destination server title, the file status includes:Non- test mode, test mode and issued state;
S2, obtain in code file management storehouse and be the first script code file of non-test mode, and be synchronized to described the One destination server, the synchronous regime is stored in daily record;
S3, by the first object server first script code file is tested, will be described after being completed The state of first script code file is updated to test mode;
S4, obtain the second script code file for test mode in code file management storehouse, and be synchronized to described the Two destination servers, are updated to issued state, and the synchronous regime is preserved by the state of second script code file In the daily record.
2. the increment synchronization method of a kind of script code file according to claim 1, it is characterised in that in step S2, Obtain and specifically included in the code file management storehouse for the method for the first script code file of non-test mode:
A1, be retrieved as from the script iteration management table non-test mode the first file storage path;
A2, according to the storage path of first file from the code file manage storehouse in obtain first file corresponding First script code file.
3. the increment synchronization method of a kind of script code file according to claim 1, it is characterised in that in step S4, Obtain and specifically included in the code file management storehouse for the method for the second script code file of test mode:
B1, be retrieved as from the script iteration management table test mode the second file storage path;
B2, according to the storage path of second file from the code file manage storehouse in obtain second file corresponding Second script code file.
4. the increment synchronization method of a kind of script code file according to claim 3, it is characterised in that in step S2, Server is built by version first script code file is synchronized to the first object server.
5. the increment synchronization method of a kind of script code file according to claim 4, it is characterised in that in step S4, Server is built by the version second script code file is synchronized to second destination server.
6. a kind of increment synchronization method of script code file according to claim any one of 1-5, it is characterised in that when When user carries out increment synchronization to the scripted code in local development environment, the increment synchronization method also includes:
The scripted code of test mode is retrieved as or from described second from the first object server by the client Destination server is retrieved as the scripted code of issued state;
The scripted code of acquisition is synchronized to local development environment.
7. a kind of increment synchronization method of script code file according to claim any one of 1-5, it is characterised in that institute Stating daily record includes:Client ip address, ID, synchronizing code filename, lock in time, synchronized result and synchronization failure are former Cause.
8. a kind of increment synchronization method of script code file according to claim any one of 1-5, it is characterised in that institute First object server is stated for test server.
9. a kind of increment synchronization system of script code file, it is characterised in that including:
Module (1) is checked, whether there is newest script code file for checking in real time in code file management storehouse, then give birth in this way It is saved in into state-of-the-art record in the script iteration management table of database, the state-of-the-art record includes:The newest scripted code text The ID of part, file name, file storage path, renewal time, file status, the first object server name of code tester and Second destination server title of final running environment, the file status includes:Non- test mode, test mode and send out Cloth state;
First synchronization module (2), for obtaining the first scripted code text in the code file management storehouse for non-test mode Part, and the first object server is synchronized to, the synchronous regime is stored in daily record;
Test module (3), for being tested by the first object server first script code file, test After finishing, the state of first script code file is updated to test mode;
Second synchronization module (4), for obtaining the second scripted code text in the code file management storehouse for test mode Part, and second destination server is synchronized to, the state of second script code file is updated to issued state, and The synchronous regime is stored in the daily record.
10. the increment synchronization system of a kind of script code file according to claim 8, it is characterised in that described first Synchronization module (2) includes:
First acquisition submodule (21), the first file for being retrieved as from the script iteration management table non-test mode Deposit path;
Second acquisition submodule (22), is obtained for the storage path according to first file from code file management storehouse Take corresponding first script code file of first file.
Second synchronization module (4) includes:
3rd acquisition submodule (41), the second file for being retrieved as from the script iteration management table test mode Deposit path;
4th acquisition submodule (42), is obtained for the storage path according to second file from code file management storehouse Take corresponding second script code file of second file.
CN201710210464.9A 2017-03-31 2017-03-31 The increment synchronization method and system of a kind of script code file Withdrawn CN107038227A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710210464.9A CN107038227A (en) 2017-03-31 2017-03-31 The increment synchronization method and system of a kind of script code file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710210464.9A CN107038227A (en) 2017-03-31 2017-03-31 The increment synchronization method and system of a kind of script code file

Publications (1)

Publication Number Publication Date
CN107038227A true CN107038227A (en) 2017-08-11

Family

ID=59533883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710210464.9A Withdrawn CN107038227A (en) 2017-03-31 2017-03-31 The increment synchronization method and system of a kind of script code file

Country Status (1)

Country Link
CN (1) CN107038227A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108769212A (en) * 2018-05-31 2018-11-06 康键信息技术(深圳)有限公司 Method of data synchronization, device, computer equipment and storage medium
CN109002392A (en) * 2018-06-29 2018-12-14 郑州云海信息技术有限公司 A kind of software development script management method and system
CN110221853A (en) * 2019-05-15 2019-09-10 无线生活(杭州)信息科技有限公司 The method and Nginx server of page script are updated based on Nginx
CN111045720A (en) * 2019-12-12 2020-04-21 广州品唯软件有限公司 Code management method, code management system, server, and medium
CN111813683A (en) * 2020-07-14 2020-10-23 深圳前海移联科技有限公司 Universal automatic software test environment synchronization method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1269321A1 (en) * 2000-03-27 2003-01-02 Accenture LLP System, method, and article of manufacture for an automated scripting solution for enterprise testing
CN1601483A (en) * 2004-10-22 2005-03-30 中国工商银行 Automation software testing system based on script explanatory tool
CN104021080A (en) * 2014-06-13 2014-09-03 中国民航信息网络股份有限公司 Automatic testing system based on custom scripts
CN104423961A (en) * 2013-09-11 2015-03-18 阿里巴巴集团控股有限公司 Method and system for generating testing script

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1269321A1 (en) * 2000-03-27 2003-01-02 Accenture LLP System, method, and article of manufacture for an automated scripting solution for enterprise testing
CN1601483A (en) * 2004-10-22 2005-03-30 中国工商银行 Automation software testing system based on script explanatory tool
CN104423961A (en) * 2013-09-11 2015-03-18 阿里巴巴集团控股有限公司 Method and system for generating testing script
CN104021080A (en) * 2014-06-13 2014-09-03 中国民航信息网络股份有限公司 Automatic testing system based on custom scripts

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
陈雪梅等: "谈开放式脚本开发环境ASP在Web数据库开发上的应用", 《电脑与电信》 *
韩俊青: "通用关系数据库脚本语言的设计与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108769212A (en) * 2018-05-31 2018-11-06 康键信息技术(深圳)有限公司 Method of data synchronization, device, computer equipment and storage medium
CN108769212B (en) * 2018-05-31 2023-04-07 康键信息技术(深圳)有限公司 Data synchronization method and device, computer equipment and storage medium
CN109002392A (en) * 2018-06-29 2018-12-14 郑州云海信息技术有限公司 A kind of software development script management method and system
CN110221853A (en) * 2019-05-15 2019-09-10 无线生活(杭州)信息科技有限公司 The method and Nginx server of page script are updated based on Nginx
CN111045720A (en) * 2019-12-12 2020-04-21 广州品唯软件有限公司 Code management method, code management system, server, and medium
CN111045720B (en) * 2019-12-12 2024-01-02 广州品唯软件有限公司 Code management method, code management system, server and medium
CN111813683A (en) * 2020-07-14 2020-10-23 深圳前海移联科技有限公司 Universal automatic software test environment synchronization method
CN111813683B (en) * 2020-07-14 2023-10-03 深圳前海移联科技有限公司 Universal automatic synchronization method for software testing environment

Similar Documents

Publication Publication Date Title
CN107038227A (en) The increment synchronization method and system of a kind of script code file
US7711693B2 (en) Deployment of life-cycle model for LDAP applications
CN107609188B (en) Data synchronization verification method based on golden gate
CN105376277B (en) A kind of method of data synchronization and device
US20090012932A1 (en) Method and System For Data Storage And Management
CN105989044A (en) Database verification method and system
US7870169B2 (en) Method for enabling traceability and recovery from errors during migration of software applications
CN107015908A (en) A kind of computer application software test system and method
CN105554044B (en) The method and device of synchronization object in native object memory node
CN110188103A (en) Data account checking method, device, equipment and storage medium
CN104901845B (en) Domain name WHOIS automatizations of service test system and method
JP2018200683A (en) Method and design of automated examination system
US11907260B2 (en) Compare processing using replication log-injected compare records in a replication environment
CN110245145A (en) Structure synchronization method and apparatus of the relevant database to Hadoop database
CN107122238B (en) Efficient iterative Mechanism Design method based on Hadoop cloud Computational frame
CN110515927A (en) Data processing method and its system, electronic equipment and medium
CN109885474A (en) Test case edit methods and device, terminal and computer readable storage medium
CN110399309A (en) A kind of test data generating method and device
CN105653579A (en) Method and device for testing distributed transactions
CN114153822A (en) Data migration method and device, electronic equipment and storage medium
CN109324821A (en) A kind of self-service terminal system method for edition management
KR101073816B1 (en) Method and system for automatically testing database system based on scenario
US20110289086A1 (en) System, method and apparatus for data analysis
CN106454767A (en) Business data synchronization method, device and system
Noor et al. Survey on replication techniques for distributed system

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20170811

WW01 Invention patent application withdrawn after publication