# Patent

## Title
Techniques for automatically generating test data

## Abstract

Techniques for automatically generating test data solve various problems in test data generation. A technique of automatically generating test data includes receiving a signature to be embedded in at least one character string to be generated and determining a total sum of attribute values intrinsic to characters in the character string. The sum is associated with each element of the signature. At least one of the characters in the character string may be selected from a character table describing characters prepared to create the test data so as to achieve the determined total sum for each element of the signature. The generated test data contains the character string including the selected character.

## Background
FOREIGN PRIORITY
This application claims priority to Japanese Patent Application No. 2013-184775 filed Sep. 6, 2013, and all the benefits accruing therefrom under 35 U.S.C. §119, the contents of which in its entirety are herein incorporated by reference.
BACKGROUND
This disclosure relates to computer testing systems utilizing test data and, more particularly, to techniques for automatically generating test data.
Test data (also referred to as character string data for test) is used instead of live data in a variety of test operations, such as testing whether a system is operating normally or whether the system can be resistant to a load. While live customer data could be used as test data, created test data is preferred to prevent leakage of customer data. Test data can also be linked to computer units, modules or subsystems in system development. For example, test data may be used for an entire system test, or for a stress test on whether a specific web application is resistant to a particular actual operation, and so forth.
Various conventional methods have been known. In the conventional art, a specific character string may be added to live data to create test data. For instance, the data may be in the form “test_XXXXX” (which may be an alphabetic or pictorial character data) where a specific character string “test_” is added to live data “XXXXX”. Alternatively, the same character string may be used at all positions to acquire test data. In this case, the data may be in the form “XXXXX” where all of the data is created for test purposes. Irregular character strings may also be randomly generated to create the test data. The data may be, for instance, “fkwLkxP”. As another option, pictorial characters or character strings selected from a lookup table may also serve as test data. For instance, the data may include pictorial characters, such as , , and .
SUMMARY
Embodiments include a method, system, and computer program product for automatically generating test data. A method includes receiving a signature to be embedded in at least one character string to be generated. A total sum of attribute values intrinsic to characters in the character string is determined, where the sum is associated with each element of the signature. A least one of characters configuring the character string is selected from a character table describing characters prepared to create the test data so as to achieve the determined total sum for each element of the signature. The generated test data includes the character string including the selected character.
Additional features and advantages are realized through the techniques of the present disclosure. Other embodiments and aspects of the disclosure are described in detail herein. For a better understanding of the disclosure with the advantages and the features, refer to the description and to the drawings.



BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS
The subject matter which is regarded as the invention is particularly pointed out and distinctly claimed in the claims at the conclusion of the specification. The forgoing and other features, and advantages of the invention are apparent from the following detailed description taken in conjunction with the accompanying drawings in which:
FIG. 1 is a diagram showing an example of a computer that can be used in an embodiment.
FIG. 2A is a diagram for illustrating a technique of generating test data with a value representing, as an attribute value, a vowel in a language that uses vowels and consonants in a discriminated manner in accordance with an embodiment.
FIG. 2B is a diagram for illustrating the technique of generating test data with a value representing, as an attribute value, a vowel in the language that uses vowels and consonants in the discriminated manner in accordance with an embodiment.
FIG. 3 is a diagram of showing an alternative technique of generating test data in accordance with an embodiment.
FIG. 4 is a flowchart showing the details of the flow of processes shown in FIGS. 2A and 2B in accordance with an embodiment.
FIG. 5 is a flowchart of identifying a signature from test data generated according to the embodiment shown in FIGS. 2A and 2B in accordance with an embodiment.
FIG. 6A is a diagram for illustrating a technique of generating test data using, as an attribute value, the number of strokes of a character in a language including characters having a prescribed number of strokes in accordance with an embodiment.
FIG. 6B is a diagram for illustrating the technique of generating test data using, as an attribute value, the number of strokes of a character in the language including characters having a prescribed number of strokes in accordance with an embodiment.
FIG. 7 is a diagram showing an embodiment different from the embodiment shown in FIGS. 6A and 6B in accordance with an embodiment.
FIG. 8 is a flowchart showing the details of the flow of processes of the embodiment shown in FIGS. 6A and 6B in accordance with an embodiment.
FIG. 9 is a flowchart of identifying a signature from test data generated according to the embodiment shown in FIGS. 6A and 6B in accordance with an embodiment.
FIG. 10 is a functional block diagram of a computer configured to automatically generates test data according to an embodiment.
FIG. 11 is a diagram showing an example of a functional block diagram of a computer that preferably includes the hardware configuration according to FIG. 1 and identifies a signature embedded in test data according to an embodiment.
FIG. 12 shows an example of a character string (combination of vowel characters and consonant characters in a character string) selected so as to achieve the total sum of values representing a vowel in a character string according to an embodiment.
FIG. 13 shows an example of a character string selected so as to achieve the total sum of values representing the number of strokes of each character in a character string in accordance with an embodiment.



