[go: up one dir, main page]

JP7512742B2 - DETECTION PROGRAM, DETECTION METHOD, AND DETECTION APPARATUS - Google Patents

DETECTION PROGRAM, DETECTION METHOD, AND DETECTION APPARATUS Download PDF

Info

Publication number
JP7512742B2
JP7512742B2 JP2020128950A JP2020128950A JP7512742B2 JP 7512742 B2 JP7512742 B2 JP 7512742B2 JP 2020128950 A JP2020128950 A JP 2020128950A JP 2020128950 A JP2020128950 A JP 2020128950A JP 7512742 B2 JP7512742 B2 JP 7512742B2
Authority
JP
Japan
Prior art keywords
locale
english
test
detection
sub
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2020128950A
Other languages
Japanese (ja)
Other versions
JP2022025836A (en
Inventor
卓弥 桐山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2020128950A priority Critical patent/JP7512742B2/en
Publication of JP2022025836A publication Critical patent/JP2022025836A/en
Application granted granted Critical
Publication of JP7512742B2 publication Critical patent/JP7512742B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Description

本発明は、検出プログラム、検出方法及び検出装置に関する。 The present invention relates to a detection program, a detection method, and a detection device.

ソフトウェアの実装では、テストプログラムの実行が欠かせない。このため、例えばオープンソースソフトウェア(OSS:Open Source Software)では、テストプログラムがソースプログラムとともに提供される。OSSコミュニティの共通言語は英語であり、OSSの動作を確認するテストプログラムも英語ロケールでの走行を前提に作成される。ここで、ロケールとは、プログラムの実行環境に設定される言語を表す。 When implementing software, it is essential to run test programs. For this reason, for example, in open source software (OSS), test programs are provided along with the source program. The common language of the OSS community is English, and test programs to check the operation of OSS are also created on the assumption that they will run in the English locale. Here, locale refers to the language set in the program's execution environment.

例えば、テスト結果の判定文は英語で記載される。このため、英語ロケール以外の環境でテストを実行すると、英語以外の言語による出力がテスト結果の判定に用いられる判定文と不一致となり、テストでエラーが発生したと判定される。 For example, the judgment statement for the test result is written in English. Therefore, if the test is run in an environment other than the English locale, the output in a language other than English will not match the judgment statement used to judge the test result, and the test will be determined to have encountered an error.

エラーが発生すると、エラーの原因が英語ロケールにあるのか英語ロケール以外の環境にあるのかを確認する必要がある。また、OSSのテスト項目は、非常に多く、例えば、OpenJDK(Java Development Kit)のJCK(Java Compatibility Kit)の場合、10万件以上ある。このため、英語ロケールを設定してテストプログラムを実行することで、英語ロケールを原因とするエラーの発生を防ぐことが行われる。 When an error occurs, it is necessary to check whether the cause of the error is the English locale or an environment other than the English locale. In addition, OSS has a large number of test items; for example, the JCK (Java Compatibility Kit) of the OpenJDK (Java Development Kit) has more than 100,000 items. For this reason, the English locale is set and the test program is executed to prevent errors caused by the English locale.

なお、従来技術として、アプリケーションソースコード内の地域化されていない行の検出、修正、及び翻訳を自動で行う技術がある。また、従来技術として、グローバライゼーション・テスト動作の組を用いたグローバライゼーション・テスト管理システムがある。このグローバライゼーション・テスト管理システムは、グローバライゼーション・データの組を収集し、グローバライゼーション・データの組に基づいて、グローバライゼーション・テスト動作の組の実行を決定する。そして、このグローバライゼーション・テスト管理システムは、グローバライゼーション・テスト動作の組を実行することによって、グローバライゼーション・データの組を処理する。そして、このグローバライゼーション・テスト管理システムは、処理したことに応答して、グローバライゼーション・テスト出力データの組を確立する。 Note that prior art includes technology that automatically detects, corrects, and translates non-localized lines in application source code. Prior art also includes a globalization test management system that uses a set of globalization test operations. This globalization test management system collects a set of globalization data and determines to execute a set of globalization test operations based on the set of globalization data. The globalization test management system then processes the set of globalization data by executing the set of globalization test operations. In response to the processing, the globalization test management system then establishes a set of globalization test output data.

特表2019-530927号公報JP 2019-530927 A 特開2017-102920号公報JP 2017-102920 A

英語ロケール以外の環境において、英語ロケールを設定してテストプログラムを実行しても、テストプログラム内で起動されるサブプロセスには、英語ロケールが設定されない。図7は、テストプログラム内で起動されるサブプロセスのロケールを示す図である。図7に示すように、例えば日本では、OS(Operating System)に日本語ロケールが設定される。このため、英語ロケールでの走行を前提に作成されたテストプログラム(TP:Test Program)は、英語ロケール設定の下に実行される。 Even if a test program is executed with the English locale set in an environment other than the English locale, the English locale is not set for the sub-process started within the test program. Figure 7 is a diagram showing the locale of the sub-process started within the test program. As shown in Figure 7, for example, in Japan, the Japanese locale is set for the OS (Operating System). For this reason, a test program (TP) created on the assumption that it will be run in the English locale is executed under the English locale setting.

しかしながら、テストプログラムのメインプロセスからforkにより生成されたサブプロセスは、OSのロケール設定を参照し、OSのロケール設定が日本語ロケールであるので、日本語ロケール下で実行される。このため、サブプロセスにおいては英語ロケールの設定漏れが原因でエラー(Error)が発生するが、エラーの原因が英語ロケールにあるのか英語ロケール以外の環境にあるのかを判定することができない。 However, the sub-process generated by fork from the main process of the test program references the OS locale setting, and because the OS locale setting is Japanese, it is executed under the Japanese locale. For this reason, an error occurs in the sub-process due to a failure to set the English locale, but it is not possible to determine whether the cause of the error is the English locale or an environment other than the English locale.

本発明は、1つの側面では、テストプログラムの実行において発生したエラーの原因が英語ロケールの設定漏れにあることを自動的に判定することを目的とする。 In one aspect, the present invention aims to automatically determine whether an error that occurs during the execution of a test program is caused by a failure to set the English locale.

1つの態様では、検出プログラムは、コンピュータに、ソフトウェアのテストを実行し、ロケールが未設定であるサブプロセスを特定し、テストの実行結果に基づいて、エラーとなったテストのうち出力結果が英語でないテストを特定する処理を実行させる。そして、前記検出プログラムは、前記コンピュータに、特定されたサブプロセスの情報と特定されたテストの情報とに基づいて、英語ロケールの設定漏れを検出する処理を実行させる。 In one aspect, the detection program causes a computer to execute a process of executing a software test, identifying a sub-process for which the locale is not set, and, based on the results of the test execution, identifying tests that have resulted in errors and whose output results are not in English. The detection program then causes the computer to execute a process of detecting an omission of the English locale setting, based on information on the identified sub-process and information on the identified test.

1つの側面では、本発明は、テストプログラムの実行において発生したエラーの原因が英語ロケールの設定漏れにあることを自動的に判定することができる。 In one aspect, the present invention can automatically determine that an error that occurs during execution of a test program is caused by a failure to set the English locale.

図1は、実施例に係る検出装置の機能構成を示す図である。FIG. 1 is a diagram illustrating a functional configuration of a detection device according to an embodiment. 図2は、ロケール未設定リストの一例を示す図である。FIG. 2 is a diagram showing an example of the locale unset list. 図3は、テスト結果ログの一例を示す図である。FIG. 3 is a diagram showing an example of a test result log. 図4は、検出装置による検出処理のフローを示すフローチャートである。FIG. 4 is a flowchart showing the flow of the detection process performed by the detection device. 図5は、プロセス監視部による監視処理のフローを示すフローチャートである。FIG. 5 is a flowchart showing the flow of monitoring processing by the process monitoring unit. 図6は、実施例に係る検出プログラムを実行するコンピュータのハードウェア構成を示す図である。FIG. 6 is a diagram illustrating a hardware configuration of a computer that executes a detection program according to the embodiment. 図7は、テストプログラム内で起動されるサブプロセスのロケールを示す図である。FIG. 7 is a diagram showing the locales of the sub-processes started in the test program.

以下に、本願の開示する検出プログラム、検出方法及び検出装置の実施例を図面に基づいて詳細に説明する。なお、この実施例は開示の技術を限定するものではない。 Below, examples of the detection program, detection method, and detection device disclosed in the present application are described in detail with reference to the drawings. Note that the disclosed technology is not limited to these examples.

まず、実施例に係る検出装置の機能構成について説明する。図1は、実施例に係る検出装置の機能構成を示す図である。図1に示すように、実施例に係る検出装置1は、プロセス監視部11と、テスト実行部12と、判定部13と、修正部14とを有する。 First, the functional configuration of the detection device according to the embodiment will be described. FIG. 1 is a diagram showing the functional configuration of the detection device according to the embodiment. As shown in FIG. 1, the detection device 1 according to the embodiment has a process monitoring unit 11, a test execution unit 12, a determination unit 13, and a correction unit 14.

プロセス監視部11は、プロセスの起動を監視し、プロセスが起動されると、起動されたプロセスの環境変数又はコマンドライン引数に基づいてロケール設定を確認する。ここで、環境変数は、プロセスが実行される環境を示す変数である。コマンドライン引数は、プロセスを起動するコマンドラインの引数である。 The process monitoring unit 11 monitors the startup of a process, and when a process is started, checks the locale setting based on the environment variables or command line arguments of the started process. Here, the environment variables are variables that indicate the environment in which the process is executed. The command line arguments are arguments of the command line that starts the process.

プロセス監視部11は、ps、/proc.[pid]等を用いてロケール設定を確認する。Java(登録商標)の場合には、コマンドラインの「-Duser.language=en」、「-Duser.country=US」等がロケール設定の確認に用いられる。 The process monitoring unit 11 checks the locale setting using ps, /proc. [pid], etc. In the case of Java (registered trademark), the command line "-Duser.language=en", "-Duser.country=US", etc. are used to check the locale setting.

そして、プロセス監視部11は、起動されたプロセスにロケール設定がない場合には、親プロセスをメインプロセスまで順番にたどり、メインプロセスまでのプロセスの識別子をロケール未設定リスト16に出力する。なお、プロセス監視部11は、特許請求の範囲に記載の特定部に対応する。図2は、ロケール未設定リスト16の一例を示す図である。図2に示すように、ロケール未設定リスト16には、P識別子、プロセスID、親プロセスID、コマンドライン、環境変数が含まれる。 If the launched process does not have a locale setting, the process monitoring unit 11 traces the parent processes in order up to the main process, and outputs the identifiers of the processes up to the main process to the locale unset list 16. The process monitoring unit 11 corresponds to the identifying unit described in the claims. Figure 2 is a diagram showing an example of the locale unset list 16. As shown in Figure 2, the locale unset list 16 includes a P identifier, a process ID, a parent process ID, a command line, and environmental variables.

P識別子は、親プロセスであるか否かを示し、親プロセスの場合は「P」であり、親プロセスでない場合は空白である。プロセスIDは、プロセスを識別する識別子である。最初の行のプロセスID「1603」が起動されたサブプロセスの識別子である。親プロセスIDは、親のプロセスを識別する識別子である。環境変数の「LANG=・・・」は、ロケール設定の確認に用いられる。 The P identifier indicates whether or not it is a parent process; if it is a parent process it is "P" and if it is not a parent process it is blank. The process ID is an identifier that identifies the process. The process ID "1603" on the first line is the identifier of the launched subprocess. The parent process ID is an identifier that identifies the parent process. The environment variable "LANG=..." is used to check the locale setting.

テスト実行部12は、OSSのテストプログラムを実行し、エラーが発生したか否かを判定する。そして、テスト実行部12は、エラーが発生した場合には、判定部13にテストプログラムのメインプロセスのプロセスIDとともにエラーの発生を通知し、エラーが発生しなかった場合には、次のテストプログラムを実行する。 The test execution unit 12 executes the OSS test program and determines whether an error has occurred. If an error has occurred, the test execution unit 12 notifies the determination unit 13 of the occurrence of the error along with the process ID of the main process of the test program, and if no error has occurred, the test execution unit 12 executes the next test program.

また、テスト実行部12は、テストプログラムの実行結果を示すログをテスト結果ログ17に出力する。図3は、テスト結果ログ17の一例を示す図である。図3において、「test result:Failed」は、エラーの発生を示す。また、「¥u3053¥u308c¥u306f¥u3001¥u30c6¥u30b9¥u30c8¥u3067¥u3059¥u3002」はunicode表記で日本語のメッセージを示す。 The test execution unit 12 also outputs a log indicating the execution result of the test program to the test result log 17. FIG. 3 is a diagram showing an example of the test result log 17. In FIG. 3, "test result: Failed" indicates that an error has occurred. Also, "¥u3053¥u308c¥u306f¥u3001¥u30c6¥u30b9¥u30c8¥u3067¥u3059¥u3002" indicates a message in Japanese in unicode notation.

判定部13は、テスト実行部12から通知されたメインプロセスのプロセスIDとロケール未設定リスト16とテスト結果ログ17とに基づいて、英語ロケールの設定漏れを検出する。そして、判定部13は、英語ロケールの設定漏れを検出すると、エラーの原因が英語ロケールの設定漏れにあると判定する。 The determination unit 13 detects the absence of English locale setting based on the process ID of the main process notified by the test execution unit 12, the locale unset list 16, and the test result log 17. Then, when the determination unit 13 detects the absence of English locale setting, it determines that the cause of the error is the absence of English locale setting.

具体的には、判定部13は、テスト実行部12から通知されたメインプロセスのプロセスIDとロケール未設定リスト16に含まれるメインプロセスのプロセスIDとに基づいて、ロケールが未設定のサブプロセスを特定する。 Specifically, the determination unit 13 identifies a sub-process for which the locale is not set based on the process ID of the main process notified by the test execution unit 12 and the process ID of the main process included in the locale unset list 16.

また、判定部13は、テスト結果ログ17に英語でないログが含まれるか否かを判定し、英語でないログが含まれる場合には、テストプログラムを出力結果が英語でないテストプログラムとして特定する。具体的には、判定部13は、テスト結果ログ17に含まれるメッセージが期待されるメッセージと異なる場合に、メッセージのunicodeに基づいてメッセージが英語であるか否かを判定する。 The determination unit 13 also determines whether the test result log 17 includes a log that is not in English, and if a log that is not in English is included, identifies the test program as a test program whose output result is not in English. Specifically, when a message included in the test result log 17 differs from an expected message, the determination unit 13 determines whether the message is in English based on the unicode of the message.

例えば、期待されるメッセージが「This is a test.」であるとする。このとき、テスト結果ログ17に含まれるメッセージがunicodeで「¥u3053¥u308c¥u306f¥u3001¥u30c6¥u30b9¥u30c8¥u3067¥u3059¥u3002」であるとする。「¥u3053¥u308c¥u306f¥u3001¥u30c6¥u30b9¥u30c8¥u3067¥u3059¥u3002」は、「これはテストです。」のunicodeなので、判定部13は、メッセージは英語でないと判定する。 For example, suppose the expected message is "This is a test." In this case, suppose the message contained in the test result log 17 is "¥u3053¥u308c¥u306f¥u3001¥u30c6¥u30b9¥u30c8¥u3067¥u3059¥u3002" in unicode. Since "¥u3053¥u308c¥u306f¥u3001¥u30c6¥u30b9¥u30c8¥u3067¥u3059¥u3002" is the unicode for "This is a test.", the determination unit 13 determines that the message is not in English.

あるいは、判定部13は、期待されるメッセージに「$123,456」のように通貨の単位「$」が含まれ、テスト結果ログ17のメッセージに「¥123,456」のように異なる通貨の単位「¥」が含まれる場合、メッセージは英語でないと判定する。あるいは、判定部13は、期待されるメッセージに「4,294,967.00」のような数値が含まれ、テスト結果ログ17のメッセージに「42,94,967.00」が含まれる場合、数値の区切りが異なるので、メッセージは英語でないと判定する。なお、「42,94,967.00」はヒンズー語における数値の区切りである。 Alternatively, if the expected message contains the currency unit "$" such as "$123,456" and the message in the test result log 17 contains a different currency unit "¥" such as "¥123,456", the determination unit 13 determines that the message is not in English. Alternatively, if the expected message contains a numerical value such as "4,294,967.00" and the message in the test result log 17 contains "42,94,967.00", the determination unit 13 determines that the message is not in English because the numerical value separators are different. Note that "42,94,967.00" is a numerical value separator in Hindi.

そして、判定部13は、ロケールが未設定のサブプロセスを特定することができ、テストプログラムの出力結果が英語でないと判定した場合に、英語ロケールの設定漏れがあると判定し、エラーの原因が英語ロケールの設定漏れにあると判定する。なお、判定部13は、特許請求の範囲に記載の検出部に対応する。 Then, the determination unit 13 can identify the sub-processes for which the locale is not set, and when it is determined that the output result of the test program is not in English, it determines that the English locale is not set, and determines that the cause of the error is the absence of the English locale setting. Note that the determination unit 13 corresponds to the detection unit described in the claims.

修正部14は、英語ロケールの設定漏れがある場合に、判定部13により特定されたサブプロセスの英語ロケールを設定する。修正部14は、例えば、サブプロセスを生成するコマンドライン引数を修正することで英語ロケールを設定する。 If the English locale has not been set, the correction unit 14 sets the English locale for the sub-process identified by the determination unit 13. The correction unit 14 sets the English locale, for example, by correcting the command line arguments that generate the sub-process.

次に、検出装置1による処理のフローについて図4及び図5を用いて説明する。図4は、検出装置1による検出処理のフローを示すフローチャートである。図4に示すように、検出装置1は、最新テストセット(テストプログラム)をクローンする(ステップS1)。ここで、クローンするとは、コピーすることである。そして、検出装置1は、テストセットをビルドする(ステップS2)。ここで、ビルドするとは、テストセットに対してコンパイル等を行ってテストセットを実行可能にすることである。 Next, the flow of processing by the detection device 1 will be described with reference to Figs. 4 and 5. Fig. 4 is a flowchart showing the flow of detection processing by the detection device 1. As shown in Fig. 4, the detection device 1 clones the latest test set (test program) (step S1). Here, cloning means copying. Then, the detection device 1 builds the test set (step S2). Here, building means compiling the test set to make it executable.

そして、検出装置1は、プロセス監視部11を起動する(ステップS3)。そして、検出装置1は、テストを実行し(ステップS4)、エラーが発生したか否かを判定する(ステップS5)。そして、検出装置1は、エラーが発生しなかった場合には、全テストを終了したか否かを判定し(ステップS6)、全テストを終了した場合には検出処理を終了し、終了していないテストセットがある場合には、ステップS1に戻る。 Then, the detection device 1 starts the process monitoring unit 11 (step S3). The detection device 1 then executes a test (step S4) and determines whether an error has occurred (step S5). If no error has occurred, the detection device 1 then determines whether all tests have been completed (step S6), and if all tests have been completed, ends the detection process. If there is a test set that has not been completed, the detection device 1 returns to step S1.

一方、エラーが発生した場合には、検出装置1は、ロケール未設定リスト16に基づいて、テストセットのサブプロセスにロケール未設定があるか否かを判定する(ステップS7)。そして、ロケール未設定がある場合には、検出装置1は、テストセットの出力結果が英語であるか否かを判定する(ステップS8)。 On the other hand, if an error occurs, the detection device 1 determines whether or not there is a locale not set in the sub-process of the test set based on the locale not set list 16 (step S7). If there is a locale not set, the detection device 1 determines whether or not the output result of the test set is in English (step S8).

そして、テストセットの出力結果が英語でない場合には、検出装置1は、テストセットの修正又はテスト環境を変更する(ステップS9)。検出装置1は、例えば、ロケール未設定のサブプロセスを起動するコマンドラインを修正する。そして、検出装置1は、ステップS2に戻る。 If the output result of the test set is not in English, the detection device 1 modifies the test set or changes the test environment (step S9). For example, the detection device 1 modifies the command line that launches a sub-process for which the locale is not set. The detection device 1 then returns to step S2.

一方、テストセットの出力結果が英語である場合、又は、テストセットのサブプロセスにロケール未設定がない場合には、検出装置1は、エラーメッセージを出力する(ステップS10)。例えば、検出装置1は、エラー原因を調査し、エラー原因への対策を行うように、エラーメッセージで依頼する。 On the other hand, if the output result of the test set is in English, or if the subprocess of the test set does not have an unset locale, the detection device 1 outputs an error message (step S10). For example, the detection device 1 uses an error message to request that the cause of the error be investigated and that measures be taken to address the cause of the error.

このように、検出装置1は、テストセットのサブプロセスにロケール未設定があるか否か、及び、テストセットの出力結果が英語であるか否かを判定することで、英語ロケールの設定漏れを検出することができる。なお、検出装置1は、ステップS7とステップS8の順序を入れ替えてもよい。 In this way, the detection device 1 can detect the absence of an English locale setting by determining whether or not the sub-process of the test set has an unset locale and whether or not the output result of the test set is in English. Note that the detection device 1 may switch the order of steps S7 and S8.

図5は、プロセス監視部11による監視処理のフローを示すフローチャートである。図5に示すように、プロセス監視部11は、プロセス監視を行い(ステップS21)、プロセス起動があるか否かを判定する(ステップS22)。そして、プロセス起動がない場合には、プロセス監視部11は、ステップS21に戻る。 Figure 5 is a flowchart showing the flow of monitoring processing by the process monitoring unit 11. As shown in Figure 5, the process monitoring unit 11 performs process monitoring (step S21) and determines whether or not a process has been started (step S22). Then, if a process has not been started, the process monitoring unit 11 returns to step S21.

一方、プロセス起動がある場合には、プロセス監視部11は、プロセスID、コマンドライン、環境変数を取得し(ステップS23)、コマンドライン又は環境変数に基づいて、起動されたサブプロセスにロケール設定があるか否かを判定する(ステップS24)。そして、ロケール設定がある場合には、プロセス監視部11は、ステップS21に戻る。 On the other hand, if a process is started, the process monitoring unit 11 acquires the process ID, command line, and environment variables (step S23), and determines whether the started sub-process has a locale setting based on the command line or the environment variables (step S24). If a locale setting is found, the process monitoring unit 11 returns to step S21.

一方、ロケール設定がない場合には、プロセス監視部11は、親プロセスがあるか否かを判定し(ステップS25)、親プロセスがある場合には、親プロセスのプロセスID、コマンドライン、環境変数を取得し(ステップS26)、ステップS25に戻る。一方、親プロセスがない場合には、プロセス監視部11は、起動されたサブプロセス及び全ての親プロセスの情報を解析して、ロケール未設定リスト16に格納する(ステップS27)。そして、プロセス監視部11は、ステップS21に戻る。 On the other hand, if there is no locale setting, the process monitoring unit 11 determines whether there is a parent process (step S25), and if there is a parent process, obtains the process ID, command line, and environment variables of the parent process (step S26), and returns to step S25. On the other hand, if there is no parent process, the process monitoring unit 11 analyzes information on the started sub-process and all parent processes, and stores it in the locale unset list 16 (step S27). Then, the process monitoring unit 11 returns to step S21.

このように、プロセス監視部11は、サブプロセスが起動され、起動されたサブプロセスにロケール設定がないときに、サブプロセス及び全ての親プロセスの情報を解析して、ロケール未設定リスト16に格納する。したがって、検出装置1は、ロケール未設定リスト16を用いて英語ロケールの設定漏れを検出することができる。 In this way, when a sub-process is started and the started sub-process does not have a locale setting, the process monitoring unit 11 analyzes information about the sub-process and all parent processes and stores the information in the locale unset list 16. Therefore, the detection device 1 can use the locale unset list 16 to detect the absence of an English locale setting.

上述してきたように、実施例では、プロセス監視部11は、テストプログラムの実行中に、ロケールが未設定であるサブプロセスを特定し、ロケールが未設定であるサブプロセス及び全ての親プロセスの情報を解析してロケール未設定リスト16に格納する。また、判定部13は、テスト結果ログ17に基づいて、テストプログラムの出力結果が英語であるか否かを判定する。そして、判定部13は、テストプログラムの実行においてロケールが未設定のサブプロセスがあり、テストプログラムの出力結果が英語でないと判定した場合に、英語ロケールの設定漏れがあると判定する。したがって、検出装置1は、テストプログラムの実行において発生したエラーの原因が英語ロケールの設定漏れにあることを自動的に判定することができる。 As described above, in the embodiment, the process monitoring unit 11 identifies sub-processes for which the locale is not set during execution of the test program, analyzes information on the sub-processes for which the locale is not set and all parent processes, and stores the information in the locale not set list 16. The determination unit 13 also determines whether the output result of the test program is in English based on the test result log 17. Then, when the determination unit 13 determines that there is a sub-process for which the locale is not set during execution of the test program and that the output result of the test program is not in English, it determines that the English locale is not set. Therefore, the detection device 1 can automatically determine that the cause of an error that occurs during execution of the test program is the absence of the English locale setting.

また、実施例では、プロセス監視部11は、サブプロセスの環境変数又はコマンドラインに基づいてロケールが未設定であることを特定するので、ロケール未設定を正確に判定することができる。 In addition, in the embodiment, the process monitoring unit 11 identifies that the locale is not set based on the environment variables or command line of the subprocess, so that it can accurately determine that the locale is not set.

また、実施例では、判定部13は、テスト結果ログ17に含まれるメッセージのコード、当該メッセージに含まれる通貨の単位又は当該メッセージに含まれる数値の区切りを用いてテストプログラムの出力結果が英語でないと判定する。したがって、判定部13は、テストプログラムの出力結果が英語でないことを正確に判定することができる。 In addition, in the embodiment, the determination unit 13 determines that the output result of the test program is not in English by using the code of the message included in the test result log 17, the currency unit included in the message, or the separator of the numerical values included in the message. Therefore, the determination unit 13 can accurately determine that the output result of the test program is not in English.

また、実施例では、判定部13は、テスト実行部12から通知されたメインプロセスのプロセスIDとロケール未設定リスト16に含まれるメインプロセスのプロセスIDとに基づいて、ロケールが未設定のサブプロセスがあるか否かを判定する。したがって、判定部13は、ロケールが未設定のサブプロセスの有無を正確に判定することができる。 In addition, in the embodiment, the determination unit 13 determines whether or not there is a sub-process for which the locale is not set, based on the process ID of the main process notified by the test execution unit 12 and the process ID of the main process included in the locale unset list 16. Therefore, the determination unit 13 can accurately determine whether or not there is a sub-process for which the locale is not set.

なお、実施例では、検出装置1について説明したが、検出装置1が有する構成をソフトウェアによって実現することで、同様の機能を有する検出プログラムを得ることができる。そこで、検出プログラムを実行するコンピュータについて説明する。 In the embodiment, the detection device 1 has been described, but a detection program having similar functions can be obtained by implementing the configuration of the detection device 1 using software. Therefore, a computer that executes the detection program will be described.

図6は、実施例に係る検出プログラムを実行するコンピュータのハードウェア構成を示す図である。図6に示すように、コンピュータ50は、メインメモリ51と、CPU(Central Processing Unit)52と、LAN(Local Area Network)インタフェース53と、HDD(Hard Disk Drive)54とを有する。また、コンピュータ50は、スーパーIO(Input Output)55と、DVI(Digital Visual Interface)56と、ODD(Optical Disk Drive)57とを有する。 Fig. 6 is a diagram showing the hardware configuration of a computer that executes a detection program according to an embodiment. As shown in Fig. 6, computer 50 has main memory 51, CPU (Central Processing Unit) 52, LAN (Local Area Network) interface 53, and HDD (Hard Disk Drive) 54. Computer 50 also has super IO (Input Output) 55, DVI (Digital Visual Interface) 56, and ODD (Optical Disk Drive) 57.

メインメモリ51は、プログラムやプログラムの実行途中結果等を記憶するメモリである。CPU52は、メインメモリ51からプログラムを読み出して実行する中央処理装置である。CPU52は、メモリコントローラを有するチップセットを含む。 The main memory 51 is a memory that stores programs and intermediate results of program execution. The CPU 52 is a central processing unit that reads and executes programs from the main memory 51. The CPU 52 includes a chipset with a memory controller.

LANインタフェース53は、コンピュータ50をLAN経由で他のコンピュータに接続するためのインタフェースである。HDD54は、プログラムやデータを格納するディスク装置であり、スーパーIO55は、マウスやキーボード等の入力装置を接続するためのインタフェースである。DVI56は、液晶表示装置を接続するインタフェースであり、ODD57は、DVDの読み書きを行う装置である。 The LAN interface 53 is an interface for connecting the computer 50 to other computers via a LAN. The HDD 54 is a disk device for storing programs and data, and the super IO 55 is an interface for connecting input devices such as a mouse and keyboard. The DVI 56 is an interface for connecting an LCD display device, and the ODD 57 is a device for reading and writing DVDs.

LANインタフェース53は、PCIエクスプレス(PCIe)によりCPU52に接続され、HDD54及びODD57は、SATA(Serial Advanced Technology Attachment)によりCPU52に接続される。スーパーIO55は、LPC(Low Pin Count)によりCPU52に接続される。 The LAN interface 53 is connected to the CPU 52 via PCI Express (PCIe), and the HDD 54 and ODD 57 are connected to the CPU 52 via SATA (Serial Advanced Technology Attachment). The super IO 55 is connected to the CPU 52 via LPC (Low Pin Count).

そして、コンピュータ50において実行される検出プログラムは、コンピュータ50により読み出し可能な記録媒体の一例であるDVDに記憶され、ODD57によってDVDから読み出されてコンピュータ50にインストールされる。あるいは、検出プログラムは、LANインタフェース53を介して接続された他のコンピュータシステムのデータベース等に記憶され、これらのデータベースから読み出されてコンピュータ50にインストールされる。そして、インストールされた検出プログラムは、HDD54に記憶され、メインメモリ51に読み出されてCPU52によって実行される。 The detection program executed in the computer 50 is stored in a DVD, which is an example of a recording medium readable by the computer 50, and is read from the DVD by the ODD 57 and installed in the computer 50. Alternatively, the detection program is stored in a database or the like of another computer system connected via the LAN interface 53, and is read from the database and installed in the computer 50. The installed detection program is then stored in the HDD 54, read into the main memory 51, and executed by the CPU 52.

また、実施例では、OSSの英語ロケールの設定漏れを検出する場合について説明したが、検出装置1は、他のソフトウェアの英語ロケールの設定漏れを検出してもよい。また、実施例では、英語ロケールの設定漏れを検出する場合について説明したが、検出装置1は、他の言語のロケールの設定漏れを検出してもよい。 In the embodiment, a case where an omission of the English locale setting of the OSS is detected has been described, but the detection device 1 may also detect an omission of the English locale setting of other software. In the embodiment, a case where an omission of the English locale setting is detected has been described, but the detection device 1 may also detect an omission of the locale setting of another language.

1 検出装置
11 プロセス監視部
12 テスト実行部
13 判定部
14 修正部
16 ロケール未設定リスト
17 テスト結果ログ
50 コンピュータ
51 メインメモリ
52 CPU
53 LANインタフェース
54 HDD
55 スーパーIO
56 DVI
57 ODD
REFERENCE SIGNS LIST 1 Detection device 11 Process monitoring unit 12 Test execution unit 13 Determination unit 14 Correction unit 16 Locale unset list 17 Test result log 50 Computer 51 Main memory 52 CPU
53 LAN interface 54 HDD
55 Super IO
56 DVI
57 ODD

Claims (8)

コンピュータに、
ソフトウェアのテストを実行し、ロケールが未設定であるサブプロセスを特定し、
テストの実行結果に基づいて、エラーとなったテストのうち出力結果が英語でないテストを特定し、
特定されたサブプロセスの情報と特定されたテストの情報とに基づいて、英語ロケールの設定漏れを検出する
処理を実行させることを特徴とする検出プログラム。
On the computer,
Run software tests to identify subprocesses that do not have the locale set,
Based on the test execution results, identify the tests that failed and whose output results were not in English,
A detection program for detecting an omission of an English locale setting based on information on the identified sub-process and information on the identified test, the detection program comprising:
前記サブプロセスを特定する処理は、前記サブプロセスの環境変数又はコマンドラインに基づいてロケールが未設定であることを特定することを特徴とする請求項1に記載の検出プログラム。 The detection program according to claim 1, characterized in that the process of identifying the sub-process identifies that the locale is not set based on the environment variables or command line of the sub-process. 前記出力結果が英語でないテストを特定する処理は、出力結果のコード、出力結果に含まれる通貨の単位又は出力結果に含まれる数値の区切りを用いて該テストを特定することを特徴とする請求項1又は2に記載の検出プログラム。 The detection program according to claim 1 or 2, characterized in that the process of identifying tests whose output results are not in English identifies the tests using the code of the output result, the currency unit included in the output result, or the numeric separator included in the output result. 前記検出する処理は、特定されたサブプロセスのメインプロセスの識別子と前記出力結果が英語でないテストのメインプロセスの識別子に基づいて前記設定漏れを検出することを特徴とする請求項1、2又は3に記載の検出プログラム。 The detection program according to claim 1, 2 or 3, characterized in that the detection process detects the setting omission based on the identifier of the main process of the identified subprocess and the identifier of the main process of the test whose output result is not in English. 前記コンピュータに、
前記サブプロセスを起動するコマンドラインを修正して英語ロケールを設定する処理をさらに実行することを特徴とする請求項1~4のいずれか1つに記載の検出プログラム。
The computer includes:
5. The detection program according to claim 1, further comprising a process of modifying a command line for starting the sub-process to set an English locale.
前記ソフトウェアは、オープンソースソフトウェアであることを特徴とする請求項1~5のいずれか1つに記載の検出プログラム。 The detection program according to any one of claims 1 to 5, characterized in that the software is open source software. コンピュータが、
ソフトウェアのテストを実行し、ロケールが未設定であるサブプロセスを特定し、
テストの実行結果に基づいて、エラーとなったテストのうち出力結果が英語でないテストを特定し、
特定されたサブプロセスの情報と特定されたテストの情報とに基づいて、英語ロケールの設定漏れを検出する
処理を実行することを特徴とする検出方法。
The computer
Run software tests to identify subprocesses that do not have the locale set,
Based on the test execution results, identify the tests that failed and whose output results were not in English,
A detection method comprising: detecting an omission of setting of the English locale based on information on the identified subprocess and information on the identified test.
ソフトウェアのテストを実行し、ロケールが未設定であるサブプロセスを特定する特定部と、
テストの実行結果に基づいて、エラーとなったテストのうち出力結果が英語でないテストを特定し、特定部により特定されたサブプロセスの情報と特定されたテストの情報とに基づいて、英語ロケールの設定漏れを検出する検出部と
を有することを特徴とする検出装置。
a part for executing the software tests and identifying sub-processes for which the locale has not been set;
a detection unit that identifies tests that have an output result that is not in English among the tests that have resulted in an error based on the test execution results, and detects an omission of the English locale setting based on information on the sub-process identified by the identification unit and information on the identified test.
JP2020128950A 2020-07-30 2020-07-30 DETECTION PROGRAM, DETECTION METHOD, AND DETECTION APPARATUS Active JP7512742B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020128950A JP7512742B2 (en) 2020-07-30 2020-07-30 DETECTION PROGRAM, DETECTION METHOD, AND DETECTION APPARATUS

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020128950A JP7512742B2 (en) 2020-07-30 2020-07-30 DETECTION PROGRAM, DETECTION METHOD, AND DETECTION APPARATUS

Publications (2)

Publication Number Publication Date
JP2022025836A JP2022025836A (en) 2022-02-10
JP7512742B2 true JP7512742B2 (en) 2024-07-09

Family

ID=80264365

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020128950A Active JP7512742B2 (en) 2020-07-30 2020-07-30 DETECTION PROGRAM, DETECTION METHOD, AND DETECTION APPARATUS

Country Status (1)

Country Link
JP (1) JP7512742B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017102920A (en) 2015-12-01 2017-06-08 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Globalization testing management using set of globalization testing operations
JP2019530927A (en) 2016-09-20 2019-10-24 イングラム マイクロ インコーポレーテッド Automatic detection, correction and translation method for non-localized lines

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017102920A (en) 2015-12-01 2017-06-08 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Globalization testing management using set of globalization testing operations
JP2019530927A (en) 2016-09-20 2019-10-24 イングラム マイクロ インコーポレーテッド Automatic detection, correction and translation method for non-localized lines

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
IDS09-J. 適切なロケールを指定せずに、ロケール依存メソッドをロケール依存データに対して使用しない,JPCERT/CC [online],一般社団法人JPCERTコーディネーションセンター,2012年01月16日,https://www.jpcert.or.jp/java-rules/ids09-j.html [2024年5月23日検索]

Also Published As

Publication number Publication date
JP2022025836A (en) 2022-02-10

Similar Documents

Publication Publication Date Title
KR102497730B1 (en) Data processing method and apparatus, device and storage medium
CN113377586B (en) Automatic detection method and device for server and storage medium
CN102609275A (en) BIOS updating system and method thereof
EP3769222B1 (en) Testing kernel mode computer code by executing the computer code in user mode
US20190121717A1 (en) Dynamic, crowd-sourced error and crash resolution for computer programs
JP2015011372A (en) Debug support system, method, program, and recording medium
US20160266924A1 (en) Apparatus and method for identifying a virtual machine having changeable settings
WO2021101894A1 (en) Auto-recovery for software systems
CN112925524A (en) Method and device for detecting unsafe direct memory access in driver
JP2013045154A (en) Information processing apparatus, information processing system, abnormality sign detection method for information processing apparatus, and abnormality sign detection program
JP7512742B2 (en) DETECTION PROGRAM, DETECTION METHOD, AND DETECTION APPARATUS
CN106776219B (en) A method for detecting the burn-in of the whole server
KR20050016545A (en) System and method to determine a healthy group of processors and associated firmware for booting a system
JP7619063B2 (en) DETECTION APPARATUS, TEST SYSTEM, DETECTION METHOD, AND PROGRAM
KR102682746B1 (en) Apparatus and Method for Detecting Non-volatile Memory Attack Vulnerability
US7415560B2 (en) Method of automatically monitoring computer system debugging routine
CN116340031A (en) Computer system, method, and non-transitory computer readable medium for detecting deviation
CN119003225B (en) A fault location method and device, storage medium and computer program product
JP6731366B2 (en) Source code verification system
JP6724673B2 (en) Test support program, test support method, and test support device
CN102880476B (en) Bios version arranges system and method
CN112732481B (en) Processor exception repair method and device
JP2024003945A (en) Program modification device, program modification method, and program modification program
CN118606219A (en) Code defect identification method, electronic device and storage medium
JP2024013784A (en) Source code modification support device and source code modification support method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230407

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20240528

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240610

R150 Certificate of patent or registration of utility model

Ref document number: 7512742

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150