JP2021103354A - Program testing method - Google Patents

Program testing method Download PDF

Info

Publication number
JP2021103354A
JP2021103354A JP2019233279A JP2019233279A JP2021103354A JP 2021103354 A JP2021103354 A JP 2021103354A JP 2019233279 A JP2019233279 A JP 2019233279A JP 2019233279 A JP2019233279 A JP 2019233279A JP 2021103354 A JP2021103354 A JP 2021103354A
Authority
JP
Japan
Prior art keywords
program
test
test target
main body
target portion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2019233279A
Other languages
Japanese (ja)
Inventor
雅紀 宮川
Masanori Miyagawa
雅紀 宮川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toyota Motor Corp
Original Assignee
Toyota Motor Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP2019233279A priority Critical patent/JP2021103354A/en
Publication of JP2021103354A publication Critical patent/JP2021103354A/en
Pending legal-status Critical Current

Links

Images

Abstract

To provide a program testing method that improves an efficiency of a white-box testing.SOLUTION: A program difference testing system 1 includes a difference code generation unit 11, an identity secure representative information storage unit 12, and an identity confirmation unit 13. The difference code generation unit extracts a test target portion 211 and a dependent portion 212 of the test target portion from a main body code 2, and generates difference codes 3 based on the test target portion and the dependent portion. The identity secure representative information storage unit 12 stores identity secure information securing that contents of a copy 31 are identical to contents of the test target portion in a database 120. The identity confirmation unit extracts all of functions and methods from the main body codes, calculates a hash value from a constituted character string for each of the functions and the methods, and retrieves the calculated hash value for the database, and when the hash value is stored, the function is considered to be tested and a verification coverage degree of testing of the main body codes is confirmed.SELECTED DRAWING: Figure 1

Description

本開示は、プログラムの試験方法に関する。 The present disclosure relates to test methods for programs.

プログラムの動作試験を行う試験方法として、ホワイトボックステストがある。ホワイトボックステストでは、テスト対象のプログラムの設計仕様に応じたテストパターンを網羅的に該プログラムに入力し、該プログラムが上記設計仕様を満たすか否かを試験する(例えば特許文献1)。 There is a white box test as a test method for performing an operation test of a program. In the white-box test, a test pattern corresponding to the design specifications of the program to be tested is comprehensively input to the program, and whether or not the program satisfies the above design specifications is tested (for example, Patent Document 1).

特開2015−200984JP 2015-200984

上記ホワイトボックステストは、テスト対象のプログラムの規模が大きくほど、あるいはプログラムの構造が複雑になるほど、テスト対象へのテストパターンの入力が困難となる。例えば、ローカルシンボルとして定義された関数に関し、シンボルが定義されたオブジェクトファイルの外部からは当該関数を直接呼び出すことができない。この課題に対して、例えば、テスト対象のプログラムにテスト用機能を追加し、又はデバッガを用いてテストする等の手法が考えられる。しかしこの場合、テスト対象へテストパターンを入力するまでの前作業が複雑になってしまい、効率的にテストが進められない。 In the above white-box test, the larger the scale of the program to be tested or the more complicated the structure of the program, the more difficult it becomes to input the test pattern to the test target. For example, for a function defined as a local symbol, the function cannot be called directly from outside the object file in which the symbol is defined. To solve this problem, for example, a method of adding a test function to the program to be tested or testing using a debugger can be considered. However, in this case, the preparatory work until the test pattern is input to the test target becomes complicated, and the test cannot proceed efficiently.

かかる事情に鑑みてなされた本開示の目的は、ホワイトボックステストの効率化を図ることにある。 The purpose of the present disclosure made in view of such circumstances is to improve the efficiency of the white box test.

本開示の一実施形態に係るプログラムの試験方法は、
試験対象のプログラムの本体コードからテスト対象部分と、該テスト対象部分の依存部分を抽出するステップと、
前記テスト対象部分と前記依存部分とに基づき差分コードを生成するステップと、
前記差分コードに基づきテストを行い、前記差分コードに係る文字列から算出したハッシュ値を記憶するステップと、
を含む。
The test method of the program according to the embodiment of the present disclosure is as follows.
A step of extracting the test target part and the dependent part of the test target part from the main body code of the test target program, and
A step of generating a difference code based on the test target part and the dependent part,
A step of performing a test based on the difference code and storing a hash value calculated from the character string related to the difference code, and
including.