DETAILED DESCRIPTION
Embodiments may be realized in a system, method and computer product for automatically generating test data to solve various problems in test data generation. A technique of automatically generating test data includes receiving a signature to be embedded in at least one character string to be generated and determining a total sum of attribute values intrinsic to characters in the character string. The sum is associated with each element of the signature. At least one of the characters in the character string may be selected from a character table describing characters prepared to create the test data so as to achieve the determined total sum for each element of the signature. The generated test data contains the character string including the selected character.
In the embodiments of the present invention, “test data” is character string data for test and, for instance, may be data used instead of live data for testing whether, for instance, the system normally operates or not or whether the system can be resistant to a load or not. The “test data” may also be test data including the character string data as mask data that is to be used for preventing security information from leaking.
A “signature” is characteristic information to be added to the test data when the test data is generated. The signature includes numbers and may include one or multiple elements. The signature is, for instance, information on a test data generating tool (e.g., a product number, a version number, or a license number), a number intrinsic to a user who generates or uses test data (e.g., user ID), or, for instance, the date and time when the test data is generated. In the case where a signature is, for instance, a signature including the date and time, the signature may be, for instance, “20131231”. In the case where the signature including the date and time is composed of, for instance, numbers having each element composed of a one-digit number, the elements are composed of “2”, “0”, “1”, “3”, “1”, “2”, “3” and “1”. Alternatively, in the case where the elements are composed of numbers having each element composed of a two-digit number, the elements are composed of “20”, “13”, “12” and “31”.
Users using test data sometimes wish to be able to verify that the test data has been certainly generated as test data. Some pieces of test data are incapable of being verified as data having been generated as test data. Accordingly, if live data were mixed in the data, no one would find the fact. According to the method of adding a prescribed character string to live data to acquire test data, the data sometimes has characteristics different from those of live data. For instance, in the case where the field type of live data is Kanji, acquisition of test data through adding a prescribed character string “TEST_” (half-width or single-byte characters) to the live data (Kanji) unfortunately allows a half-width character to be mixed into the field. Thus, mixture of a half-width character into the field breaks the type.
Meta information may also be included in generated test data itself. For instance, a characteristic signature may be included in test data to allow the signature to be taken from the test data itself. It is also demanded that in case where a test data generating tool or test data generated through the test data generating tool is used without authorization, the unauthorized use can be easily identified. Even if the character codes (codepage) are changed, the signature associated with test data is not lost. For instance, even with difference in character code, half-width or full-width or typeface or font, the signature can still be recognized. In addition, the signature is recognized with any manner of displaying of a character string of test data. For instance, the signature is sometimes desired to be verified by the naked eye also from printed test data or test data displayed on a display screen.
The generated test data itself has recognizable, intrinsic characteristics. If the test data includes multiple items (e.g., items in database software, cells in spreadsheet software, items in templates in various types of application software), the same signature may be included in every item. For instance, the same signature may be included in every item, thereby allowing the signature to be extracted only through extraction of a part of data. If variation of generated test data is small or biased, the variation may be increased or eliminated.
An embodiment provides a technique of automatically generating test data including character strings. This technique may involve a method of automatically generating the test data, and a computer, computer program and computer program product thereof. A signature may be embedded in the test data including character strings. This technique may involve identifying the signature embedded in the test data.
A method of automatically generating test data including a character string, includes receiving a signature to be embedded in at least one character string to be generated; determining a total sum of attribute values intrinsic to characters in the character string, the sum being associated with each element of the signature; and selecting at least one of characters configuring the character string from a character table describing characters prepared to create the test data so as to achieve the determined total sum for each element of the signature, and generating test data including the character string including the selected character.
The method of identifying a signature embedded in test data including a character string includes receiving test data including multiple items; acquiring a total sum of attribute values by analyzing the attribute values intrinsic to respective characters of the character string in the test data on the basis of mapping information, the mapping information including mapping information on the items and the total sum of the attribute values associated with the respective items; and identifying the signature of the test data on the basis of the total sum.
A computer that automatically generates test data includes a signature reception module for receiving a signature to be embedded in at least one character string to be generated. A total sum determination module determines a total sum of attribute values intrinsic to respective characters in the character string associated with each element of the signature. A character selection module selects at least one of characters configuring the character string from a character table describing characters prepared to create the test data so as to achieve the determined total sum, for each element of the signature. The system generates the test data containing a character string including the selected character.
In an embodiment, the character selection module may determine at least one combination pattern of the attribute values intrinsic to the respective characters in the character string so as to achieve the determined total sum. The character selection module may select at least one of characters configuring the character string from the character table, for each combination pattern of the attribute values intrinsic to the respective characters. The computer may include signature division module for dividing the signature into multiple elements. These divided elements configure the respective elements of the signature. The division module may divide the signature into one-digit numbers. The divided one-digit numbers may configure each element of the signature.
In the case where the test data includes multiple items, the computer may further include mapping information generation module for associating the elements with the respective items. Alternatively, the mapping information generation module may associate the elements with respective words in the item. The word may be a word having a meaning or a word having no meaning. The character selection module may insert, as a delimiter, at least one character of a type different from a type of characters configuring a first character string associated with a first element and a second character string associated with a second element between the first and second character strings, in a case where the signature includes these elements. The character selection module may determine at least one combination pattern of the attribute values intrinsic to the respective characters in the character string by generating a random number or calculating a hash value so as to achieve the determined total sum. The character selection module may also select the at least one character from the character table by generating a random number or calculating a hash value, for each character string to be generated.
In the case where the attribute value is a value representing a vowel in a language that uses vowels and consonants in a discriminated manner and the character table is a table describing the vowels and the consonants, the total sum determination module may determine the total sum of values representing vowels in the character string associated with each element of the signature. The character selection module may also determine at least one combination pattern of the vowel character and the consonant character in the character string so as to achieve the determined total sum, for each element of the signature. The character selection module may select characters configuring the character string from the character table for each of the combination patterns of vowel characters and consonant characters.
In the case where the attribute value is the number of strokes of the character in the language that includes characters having a prescribed number of strokes and the character table is a table describing the number of strokes and the character associated with the number of strokes. The total sum determination module may determine the total sum of the number of strokes of each character in a character string associated with each element of the signature. The character selection module may determine at least one combination pattern of the numbers of strokes of the respective characters in the character string so as to achieve the determined total sum, for each element of the signature. The character selection module may select at least one of characters configuring the character string for each combination pattern of the numbers of strokes of the characters.
The computer identifying a signature embedded in test data including a character string may include a test data reception module for receiving test data including multiple items. An analysis module acquires a total sum of attribute values by analyzing the attribute values intrinsic to respective characters of the character string in the test data on the basis of mapping information, the mapping information including mapping information on the items and the total sum of the attribute values associated with the respective items. A signature identification module identifies the signature of the test data on the basis of the total sum.
Technical effects and benefits include allowing a user to verify that test data generated has certainly been generated as test data. The test data may include a signature. Even if the character code is changed in test data generated, the signature in the test date is not lost. The signature can be recognized in test data generated when the character string of the test data is displayed in any suitable manner (e.g., printed test data, and test data displayed on a display screen). In the case where test data includes multiple items of data, the same signature can be included in every item. In the test data, the length of the character string (the number of characters) can be arbitrarily changed. Accordingly, the number of variations can be increased. Test data itself has recognizable, intrinsic characteristics (the number of strokes of Kanji, or the number of vowels of alphabet).
Turning now to the figures, embodiments are described with reference to the drawings. FIG. 1 is a diagram showing an example of a computer usable for an embodiment. The computer (101) includes a CPU (102) and a main memory (103), which are connected to a bus (104). Preferably, the CPU (102) is based on a 32-bit or 64-bit architecture. The CPU (102) is, for instance, CoreTM i series, CoreTM 2 series, AtomTM series, Xeon® series, Pentium® series or Celeron® series by Intel Corporation, A series, PhenomTM series, AthlonTM series, TurionTM series or SempronTM by AMD (Advanced Micro Devices), or PowerTM series by International Business Machines Corporation.
A display (106), e.g., a liquid crystal display (LCD), can be connected to the bus (104) via a display controller (105). The liquid crystal display (LCD) may be, for instance, a touch panel display or a floating touch display. The display (106) may be used for displaying an object that is to be displayed by operation of software (e.g., a computer program, or various computer programs operating on the computer (101)) operating on the computer (101) through an appropriate graphic interface.
A disk (108), e.g., a hard disk or a solid state drive (SSD), can be optionally connected to the bus (104) via e.g., an SATA or IDE controller (107). A drive (109), e.g., a CD, DVD or BD drive, can be optionally connected to the bus (104) via e.g., the SATA or IDE controller (107). A keyboard (111) and a mouse (112) can be optionally connected to the bus (104) via a peripheral device controller (110), e.g., a keyboard and mouse controller or a USB bus. The disk (108) may store a program that provides an operating system, e.g., Windows® OS, UNIX®, MacOS®, and Java® processing environment, such as J2EE, Java® application, Java® virtual machine (VM), and Java® just-in-time (JIT) compiler, a computer program, and another program, and data, in a manner that can be loaded into the main memory (103). The disk (108) may be embedded in the computer (101), connected via a cable in a manner of allowing the computer (101) to be accessible, or connected via a wired or wireless network in a manner allowing the computer (101) to be accessible.
The drive (109) may be used for installing a program, for instance, an operating system, an application or a computer program, into the disk (108) from a CD-ROM, DVD-ROM or BD, as necessary. A communication interface (114) is in conformity with, e.g., the Ethernet® protocol. The communication interface (114) is connected to the bus (104) via the communication controller (113), performs a role of connecting the computer (101) to a communication line (115) in a wired or wireless manner, and provides a network interface layer for the TCP/IP communication protocol of a communication function of the operating system of the computer (101). The communication line is, for instance, a wireless LAN environment in conformity with wireless LAN connection standards, a Wi-Fi wireless LAN environment, such as IEEE802.11a/b/g/n, or a mobile phone network environment (e.g., 3G or 4G environment).
On each language that uses vowels and consonants in a discriminated manner, and a language that includes characters having a prescribed number of strokes, a technique of generating test data, and a technique of identifying the signature embedded in the generated test data are described. In the following FIGS. 2A to 2B and 3, 4 and 5, for a the language that uses vowels and consonants in a discriminated manner, the technique of generating test data, and the technique of identifying the signature embedded in the generated test data are described. FIGS. 2A and 2B are diagrams for illustrating the technique of generating test data with a value representing, as an attribute value, a vowel in the language that uses vowels and consonants in a discriminated manner.
A “language that uses vowels and consonants in a discriminated manner” is, for instance, English or European languages (e.g., German, French, Italian, or Spanish). However, the language is not limited thereto. The case where the language that uses vowels and consonants in a discriminated manner is English is hereinafter described as an example. In the “language that uses vowels and consonants in a discriminated manner”, the attribute value intrinsic to each character is a value representing a vowel in the language that uses vowels and consonants in a discriminated manner. The value is one if a vowel is present.
In block 1, the user prepares a signature “21” (201) to be embedded in test data, and inputs the signature into the computer (101). Alternatively, the computer (101) can automatically generate the signature “21” (201) by, for instance, generating a random number or calculating a hash value in response to a signature generation request by the user. In block 2, the computer (101) receives the signature “21” (201). The computer (101) refers to a template table (211) of test data to be generated, and recognizes the number of items of the test data to be generated is two (a column X and a column Y). The computer (101) divides the signature “21” (201) by two, which is the number of items, and acquires the elements of the signature. The computer (101) thus divides the signature “21” (201) into one-digit numbers, which are an element “2” and an element “1” (202). The computer (101) associates the element “2” and the element “1” with the column X and the column Y in the template table (211), respectively, to generate the mapping table (212).
In block 3, the computer (101) refers to a vowel and consonant table (213), which is a table describing vowels and consonants, and determines a combination pattern (hereinafter, sometimes referred to as “pattern”) of a vowel character and a consonant character such that, for each of the element “2” and the element “1” of the signature “21” (201), the number of vowel characters corresponds to the number of elements. The combination patterns of vowel characters and consonant characters include patterns that include only vowel characters but do not include any consonant character. Those skilled in the art can determine the number of vowel characters of a character string to be generated in the pattern. For instance, the number of vowels ranges from one to four. However, the number is not limited thereto.
The vowel and consonant table (213) is a table describing characters (vowels and consonants) prepared for creating test data. The vowel and consonant table (213) includes a vowel table (V) (214), a table of pre-vowel consonants (pre V) (C1) (215), a table of consonants between vowels (between Vs) (C2) (216), and a table of post-vowel consonants (post V) (C3) (217). The vowel table (V) (214) only lists vowel characters. The table of pre-vowel consonants (C1) (215) lists consonant characters disposed before a vowel character. The table of consonants between vowels (C2) (216) lists consonant characters disposed between a vowel character and a vowel character. The table of post-vowel consonants (C3) (217) lists consonant characters disposed after a vowel character. Those skilled in the art can appropriately set or select at least one of consonant characters listed in the table of pre-vowel consonants (C1) (215), the table of consonants between vowels (C2) (216) and the table of post-vowel consonants (C3) (217). For instance, if a vowel character and a consonant character are combined in this order or a consonant character and a vowel character are combined in this order, those skilled in the art can select the consonant characters so as to make pronounceable combination patterns and list the combinations in the tables (215, 216 and 217). Pronounceability includes not only pronunciation by a person but also mechanical readability (through software) into speech.
The combination patterns of the vowel characters and the consonant characters are any one or a combination thereof:
(1) a vowel character immediately after a consonant character;
(2) a vowel character between consonant characters;
(3) a vowel character immediately before a consonant character;
(4) a vowel character at the beginning of a word;
(5) a vowel character at the end of a word; and
(6) a vowel character immediately after another vowel character (i.e., sequence of vowel characters). The combination patterns of the vowel characters and the consonant characters may be pronounceable combination patterns.
In the example shown in FIG. 2A, as illustrated on the element “2” in the pattern A (203), the pattern B (204) and the pattern C (205), the computer (101) determines three combination patterns, which are “V+C2+V” (a pattern including vowel characters at the beginning of a word and the end of the word), “V+V+C3” (a pattern including vowel character at the beginning of a word and another vowel character immediately after the foregoing vowel character), and “C1+V+V” (a pattern including a vowel character at the end of a word and a vowel character immediately after the other vowel character) such that the total number of vowels in the characters configuring a character string to be generated is the foregoing “2”. In each of the determined patterns “V+C2+V”, “V+V+C3” and “C1+V+V”, the determination is made such that the number of vowels is equal to the foregoing element “2”. In other words, the total number of vowels is two such that values (e.g., one) representing vowels are equal to the element “2”. The computer (101) can determine the combination pattern by, for instance, generating a random number or calculating a hash value such that the total number of vowels is two.
In the example shown in FIG. 2A, as illustrated on the element “1” in each of the pattern A (203), the pattern B (204) and the pattern C (205), the computer (101) determines the combination pattern “C1+V” such that the total number of vowels among characters configuring a character string to be generated is the “1” in an analogous manner. The determined pattern “C1+V” is thus determined such that the number of vowels is the element “1”. In other words, the total number of vowels is one such that the value representing a vowel (e.g., one) is the element “1”. The computer (101) can determine the combination pattern by, for instance, generating a random number or calculating a hash value such that the total number of vowels is one.
In block 4, the computer (101) selects a combination pattern of a vowel character, a consonant character and a vowel character from the vowel and consonant table (213) such that the element “2” in the pattern A (203) is “V+C2+V”. Likewise, the computer (101) selects the combination pattern of a vowel character, a vowel character and a consonant character from the vowel and consonant table (213) such that the element “2” in the pattern B (204) is “V+V+C3”. Likewise the computer (101) selects the combination pattern of a consonant character, a vowel character and a vowel character from the vowel and consonant table (213) such that the element “2” in the pattern C (205) is “C1+V+V”. The computer (101) can select the combination pattern of characters from the vowel and consonant table (213) by, for instance, generating a random number or calculating a hash value. The computer (101) can select the combination pattern of a consonant character and a vowel character from the vowel and consonant table (213), for each of patterns A to C (203, 204 and 205) by, for instance, generating a random number or calculating a hash value so as to select at least one character string.
Likewise, the computer (101) selects at least one combination pattern of a consonant character and a vowel character from the vowel and consonant table (213) such that the element “1” of the pattern A (203) is “C1+V”. Likewise, the computer (101) selects at least one combination pattern of a consonant character and a vowel character from the vowel and consonant table (213) such that the element “1” of the pattern B (204) is “C1+V”. Likewise, the computer (101) selects at least one combination pattern of a consonant character and a vowel character from the vowel and consonant table (213) such that the element “1” of the pattern C (205) is “C1+V”. The computer (101) can select the combination pattern of characters from the vowel and consonant table (213) for each of the patterns A to C (203, 204 and 205) by, for instance, generating a random number or calculating a hash value so as to make a at least one character string. An output table A (206), an output table B (207) and an output table C (208) show character strings generated on the basis of the pattern A (203), the pattern B (204) and the pattern C (205).
In block 5, the computer (101) can generate test data (209) by combining the tables, or the output table A (206), the output table B (207) and the output table C (208). The combining method can be performed by taking the character strings in the respective columns X and Y on any one row from the output table A (206), the output table B (207) and the output table C (208). The computer (101) can take the character strings in the respective columns X and Y on any one row, for instance, in order of the output table A (206), the output table B (207) and the output table C (208), or randomly. The computer (101) may output the test data (209) and the mapping information (212). The output may include, for instance, storing in a storing medium (e.g., sign 108 in FIG. 1) accessible by the computer (101), displaying on a screen of a display device, or output through a printer.
FIG. 3 is a diagram showing another embodiment different from the embodiment shown in FIGS. 2A and 2B. A template table (311) shown in FIG. 3 is different from the template table (211) shown in FIG. 2A, and a non-structured text. The non-structured text includes a position where a 1st word corresponding to a character string to be input into a column X is input in the template table (311), and a position where a 2nd word corresponding to a character string to be input into a column X is input in the template table (311).
In block 1, the user prepares a signature “21” (301) that is to be embedded into test data, and inputs the signature into the computer (101). Alternatively the computer (101) may automatically generate the signature “21” (301) by, for instance, generating a random number or calculating a hash value in response to a request by the user.
In block 2, the computer (101) receives the signature “21” (301). The computer (101) refers to the template table (311) of test data to be generated, and recognizes that the number of items where the character string is to be input is two (the 1st word and 2nd word). The computer (101) divides the signature “21” (301) by two, which is the number of items. The signature “21” (301) thus is divided into one-digit numbers, which are an element “2” and an element “1” (302). The computer (101) associates the element “2” and the element “1” with the 1st word and the 2nd word, respectively, to generate a mapping table (312). Blocks 3 and 4, are the same as the blocks in FIG. 2A. Accordingly, the description thereof is omitted here. An output table A (306), an output table B (307) and an output table C (308) illustrate character strings generated on the basis of the pattern A (same as 203), the pattern B (same as 204) and the pattern C (same as 205), respectively.
In block 5, the computer (101) can generate test data (309) by combining the tables, or the output table A (306), the output table B (307) and the output table C (308). The combining method can be performed by taking the character strings in the respective columns X and Y on any one row from the output table A (306), the output table B (307) and the output table C (308) and then inputting each of the taken characters into the template table (311). As to the input, the computer (101) can input a character (e.g., a space) other than a vowel and a consonant between the character string in the column X and the character string in the column Y in order to discriminate the character string in the column X and the character string in the column Y from each other. For instance, the computer (101) can take the character strings of the 1st word and the 2nd word in order of the output table A (306), the output table B (307) and the output table C (308) on row-by-row basis.
The computer (101) may output test data (309) and mapping information (312). The output may include, for instance, storing in a storing medium (e.g., sign 108 in FIG. 1) accessible by the computer (101), displaying on a screen, or output through the printer. The computer (101) can insert, into the test data (309), information with which the mapping information (312) is to be associated. For instance, the computer (101) can embed the mapping information (312) in the test data (309). The information can be used for identifying the mapping information associated with the test data, in a process of identifying the signature from the test data.
FIG. 4 is a flowchart showing the details of the process of the embodiment shown in FIGS. 2A and 2B. In block 401, the computer (101) starts a process of generating test data using, as an attribute value, a value representing a vowel in the language that uses vowels and consonants in a discriminated manner. In block 402, the computer (101) receives metadata. The metadata has multiple signatures. If the metadata has only one signature, the metadata is the same as the signature. The multiple signatures are, for instance, at least two signatures selected from information on a test data generating tool (e.g., a product number, a version number, or a license number), a number intrinsic to a user who generates or uses test data (e.g., user ID), and date and time when the test data is generated. As the user designates multiple signatures to be embedded in the test data, the computer (101) stores the designated multiple signatures, as metadata, in for instance the storing medium (e.g., sign 108 in FIG. 1) accessible by the computer (101).
In block 403, the computer (101) takes one signature included in the metadata received in block 402. In block 404, the computer (101) refers to the template table of the test data to be generated, and acquires the number of items. The computer (101) divides the signature acquired in block 403 by the number of items to acquire the elements of the signature. Typically, in the case of generating test data on the language that uses vowels and consonants in a discriminated manner, the elements acquired by division are one-digit numbers. In block 405, the computer (101) associates the elements with the respective items in the template table, and generates the mapping table. The mapping table may be, for instance, mapping data storing mapping information that associates the elements with the respective items.
In block 406, the computer (101) determines the total sum of values representing a vowel in character strings input into the respective items in the template table according to the mapping table. That is, the computer (101) determines the element (one-digit number) in the mapping table as the total sum of the values. In block 407, the computer (101) refers to the vowel and consonant table, and determines the combination pattern of the vowel character and the consonant character so as to achieve the total sum determined in block 406, for each element, such that the number of vowel characters corresponds to the number of elements. The computer (101) can determine one or more combination patterns of vowel characters and consonant characters, for one element. In block 408, the computer (101) takes one combination pattern among the combination patterns determined in block 407.
In block 409, the computer (101) selects a combination of a vowel character and a consonant character that configures the character string from the vowel and consonant table so as to be the combination pattern taken in block 408. The computer (101) may select the combination of a consonant character and a vowel character from the vowel and consonant table by, for instance, generating a random number or calculating a hash value, for the combination pattern taken in block 408 so as to acquire at least one character string. The computer (101) can store the generated character string in, for instance, the temporary storing device (e.g., sign 103 in FIG. 1) of the computer (101) or the storing medium (e.g., sign 108 in FIG. 1) accessible by the computer (101). In block 410, the computer (101) determines whether or not there is any combination pattern having not been subjected to the process in block 409 yet among the combination patterns determined in block 407. The computer (101) returns the processing to block 408 in response to presence of the unprocessed combination pattern. In contrast, the computer (101) advances the processing to block 411 in response to absence of the unprocessed combination pattern. In block 411, the computer (101) can insert the character string stored in block 409 into the template table to generate test data. That is, the computer (101) shapes the generated character string into the format of the test data.
In block 412, the computer (101) determines whether or not there is any signature having not been subjected to the processes of blocks 403 to 411 among the signatures included in the metadata received in block 402. The computer (101) returns the processing to block 403 in response to presence of the unprocessed signature. In contrast, the computer (101) advances the processing to block 413 in response to absence of the unprocessed signature.
In block 413, the computer (101) can store the test data generated in block 411 and the mapping information generated in block 405 in the storing medium (e.g., sign 108 in FIG. 1) accessible by the computer (101). The output of the test data may include not only storing in a storing medium (e.g., sign 108 in FIG. 1) accessible by the computer (101) but also, for instance, displaying on a screen of the display device, or output through the printer. The mapping information is used for identifying the signature from the test data as shown in the flowchart illustrated in FIG. 5. In block 414, the computer (101) finishes the process of generating the test data using, as an attribute value, the value representing a vowel in the language that uses vowels and consonants in a discriminated manner.
FIG. 5 shows a flowchart of identifying the signature from the test data shown in FIGS. 2A and 2B. Hereinafter, the computer (101), which is a subject unit of each block, may be a computer physically identical to the computer (101) for each block shown in FIG. 4, or a different computer. In block 501, the computer (101) starts a process of identifying a signature from test data. In block 502, the computer (101) receives the test data. The computer (101) may receive the test data, for instance, through the storing medium accessible by the computer (101) or via a network, or by capturing a display screen on another computer or capturing a printed matter through a scanner.
In block 503, the computer (101) refers to the information embedded in the test data received in block 502, and takes the mapping information associated with the received test data. The computer (101) can take the mapping information, for instance, through the storing medium accessible by the computer (101), or via a network. In block 504, the computer (101) takes prescribed one character string from among the character strings in the test data received in block 502. In block 505, the computer (101) calculates the total sum of vowel characters in the character string taken in block 504. The total sum of vowel characters in the one prescribed character string corresponds to one element of the signature (i.e., number). In block 506, the computer (101) determines whether or not there is any character string having not been subjected to the processes in blocks 504 to 505 among the character strings in the test data received in block 502. The computer (101) returns the processing to block 504 in response to presence of the unprocessed character string. In contrast, the computer (101) advances the processing to block 507 in response to absence of the unprocessed character string.
In block 507, the computer (101) combines the total sums of the vowel characters calculated in block 505, and identifies the signature of the test data received in block 502. For instance, in the case where the total sums of the vowel characters calculated in block 505 is “2” and “1”, the signature is “21”, which is the combination of “2” and “1”. In block 508, the computer (101) can combine the signatures identified in block 507 and reproduce (reconstruct) the meta data including multiple signature. In block 509, the computer (101) can store the meta data reproduced in block 508 into the storing medium (e.g., sign 108 in FIG. 1) accessible by the computer (101). In block 510, the computer (101) finishes the process of identifying a signature from test data.
The computer (101) can arbitrarily compare the signature identified in block 507 with the signature expected to be embedded in the test data received in block 502. As a result of the comparison, the computer (101) recognizes that the test data has not been falsified on the basis that the signature identified in block 507 matches with the signature expected to be embedded in the test data received in block 502. In contrast, as a result of the comparison, the computer (101) recognizes that the test data has been falsified on the basis that the signature identified in block 507 does not math with the signature expected to be embedded in the test data received in block 502. The computer (101) can acquire information about the date and time when the test data is generated or information on the generating tool from the metadata reproduced in block 508.
In FIGS. 2A to 2B and 3, 4 and 5, the technique of generating test data using a value representing a vowel in the language that uses vowels and consonants in a discriminated manner as an attribute value, and the technique of identifying the signature from the test data generated using the foregoing technique have been described according to the embodiment of the present invention. The embodiment using the value representing a vowel has the following characteristics. The character string in the test data generated may include characters (a vowel character and a consonant character) selected from the vowel and consonant table. Those skilled in the art can identify the consonant included in the generated data as a prescribed combination of a consonant (e.g., sp, fl and z (that is, in the table of pre-vowel consonants (C1)), ks and vr (that is, in the table of consonants between vowels (C2)), and l, rr and kt (that is, table of post-vowel consonants (C3))) in the vowel and consonant table. Each vowel and each consonant configuring the character string in the test data have been selected by the computer generating a random number or calculating a hash value. Accordingly, the user can recognize that the generated character string has been certainly generated as test data, as shown in the test data (209) in FIG. 2B.
The signature embedded in the test data is reconstructed from the total sum of the vowels in the character string in the test data. Accordingly, the generated test data itself includes the meta information. For instance, it is provided that the total sums of vowels included in “item A”, “item B”, “item C” and “item D” in the test data is “1”, “2”, “3” and “4”, respectively. In this case, the signature is “1234”. The signature “1234” is common to every data set including the items A to D. Accordingly, the same signature can be embedded in prescribed items. Thus, the identified signature is the same even if only a piece of the test data (i.e., one of the data sets) is taken. The data set that does not match with the signature “1234” among the data sets including the items A to D can be determined as invalid data (e.g., falsified data).
The total sum of vowels in the character string is independent of the character code. Accordingly, even if the character code of the vowel characters is converted, the total sum of vowels is the same. That is, the total sum of vowels does not change even if the character code is converted. If the characters in the character string are uppercase characters or lowercase characters, the total sum of vowels in the character string does not change. Accordingly, even if the character code of the data generated using a prescribed number of vowel characters and any number of consonant characters is changed, the signature associated with the test data generated according to the embodiment is not lost.
Even in the case where the test data is printed, the total sum of vowels in the character string can be counted on the basis of the printed matter. Likewise, the total sum of vowels in the character string can be counted on the basis of a display screen even in the case where the test data is displayed on the display screen. Even whether the characters in the character string are uppercase characters or lowercase characters, the total sum of vowels in the character string does not change. Accordingly, the user can take the signature even in the case where the character string of the test data generated may be in any display format. The signature is the same in any of cases. Accordingly, only if the total sum of vowels in the prescribed character string in the test data is checked, it can be easily determined whether or not the test data has been correctly generated and has not been falsified.
In the case where the test data generated according to the embodiment includes multiple items, for instance, the case where the test data includes multiple data sets of “item A”, “item B”, “item C” and “item D”, the same signature is embedded in the items A to D. Accordingly, in the case where the test data includes multiple items, the same signature can be included in each item.
The combination pattern can be changed, while the total sum of vowels in the character string is maintained constant (i.e., the same signature is included). That is, the length of character string to be generated can be changed by changing the number of constant characters while the number of vowel characters is maintained constant. Accordingly, variation in test data to be generated can be increased. Furthermore, redundant data can be minimized. Moreover, the generated test data is allowed to have a more realistic length. The test data itself generated according to the may include the signature that is recognizable, intrinsic characteristics (e.g., the foregoing “1234”).
In the following FIGS. 6A to 6B and 7, 8 and 9, as to the language that includes characters having a prescribed number of strokes, the technique of generating test data and the technique of identifying the signature embedded in the generated test data are described. FIGS. 6A and 6B are diagrams for illustrating the technique of generating test data using, as an attribute value, the number of strokes of a character of the language that includes characters having a prescribed number of strokes.
In an embodiment, the “language that includes characters having a prescribed number of strokes” and “characters having the number of strokes” (i.e., characters with the defined numbers of strokes) are, for instance, Japanese and Kanji, Chinese and simplified Chinese characters or the traditional Chinese characters, or Korean and Hangul characters. However, these are not limited thereto. The case where the language that includes characters having a prescribed number of strokes is Japanese and the characters having the number of strokes are Kanji is hereinafter exemplified and described.
In the “language that includes characters having a prescribed number of strokes”, the attribute value intrinsic to each character is the number of strokes of a character of the language. The number of strokes is, for instance, based on the number of strokes contained in a Kanji dictionary.
In block 1, the user prepares a signature “2013” (601) that is to be embedded in the test data, and inputs the signature into the computer (101). Alternatively, the computer (101) can automatically generate the signature “2013” (601) by, for instance, generating a random number or calculating a hash value in response to a signature generation request by the user.
In block 2, the computer (101) receives the signature “2013” (601). The computer (101) refers to a template table (611) of test data to be generated, and recognizes the number of items of the test data to be generated is two (a column X and a column Y).
The computer (101) divides the signature “2013” (601) by two, which is the number of items, and acquires the elements of the signature. The computer (101) thus divides the signature “2013” (601) into two elements, which are an element “20” and an element “13” (602).
The computer (101) associates the element “20” and the element “13” with the column X and the column Y in the template table (611), respectively, to generate a mapping table (612).
In block 3, the computer (101) refers to a Kanji table (613) based on the number of strokes, the table describing the numbers of strokes of Kanji (characters) and these Kanji (characters) associated with the numbers of strokes, and then determines a combination pattern (hereinafter, sometimes referred to as a “pattern”) of the number of strokes of each Kanji in a character string associated with each of elements with respect to each of an element “20” and an element “13” of the signature “2013” (601) so as to achieve the total sum of the number of strokes corresponding to the number of elements. Those skilled in the art can determine the number of characters of Kanji configuring the character string to be generated in the pattern. The number of characters is, for instance, one to five. However, the number is not limited thereto.
The Kanji table (613) is a table that describes characters (Kanji) prepared for creating test data. The Kanji table (613) is a table of Kanji that describes the number of strokes of Kanji, and these Kanji associated with the number of strokes. One specific aspect of the Kanji table (613) may be, for instance, a table describing the number of strokes of each Kanji and at least one Kanji belonging to the number of strokes. Those skilled in the art can appropriately configure or select Kanji listed in the Kanji table (613).
In the example shown in FIG. 6A, as to the element “20”, the computer (101) determines three combination patterns, or “5+7+8”, “11+9” and “20”, such that the total sum of the numbers of strokes of Kanji in the character string to be generated is the “20”, as illustrated in the pattern A (603), the pattern B (604) and the pattern C (605). For each of the determined patterns “5+7+8”, “11+9” and “20”, it is determined such that the total sum of the numbers of strokes of Kanji configuring the character string is the element “20”. The computer (101) may determine the combination pattern by, for instance, generating a random number or calculating a hash value such that the total sum of the number of strokes of Kanji configuring the character string is equal to the element “20”.
Likewise, in the example shown in FIG. 6A, as to the element “13”, the computer (101) determines three combination patterns, or “6+7”, “5+8” and “7+6” as illustrated in the pattern A (603), the pattern B (604) and the pattern C (605) such that the total sum of the number of strokes of Kanji in the character string to be generated is the “13”. For each of the determined patterns “6+7”, “5+8” and “7+6”, it is determined such that the total sum of the number of strokes of Kanji configuring the character string is the element “13”. The computer (101) may determine the combination pattern by, for instance, generating a random number or calculating a hash value such that the total sum of the number of strokes of Kanji configuring the character string is equal to the element “13”.
In block 4, the computer (101) selects the combination of a Kanji having the number of strokes 5, a Kanji having the number of strokes 7 and a Kanji having the number of strokes 8 from the Kanji table (613) so as to achieve “5+7+8” for the element “20” in the pattern A (603). Likewise, the computer (101) selects the combination of a Kanji having the number of strokes 11 and a Kanji having the number of strokes 9 from the Kanji table (613) so as to achieve “11+9” for the element “20” in the pattern B (604). Likewise, the computer (101) selects a Kanji having the number of strokes 20 from the Kanji table (613) so as to achieve “20” for the element “20” in the pattern C (605). The computer (101) may select the combination of the Kanji from the Kanji table (613) by, for instance, generating a random number or calculating a hash value. For each of the patterns A to C (603, 604 and 605), the computer (101) can select the combination of Kanji from the Kanji table (613) by, for instance, generating a random number or calculating a hash value so as to generate a character string according to each pattern.
Likewise, the computer (101) selects the combination of a Kanji having the number of strokes 6 and a Kanji having the number of strokes 7 from the Kanji table (613) so as to achieve “6+7” for the element “13” in the pattern A (603). Likewise, the computer (101) selects the combination of a Kanji having the number of strokes 5 and a Kanji having the number of strokes 8 from the Kanji table (613) so as to achieve “5+8” for the element “13” in the pattern B (604). Likewise, the computer (101) selects a Kanji having the number of strokes 7 and a Kanji having the number of strokes 6 in the pattern C (605) from the Kanji table (613) so as to achieve “7+6” for the element “13”. The computer (101) may select the combination of the Kanji from the Kanji table (613) by, for instance, generating a random number or calculating a hash value. The computer (101) may select the combination of Kanji from the Kanji table (613) by, for instance, generating a random number or calculating a hash value for each of the patterns A to C (603, 604 and 605) so as to acquire at least one character string.
The output table A (606), the output table B (607) and the output table C (608) show character strings generated on the basis of the pattern A (603), the pattern B (604) and the pattern C (605), respectively.
In block 5, the computer (101) can generate test data (609) by combining the output table A (606), the output table B (607) and the output table C (608). The combining method may be performed by taking the character strings in the respective columns X and Y on any one row from the output table A (606), the output table B (607) and the output table C (608). The computer (101) can take the character strings in the respective columns X and Y on any one row, for instance, in an order of the output table A (606), the output table B (607) and the output table C (608), or randomly.
The computer (101) may output test data (609) and mapping information (612). The output may include, for instance, storing in a storing medium (e.g., sign 108 in FIG. 1) accessible by the computer (101), displaying on a screen of the display device, or output through the printer.
FIG. 7 is a diagram showing an embodiment different from the embodiment shown in FIGS. 6A and 6B.
A template table (711) shown in FIG. 7 is different from the template table (611) shown in FIG. 6A, and is a non-structured text. The non-structured text has a position in the template table (611) where a 1st word corresponding to a character string to be input into the column X is input, and a position in the template table (611) where a 2nd word corresponding to a character string to be input into the column X is input.
In block 1, the user prepares a signature “2013” (701) that is to be embedded into test data, and inputs the signature into the computer (101). Alternatively, the computer (101) may automatically generate the signature “2013” (101) by, for instance, generating a random number or calculating a hash value in response to a request from the user.
In block 2, the computer (101) receives the signature “2013” (701). The computer (101) refers to the template table (711) of the test data to be generated, and recognizes that the number of items where the character strings are input is two (the 1st word and the 2nd word).
The computer (101) divides the signature “2013” (701) by the number of items, or two. Accordingly, the signature “2013” (701) is divided into the element “20” and the element “13” (702).
The computer (101) associates the element “20” and the element “13” with the 1st word and the 2nd word, respectively, and generates a mapping table (712).
Blocks 3 and 4, are the same as the blocks in FIG. 6A. Accordingly, the description thereof is omitted here.
The output table A (706), the output table B (707) and the output table C (708) show character strings generated on the basis of the pattern A (same as 603), the pattern B (same as 604) and the pattern C (same as 605), respectively.
In block 5, the computer (101) can generate test data (709) by combining the tables, or the output table A (706), the output table B (707) and the output table C (708). The combining method may be performed by taking the character strings in the respective columns X and Y on any one row from the output table A (706), the output table B (707) and the output table C (708) and then inputting each of the taken characters into the template table (711). At this input, the computer (101) can insert a non-Kanji character (e.g., a space) between the character string from the column X and the character string from the column Y in order to discriminate the character string from the column X and the character string from the column Y. For instance, the computer (101) may take the character strings of the 1st word and the 2nd word on a row-by-row basis in an order of the output table A (706), the output table B (707) and the output table C (708).
Alternatively, the computer (101) can generate test data (710) by combining the tables, or the output table A (706), the output table B (707) and the output table C (708). The combining method can be performed by taking the character strings in the respective columns X and Y on any one row from the output table A (706), the output table B (707) and the output table C (708) and then inputting each of the taken characters into the template table (711). At this input, the computer (101) may insert a non-Kanji character (e.g., a Hiragana, a Katakana, a number, alphabet, or a symbol) between the character string from the column X and the character string from the column Y so as to discriminate, from each other, the character string from the column X and the character string from the column Y. For instance, the computer (101) may take the character strings of the 1st word and the 2nd word on a row-by-row basis in an order of the output table A (706), the output table B (707) and the output table C (708).
The computer (101) may output test data (709) and mapping information (712). The output may include, for instance, storing in a storing medium (e.g., sign 108 in FIG. 1) accessible by the computer (101), displaying on a screen of the display device, or output through the printer. The computer (101) can insert information for associating the mapping information (712) with the test data (709). For instance, the computer (101) may embed the mapping information (712) into the test data (709). The information can be used for identifying the mapping information associated with the test data in the process of identifying a signature from test data.
FIG. 8 is a flowchart showing the details of the flow of the embodiment shown in FIGS. 6A and 6B.
In block 801, the computer (101) starts a process of generating test data using, as an attribute value, the number of strokes of a character in the language that includes characters having a prescribed number of strokes. In block 802, the computer (101) receives metadata. The metadata includes multiple signatures. If the metadata includes only one signature, the meta data is the same as the signature. The multiple signatures are, for instance, at least two signatures selected from among information on a test data generating tool (e.g., a product number, a version number, or a license number), a number intrinsic to a user who generates or uses test data (e.g., user ID), and e.g., date and time when the test data is generated. In response to designation of multiple signatures to be embedded into the test data by the user, the computer (101) stores the designated multiple signatures as metadata in, for instance, the storing medium (e.g., sign 108 in FIG. 1) accessible by the computer (101).
In block 803, the computer (101) takes one signature from among the signatures included in the metadata received in block 802.
In block 804, the computer (101) refers to the template table of the test data to be generated, and acquires the number of items. The computer (101) divides the signature taken in block 803 by the number of items to acquire the elements of the signature. Typically, in the case of generating test data on the language that includes characters having a prescribed number of strokes, the elements generated by division may be at least one-digit number.
In block 805, the computer (101) associates each element with an item in the template table and generates a mapping table. The mapping table may be, for instance, mapping data that stores mapping information associating the elements with the respective items.
In block 806, the computer (101) determines the total sum of the numbers of strokes of characters (Kanji) in a character string input into each item in the template table, according to the mapping table. That is, the computer (101) determines the element in the mapping table as the total sum of the values.
In block 807, the computer (101) refers to the Kanji table, and determines the combination patterns of the number of strokes of Kanji in the character string that are associated with the respective elements, for these elements, so as to achieve the total sum determined in block 806. The computer (101) can determine one or more combination patterns of the number of strokes of each Kanji, for one element.
In block 808, the computer (101) takes one combination pattern from among the combination patterns determined in block 807.
In block 809, the computer (101) selects a combination of Kanji configuring the character string from the Kanji table so as to be in conformity with the combination pattern taken in block 808. The computer (101) may select the combination of Kanji from the Kanji table by, for instance, generating a random number or calculating a hash value, so as to acquire at least one character string, for the combination pattern taken in block 808. The computer (101) may store the generated character string in, for instance, a temporary storing device (e.g., sign 103 in FIG. 1) of the computer (101) or the storing medium (e.g., sign 108 in FIG. 1) accessible by the computer (101).
In block 810, the computer (101) determines whether or not there is any combination pattern having not been subjected to the process in block 809 among the combination patterns determined in block 807. The computer (101) returns the processing to block 808 in response to presence of the unprocessed combination pattern. In contrast, the computer (101) advances the processing to block 811 in response to absence of the unprocessed combination pattern.
In block 811, the computer (101) may generate test data by inserting the character string stored in block 809 into the template table. That is, the computer (101) shapes the generated character string into the format of the test data.
In block 812, the computer (101) determines whether or not there is any signature having not been subjected to the processes in blocks 803 to 811 among the signatures included in the metadata received in block 802. The computer (101) returns the processing to block 803 in response to presence of the unprocessed signature. In contrast, the computer (101) advances the processing to block 813 in response to absence of the unprocessed signature.
In block 813, the computer (101) can store the test data generated in block 811 and the mapping information generated in block 805 in the storing medium (e.g., sign 108 in FIG. 1) accessible by the computer (101). The output of the test data may include not only storing in a storing medium (e.g., sign 108 in FIG. 1) accessible by the computer (101) but also, for instance, displaying on a screen of the display device, or output through the printer. The mapping information is used for identifying the signature from the test data, as shown in the flowchart illustrated in FIG. 9. In block 814, the computer (101) finishes the process of generating test data using, as an attribute value, the number of strokes of a character in the language that includes characters having a prescribed number of strokes.
FIG. 9 shows a flowchart of identifying the signature from test data generated according to the embodiment shown in FIGS. 6A and 6B. In the following description, the computer (101), which is a subject unit of each block, may be a computer physically identical to the computer (101) for each block shown in FIG. 8, or a different computer. In block 901, the computer (101) starts a process of identifying a signature from test data. In block 902, the computer (101) receives the test data. The computer (101) can receive the test data, for instance, through the storing medium accessible by the computer (101) or via a network, or by capturing a display screen on another computer or capturing a printed matter through a scanner. In block 903, the computer (101) refers to the information embedded in the test data received in block 902, and takes the mapping information associated with the received test data. The computer (101) can take the mapping information, for instance, through the storing medium accessible by the computer (101), or via a network.
In block 904, the computer (101) takes prescribed one character string from among the character strings in the test data received in block 902. In block 905, the computer (101) calculates the total sum of the numbers of strokes of characters (Kanji) in the character string taken in block 904. The total sum of the numbers of strokes of characters (Kanji) in the one prescribed character string corresponds to one element of the signature (i.e., number). In block 906, the computer (101) determines whether or not there is any character string having not been subjected to the processes in block 904 to 905 among the character strings in the test data received in block 902. The computer (101) returns the processing to block 904 in response to presence of the unprocessed character string. In contrast, the computer (101) advances the processing to block 907 in response to absence of the unprocessed character string. In block 907, the computer (101) combines the total sum of the numbers of strokes calculated in block 905, and identifies the signature of the test data received in block 902. For instance, in the case where the total sums of the numbers of strokes calculated in block 905 is “20” and “13”, the signature is “2013”, which is the combination of “20” and “13”. In block 908, the computer (101) can combine the signatures identified in block 907 and reproduce (reconstruct) the metadata including multiple signatures. In block 909, the computer (101) can store the metadata reproduced in block 908 into the storing medium (e.g., sign 108 in FIG. 1) accessible by the computer (101). In block 910, the computer (101) finishes the process of identifying a signature from test data, according to the embodiment.
The computer (101) can arbitrarily compare the signature identified in block 907 with the signature expected to be embedded in the test data received in block 902. As a result of the comparison, the computer (101) recognizes that the test data has been correctly generated and has not been falsified on the basis that the signature identified in block 907 matches with the signature expected to be embedded in the test data received in block 902. In contrast, as a result of the comparison, the computer (101) recognizes that the test data has not been correctly generated or has been falsified on the basis that the signature identified in block 907 does not match with the signature expected to be embedded in the test data received in block 902. The computer (101) can acquire date and time when the test data is generated and information on a generating tool from the metadata reproduced in block 908.
Referring to FIG. 6A to FIG. 6B and FIGS. 7, 8 and 9, the technique of generating test data using, as an attribute value, the number of strokes of characters in the language that includes characters having a prescribed number of strokes, and the technique of identifying the signature from test data generated using the foregoing technique have been described. The embodiment using a prescribed number of strokes (e.g., the number of strokes of Kanji) has the following characteristics: The character string in the test data generated includes characters (Kanji) selected from the Kanji table. Those skilled in the art can identify, in the Kanji table, a Kanji included in the generated data as a prescribed Kanji. Each of Kanji configuring the character string in the test data has been selected by the computer generating a random number or calculating a hash value. Accordingly, the user can recognize that the generated character string has been certainly generated as test data, as shown in the test data (609) in FIG. 6B.
The signature embedded in the test data generated is reconstructed from the total sum of the numbers of strokes of Kanji in the character string in the test data. Accordingly, the generated test data itself includes the meta information. For instance, it is provided that the total sums of the numbers of strokes of Kanji included in “item A”, “item B”, “item C” and “item D” in the test data are “20”, “13”, “12” and “31”, respectively. In this case, the signature is “20131231”. The signature “20131231” is common to every data set including the items A to D. Accordingly, the same signature can be embedded in prescribed items. Thus, the identified signature is the same even if only a piece of the test data (i.e., one of the data sets) is taken. The data set that does not match with the signature “20131231” among the data sets including the items A to D can be determined as invalid data (e.g., falsified data etc.).
The numbers of strokes of Kanji in a character string and the total sum thereof are independent of the character code. Accordingly, even if the character code of the Kanji is converted, the numbers of strokes of the Kanji and the total sum thereof are the same. That is, the numbers of strokes of Kanji and the total sum thereof do not change even if the character code is converted. Accordingly, even if the character code of data generated using Kanji, the signature associated with the test data is not lost.
Even in the case where the test data is printed, the numbers of strokes of Kanji in the character string and the total sum thereof can be counted on the basis of the printed matter. Likewise, even in the case where the test data is displayed on a display screen, the numbers of strokes of Kanji in the character string and the total sum thereof can be counted from the display screen. Thus, even in any manner where the character string of the test data generated is displayed, the user can take (recognize) the signature. The signature is the same in any of cases. Accordingly, only if the total sum of the numbers of strokes of Kanji in a prescribed character string in the test data is verified, it can be easily determined whether or not the test data has been correctly generated and has not been falsified.
In the case where the test data generated includes multiple items, for instance, the case where the test data includes multiple data sets of “item A”, “item B”, “item C” and “item D”, the same signature is embedded in the items A to D. Accordingly, in the case where the test data includes multiple items, the same signature can be included in each item.
The combination pattern can be changed, while the total sum of the numbers of strokes of Kanji is maintained constant (i.e., the same signature is included). Thus, the length (the number of Kanji) of the character string to be generated can be changed. Accordingly, variation in test data to be generated can be increased. Furthermore, redundant data can be minimized. Moreover, the generated test data is allowed to have a more realistic length. The test data itself may include the signature that is recognizable, intrinsic characteristics (e.g., the “20131231”).
FIG. 10 is a diagram showing an example of a functional block diagram of a computer that preferably includes a hardware configuration in conformity with FIG. 1 and automatically generates test data. The computer (1001) is a computer that automatically generates test data, for instance, a computer shown in FIG. 1. The computer (1001) includes metadata reception module (1011), signature reception module (1012), signature division module (1013), mapping information generation module (1014), total sum determination module (1015), pattern generation module (1016), character selection module (1017), and test data output module (1018) and mapping information output module (1019).
The metadata reception module (1011) receives meta data from, for instance, the storing medium (e.g., sign 108 in FIG. 1) accessible by the computer (101). The metadata reception module (1011) can execute block 402 shown in FIG. 4 and block 802 shown in FIG. 8. The signature reception module (1012) takes a signature that is to be embedded into at least one character string to be generated, from the metadata received by the meta data reception module (1011). Alternatively, the signature reception module (1012) receives the signature to be embedded in at least one character string to be generated in the metadata received by the metadata reception module (1011).
The signature reception module (1012) can execute block 403 shown in FIG. 4 and block 803 shown in FIG. 8. The signature division module (1013) divides the signature received by the signature reception module (1012) into multiple elements. Furthermore, the signature division module (1013) can divide the signature into one-digit numbers. The signature division module (1013) can execute blocks 404 and 412 shown in FIG. 4 and blocks 804 and 812 shown in FIG. 8.
In the case where test data includes multiple items, the mapping information generation module (1014) can associate the elements with the respective items. In the case where test data includes multiple items, the mapping information generation module (1014) may associate the elements with respective words in the item.
The mapping information generation module (1014) may execute block 405 shown in FIG. 4 and block 805 shown in FIG. 8. The total sum determination module (1015) determines the total sum of attribute values intrinsic to characters in the character string and associated with each element of the signature.
The total sum determination module (1015) may execute block 406 shown in FIG. 4 and block 806 shown in FIG. 8. The pattern generation module (1016) may determine at least one combination pattern of characters in a character string so as to achieve the total sum determined by the total sum determination module (1015). The pattern generation module (1016) may execute block 407 shown in FIG. 4 and block 807 shown in FIG. 8. The character selection module (1017) selects at least one of characters configuring the character string from the character table that describes characters prepared to create the test data so as to achieve the determined total sum, for each element of the signature, and generates test data including a character string including the selected characters. The character selection module (1017) may determine at least one combination pattern of the attribute values intrinsic to the respective characters in the character string so as to achieve the determined total sum. Furthermore, the character selection module (1017) may select at least one of characters configuring the character string, for each combination pattern of the attribute values intrinsic to the respective characters from the character table.
The character selection module (1017) may execute blocks 408 to 409 and 410 shown in FIG. 4 and blocks 808 to 809 and 810 shown in FIG. 8. The test data output module (1018) generates test data by inserting the character string generated by the character selection module (1017) into the template table. The test data output module (1018) shapes the generated character string into the format of the test data. The test data output module (1018) outputs the generated test data. The test data output module (1018) may execute blocks 411 and 413 shown in FIG. 4 (output of the test data) and blocks 811 and 813 shown in FIG. 8 (output of the test data). The mapping information output module (1019) outputs the mapping information generated by the mapping information generation module (1014) to, for instance, the storing medium (e.g., sign 108 in FIG. 1) accessible by the computer (101). The mapping information output module (1019) may execute block 413 shown in FIG. 4 (output of the mapping information) and block 813 shown in FIG. 8 (output of the mapping information).
FIG. 11 is a diagram showing an example of a functional block diagram of a computer that preferably includes a hardware configuration in conformity with FIG. 1 and identifies a signature embedded in test data. The computer (1101) is a computer that identifies a signature embedded in test data, for instance, a computer shown in FIG. 1. The computer (1101) includes test data reception module (1111), mapping information capturing module (1112), analysis module (1113), signature identification module (1114) and metadata output module (1115). The test data reception module (1111) receives the test data. The test data includes multiple items. The test data reception module (1111) may execute block 502 shown in FIG. 5 and block 902 shown in FIG. 9.
The mapping information capturing module (1112) receives mapping information. The mapping information includes mapping information between an item and the total sum of the attribute values associated with the item. The mapping information capturing module (1112) may execute block 503 shown in FIG. 5 and block 903 shown in FIG. 9. The analysis module (1113) analyzes the attribute values intrinsic to the respective characters in the character string in the test data on the basis of the mapping information received by the mapping information capturing module (1112), and acquires the total sum of the attribute values. The analysis module (1113) may execute blocks 504 to 506 shown in FIG. 5 and block 904 to 906 shown in FIG. 9.
The signature identification module (1114) identifies the signatures of the test data on the basis of the total sum acquired by the analysis module (1113). The signature identification module (1114) combines the identified signatures and reproduces meta data including the multiple signatures. The signature identification module (1114) may execute blocks 507 to 508 shown in FIG. 5 and blocks 907 to 908 shown in FIG. 9. The metadata output module (1115) stores the metadata reproduced by the signature identification module (1114), into storing medium. The metadata output module (1115) executes block 509 shown in FIG. 5 and block 909 shown in FIG. 9.
FIG. 12 shows an example of a character string (a combination of vowel characters and consonant characters in the character string) selected so as to achieve the total sum of values representing vowels in a character string. This example of the character string is for the cases where the total sum of vowel characters in the character string is one (1 vowel), two (2 vowels), three (3 vowels), four (4 vowels) and five (5 vowels). As apparent from the example of this character string, it can be understood that the generated character string has been certainly generated as test data. The generated character string itself includes the signature (the total sum of values representing vowels in the character string).
FIG. 13 shows an example of a character string selected so as to achieve the total sum of the numbers of strokes of respective characters in the character strings. The example of the following character string is for the cases where the total sum of the numbers of strokes of Kanji in the character string is 12 strokes to 24 strokes. As apparent from the example of the character string, it can be understood that the generated character string has been certainly generated as test data. The generated character string itself includes the signature (the total sum of the numbers of strokes of the respective characters in the character string).
It is a matter of course that those skilled in the art can easily assume various modifications where each hardware component of the computer used in the embodiment of the present invention is combined with multiple machines, to which functions are allocated and on which the functions are performed. It is a matter of course that these modifications are included in the concept of the embodiments. It should be noted that these components are for exemplification. Not all these components are necessarily configure indispensable component of the embodiments.
Embodiments of the present invention can be achieved by hardware, software or a combination of hardware and software. Execution through combination of hardware and software is typified by execution through a computer in which the computer program is installed. In such a case, the computer program is loaded into the memory of the computer and executed, thereby allowing the computer program to control the computer and causing the computer to execute processes pertaining to the present invention. The computer program may include a group of instructions that can be represented by any language, code or representation. Such a group of instructions allows the computer to directly execute a specific function, or execute processes after execution of one or both of conversion into another language, code or representation, and copying onto another medium.
Embodiments may be a system, a method, and/or a computer program product. The computer program product may include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the embodiments. The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device.
The computer readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of the computer readable storage medium includes the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.
Computer readable program instructions described herein can be downloaded to respective computing/processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and/or a wireless network. The network may comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing/processing device.
Computer readable program instructions for carrying out operations of the embodiments may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like, and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) may execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the embodiments.
Aspects of the embodiments are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein comprises an article of manufacture including instructions which implement aspects of the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational blocks to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable apparatus, or other device implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts or carry out combinations of special purpose hardware and computer instructions.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises” and/or “comprising,” when used in this specification, specify the presence of stated features, integers, blocks, operations, elements, and/or components, but do not preclude the presence or addition of one more other features, integers, blocks, operations, element components, and/or groups thereof.
The corresponding structures, materials, acts, and equivalents of all means or block plus function elements in the claims below are intended to include any structure, material, or act for performing the function in combination with other claimed elements as specifically claimed. The description of the present invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the invention. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.

