CN105893241A - Updating method and device for test data - Google Patents

Updating method and device for test data Download PDF

Info

Publication number
CN105893241A
CN105893241A CN201510891977.1A CN201510891977A CN105893241A CN 105893241 A CN105893241 A CN 105893241A CN 201510891977 A CN201510891977 A CN 201510891977A CN 105893241 A CN105893241 A CN 105893241A
Authority
CN
China
Prior art keywords
check code
test data
data
test
corresponding
Prior art date
Application number
CN201510891977.1A
Other languages
Chinese (zh)
Inventor
王鑫
Original Assignee
乐视网信息技术(北京)股份有限公司
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 乐视网信息技术(北京)股份有限公司 filed Critical 乐视网信息技术(北京)股份有限公司
Priority to CN201510891977.1A priority Critical patent/CN105893241A/en
Publication of CN105893241A publication Critical patent/CN105893241A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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/368Test management for test version control, e.g. updating test cases to a new software version
    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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/3684Test management for test design, e.g. generating new test cases

Abstract

The invention provides an updating method and an updating device for test data. The updating method comprises the following steps of: acquiring a first check code of the test data; comparing the first check code with a prestored second check code of the test data; when the first check code is different from the second check code, sending the test data corresponding to the first check code to a server. By using the updating method and the updating device for the test data, an updating process of the test data can be simplified and the working efficiency can be improved.

Description

测试数据的更新方法和装置 Test data updating method and apparatus

技术领域 FIELD

[0001 ]本发明涉及计算机技术,尤其涉及一种测试数据的更新方法和装置。 [0001] The present invention relates to computer technology, and particularly relates to a method and apparatus for updating test data.

背景技术 Background technique

[0002]通常,数据库中包含多种程序代码的数据,如用于各种测试的程序代码的数据、用于购物的程序代码的数据等。 [0002] Generally, the database contains data from multiple program code, such as program code, data for various tests, the data for program code, shopping and the like.

[0003]如果数据库中的程序代码被更新,则需要将更新的数据及时发送给应用服务器或业务服务器中,以使应用服务器或业务服务器使用最新的程序代码对外提供相应的服务。 [0003] If the program code in the database is updated, you will need to update the data in a timely manner to the application server or the application server in order to make the application server or the application server using the latest program code outside provide the necessary services. 通常,在将更新的数据发送给应用服务器或业务服务器的过程,需要通过手工的方式进行,即用户通过存储设备将更新后的数据转存到服务器(如测试服务器等)或数据库中,在此过程中,用户还可使用预定的方法对更新的数据进行处理,如压缩处理等。 Typically, the process is sent to the application server or a service server in the updated data needs to be manually manner, i.e., the user will be updated by the server transfer data to the storage device (such as a test server, etc.) or a database, this process, the user can also use a method of updating a predetermined data processing, such as compression processing and the like.

[0004]然而,通过手工的方式将更新后的数据写入相应的服务器(如测试服务器等)中,会导致数据更新较繁琐,工作效率较低。 [0004] However, the updated data written to the appropriate server (such as a test server, etc.) by hand, the data update can cause more complicated, productivity is low.

发明内容 SUMMARY

[0005]本发明的目的在于,提供一种对测试数据进行更新的方法,以及实现该方法的装置,通过比较测试数据的校验码,来达到对测试数据的更新的目的,从而简化了测试数据的更新过程,提高了工作效率。 [0005] The object of the present invention is to provide a method for updating the test data, and means for implementing the method, by comparing test data check code to achieve the purpose of updating the test data, thereby simplifying the test update process data, improve work efficiency.

[0006]根据本发明的一方面,提供一种测试数据的更新方法。 [0006] According to an aspect of the present invention, there is provided a method for updating test data. 所述更新方法包括,获取测试数据的第一校验码;比较所述第一校验码与预存的所述测试数据的第二校验码;当所述第一校验码与第二校验码不同时,将所述第一校验码对应的测试数据发送给服务器。 The updating method comprising, obtaining a first checksum test data; a second check code comparing said first check code with the stored test data; when the first check code and the second correction check code is not the same, sending the first check code corresponding to the test data to the server.

[0007]优选地,所述更新方法还包括:获取第一版本的测试数据;存储所述第一版本的测试数据和对应的第二校验码。 [0007] Preferably, the updating method further comprising: obtaining a first version of the test data; storing the first version of the test data and the corresponding second check code.

[0008]优选地,所述更新方法还包括:获取第二版本的测试数据;存储所述第二版本的测试数据和对应的第一校验码。 [0008] Preferably, the updating method further comprising: obtaining a second version of the test data; storing the second version of the test data and the corresponding first check code.

[0009]优选地,所述第一校验码和/或第二校验码为零。 [0009] Preferably, the first check code and / or the second check code is zero.

[0010]优选地,所述当所述第一校验码与第二校验码不同时,将所述第一校验码对应的测试数据发送给服务器包括:当所述第一校验码与第二校验码不同时,获取所述第一校验码对应的测试数据中的预定字符,其中,所述预定字符为空格、换行符、回车符和/或Tab符;将所述预定字符从所述测试数据中删除,得到处理后的测试数据;将处理后的测试数据发送给服务器。 [0010] Preferably, the check code when the first and the second check code are different, the first check code corresponding to the test data to the server comprises: when the first check code a second check code is not the same, obtaining the first check code corresponding to a predetermined test data characters, wherein the predetermined character is a space, line feed, carriage return and / or Tab symbol; the deleting the character from a predetermined test data, the test data obtained after processing; transmitting the processed data to the test server.