本開示の一実施形態に係るプログラムの試験方法によれば、ホワイトボックステストの効率化を図ることができる。 According to the test method of the program according to the embodiment of the present disclosure, the efficiency of the white box test can be improved.

本開示の一実施形態に係るプログラムの差分テストシステムの構成を示す構成図である。It is a block diagram which shows the structure of the difference test system of the program which concerns on one Embodiment of this disclosure. テスト対象の本体コードの具体例を示す図である。It is a figure which shows the specific example of the main body code to be tested. 関数mms()に対応する差分コードの具体例を示す図である。It is a figure which shows the specific example of the difference code corresponding to the function mms (). テスト結果及びハッシュ値を記憶する処理の概要を示す図である。It is a figure which shows the outline of the process which stores a test result and a hash value. 同一性確認部による動作の概要を示す図である。It is a figure which shows the outline of the operation by the identity confirmation part.

以下、本開示の実施形態に係るプログラムの試験方法について、図面を参照して説明する。 Hereinafter, the test method of the program according to the embodiment of the present disclosure will be described with reference to the drawings.

各図中、同一又は相当する部分には、同一符号を付している。本実施形態の説明において、同一又は相当する部分については、説明を適宜省略又は簡略化する。 In each figure, the same or corresponding parts are designated by the same reference numerals. In the description of the present embodiment, the description will be omitted or simplified as appropriate for the same or corresponding parts.

図1を参照して、本実施形態に係るプログラムの差分テストシステム1の構成を説明する。 The configuration of the difference test system 1 of the program according to the present embodiment will be described with reference to FIG.

プログラムの差分テストシステム1(以下、単にシステム1ともいう)は、本実施形態に係るプログラムの試験方法を実施するシステムであり、差分コード生成部11と、同一性担保代表情報記憶部12と、同一性確認部13とを備える。システム1は概略として、プログラムである本体コード2の試験を行う。試験対象のプログラムの本体コード2は、複数の本体コード構成ファイル21を含む。システム1は、本体コード構成ファイル21のテスト対象部分211の試験を行う。テスト対象部分211は、テスト対象とするプログラムの機能(関数及びメソッド)を含む。このようにシステム1は、本体コード構成ファイル21の各部分をそれぞれ個別にテストすることにより、規模の大きなプログラムであったとしても各機能の設計仕様を網羅的に検証することができる。ここで当該テスト対象部分211は、テスト対象部分211が記述された本体コード構成ファイル21とは別の本体コード構成ファイル21に含まれる依存部分212に依存しているとする。換言すると当該テスト対象部分211は、テスト対象部分211が記述された本体コード構成ファイル21とは別の本体コード構成ファイル21に含まれる依存部分212が無ければ、コンパイル等、テストに必要な処理が行えないものとする。 The program difference test system 1 (hereinafter, also simply referred to as system 1) is a system that implements the program test method according to the present embodiment, and includes a difference code generation unit 11, an identity guarantee representative information storage unit 12, and the sameness guarantee representative information storage unit 12. It includes an identity confirmation unit 13. As a general rule, the system 1 tests the main body code 2 which is a program. The main body code 2 of the program to be tested includes a plurality of main body code configuration files 21. The system 1 tests the test target portion 211 of the main body code configuration file 21. The test target portion 211 includes the functions (functions and methods) of the program to be tested. In this way, the system 1 can comprehensively verify the design specifications of each function even if it is a large-scale program by individually testing each part of the main body code configuration file 21. Here, it is assumed that the test target portion 211 depends on the dependent portion 212 included in the main body code configuration file 21 different from the main body code configuration file 21 in which the test target portion 211 is described. In other words, if the test target part 211 does not have the dependent part 212 included in the main body code configuration file 21 different from the main body code configuration file 21 in which the test target part 211 is described, processing necessary for the test such as compilation can be performed. It shall not be possible.