## Claims

1. A computer implementable method of automatically generating, by a computer testing system, test data for testing a computer system, the test data including a character string, the method comprising:
receiving, by the computer testing system, a signature of the character string to be generated, the character string comprising one or more words;
dividing, by the computer testing system, the signature into a plurality of elements, each element being a numeric value indicative of a total sum of attribute values in a corresponding word in the character string, wherein each element in the signature maps to a respective word in the character string;
for each element of the signature:
generating, by the computer testing system, a combination of numeric values, such that a sum of the numeric values equals a value of the element, wherein the combination includes a predetermined number of numeric values;
selecting, by the computer testing system, at least one combination of characters configuring the corresponding word from the character string, the selection being from a character table data-structure, and wherein the combination of characters is selected so as to achieve the determined total sum of attribute values for the corresponding word from the character string;
in response to the character table data-structure including additional combinations of characters that match the determined total sum of attribute values, repeatedly selecting an additional combination of characters; and
generating, by the computer testing system, the test data by including the selected combinations of characters; and

using, by the computer testing system, the generated test data to test one or more operations of the computer system by using the test data as input.

2. The method according to claim 1, wherein selecting the at least one of characters from the character table, further comprises determining at least one combination pattern of the attribute values intrinsic to the respective characters in the character string so as to achieve the determined total sum.