[0011 ]根据本发明的另一方面,提供一种测试数据的更新装置。 [0011] According to another aspect of the present invention, there is provided an apparatus for updating test data. 所述更新装置包括:校验码获取模块,用于获取测试数据的第一校验码;校验码比较模块,用于比较所述第一校验码与预存的所述测试数据的第二校验码;测试数据发送模块,用于当所述第一校验码与第二校验码不同时,将所述第一校验码对应的测试数据发送给服务器。 Said updating means comprises: checksum obtaining module, configured to obtain a first test check code data; check code comparing means for comparing said first check the test code and the second pre-stored data checksum; test data sending module, configured to, when the first check code and the second check code are different, sending the first check code corresponding to the test data to the server.

[0012]优选地,所述更新装置还包括:第一数据获取模块,用于获取第一版本的测试数据;第一数据存储模块,用于存储所述第一版本的测试数据和对应的第二校验码。 [0012] Preferably, said updating means further comprises: a first data acquisition module, configured to obtain a first version of the test data; a first data storage module, for storing the first version of the test data and the corresponding first two check code.

[0013]优选地,所述更新装置还包括:第二数据获取模块,用于获取第二版本的测试数据;第二数据存储模块,用于存储所述第二版本的测试数据和对应的第一校验码。 [0013] Preferably, said updating means further comprises: a second data acquisition module, configured to obtain a second version of the test data; a second data storage module for storing the second version of the test data and the corresponding first a checksum.

[0014]优选地,所述第一校验码和/或第二校验码为零。 [0014] Preferably, the first check code and / or the second check code is zero.

[0015]优选地,所述测试数据发送模块包括:字符获取单元,用于当所述第一校验码与第二校验码不同时,获取所述第一校验码对应的测试数据中的预定字符,其中,所述预定字符为空格、换行符、回车符和/或Tab符;数据处理单元,用于将所述预定字符从所述测试数据中删除,得到处理后的测试数据;数据发送单元,用于将处理后的测试数据发送给服务器。 [0015] Preferably, the test data transmission module comprising: a character obtaining means, when the first check code and the second check code are different, obtaining the first check code corresponding to the test data a predetermined character, wherein the predetermined character is a space, line feed, carriage return and / or Tab symbol; a data processing unit for deleting the character from said predetermined test data, the test data is processed to give ; data transmission unit for transmitting the processed data to the test server.

[0016]根据本发明实施例提供的测试数据的更新方法和装置,通过获取测试数据的第一校验码,并将其与预存的所述测试数据的第二校验码比较,当所述第一校验码与第二校验码不同时,则确定该测试数据已更新,可将所述第一校验码对应的测试数据发送给服务器,从而简化了测试数据的更新过程,提高了工作效率。 [0016] The updating method and apparatus provided by the embodiment of the present invention, the test data, the first check code by obtaining test data, and a second check code is compared with the stored test data, when the a first check code and the second check code are different, it is determined that the test data has been updated, the first check code corresponding to the test data to the server, which simplifies the process of updating the test data, the improved productivity.

附图说明 BRIEF DESCRIPTION

[0017]图1是示出根据本发明实施例一的测试数据的更新方法的流程图; [0017] FIG. 1 is a flowchart illustrating a method of updating data in a test embodiment of the present invention;

[0018]图2是示出根据本发明实施例二的测试数据的更新方法的流程图; [0018] FIG 2 is a flowchart illustrating a method of updating the test data according to a second embodiment of the present invention;

[0019]图3是示出根据本发明实施例三的测试数据的更新装置的一种逻辑框图; [0019] FIG. 3 is a block diagram illustrating a logical test data updating apparatus according to a third embodiment of the present invention;

[0020]图4是示出根据本发明实施例三的测试数据的更新装置的另一种逻辑框图; [0020] FIG. 4 is a logical block diagram illustrating another test data updating apparatus according to a third embodiment of the present invention;

[0021]图5是示出根据本发明实施例三的测试数据的更新装置的又一种逻辑框图。 [0021] FIG. 5 is a logical block diagram illustrating a further test data updating apparatus according to a third embodiment of the present invention.

具体实施方式 Detailed ways

[0022]本方案的发明构思是,提供一种对测试数据进行更新的技术方案,通过获取测试数据的第一校验码,并将其与预存的所述测试数据的第二校验码比较,如果两者不同,则确定该测试数据已更新,则可将所述第一校验码对应的测试数据发送给服务器,从而简化了测试数据的更新过程,提高了工作效率。 Inventive concept [0022] The present embodiment is to provide a test data updating aspect, the first check code by obtaining the test data, and comparing the second check code with the stored test data , if they are different, it is determined that the test data has been updated, may first check code corresponding to the test data to the server, which simplifies the process of updating the test data, improve the working efficiency.

[0023]下面结合附图详细描述本发明的示例性实施例。 [0023] Exemplary embodiments of the present invention is described in detail below in conjunction with the accompanying drawings.

[0024] 实施例一 [0024] Example a

[0025]图1是示出根据本发明实施例一的测试数据的更新方法的流程图。 [0025] FIG. 1 is a flowchart illustrating a method of updating data in a test embodiment of the present invention. 通过包括如图3所示的更新装置的计算机系统执行所述更新方法。 By including updating apparatus shown in FIG. 3, a computer system executing the updating method.

[0026]参照图1,在步骤S110,获取测试数据的第一校验码。 [0026] Referring to FIG. 1, at step S110, the first check code acquiring test data.

[0027]其中,测试数据可以是用于对终端设备的某功能(如点击操作的功能或显示功能等)进行测试的程序代码等的数据。 [0027] wherein the test data may be used for program code, data and the like of a function of the terminal device (e.g., a click operation functions or display functions) testing. 第一校验码可以是通过相应的校验码生成工具生成的一串特殊的字符串,该字符串中可包括多个字符,校验码可以是根据数据的具体内容生成,如果数据的内容不同,则该数据对应的校验码不同。 The first check code may be generated special string tool string generated by the respective check code, which may comprise a plurality of character string, a check code may be generated based on the specific content data if the content data different, the data corresponding to different check code. 第一校验码可以为如奇偶校验码、海明校验码或循环冗余校验码(即CRC校验码)。 The first check code may be a parity code, a Hamming code parity or cyclic redundancy check code (i.e. CRC check code).