システム1の差分コード生成部11は、依存箇所探索部110を含む。依存箇所探索部110は、本体コード2を解析し、テスト対象部分211とその依存部分212を抽出する。また差分コード生成部11は、抽出したテスト対象部分211と依存部分212とに基づき差分コード3を生成する。換言すると差分コード生成部11は、テスト対象部分211をテストするために最小限必要なコード(差分コード3)を生成する機能を有する。 The difference code generation unit 11 of the system 1 includes a dependency location search unit 110. The dependent portion search unit 110 analyzes the main body code 2 and extracts the test target portion 211 and the dependent portion 212 thereof. Further, the difference code generation unit 11 generates the difference code 3 based on the extracted test target portion 211 and the dependent portion 212. In other words, the difference code generation unit 11 has a function of generating the minimum code (difference code 3) necessary for testing the test target portion 211.

差分コード3は、単体でコンパイル及びリンク可能なコードである。差分コード3は、テスト対象部分211のコピー31と、依存部分のスタブ・ドライバ32とを含む。つまり当該差分コード3をビルドすることで生成されたバイナリ(実行ファイル)を用いて、ユーザは本体コード2のテスト対象部分211の動作をテストすることができる。 The difference code 3 is a code that can be compiled and linked by itself. The difference code 3 includes a copy 31 of the test target portion 211 and a stub driver 32 of the dependent portion. That is, the user can test the operation of the test target portion 211 of the main body code 2 by using the binary (executable file) generated by building the difference code 3.

同一性担保代表情報記憶部12は、データベース120を備える。同一性担保代表情報記憶部12は、コピー31の内容が、本体コード2のテスト対象部分211の内容と同一であることを担保する情報(以下、同一性担保情報)をデータベース120に記憶する。同一性担保情報は、差分コード3に含まれる、コピー31を構成する全文字列から生成されたハッシュ値と、当該差分コード3に係るテスト結果とを含む。 The identity guarantee representative information storage unit 12 includes a database 120. The identity guarantee representative information storage unit 12 stores information (hereinafter, identity guarantee information) that guarantees that the content of the copy 31 is the same as the content of the test target portion 211 of the main body code 2 in the database 120. The identity guarantee information includes a hash value included in the difference code 3 and generated from all the character strings constituting the copy 31, and a test result related to the difference code 3.

同一性確認部13は、差分コード3を用いて行ったテスト結果と、本体コード2を用いて行ったテスト結果が論理的に同一であることを保証する。具体的には同一性確認部13は、本体コード2から全ての関数及びメソッドを抽出し、それぞれの関数及びメソッドに対し、構成する文字列からハッシュ値を計算する。同一性確認部13は、算出したハッシュ値をキーにデータベース120を検索し、当該ハッシュ値が記憶されている場合、当該関数がテストされたものとする。これにより、同一性確認部13は、本体コード2のテストの検証網羅度を確認することができる。 The identity confirmation unit 13 guarantees that the test result performed using the difference code 3 and the test result performed using the main body code 2 are logically the same. Specifically, the identity confirmation unit 13 extracts all the functions and methods from the main body code 2, and calculates a hash value from the constituent character strings for each function and method. The identity confirmation unit 13 searches the database 120 using the calculated hash value as a key, and if the hash value is stored, it is assumed that the function has been tested. As a result, the identity confirmation unit 13 can confirm the verification coverage of the test of the main body code 2.