3. The method according to claim 2, wherein selecting the at least one of characters from the character table, further comprises selecting at least one of characters configuring the character string from the character table, for each combination pattern of the attribute values intrinsic to the respective characters.

4. The method according to claim 1, further comprising dividing the signature into multiple elements.

5. The method according to claim 4, wherein the test data is data including multiple items, further comprising:
associating the elements with the respective items, or
associating the elements with respective words in the items.

6. The method according to claim 4, wherein dividing the signature into multiple elements, comprises dividing the signature into one-digit numbers, the divided one-digit numbers configuring each element of the signature.

7. The method according to claim 1, wherein the attribute value and the character table are in any of the following combination patterns:
the attribute value is a value representing a vowel in a language that uses vowels and consonants in a discriminated manner, and the character table is a table describing vowels and consonants; or
the attribute value is a number of strokes of a character of a language that includes characters having a prescribed number of strokes, and the character table is a table describing the number of strokes and the character associated with the number of strokes.

8. The method according to claim 7, wherein:
in a case where the attribute value is the value representing a vowel in the language that uses vowels and consonants in a discriminated manner and the character table is the table describing the vowels and the consonants,
determining the total sum of the attribute values comprises determining a total sum of values representing vowels in a character string associated with each element of the signature, and
selecting the at least one of characters from the character table further comprises determining at least one combination pattern of a vowel character and a consonant character in the character string so as to achieve the determined total sum, for each element of the signature.