[0028]具体地,可以设置用于存储测试数据的数据库和相应的服务器,其中服务器可用于对终端设备的相应功能进行测试。 [0028] In particular, the database may be provided for the test and the corresponding data stored in the server, wherein the server can be used for the respective functions of the terminal device to be tested. 用户的终端设备中可安装有检测数据库中存储的测试数据是否发生变化的应用程序,当用户需要对服务器中存储的测试数据进行更新时,可点击终端设备中的该应用程序的快捷方式图标,终端设备启动该应用程序。 The user's terminal equipment can be installed to detect stored in the database test data if the application changes occur when the user needs to test the data stored in the server is updated, click the shortcut icon for the application in the terminal device, terminal device to launch the application. 数据库中可预先存储有各个测试数据的存储路径信息,终端设备通过该应用程序并基于相应的存储路径信息,可获取数据库中的测试数据,并使用预设的校验码生成方式为所述测试数据生成相应的校验码(即第一校验码),从而终端设备获取第一校验码。 Database may be pre-stored test data stored in the respective path information, by the terminal device and the application based on the respective stored path information may be acquired test data in the database, and generating a check code using the default mode of the test a corresponding data generating check code (i.e., a first check code), so that the terminal apparatus acquires the first check code.

[0029]需要说明的是,该应用程序在检测数据库中的测试数据是否发生变化的处理可以通过轮询的方式执行,即设置检测周期,每当到达检测周期时,该应用程序通过该应用程序并基于相应的存储路径信息,可获取数据库中的测试数据,并获取该测试数据的第一校验码,相应的处理可参见上述相关内容,在此不再赘述。 [0029] Incidentally, if the test data in the application database detection process may be performed by a change in a polling manner, i.e., set the detection cycle occurs whenever reaching the detection period, the application by the application and a corresponding storage path information, acquiring the test data in the database, and obtaining a first checksum of the test data, the corresponding processing can be found in the aforementioned related content, based not repeated here.

[0030]在步骤S120,比较所述第一校验码与预存的所述测试数据的第二校验码。 A second check code [0030] In step S120, comparing said first check code with the stored test data.

[0031] 其中,第一校验码与第二校验码可以相同,也可以不同,而且,第一校验码和第二校验码是通过相同的校验码生成方式生成。 [0031] wherein the first check code and the second check code may be the same or different, and, first and second parity check code is generated by the same code check code generating mode.

[0032]具体地,数据库中可预先存储数据库中各个测试数据的校验码。 [0032] In particular, the database may be previously stored in a database check code data of each test. 当该应用程序获取到某测试数据的第一校验码时,可根据预先存储的该测试数据的存储路径信息查找到数据库中当前测试数据,然后,可获取当前测试数据的第二校验码,可将第一校验码和第二校验码进行对比,如果第一校验码与第二校验码不同,则可执行下述步骤S130的处理,如果第一校验码与第二校验码相同,则可确定第一校验码对应的测试数据与第二校验码对应的测试数据相同,此时,可以认为该测试数据没有被更新,服务器中存储有该测试数据,因此,该应用程序可不需将该测试数据发送给服务器。 When the first application obtains a checksum test data, to find test data according to the storage path of the pre-stored information to the current test data in the database, then a second check code can obtain the current test data , a first check code and the second check code comparison, if the first check code and the second check code different from, the following processing may be performed in the step S130, if the first and the second check code the same checksum, may be determined as in the first check code corresponding to the test data and the second check code corresponding to the test data, this time can be considered that the test data is not updated, the server storing the test data, that the application may need to send test data server.

[0033]需要说明的是,确定测试数据是否被更新,除了通过上述方式外,还可以通过其它方式判定,例如,通过测试数据的版本号或通过对比测试数据中的内容等放判定该测试数据是否被更新。 [0033] Incidentally, to determine whether the test data is updated, in addition to the above-described manner, also through other ways is determined, for example, the version number by testing data or the discharge is determined that the test data by comparing the test data contents whether it has been updated.

[0034]在步骤S130,当所述第一校验码与第二校验码不同时,将所述第一校验码对应的测试数据发送给服务器。 [0034] In step S130, when the first check code and the second check code are different, sending the first check code corresponding to the test data to the server.

[0035] 具体地,通过上述步骤S120的比较后,如果确定第一校验码与第二校验码不同,则可认为该测试数据与上一次存储的测试数据不同,用户已将该测试数据的内容进行了更改,此时,该应用程序确认该测试数据已经被更新,可将第一校验码对应的测试数据发送给服务器。 [0035] Specifically, by the comparison of the above-described step S120, if it is determined the first check code and the second check code different, may be considered different from the stored test data on a test data, the test data the user has content changes were made at this time, the test data confirm that the application has been updated, may transmit a first check code corresponding to the test data to the server.

[0036]本发明实施例提供的测试数据的更新方法,通过获取测试数据的第一校验码,并将其与预存的所述测试数据的第二校验码比较,当所述第一校验码与第二校验码不同时,则确定该测试数据已更新,可将所述第一校验码对应的测试数据发送给服务器,从而简化了测试数据的更新过程,提高了工作效率。 Update method provided in the embodiment of the test data [0036] The present invention, by obtaining a first checksum test data, and a second check code is compared with the stored test data, when the first correction testing code and the second check code are different, it is determined that the test data has been updated, the first check code corresponding to the test data to the server, which simplifies the process of updating the test data, improve the working efficiency.

[0037] 实施例二 [0037] Second Embodiment

[0038]图2是示出根据本发明实施例二的测试数据的更新方法的流程图,所述实施例可视为图1的又一种具体的实现方案。 [0038] FIG 2 is a flowchart illustrating a method of updating the test data according to a second embodiment of the present invention, the embodiments may be considered as a further particular implementation of FIG.