図2に、テスト対象のコードの具体例を示す。ここではテスト対象部分211が、関数mms()であるとする。テスト対象部分211の指定は、システム1が設定ファイルにおけるユーザの入力データを受け付けることにより行う。例えばシステム1は、本体コード2が格納されたディレクトリと、テスト対象部分211の開始行番号と、終了行番号とを含む設定ファイルを受け付け、テスト対象部分211を特定する。ここでは、テスト対象部分211が関数mms()であるとする。設定ファイルでは、関数mms()が記述されたファイルのディレクトリと、関数mms()の開始行番号と、終了行番号とが指定されている。なおテスト対象部分211の指定方法として設定ファイルを用いる例を示したがこれに限られず、テスト対象部分211を指定できる方法であれば任意の方法を採用可能である。 FIG. 2 shows a specific example of the code to be tested. Here, it is assumed that the test target portion 211 is the function mms (). The test target portion 211 is specified by the system 1 accepting the input data of the user in the setting file. For example, the system 1 receives a directory in which the main body code 2 is stored, a setting file including a start line number and an end line number of the test target portion 211, and identifies the test target portion 211. Here, it is assumed that the test target portion 211 is a function mms (). In the configuration file, the directory of the file in which the function mms () is described, the start line number of the function mms (), and the end line number are specified. An example of using a setting file as a method for designating the test target portion 211 has been shown, but the present invention is not limited to this, and any method can be adopted as long as the test target portion 211 can be specified.

差分コード生成部11は、設定ファイルで指定されたテスト対象部分211を探索し構文解析を行う。また依存箇所探索部110は、テスト対象部分211が依存する依存部分212の探索を行う。図2に示すように、ここでは関数mms()の引数として、シンボルstruct resultの*rが特定されている。したがって関数mms()を呼び出す前提として、struct resultの宣言をする必要がある。また関数mms()において、関数calc_A()とcalc_B()とを呼び出している。すなわち関数mms()を用いるために、関数calc_A()とcalc_B()とを定義する必要がある。依存箇所探索部110は、これらの依存関係を探索し、関数mms()が記述されているソースファイルとは別のソースファイルに記述されているstruct resultと、calc_A()と、calc_B()とを、依存部分212として抽出する。なおここではstruct resultと、calc_A()及びcalc_B()とが、それぞれ別のソースファイルに記述されている例を示しているがこれに限られず、これらが同一のソースファイルに記述されていてもよい。またここでは、calc_A()及びcalc_B()が同一のソースファイルに記述されている例を示したが、これに限られず、calc_A()及びcalc_B()がそれぞれ異なるソースファイルに記述されていてもよい。 The difference code generation unit 11 searches for the test target portion 211 specified in the setting file and performs parsing. Further, the dependent portion search unit 110 searches for the dependent portion 212 on which the test target portion 211 depends. As shown in FIG. 2, here, * r of the symbol struct result is specified as an argument of the function mms (). Therefore, it is necessary to declare struct result as a prerequisite for calling the function mms (). Also, in the function mms (), the functions calc_A () and calc_B () are called. That is, in order to use the function mms (), it is necessary to define the functions calc_A () and calc_B (). The dependency search unit 110 searches for these dependencies, and the struct result, calc_A (), and calc_B () described in a source file different from the source file in which the function mms () is described. Is extracted as the dependent portion 212. Note that here, struct result and calc_A () and calc_B () are described in different source files, but the example is not limited to this, and even if they are described in the same source file, they are not limited to this. Good. Also, here, an example in which calc_A () and calc_B () are described in the same source file is shown, but the present invention is not limited to this, and calc_A () and calc_B () may be described in different source files. Good.