9. The method according to claim 8, wherein selecting the at least one of characters from the character table further comprises selecting characters configuring the character string from the character table, for each of the combination patterns of vowel characters and consonant characters.

10. The method according to claim 8, wherein:
the combination pattern of the vowel character and the consonant character is any one or combination of:
the vowel character is immediately after the consonant character;
the vowel character is between the consonant characters;
the vowel character is immediately before the consonant character;
the vowel character is at a beginning of a word;
the vowel character is at an end of a word; or
the vowel character is immediately after another vowel character.

11. The method according to claim 8, wherein the combination pattern of the vowel character and the consonant character is a pronounceable combination.

12. The method according to claim 7, wherein:
in a case where the attribute value is the number of strokes of the character in the language that includes characters having a prescribed number of strokes and the character table is a table describing the number of strokes and the character associated with the number of strokes,
determining the total sum of the attribute value comprises determining a total sum of the number of strokes of each character in a character string associated with each element of the signature, and
determining at least one combination pattern of the numbers of strokes of the respective characters in the character string so as to achieve the determined total sum, for each element of the signature.

13. The method according to claim 12, wherein:
selecting the at least one of characters from the character table comprises selecting at least one of characters configuring the character string from the character table, for each combination pattern of the numbers of strokes of the respective characters.