[0039]参照图2,在步骤S210,获取测试数据的第一校验码。 [0039] Referring to Figure 2, at step S210, the first check code acquiring test data.

[0040]具体地,数据库中可存储有用于对终端设备中某应用程序进行测试的测试数据,可以根据测试内容的不同分别设置不同的服务器用于进行相应的测试,例如可以设置每个服务器只用于进行某一种测试等,这样,服务器中通常会存储进行该项测试的最新的测试数据。 [0040] In particular, the database may store the test data for testing of an application in the terminal apparatus, may be different for different servers are provided for respective tests according to the test contents, for example, each server may be provided only for a certain kind of test, etc., so the server will usually be the latest test data stored in the test. 数据库所在的终端设备中可安装有对数据库中的数据进行检测的应用程序,该应用程序运行后,可以轮询的方式检测数据库中的数据是否发生变化,即设置检测周期,每当到达检测周期时,该应用程序通过该应用程序并基于相应的存储路径信息,可获取数据库中的第一版本的测试数据,并获取该测试数据的第二校验码,可将第一版本的测试数据和对应的第二校验码对应存储。 Database located in the terminal device may be attached to the data in the database application detected after the application runs, data may be detected by way of polling the database is changed or not, i.e., setting the detection period, each time reaching the detection period when the application by the application and a corresponding storage path information, available in the database of the first version of the test data, and acquiring a second check code of the test data, the first version can be based on test data and corresponding to the second check code stored in correspondence.

[0041]如果用户需要更新该测试数据,则可以使用相应的程序语言编写相应的程序代码以修改该测试数据,修改完成后,可存储修改后的测试数据(可称为第二版本的测试数据),然后,用户可通过该应用程序获取第二版本的测试数据,然后将预先存储的第一版本的测试数据删除,同时,数据库也可将预先存储的第一版本的测试数据删除,并将第二版本的测试数据存储在数据库中。 [0041] If a user needs to update the test data, the program can use the corresponding language corresponding code to modify the test data, after the modification is completed, the test data may be stored modified (it may be referred to as a second version of the test data ), then the user may be obtained by the application of the second version of the test data, and the previously stored version of the first test data deletion, while the first version of the database may also be pre-stored test data deletion, and the second version of the test data stored in the database. 当再次到达检测周期时,终端设备通过该应用程序并基于相应的存储路径信息,可获取数据库中的第二版本的测试数据,并使用预设的校验码生成方式为该测试数据生成相应的校验码(即第一校验码),从而终端设备获取并存储第一校验码。 Upon reaching the detection period again, and the terminal device based on the respective stored path information may be obtained by the application of the second version of the test data in the database, and using the default mode for generating a check code corresponding test data generation check code (i.e., a first check code), so that the terminal device acquires and stores a first check code.

[0042]在步骤S220,比较所述第一校验码与预存的所述测试数据的第二校验码。 A second check code [0042] In step S220, comparing said first check code with the stored test data.

[0043] 其中,上述步骤S220的步骤内容与上述实施例一中步骤S120的步骤内容相同,在此不再赘述。 [0043] wherein the same steps with the contents of step S220 in the above-described embodiment, a step S120 the contents are not repeated here.

[0044]在步骤S230,当所述第一校验码与第二校验码不同时,获取所述第一校验码对应的测试数据中的预定字符。 [0044] In step S230, the check code when the first and the second check code is not the same, obtaining a predetermined character code corresponding to the first checksum test data.

[0045]其中,所述预定字符可为空格、换行符、回车符和/或Tab符。 [0045] wherein the predetermined characters may be spaces, line feed, carriage return and / or Tab character.

[0046]具体地,测试数据通常是由程序代码构成,通过相应的程序语言编写程序代码时,程序代码中通常会包括很多程序格式的字符,终端设备在存储该程序代码时,这些字符会占用大量的存储空间,但是这些字符并不会影响该测试数据的正常使用,为了减少数据存储的存储量,可将测试数据中冗余的字符去掉,相应的处理可包括以下内容:通过上述步骤S220的比较后,如果确定第一校验码与第二校验码不同,则可获取第一校验码对应的测试数据,该应用程序可从第一校验码对应的测试数据中查找其中是否包括预定字符,如果该测试数据中包括预定字符,则可获取所述第一校验码对应的测试数据中的预定字符。 [0046] Specifically, the test data is typically composed of a program code, when writing program code corresponding program language, the program code will typically include many characters program format, the terminal device at the time of storing the program code, these characters take up lot of storage space, but the characters do not affect the normal use of the test data, in order to reduce the amount of data stored in memory, test data may be removed redundant characters, corresponding processing can include the following: the above-described step S220 after the comparison, determining if the first check code and the second check code different, may acquire a first check code corresponding to the test data, the application can be found wherein the first check code from the data whether the corresponding test It comprises a predetermined character, if the test data includes a predetermined character code can obtain the first checksum data corresponding to a predetermined character test. 例如,该应用程序可在该测试数据中查找其中是否包括空格、换行符(即“\n”)、回车符(即“\r” )和Tab符等,并获取该测试数据中的空格、换行符、回车符和Tab符等。 For example, the application may find whether they included spaces, line breaks (i.e., "\ n"), carriage return (i.e., "\ r") and the like in the test Tab character data, and acquires the test data spaces , line feed, carriage return, and other symbols Tab.

[0047]在步骤S240,将所述预定字符从所述测试数据中删除,得到处理后的测试数据。 [0047] In step S240, the character deleted from the said predetermined test data, the test data obtained after processing.

[0048]具体地,该应用程序获取到第一校验码对应的测试数据中的预定字符后,可将预定字符从所述测试数据中删除,如将测试数据中的空格、换行符、回车符和Tab符等删除,剩余的程序代码可构成处理后的测试数据。 [0048] In particular, the application of test data obtained after a first check code corresponding to a predetermined character, a predetermined character may be removed from the test data as the test data spaces, carriage return Tab and a carriage for deleting character, the program code may constitute the remaining test data is processed.