差分コード生成部11は、テスト対象部分211と、抽出した依存部分212とに基づき差分コード3を生成する。関数mms()に対応する差分コード3の具体例を図3に示す。関数mms()の差分コード3は、本体コード2を複製して生成したコピー31と、依存部分のスタブ・ドライバ32とを含む。依存部分のスタブ・ドライバ32は、差分コード生成部11が自動的に生成する。差分コード3をビルドしてバイナリが生成される。当該バイナリを用いてテストを行うことができる。なお、依存部分のスタブ・ドライバ32の内容を改変することで、様々なテストケースを実装することができる。コピー31のハッシュ値及びテスト結果は、図4に示すように同一性担保代表情報記憶部12によりデータベース120に記憶される。図5は、同一性確認部13による動作の概要を示す図である。同一性確認部13は、本体コード2から、関数mms()を含む全関数を構成する文字列からハッシュ値を計算する。図5では、同一性確認部13が、本体コード2に記述されている関数mms()の文字列からハッシュ値を計算し、同一性担保代表情報記憶部12のデータベース120に記憶されているレコードと比較している。ハッシュ値がデータベース120のいずれかのレコードと一致すれば、関数mms()はテスト済みと判断できる。他方でハッシュ値がデータベース120のいずれのレコードとも一致しない場合、関数mms()はテストしていないと判断できる。ここで、例えば本体コード2の関数mms()のテストをした後に、当該関数を改変した場合等は、ハッシュ値が異なることになる。同一性確認部13は、本体コード2の文字列から計算したハッシュ値を用いてテスト済みか否かを判断するため、このように改変が加えられたような場合も確実に検知し、本体コード2の各関数等がテスト済みであるか否かを正確に確認することができる。 The difference code generation unit 11 generates the difference code 3 based on the test target portion 211 and the extracted dependent portion 212. A specific example of the difference code 3 corresponding to the function mms () is shown in FIG. The difference code 3 of the function mms () includes a copy 31 generated by duplicating the main body code 2 and a stub driver 32 as a dependent portion. The stub driver 32 of the dependent portion is automatically generated by the difference code generation unit 11. The difference code 3 is built and the binary is generated. Testing can be done using the binary. Various test cases can be implemented by modifying the contents of the stub driver 32 in the dependent portion. The hash value of the copy 31 and the test result are stored in the database 120 by the identity guarantee representative information storage unit 12 as shown in FIG. FIG. 5 is a diagram showing an outline of the operation by the identity confirmation unit 13. The identity confirmation unit 13 calculates a hash value from the main body code 2 from the character strings constituting all the functions including the function mms (). In FIG. 5, the identity confirmation unit 13 calculates a hash value from the character string of the function mms () described in the main body code 2, and records stored in the database 120 of the identity guarantee representative information storage unit 12. Is compared with. If the hash value matches any record in database 120, then the function mms () can be considered tested. On the other hand, if the hash value does not match any record in database 120, it can be determined that the function mms () has not been tested. Here, for example, if the function mms () of the main body code 2 is tested and then the function is modified, the hash value will be different. Since the identity confirmation unit 13 determines whether or not the test has been completed using the hash value calculated from the character string of the main body code 2, it reliably detects even if such a modification is made, and the main body code. It is possible to accurately confirm whether or not each function of 2 has been tested.

上述のように、本実施形態に係るプログラムの試験方法は、本体コード2からテスト対象部分211と、その依存部分212とを抽出し、これらに基づき差分コード3を生成する。差分コード3は、依存部分212を含むため、単体でビルド可能である。そのためユーザは、差分コード3のみでホワイトボックステストを行うことができる。またテスト結果及びテスト対象部分のコピー31のハッシュ値を記憶し、当該ハッシュ値に基づき本体コード2との同一性が担保されるため、本実施形態に係るプログラムの試験方法によれば、本体コード2の内容でテストが行われたこと、及び本体コード2のテストの検証網羅度を確認することができる。なおシステム1は、データベース120に格納された複数のハッシュ値と、本体コード2の各機能のハッシュ値に基づき、テストの検証網羅度を自動的に算出して出力してもよい。このように本実施形態に係るプログラムの試験方法によれば、ホワイトボックステストの効率化を図ることができる。 As described above, in the test method of the program according to the present embodiment, the test target portion 211 and the dependent portion 212 thereof are extracted from the main body code 2, and the difference code 3 is generated based on these. Since the difference code 3 includes the dependent portion 212, it can be built by itself. Therefore, the user can perform the white box test only with the difference code 3. Further, since the test result and the hash value of the copy 31 of the test target portion are stored and the identity with the main body code 2 is guaranteed based on the hash value, the main body code is according to the test method of the program according to the present embodiment. It can be confirmed that the test was performed with the contents of 2 and the verification coverage of the test of the main body code 2. The system 1 may automatically calculate and output the verification coverage of the test based on the plurality of hash values stored in the database 120 and the hash values of each function of the main body code 2. As described above, according to the test method of the program according to the present embodiment, the efficiency of the white box test can be improved.