14. The method according to claim 1, wherein generating the test data further comprises inserting, in the test data, at least one delimiter of a type different from a type of characters of a first character string associated with a first element and a second character string associated with a second element, wherein the delimiter is inserted between the first and second character strings.

15. The method according to claim 2, wherein selecting the at least one character from the character table comprises:
determining at least one of the combination patterns by generating a random number or calculating a hash value; and/or
selecting the at least one character from the character table by generating a random number or calculating a hash value for the character string to be generated.

16. A system for automatically generating test data for testing a computer system, the test data including a character string, the system comprising:
a memory having computer readable instructions; and
a processor for executing the computer readable instructions, the processor configured for:
receiving a signature of the character string to be generated, the character string comprising one or more words;
dividing the signature into a plurality of elements, each element being a numeric value indicative of a total sum of attribute values in a corresponding word in the character string, wherein each element in the signature maps to a respective word in the character string;
for each element of the signature:
generating, by the computer testing system, a combination of numeric values, such that a sum of the numeric values equals a value of the element, wherein the combination includes a predetermined number of numeric values;
selecting at least one combination of characters configuring the corresponding word from the character string, the selection being from a character table data-structure, and wherein the combination of characters is selected so as to achieve the determined total sum of attribute values for the corresponding word from the character string;
in response to the character table data-structure including additional combinations of characters that match the determined total sum of attribute values, repeatedly selecting an additional combination of characters; and
generating the test data by including the selected combinations of characters; and