[0049] 在步骤S250,将处理后的测试数据发送给服务器。 [0049] In step S250, the processing of the test data to the server.

[0050] 具体地,通过上述步骤S240的处理后,如果确定第一校验码与第二校验码不同,则可认为该测试数据与上一次存储的测试数据不同,用户已将该测试数据的内容进行了更改,此时,该应用程序确认该测试数据已经被更新,可将处理后的测试数据发送给服务器,以便服务器为相应的终端设备提供测试数据。 [0050] Specifically, after treatment by the above-described step S240, if determined that the first check code and the second check code different, may be considered different from the stored test data on a test data, the test data the user has content changes were made at this time, the test data confirm that the application has been updated, the test data can be processed to the server so that the server provide the test data to the appropriate terminal.

[0051]另外,还可以通过上述方式向数据库和服务器中添加新的测试数据,相应的处理可包括以下内容:所述第二校验码为零。 [0051] Further, the above-described manner may be added to the database server and the new test data, the corresponding processing can include the following: The second check code is zero.

[0052]具体地,如果用户需要更新该测试数据,则可以使用相应的程序语言编写相应的程序代码作为测试数据,编写完成后,可在数据库中存储该测试数据(即为第二版本的测试数据)。 [0052] Specifically, if the user needs to update the test data, the program can use the corresponding language corresponding code as the test data, after completion, the test data may be stored (i.e. the second version of the test in the database data). 当再次到达检测周期时,终端设备通过该应用程序并基于相应的存储路径信息,可获取数据库中的第二版本的测试数据,并使用预设的校验码生成方式为该测试数据生成相应的校验码(即第一校验码)。 Upon reaching the detection period again, and the terminal device based on the respective stored path information may be obtained by the application of the second version of the test data in the database, and using the default mode for generating a check code corresponding test data generation check code (i.e., a first check code). 可根据预先存储的该测试数据的存储路径信息查找到数据库中上一检测周期时的测试数据,然后,可获取该测试数据的第二校验码,如果上一检测周期时该测试数据对应的存储路径信息下不存在测试信息不存在,则此时上一检测周期的测试数据的校验码(即第二校验码)为O。 The storage can find the path of the test data to the information pre-stored test data from the database and a detection period, then a second check code can obtain the test data, the test data corresponding to detected if the previous cycle test absence absence information storage path information, this time the checksum test data on a detection period (i.e., a second check code) is O. 这样,第一校验码与第二校验码不同,则可执行下述步骤S230〜步骤S250的处理,具体可参见上述相关内容,在此不再赘述。 Thus, different from the first check code and the second check code, the processing may be performed by the following steps S230~ step S250, the specific content may refer to the above, are not repeated here.

[0053]另外,还可以通过上述方式将数据库和服务器中的测试数据删除,相应的处理可包括以下内容:所述第一校验码为零。 [0053] In addition, the test data may also be deleted in the database server and the above-described embodiment, the respective processing may include the following: the first check code is zero.

[0054]具体地,如果用户不需要某测试数据,或者需要重新编写测试数据,则可以将原测试数据删除。 [0054] Specifically, if a user does not need test data, or the need to re-write the test data, you can delete the original test data. 当到达检测周期时,终端设备通过该应用程序并基于相应的存储路径信息,可获取数据库中的第二版本的测试数据,如果终端设备中不存在相应的存储路径信息,或者数据库中不存在第二版本的测试数据,则可确定用户将原测试数据删除,此时,可以将第一校验码设置为零。 Upon reaching the detection period, and the terminal device based on the corresponding storage path information, a second version of the available test data in the database by the application, if the corresponding route information stored in the terminal apparatus does not exist, or is not present in the database of two versions of the test data, the user may be determined to delete the original test data, this time, the first check code may be set to zero. 可根据预先存储的该测试数据的存储路径信息查找到数据库中上一检测周期时的测试数据,然后,可获取该测试数据的第二校验码。 The storage can find the path of the test data to the information pre-stored test data from the database and a detection period, and then, acquires the test data may be a second check code. 这样,第一校验码与第二校验码不同,则可向服务器发送数据删除指令,以将服务器中存储的该测试数据删除。 Thus, different from the first check code and the second check code, data deletion instruction may be sent to the server, to the test data stored in the server deleted.

[0055]另外,除了通过上述步骤S230〜步骤S250的处理来减少测试数据的数据量外,还可以通过其它方式进一步减少测试数据的数据量,例如,当所述第一校验码与第二校验码不同时,获取所述第一校验码对应的测试数据中的目标预定字符,其中,该目标预定字符可以为用户自定义的使用多个字符组成的字符串,如testl或OrderType等。 [0055] In addition to the above-described process step S230~ step S250 to reduce the amount of data to test data, the data may further reduce the amount of test data by other means, for example, when the first and the second check code checksum not simultaneously obtain the first checksum test data corresponding to a predetermined target characters, wherein the predetermined target using a plurality of characters from the character can be defined as consisting of a string of user, such as testl or the like OrderType . 应用程序可将所述目标预定字符使用预定的单字符(如a或k等)代替,从而得到处理后的测试数据,并可将处理后的测试数据发送给服务器。 The application may use certain predetermined characters in a predetermined single character (e.g., a k, or the like) in place, whereby the test data is processed, and the processed test data to the server. 这样,通过将用户自定义的多字符的字符串使用预定的单字符表示,减少了测试数据的数据量,降低了测试数据的占用空间。 Thus, multi-character strings using a user-defined character by a predetermined single said data amount of test data, reducing the footprint of the test data.