ここで、システム1としては任意の情報処理装置を用いることができ、例えば当該情報処理装置は適宜、制御部、記憶部、入力部、出力部を備える。システム1の差分コード生成部11、依存箇所探索部110、及び同一性確認部13は、情報処理装置の制御部の機能により実現してもよい。当該制御部には、少なくとも1つのプロセッサ、少なくとも1つの専用回路、又はこれらの組み合わせが含まれる。プロセッサは、CPU(central processing unit)若しくはGPU(graphics processing unit)などの汎用プロセッサ、又は特定の処理に特化した専用プロセッサである。専用回路は、例えば、FPGA(field-programmable gate array)又はASIC(application specific integrated circuit)である。制御部は、情報処理装置の各部を制御しながら、情報処理装置の動作に関わる処理を実行する。 Here, any information processing device can be used as the system 1, and for example, the information processing device includes a control unit, a storage unit, an input unit, and an output unit as appropriate. The difference code generation unit 11, the dependency location search unit 110, and the identity confirmation unit 13 of the system 1 may be realized by the function of the control unit of the information processing device. The control unit includes at least one processor, at least one dedicated circuit, or a combination thereof. The processor is a general-purpose processor such as a CPU (central processing unit) or GPU (graphics processing unit), or a dedicated processor specialized for a specific process. The dedicated circuit is, for example, an FPGA (field-programmable gate array) or an ASIC (application specific integrated circuit). The control unit executes processing related to the operation of the information processing device while controlling each part of the information processing device.

また同一性担保代表情報記憶部12は、情報処理装置の記憶部で実現してもよい。当該記憶部には、少なくとも1つの半導体メモリ、少なくとも1つの磁気メモリ、少なくとも1つの光メモリ、又はこれらのうち少なくとも2種類の組み合わせが含まれる。半導体メモリは、例えば、RAM(random access memory)又はROM(read only memory)である。RAMは、例えば、SRAM(static random access memory)又はDRAM(dynamic random access memory)である。ROMは、例えば、EEPROM(electrically erasable programmable read only memory)である。記憶部は、例えば、主記憶装置、補助記憶装置、又はキャッシュメモリとして機能する。 Further, the identity guarantee representative information storage unit 12 may be realized by the storage unit of the information processing device. The storage unit includes at least one semiconductor memory, at least one magnetic memory, at least one optical memory, or at least two combinations thereof. The semiconductor memory is, for example, a RAM (random access memory) or a ROM (read only memory). The RAM is, for example, SRAM (static random access memory) or DRAM (dynamic random access memory). The ROM is, for example, an EEPROM (electrically erasable programmable read only memory). The storage unit functions as, for example, a main storage device, an auxiliary storage device, or a cache memory.

情報処理装置の入力部には、少なくとも1つの入力用インタフェースが含まれる。入力用インタフェースは、例えば、物理キー、静電容量キー、ポインティングデバイス、ディスプレイと一体的に設けられたタッチスクリーン、又はマイクである。入力部は、システム1の動作に用いられるデータを入力する操作を受け付ける。入力部は、情報処理装置に備えられる代わりに、外部の入力機器として情報処理装置に接続されてもよい。接続方式としては、例えば、USB(Universal Serial Bus)、HDMI(登録商標)(High-Definition Multimedia Interface)、又はBluetooth(登録商標)などの任意の方式を用いることができる。 The input unit of the information processing apparatus includes at least one input interface. The input interface is, for example, a physical key, a capacitive key, a pointing device, a touch screen integrated with the display, or a microphone. The input unit accepts an operation for inputting data used for the operation of the system 1. The input unit may be connected to the information processing device as an external input device instead of being provided in the information processing device. As the connection method, for example, any method such as USB (Universal Serial Bus), HDMI (registered trademark) (High-Definition Multimedia Interface), or Bluetooth (registered trademark) can be used.