using the generated test data to test one or more operations of the computer system by using the test data as input.

17. The system according to claim 16, wherein the attribute value is a value representing a vowel in a language that uses vowels and consonants in a discriminated manner, and the character table is a table describing vowels and consonants.

18. The system according to claim 16, wherein the attribute value is a number of strokes of a character of a language that includes characters having a prescribed number of strokes, and the character table is a table describing the number of strokes and the character associated with the number of strokes.

19. The system of claim 16, wherein the signature indicates an identity of a test data generation tool that generated that the test data.

20. A computer program product for automatically generating test data for testing a computer system, the test data including a character string, the computer program product comprising non-transitory computer readable storage medium with computer executable instructions embedded therein, wherein the non-transitory computer readable storage medium includes instructions for:
receiving a signature of the character string to be generated, the character string comprising one or more words;
dividing the signature into a plurality of elements, each element being a numeric value indicative of a total sum of attribute values in a corresponding word in the character string, wherein each element in the signature maps to a respective word in the character string;
for each element of the signature:
generating, by the computer testing system, a combination of numeric values, such that a sum of the numeric values equals a value of the element, wherein the combination includes a predetermined number of numeric values;
selecting at least one combination of characters configuring the corresponding word from the character string, the selection being from a character table data-structure, and wherein the combination of characters is selected so as to achieve the determined total sum of attribute values for the corresponding word from the character string;
in response to the character table data-structure including additional combinations of characters that match the determined total sum of attribute values, repeatedly selecting an additional combination of characters; and
generating the test data by including the selected combinations of characters; and
using the generated test data to test one or more operations of the computer system by using the test data as input.