[0056]另外,为了降低数据库和服务器中存储的测试数据的数据量,还可对数据库和服务器中的测试数据进行模块化处理,具体可包括以下内容:应用程序检测数据库和服务器中存储的多个测试数据,并对每个测试数据进行分析,可将多个测试数据中都包含的相同的程序代码提取,并将其单独存储,同时在相应的测试数据中添加调用提取的程序代码的程序语句,这样,当测试数据运行到上述程序语句时,会跳转到单独存储的程序代码处继续执行,从而使得对个测试数据可以共用一个程序代码而不需要将该程序代码设置在每一个测试数据中,减少了测试数据的数据量,降低了测试数据的占用空间。 [0056] Further, in order to reduce the amount of data and the test data stored in the server database, the database may be on the test data, and a server modular process may specifically include the following: the application and the database stored in the server detects a plurality program test data, and test data for each analysis, the same program code are included in the plurality of test data may be extracted and stored separately, while adding the extracted code calls the corresponding test data statement, so that, when the test data to said program statement run, jump to the program code stored separately proceed, so that the test data of a program code can be shared without the program code is provided in each test data, reducing the amount of data the test data, reducing the footprint of test data.

[0057]本发明实施例提供的测试数据的更新方法,一方面,当所述第一校验码与第二校验码不同时,获取所述第一校验码对应的测试数据中的预定字符,并将所述预定字符从所述测试数据中删除,将删除后的发送给服务器,从而减少了测试数据的数据量,降低了测试数据的占用空间;另一方面,通过向数据库和服务器中添加测试数据或删除测试数据,以将对数据库和服务器中的程序代码进行模块化处理,从而简化了测试数据的更新过程,并减少了测试数据的占用空间。 [0057] Test method for updating data according to an embodiment of the present invention, in one aspect, when the first check code and the second check code are different, the first check code acquiring test data corresponding to a predetermined characters and said predetermined character is deleted from the test data, transmitting to the server deletes, thereby reducing the amount of data of the test data, test data space is reduced; the other hand, by the database server, and add or delete the test data test data, program code and the database server will be modular processing, thereby simplifying the process of updating test data, and reduce the footprint of test data.

[0058] 实施例三 [0058] Example three

[0059]基于相同的技术构思,图3是示出根据本发明实施例三的测试数据的更新装置的逻辑框图。 [0059] Based on the same technical concept, FIG. 3 is a logic diagram illustrating test data updating apparatus according to a third embodiment of the present invention. 参照图3,所述更新装置包括校验码获取模块310、校验码比较模块320和测试数据发送模块330,其中,校验码获取模块310与校验码比较模块320相连接,校验码比较模块320与测试数据发送模块330相连接。 Referring to FIG. 3, the updating means 310 comprises an obtaining module checksum, checksum comparison module 320 and a test data transmitting module 330, wherein the check code acquiring module 310 is connected to the check code comparing module 320, a check code the comparison module 320 is connected to the test data transmitting module 330.

[0060]校验码获取模块310用于获取测试数据的第一校验码。 [0060] check code acquisition module 310 for obtaining a first checksum test data.

[0061]校验码比较模块320用于比较所述第一校验码与预存的所述测试数据的第二校验码。 [0061] The check code comparing module 320 for a second test check code comparing said first check code with the stored data.

[0062]测试数据发送模块330用于当所述第一校验码与第二校验码不同时,将所述第一校验码对应的测试数据发送给服务器。 [0062] Test data transmitting module 330 when the first check code and the second check code are different, sending the first check code corresponding to the test data to the server.

[0063]本发明实施例提供的测试数据的更新装置,通过获取测试数据的第一校验码,并将其与预存的所述测试数据的第二校验码比较,当所述第一校验码与第二校验码不同时,则确定该测试数据已更新,可将所述第一校验码对应的测试数据发送给服务器,从而简化了测试数据的更新过程,提高了工作效率。 [0063] updating means provided in the embodiment of the present invention, the test data, the first check code by obtaining test data, and a second check code is compared with the stored test data, when the first correction testing code and the second check code are different, it is determined that the test data has been updated, the first check code corresponding to the test data to the server, which simplifies the process of updating the test data, improve the working efficiency.

[0064]进一步地,基于图3所示的实施例,如图4所示的更新装置还包括:第一数据获取模块340,用于获取第一版本的测试数据;第一数据存储模块350,用于存储所述第一版本的测试数据和对应的第二校验码。 [0064] Further, the embodiment shown in FIG. 3 embodiment, as shown in FIG. 4 the updating means further comprises based on: a first data acquisition module 340, configured to obtain a first version of the test data; a first data storage module 350, for storing the first version of the test data and the corresponding second check code.

[0065]进一步地,如图4所示的更新装置还包括:第二数据获取模块360,用于获取第二版本的测试数据;数据删除模块370,用于删除所述第一版本的测试数据;第二数据存储模块380,用于存储所述第二版本的测试数据和对应的第一校验码。 [0065] Further, the update apparatus shown in FIG. 4 further comprising: a second data acquisition module 360, configured to obtain a second version of the test data; deleting module 370, for deleting the first version of the test data ; second data storage module 380, for storing the test data and the second version of the corresponding first check code.

[0066]优选地,所述第一校验码和/或所述第二校验码为零。 [0066] Preferably, the first check code and / or the second check code is zero.

[0067]进一步地,基于图3所示的实施例,如图5所示的测试数据发送模块330包括:字符获取单元331,用于当所述第一校验码与第二校验码不同时,获取所述第一校验码对应的测试数据中的预定字符,其中,所述预定字符为空格、换行符、回车符和/或Tab符;数据处理单元332,用于将所述预定字符从所述测试数据中删除,得到处理后的测试数据;数据发送单元333,用于将处理后的测试数据发送给服务器。 [0067] Further, based on the embodiment shown in FIG. 3, as shown in the test data transmitting module 5330 includes: character obtaining unit 331, when the first check code and the second check code is not At the same time, obtaining the first check code corresponding to the test data in a predetermined character, wherein the predetermined character is a space, line feed, carriage return and / or Tab symbol; a data processing unit 332, for the deleting the character from a predetermined test data, the test data obtained after processing; data transmitting unit 333 for transmitting the processed data to the test server.