出力部には、少なくとも1つの出力用インタフェースが含まれる。出力用インタフェースは、例えば、ディスプレイ又はスピーカである。ディスプレイは、例えば、LCD(liquid crystal display)又は有機EL(electro luminescence)ディスプレイである。出力部は、システム1の動作によって得られるデータを出力する。出力部は、情報処理装置に備えられる代わりに、外部の出力機器として情報処理装置に接続されてもよい。接続方式としては、例えば、USB、HDMI(登録商標)、又はBluetooth(登録商標)などの任意の方式を用いることができる。 The output unit includes at least one output interface. The output interface is, for example, a display or a speaker. The display is, for example, an LCD (liquid crystal display) or an organic EL (electroluminescence) display. The output unit outputs the data obtained by the operation of the system 1. The output unit may be connected to the information processing device as an external output device instead of being provided in the information processing device. As the connection method, for example, any method such as USB, HDMI (registered trademark), or Bluetooth (registered trademark) can be used.

情報処理装置の機能は、本実施形態に係るプログラムを、制御部に相当するプロセッサで実行することにより実現される。本実施形態においてプログラムは、コンピュータで読取り可能な記録媒体に記録しておくことができる。コンピュータで読取り可能な記録媒体は、非一時的なコンピュータ読取可能な媒体を含み、例えば、磁気記録装置、光ディスク、光磁気記録媒体、又は半導体メモリである。プログラムの流通は、例えば、プログラムを記録したDVD(digital versatile disc)又はCD−ROM(compact disc read only memory)などの可搬型記録媒体を販売、譲渡、又は貸与することによって行う。またプログラムの流通は、プログラムをサーバのストレージに格納しておき、サーバから他のコンピュータにプログラムを送信することにより行ってもよい。またプログラムはプログラムプロダクトとして提供されてもよい。 The function of the information processing device is realized by executing the program according to the present embodiment on a processor corresponding to the control unit. In this embodiment, the program can be recorded on a computer-readable recording medium. Computer-readable recording media include non-temporary computer-readable media, such as magnetic recording devices, optical discs, opto-magnetic recording media, or semiconductor memories. The distribution of the program is carried out, for example, by selling, transferring, or renting a portable recording medium such as a DVD (digital versatile disc) or a CD-ROM (compact disc read only memory) on which the program is recorded. Further, the distribution of the program may be performed by storing the program in the storage of the server and transmitting the program from the server to another computer. The program may also be provided as a program product.

本実施形態においてコンピュータは、例えば、可搬型記録媒体に記録されたプログラム又はサーバから送信されたプログラムを、一旦、主記憶装置に格納する。そして、コンピュータは、主記憶装置に格納されたプログラムをプロセッサで読み取り、読み取ったプログラムに従った処理をプロセッサで実行する。コンピュータは、可搬型記録媒体から直接プログラムを読み取り、プログラムに従った処理を実行してもよい。コンピュータは、サーバからプログラムを受信する度に、逐次、受け取ったプログラムに従った処理を実行してもよい。サーバからコンピュータへのプログラムの送信は行わず、実行指示及び結果取得のみによって機能を実現する、いわゆるASP(application service provider)型のサービスによって処理を実行してもよい。プログラムには、電子計算機による処理の用に供する情報であってプログラムに準ずるものが含まれる。例えば、コンピュータに対する直接の指令ではないがコンピュータの処理を規定する性質を有するデータは、「プログラムに準ずるもの」に該当する。 In the present embodiment, for example, the computer temporarily stores the program recorded on the portable recording medium or the program transmitted from the server in the main storage device. Then, the computer reads the program stored in the main storage device by the processor, and executes the processing according to the read program by the processor. The computer may read the program directly from the portable recording medium and perform processing according to the program. Each time the computer receives a program from the server, the computer may sequentially execute processing according to the received program. The process may be executed by a so-called ASP (application service provider) type service that realizes the function only by the execution instruction and the result acquisition without transmitting the program from the server to the computer. The program includes information used for processing by a computer and equivalent to the program. For example, data that is not a direct command to a computer but has the property of defining the processing of a computer corresponds to "a program-like data".

システム1の一部又は全ての機能が、情報処理装置の制御部に相当する専用回路により実現されてもよい。すなわち、システム1の一部又は全ての機能が、ハードウェアにより実現されてもよい。 A part or all the functions of the system 1 may be realized by a dedicated circuit corresponding to a control unit of the information processing apparatus. That is, some or all the functions of the system 1 may be realized by hardware.