[0068]进一步地,本发明实施例中,一方面,当所述第一校验码与第二校验码不同时,获取所述第一校验码对应的测试数据中的预定字符,并将所述预定字符从所述测试数据中删除,将删除后的发送给服务器,从而减少了测试数据的数据量,降低了测试数据的占用空间;另一方面,通过向数据库和服务器中添加测试数据或删除测试数据,以将对数据库和服务器中的程序代码进行模块化处理,从而简化了测试数据的更新过程,并减少了测试数据的占用空间。 [0068] Further, embodiments of the present invention, in one aspect, when the first check code and the second check code are different, the first check code acquiring test data corresponding to a predetermined character, and the predetermined character deleted from the test data, transmitting to the server deletes, thereby reducing the amount of data of the test data, test data space is reduced; the other hand, by adding to the test server and the database delete data or test data, program code and the database server will be modular processing, thereby simplifying the process of updating test data, and reduce the footprint of test data.

[0069]需要指出,根据实施的需要,可将本申请中描述的各个步骤/部件拆分为更多步骤/部件,也可将两个或多个步骤/部件或者步骤/部件的部分操作组合成新的步骤/部件,以实现本发明的目的。 [0069] It is noted that, according to the needs of the embodiment, the various steps can be described in the present application / members split into more steps / components, the operation portion may also be a combination of two or more of the steps / components or steps / components into new steps / components, in order to achieve the object of the present invention.

[0070]上述根据本发明的方法可在硬件、固件中实现,或者被实现为可存储在记录介质(诸如CD R0M、RAM、软盘、硬盘或磁光盘)中的软件或计算机代码,或者被实现通过网络下载的原始存储在远程记录介质或非暂时机器可读介质中并将被存储在本地记录介质中的计算机代码,从而在此描述的方法可被存储在使用通用计算机、专用处理器或者可编程或专用硬件(诸如ASIC或FPGA)的记录介质上的这样的软件处理。 [0070] The above can be achieved according to the invention is implemented in hardware, firmware, or be implemented as a storage (such as a CD R0M, RAM, a floppy disk, a hard disk) in the software or computer code in a recording medium or implemented downloaded over a network originally stored on a remote recording medium or a non-transitory machine readable medium and computer code is stored in a local recording medium, so that the method described herein may be stored in general purpose computers, special purpose processors, or may such programming software or dedicated hardware (such as an ASIC or FPGA) processing a recording medium. 可以理解,计算机、处理器、微处理器控制器或可编程硬件包括可存储或接收软件或计算机代码的存储组件(例如,RAM、ROM、闪存等),当所述软件或计算机代码被计算机、处理器或硬件访问且执行时,实现在此描述的处理方法。 It will be appreciated, a computer, a processor, controller or the programmable hardware include a microprocessor may store or receive software or computer code storage components (e.g., RAM, ROM, flash memory, etc.), when the computer software or computer code, and when the processor or hardware implement the processing methods described herein. 此外,当通用计算机访问用于实现在此示出的处理的代码时,代码的执行将通用计算机转换为用于执行在此示出的处理的专用计算机。 Further, when a general purpose computer accesses code for implementing the processing shown herein, the execution code of the general purpose computer into a special purpose computer for executing the processing shown herein.

[0071]以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。 [0071] The above are only specific embodiments of the present invention, but the scope of the present invention is not limited thereto, any skilled in the art in the art within the technical scope of the present invention is disclosed, variations may readily occur or Alternatively, it shall fall within the protection scope of the present invention. 因此,本发明的保护范围应以所述权利要求的保护范围为准。 Accordingly, the scope of the present invention should be defined by the scope of the claims.

Claims (10)

1.一种测试数据的更新方法,其特征在于,所述更新方法包括: 获取测试数据的第一校验码; 比较所述第一校验码与预存的所述测试数据的第二校验码; 当所述第一校验码与第二校验码不同时,将所述第一校验码对应的测试数据发送给服务器。 1. A test method for updating data, wherein the updating method comprising: obtaining a first checksum test data; a second check comparing said first check code with the stored test data code; when the first check code and the second check code are different, sending the first check code corresponding to the test data to the server.
2.根据权利要求1所述的更新方法,其特征在于,所述更新方法还包括: 获取第一版本的测试数据; 存储所述第一版本的测试数据和对应的第二校验码。 2. Update method of claim 1, wherein said updating method further comprising: obtaining a first version of the test data; storing the first version of the test data and the corresponding second check code.
3.根据权利要求2所述的更新方法,其特征在于,所述更新方法还包括: 获取第二版本的测试数据; 存储所述第二版本的测试数据和对应的第一校验码。 3. The updating method according to claim 2, wherein said updating method further comprising: obtaining a second version of the test data; storing the second version of the test data and the corresponding first check code.
4.根据权利要求1所述的更新方法,其特征在于,所述第一校验码和/或第二校验码为零。 4. Update method of claim 1, wherein said first check code and / or the second check code is zero.
5.根据权利要求1所述的更新方法,其特征在于,所述当所述第一校验码与第二校验码不同时,将所述第一校验码对应的测试数据发送给服务器包括: 当所述第一校验码与第二校验码不同时,获取所述第一校验码对应的测试数据中的预定字符,其中,所述预定字符为空格、换行符、回车符和/或Tab符; 将所述预定字符从所述测试数据中删除,得到处理后的测试数据; 将处理后的测试数据发送给服务器。 The updating method according to claim 1, wherein, when said first check code with said second check code is not the same, the first check code corresponding to the test data to the server comprising: when the first check code and the second check code are different, the first check code acquiring test data corresponding to a predetermined character, wherein the predetermined character is a space, line feed, carriage return character and / or symbol Tab; deleting the character from said predetermined test data, the test data obtained after processing; transmitting the processed data to the test server.
6.一种测试数据的更新装置,其特征在于,所述更新装置包括: 校验码获取模块,用于获取测试数据的第一校验码; 校验码比较模块,用于比较所述第一校验码与预存的所述测试数据的第二校验码; 测试数据发送模块,用于当所述第一校验码与第二校验码不同时,将所述第一校验码对应的测试数据发送给服务器。 A test data updating means, characterized in that said updating means comprises: checksum obtaining module, configured to obtain a first test check code data; check code comparing means for comparing the first a second check code check code with the stored test data; test data sending module, configured to, when the first check code and the second check code are different, the first check code corresponding to the test data to the server.
7.根据权利要求6所述的更新装置,其特征在于,所述更新装置还包括: 第一数据获取模块,用于获取第一版本的测试数据; 第一数据存储模块,用于存储所述第一版本的测试数据和对应的第二校验码。 7. Update the apparatus according to claim 6, wherein said updating means further comprises: a first data acquisition module, configured to obtain a first version of the test data; a first data storage module for storing the the first version of the test data and the corresponding second check code.
8.根据权利要求7所述的更新装置,其特征在于,所述更新装置还包括: 第二数据获取模块,用于获取第二版本的测试数据; 第二数据存储模块,用于存储所述第二版本的测试数据和对应的第一校验码。 8. Update device according to claim 7, wherein said updating means further comprises: a second data acquisition module, configured to obtain a second version of the test data; a second data storage module for storing the the second version of the test data and the corresponding first check code.
9.根据权利要求6所述的更新装置,其特征在于,所述第一校验码和/或第二校验码为零。 9. Update the apparatus according to claim 6, wherein said first check code and / or the second check code is zero.
10.根据权利要求6所述的更新装置,其特征在于,所述测试数据发送模块包括: 字符获取单元,用于当所述第一校验码与第二校验码不同时,获取所述第一校验码对应的测试数据中的预定字符,其中,所述预定字符为空格、换行符、回车符和/或Tab符; 数据处理单元,用于将所述预定字符从所述测试数据中删除,得到处理后的测试数据; 数据发送单元,用于将处理后的测试数据发送给服务器。 10. The updating apparatus according to claim 6, wherein said test data transmission module comprising: a character obtaining means, when the first check code and the second check code are different, the acquired a first check code corresponding to the test data in a predetermined character, wherein the predetermined character is a space, line feed, carriage return and / or Tab symbol; a data processing unit for converting the predetermined character from the test delete data, to obtain processed test data; a data transmission unit for transmitting the processed data to the test server.
CN201510891977.1A 2015-12-07 2015-12-07 Updating method and device for test data CN105893241A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510891977.1A CN105893241A (en) 2015-12-07 2015-12-07 Updating method and device for test data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510891977.1A CN105893241A (en) 2015-12-07 2015-12-07 Updating method and device for test data

Publications (1)

Publication Number Publication Date
CN105893241A true CN105893241A (en) 2016-08-24

Family

ID=57002921

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510891977.1A CN105893241A (en) 2015-12-07 2015-12-07 Updating method and device for test data

Country Status (1)

Country Link
CN (1) CN105893241A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106792183A (en) * 2016-12-16 2017-05-31 深圳Tcl数字技术有限公司 TV data error correction method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101604245A (en) * 2008-06-10 2009-12-16 英华达股份有限公司 Method and system for updating files
US20100077107A1 (en) * 2008-09-19 2010-03-25 Oracle International Corporation Storage-side storage request management
CN103001815A (en) * 2011-09-13 2013-03-27 阿里巴巴集团控股有限公司 Method, device and system for acquiring test data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101604245A (en) * 2008-06-10 2009-12-16 英华达股份有限公司 Method and system for updating files
US20100077107A1 (en) * 2008-09-19 2010-03-25 Oracle International Corporation Storage-side storage request management
CN103001815A (en) * 2011-09-13 2013-03-27 阿里巴巴集团控股有限公司 Method, device and system for acquiring test data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106792183A (en) * 2016-12-16 2017-05-31 深圳Tcl数字技术有限公司 TV data error correction method and system

Similar Documents

Publication Publication Date Title
US20130086001A1 (en) Automatic file version verification within electronic mail
US20130268491A1 (en) Telemetry system for a cloud synchronization system
US7536599B2 (en) Methods and systems for validating a system environment
CA2773721C (en) Code validation using content assist
US8126859B2 (en) Updating a local version of a file based on a rule
CN101414255A (en) Method and apparatus for processing log event
CN102880546B (en) Software integration testing method and system based on extensible markup language (XML) database
CN103377127A (en) Development testing system, testing method and device for webpage product
CN103034583A (en) Method and system for processing automatic test scrip of software
CN103414770B (en) File download method and an apparatus, method and device is recommended to download the file
EP2453370B1 (en) Method and system for specifying, preparing and using parameterized database queries
CN103645914B (en) A software method and apparatus for cleaning up
CN103597469B (en) Integrated development environment of a live browser tool
US9396082B2 (en) Systems and methods of analyzing a software component
KR101735719B1 (en) Operating system auto-update procedure
US20030188225A1 (en) Extended "run to" function
CN105446723B (en) A method and apparatus for identifying semantic distinction between source code version of
US8904352B2 (en) Systems and methods for processing source code during debugging operations
CN104683458B (en) Methods kinds of wallpaper and server recommended
US9325717B1 (en) Web-store restriction of external libraries
US8417669B2 (en) Auto-correction in database replication
US9098627B2 (en) Providing a core dump-level stack trace
CN104346184A (en) Application packaging device and application packaging method
CN101308471B (en) A method and apparatus for recovering data
CN103608802B (en) Method and system for selecting the mapping between the retrieval and source files

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
WD01