1 プログラムの差分テストシステム(システム)
11 差分コード生成部
110 依存箇所探索部110
12 同一性担保代表情報記憶部
120 データベース
13 同一性確認部
2 本体コード
21 本体コード構成ファイル
211 テスト対象部分
212 依存部分
3 差分コード
31 テスト対象部分のコピー
32 依存部分のスタブ・ドライバ
1 Program difference test system (system)
11 Difference code generation unit 110 Dependent part search unit 110
12 Identity guarantee representative information storage unit 120 Database 13 Identity confirmation unit 2 Main unit code 21 Main unit code configuration file 211 Test target part 212 Dependent part 3 Difference code 31 Copy of test target part 32 Dependent part stub driver

Claims (1)

試験対象のプログラムの本体コードからテスト対象部分と、該テスト対象部分の依存部分を抽出するステップと、
前記テスト対象部分と前記依存部分とに基づき差分コードを生成するステップと、
前記差分コードに基づきテストを行い、前記テスト対象部分のコピーに係る文字列から算出したハッシュ値を記憶するステップと、
を含むプログラムの試験方法。
A step of extracting the test target part and the dependent part of the test target part from the main body code of the test target program, and
A step of generating a difference code based on the test target part and the dependent part,
A step of performing a test based on the difference code and storing a hash value calculated from a character string related to a copy of the test target portion, and a step of storing the hash value.
How to test the program, including.
JP2019233279A 2019-12-24 2019-12-24 Program testing method Pending JP2021103354A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019233279A JP2021103354A (en) 2019-12-24 2019-12-24 Program testing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019233279A JP2021103354A (en) 2019-12-24 2019-12-24 Program testing method

Publications (1)

Publication Number Publication Date
JP2021103354A true JP2021103354A (en) 2021-07-15

Family

ID=76755199

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019233279A Pending JP2021103354A (en) 2019-12-24 2019-12-24 Program testing method

Country Status (1)

Country Link
JP (1) JP2021103354A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023162272A1 (en) * 2022-02-28 2023-08-31 日本電気株式会社 Test assistance device, system, and method, and computer-readable medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023162272A1 (en) * 2022-02-28 2023-08-31 日本電気株式会社 Test assistance device, system, and method, and computer-readable medium

Similar Documents

Publication Publication Date Title
US10586026B2 (en) Simple obfuscation of text data in binary files
CN106203006A (en) Android application reinforcement means based on dex Yu so file Dynamic Execution
EP2677451B1 (en) License verification method and apparatus, and computer readable storage medium storing program therefor
WO2015035827A1 (en) Method and apparatus for providing string encryption and decryption in program files
CN108197440A (en) A kind of Code obfuscation method, equipment and computer readable storage medium
WO2022100063A1 (en) Method and apparatus for generating and storing logs of smart contract, device, and storage medium
US7822615B2 (en) Translating expressions in a computing environment
JP5845888B2 (en) Software correction apparatus, software correction system, software correction method, and software correction program
JP7409197B2 (en) Elaboration of repair patterns for static analysis violations in software programs
CN108228312A (en) The system and method that code is performed by interpreter
JP2021103354A (en) Program testing method
CN113626773B (en) Code protection method based on intermediate language
KR101823226B1 (en) Method and system for code protection
US9417871B2 (en) Automatic generation of certificate of origin (COO) for software systems
JP6597356B2 (en) Control program, control device, and control method
KR101534493B1 (en) Source code security weakness detection apparatus and method based on structure conversion
JP2013145443A (en) Test code generation device, test code generation method and test code generation program
JP5550578B2 (en) Entry rewriting device and entry rewriting program
US9965621B2 (en) Program protection device
CN112541188B (en) Method and device for preventing application program code from being statically analyzed
JP2007041777A (en) Language processing method
JP6556091B2 (en) System specification verification support apparatus and system specification verification support method
Kim et al. Future of Kernel Object-Based Memory Forensics
JP2016173756A (en) Test case generation program, test case generation method, and test case generation device
JP2015069220A (en) Device, method, and program for generating performance evaluation program