TW201421233A - System and method of testing motherboard - Google Patents

System and method of testing motherboard Download PDF

Info

Publication number
TW201421233A
TW201421233A TW101144071A TW101144071A TW201421233A TW 201421233 A TW201421233 A TW 201421233A TW 101144071 A TW101144071 A TW 101144071A TW 101144071 A TW101144071 A TW 101144071A TW 201421233 A TW201421233 A TW 201421233A
Authority
TW
Taiwan
Prior art keywords
test
project
program
process list
host
Prior art date
Application number
TW101144071A
Other languages
Chinese (zh)
Inventor
Xin-Qiao Tang
Original Assignee
Hon Hai Prec Ind Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hon Hai Prec Ind Co Ltd filed Critical Hon Hai Prec Ind Co Ltd
Publication of TW201421233A publication Critical patent/TW201421233A/en

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The present invention provides a method for testing motherboard which applies to a testing host. The method includes: presetting a testing order for each test item of an UUT (Unit Unter Test); calling an appropriate test program of a test item to test the motherboard according to the preset testing order; scanning a process list of the testing host to check whether the test program of the test item is running; scanning the process list to check whether the test program of the test item exits the process list; encrypting and writing a test result of the test item in a log file when the appropriate test program was ever running and already exited the process list. The present invention also provides a related system for testing motherboard. The present invention can be used to prevent falsifying the test result.

Description

主機板功能測試管控系統及方法Motherboard function test control system and method

本發明涉及一種主機板功能測試管控系統及方法。The invention relates to a motherboard test function control system and method.

目前的主機板測試常採用Linux系統平台,Linux系統崇尚軟體開源,有很多可以免費使用的共用性硬體測試軟體,因此在給主機板測試準備測試軟體時,為節省開發時間常有可能會加入一些免費的共用測試程式,用腳本將這些測試程式和自己開發的測試程式串聯起來。The current motherboard test often uses the Linux system platform. The Linux system advocates software open source. There are many shared hardware test software that can be used free of charge. Therefore, when testing the software for the motherboard test, it is often possible to save development time. Some free shared test programs use scripts to connect these test programs with their own test programs.

而為滿足工廠要求每個測試項都要有測試日誌文檔的要求,在工廠運行測試程式時,有時工廠操作員或測試工程師會手動遮罩某些測試程式,只保留寫入日誌文檔功能,或者手動拷貝偽造日誌文檔,逃避測試。顯然,這些測試行為極大地影響了主機板測試品質。In order to meet the factory requirements, each test item must have a test log document. When the test program is run in the factory, sometimes the factory operator or test engineer will manually mask some test programs, leaving only the log file function. Or manually copy the forged log file and evade the test. Obviously, these test behaviors greatly affect the quality of the motherboard test.

鑒於以上內容,有必要提供一種主機板功能測試管控系統及方法,可有效防止被測設備測試結果的作假行為發生。In view of the above, it is necessary to provide a motherboard test function control system and method, which can effectively prevent the fake behavior of the test result of the device under test.

所述主機板功能測試管控系統包括:預設模組,用於預設被測設備所要執行的測試專案的測試順序;調用模組,用於根據所預設的測試順序調用相應的測試程式進行測試;掃描模組,用於在啟動其中一項測試專案後掃描所述測試主機的進程列表以檢測該項測試專案的測試程式是否正在運行;所述掃描模組,還用於當該測試專案完成測試後,掃描所述測試主機的進程列表以檢測該測試專案的測試程式是否已退出該進程列表;及記錄模組,用於當該測試專案的測試程式有實際運行且該測試程式退出所述進程列表後,將該測試專案的測試結果加密並寫入到測試日誌文檔中。The function test and control system of the motherboard includes: a preset module for presetting a test sequence of a test project to be executed by the device under test; and a calling module for calling a corresponding test program according to the preset test sequence. a scan module, configured to scan a process list of the test host after detecting one of the test projects to detect whether the test program of the test project is running; the scan module is further used to test the project After the test is completed, the process list of the test host is scanned to detect whether the test program of the test project has exited the process list; and the recording module is used when the test program of the test project is actually running and the test program exits After the process list is described, the test result of the test project is encrypted and written into the test log document.

所述主機板功能測試管控方法包括:預設步驟,預設被測設備所要執行的測試專案的測試順序;調用步驟,根據所預設的測試順序調用相應的測試程式進行測試;第一掃描步驟,在啟動其中一項測試專案後掃描所述測試主機的進程列表以檢測該項測試專案的測試程式是否正在運行;第二掃描步驟,當該測試專案完成測試後,掃描所述測試主機的進程列表以檢測該測試專案的測試程式是否已退出該進程列表;及記錄步驟,當該測試專案的測試程式有實際運行且該測試程式退出所述進程列表後,將該測試專案的測試結果加密並寫入到測試日誌文檔中。The method for controlling and controlling the function of the motherboard includes: a preset step of presetting the test sequence of the test project to be executed by the device under test; and calling the step, calling the corresponding test program for testing according to the preset test sequence; the first scanning step Scanning a list of processes of the test host to detect whether the test program of the test project is running after starting one of the test projects; and a second scanning step of scanning the process of the test host after the test project completes the test The list is to detect whether the test program of the test project has exited the process list; and the recording step, when the test program of the test project is actually running and the test program exits the process list, the test result of the test project is encrypted and Write to the test log document.

相較於習知技術,所述主機板功能測試管控系統及方法,可有效防止被測設備測試結果的作假行為發生。Compared with the prior art, the motherboard functional test and control system and method can effectively prevent the fake behavior of the test result of the tested device from occurring.

如圖1所示,是本發明主機板功能測試管控系統的運行環境圖。在本實施例中,功能測試管控系統10運行於測試主機100中,用於管控UUT(Unit Under Test,被測設備)200上的各個功能性配件進行功能測試。所述測試主機100還包括記憶體20及處理器30。As shown in FIG. 1 , it is an operating environment diagram of the functional test and control system of the motherboard of the present invention. In this embodiment, the functional test management system 10 is operated in the test host 100 for controlling the functional tests of the various functional accessories on the UUT (Unit Under Test) 200. The test host 100 further includes a memory 20 and a processor 30.

本實施例中,所述UUT200可以為主機板或其他帶有功能性配件的電子裝置。當該UUT200為主機板時,其功能性配件包括,但不限於CPU、記憶體、硬碟等。In this embodiment, the UUT 200 can be a motherboard or other electronic device with a functional accessory. When the UUT 200 is a motherboard, its functional accessories include, but are not limited to, a CPU, a memory, a hard disk, and the like.

所述記憶體20可以用於儲存各種資料,例如儲存所述功能測試管控系統10的程式化代碼及用於記錄所述UUT 200的測試結果的測試日誌文檔。本實施例中,所述功能測試管控系統10可以劃分成一個或多個模組並由所述處理器30執行以完成本發明提供的功能。本實施例中,所述功能測試管控系統10包括預設模組11、調用模組12、掃描模組13、判斷模組14及記錄模組15(參閱圖2所示)。本發明所稱的模組是完成一特定功能的程式段,關於各模組的功能將在圖3的流程圖中具體描述。The memory 20 can be used to store various materials, such as a programmatic code for storing the functional test control system 10 and a test log file for recording test results of the UUT 200. In this embodiment, the functional test management system 10 can be divided into one or more modules and executed by the processor 30 to perform the functions provided by the present invention. In this embodiment, the function test management system 10 includes a preset module 11, a call module 12, a scan module 13, a determination module 14, and a record module 15 (see FIG. 2). The module referred to in the present invention is a program segment for performing a specific function, and the functions of each module will be specifically described in the flowchart of FIG.

如圖3所示,是本發明功能測試管控方法的較佳實施例的流程圖。3 is a flow chart of a preferred embodiment of the functional test management method of the present invention.

本實施例以對UUT 200上的CPU、記憶體、硬碟的功能測試為例進行說明,在其他實施例中,還可以對其他功能性配件如網卡的功能進行測試。This embodiment is described by taking the function test of the CPU, the memory, and the hard disk on the UUT 200 as an example. In other embodiments, the functions of other functional components such as the network card may also be tested.

步驟S1,預設模組11預設UUT 200所要執行的測試專案的測試順序。In step S1, the preset module 11 presets the test sequence of the test project to be executed by the UUT 200.

例如設置所述UUT 200所要執行的測試專案的測試順序依次為:CPU測試、記憶體測試、硬碟測試。For example, the test sequence of the test program to be executed by the UUT 200 is: CPU test, memory test, hard disk test.

步驟S2,調用模組12根據所預設的測試順序調用相應的測試程式進行具體測試。In step S2, the calling module 12 calls the corresponding test program to perform a specific test according to the preset test sequence.

舉例而言,假設在步驟S1中設置首先執行CPU測試,則所述調用模組12首先調用測試CPU的測試程式。For example, assuming that the CPU test is first executed in step S1, the calling module 12 first calls the test program of the test CPU.

需要說明的是,本實施例中,可以預先將各個測試程式按照相應的測試專案命名,並儲存到所述記憶體20中,例如將測試CPU的測試程式的檔案名設置為CPUtest.exe並儲存到所述記憶體20中,將測試記憶體的測試程式的檔案名設置為Memorytest.exe並儲存到所述記憶體20中,對於測試硬碟的測試程式則可以HDDtest.exe來命名並儲存於所述記憶體20中。而當需要調用相應的測試程式進行功能測試時,例如需要調用測試CPU的測試程式對CPU進行功能測試時,可按照測試程式的檔案名直接調用執行即可。It should be noted that, in this embodiment, each test program may be named in advance according to the corresponding test program, and stored in the memory 20, for example, the file name of the test program of the test CPU is set to CPUtest.exe and stored. In the memory 20, the file name of the test program of the test memory is set to Memorytest.exe and stored in the memory 20. The test program for testing the hard disk can be named and stored in HDDtest.exe. In the memory 20. When you need to call the corresponding test program for functional test, for example, you need to call the test program of the test CPU to perform functional test on the CPU, you can directly call the execution according to the file name of the test program.

步驟S3,掃描模組13在啟動某項測試專案後掃描所述測試主機100的進程列表以檢測所述測試專案的測試程式是否正在運行。In step S3, the scan module 13 scans the process list of the test host 100 after starting a test project to detect whether the test program of the test project is running.

具體地,所述掃描模組13掃描所述測試主機100的進程列表,並從中檢測是否存在按照該測試專案命名的測試程式,以判定該測試專案的測試程式是否正在運行。例如,當前啟動的測試項目為CPU測試,則掃描模組13掃描所述測試主機100的進程列表,查找該進程列表中是否出現命名為CPUtest.exe的測試程式。若查找的結果為有檔案名為CPUtest.exe的測試程式出現在進程列表中,則判定該測試CPU的測試程式正在運行。Specifically, the scanning module 13 scans the process list of the test host 100, and detects whether there is a test program named according to the test project to determine whether the test program of the test project is running. For example, if the currently started test item is a CPU test, the scan module 13 scans the process list of the test host 100 to find whether a test program named CPUtest.exe appears in the process list. If the result of the search is that the test program with the file name CPUtest.exe appears in the process list, it is determined that the test program of the test CPU is running.

若步驟S3中檢測的結果為當前啟動的測試專案正在運行,則執行步驟S4,否則結束流程。If the result of the detection in step S3 is that the currently started test project is running, step S4 is performed, otherwise the flow is ended.

步驟S4,判斷模組14判斷所述測試項目是否測試完成,若是則執行步驟S5,否則返回到步驟S3,掃描模組13繼續掃描進程列表以判斷該測試專案對應的測試程式是否仍在運行。In step S4, the determining module 14 determines whether the test item is tested. If yes, step S5 is performed. Otherwise, returning to step S3, the scanning module 13 continues to scan the process list to determine whether the test program corresponding to the test project is still running.

例如,當運行測試CPU的測試程式後,若得到CPU的測試結果則可判定該CPU測試完成,此時則執行步驟S5。For example, after running the test program of the test CPU, if the test result of the CPU is obtained, it can be determined that the CPU test is completed, and then step S5 is performed.

步驟S5,掃描模組13掃描所述測試主機100的進程列表以檢測該測試專案的測試程式是否已退出該進程列表,若是執行步驟S6,否則結束流程。In step S5, the scan module 13 scans the process list of the test host 100 to detect whether the test program of the test project has exited the process list. If the process proceeds to step S6, the process ends.

例如,當所述測試主機100的進程列表中不存在檔案名為CPUtest.exe的測試程式時,即可判斷所述測試CPU的測試程式已退出該進程列表。For example, when the test program named CPUtest.exe does not exist in the process list of the test host 100, it can be determined that the test program of the test CPU has exited the process list.

步驟S6,記錄模組15將所述測試專案的測試結果加密並寫入到測試日誌文檔中。In step S6, the recording module 15 encrypts and writes the test result of the test project into the test log document.

需要說明的是,本步驟中涉及的加密方法可以採用習知技術中的任意一種加密演算法,例如迴圈加密法。It should be noted that the encryption method involved in this step may adopt any encryption algorithm in the prior art, such as loop encryption.

步驟S7,判斷模組14判斷所述UUT 200中是否還有其他測試專案未完成,若是,執行步驟S2,否則結束流程。In step S7, the determining module 14 determines whether there are other test projects in the UUT 200 that are not completed. If yes, step S2 is performed, otherwise the process ends.

例如,當完成CPU測試後,若還需進行記憶體或硬碟的功能測試,流程則返回至步驟S2,由調用模組12根據預設的測試順序調用相應的測試程式進行測試。For example, after the CPU test is completed, if the function test of the memory or the hard disk is still required, the flow returns to step S2, and the calling module 12 calls the corresponding test program to perform the test according to the preset test sequence.

從本發明的整個流程執行步驟可以看出,本發明每啟動一個測試專案,就會掃描所述測試主機100的進程列表中是否有相應的測試程式在運行,也即判斷該測試項目是否正在運行,而當測試完成後,會再次掃描進程列表以判斷相應的測試程式是否已退出進程列表,及當測試程式有運行且運行後退出進程列表時,才將測試結果寫入到測試日誌文檔中。因此,本發明可確保各測試項目的測試結果是基於實際運行測試程式而得到的,有效防止測試結果的作假行為發生。It can be seen from the entire process execution steps of the present invention that each time a test project is started, the test program of the test host 100 is scanned for whether a corresponding test program is running, that is, whether the test project is running. When the test is completed, the process list is scanned again to determine whether the corresponding test program has exited the process list, and the test result is written to the test log file when the test program is run and exits the process list after running. Therefore, the present invention can ensure that the test results of each test item are obtained based on the actual running test program, and effectively prevent the fake behavior of the test result from occurring.

最後應說明的是,以上實施例僅用以說明本發明的技術方案而非限制,儘管參照較佳實施例對本發明進行了詳細說明,本領域的普通技術人員應當理解,可以對本發明的技術方案進行修改或等同替換,而不脫離本發明技術方案的精神和範圍。It should be noted that the above embodiments are only for explaining the technical solutions of the present invention and are not intended to be limiting, and the present invention will be described in detail with reference to the preferred embodiments. Modifications or equivalents are made without departing from the spirit and scope of the invention.

100...測試主機100. . . Test host

200...UUT200. . . UUT

10...功能測試管控系統10. . . Functional test control system

20...記憶體20. . . Memory

30...處理器30. . . processor

11...預設模組11. . . Preset module

12...調用模組12. . . Call module

13...掃描模組13. . . Scanning module

14...判斷模組14. . . Judging module

15...記錄模組15. . . Recording module

S1...預設測試專案的測試順序S1. . . Default test project test sequence

S2...根據所預設的測試順序調用相應的測試程式進行測試S2. . . Call the corresponding test program for testing according to the preset test sequence

S3...測試專案的測試程式是否正在運行?S3. . . Is the test program for the test project running?

S4...該測試專案是否測試完成?S4. . . Is the test project completed?

S5...該測試專案的測試程式是否已退出進程列表?S5. . . Has the test program of the test project exited the process list?

S6...將該測試專案的測試結果加密並寫入到測試日誌文檔S6. . . Encrypt the test results of the test project and write them to the test log document

S7...是否還有其他測試專案未完成?S7. . . Are there other test projects not completed?

圖1是本發明主機板功能測試管控系統的運行環境圖。1 is a diagram showing the operating environment of a functional test and control system for a motherboard of the present invention.

圖2是本發明主機板功能測試管控系統的功能模組圖。2 is a functional block diagram of a functional test and control system for a motherboard of the present invention.

圖3是本發明主機板功能測試管控方法的較佳實施例的流程圖。3 is a flow chart of a preferred embodiment of a method for controlling and testing a function of a motherboard of the present invention.

S1...預設測試專案的測試順序S1. . . Default test project test sequence

S2...根據所預設的測試順序調用相應的測試程式進行測試S2. . . Call the corresponding test program for testing according to the preset test sequence

S3...測試專案的測試程式是否正在運行?S3. . . Is the test program for the test project running?

S4...該測試專案是否測試完成?S4. . . Is the test project completed?

S5...該測試專案的測試程式是否已退出進程列表?S5. . . Has the test program of the test project exited the process list?

S6...將該測試專案的測試結果加密並寫入到測試日誌文檔S6. . . Encrypt the test results of the test project and write them to the test log document

S7...是否還有其他測試專案未完成?S7. . . Are there other test projects not completed?

Claims (6)

一種主機板功能測試管控系統,運行於測試主機,該系統包括:
預設模組,用於預設被測設備所要執行的測試專案的測試順序;
調用模組,用於根據所預設的測試順序調用相應的測試程式進行測試;
掃描模組,用於在啟動其中一項測試專案後掃描所述測試主機的進程列表以檢測該測試專案的測試程式是否正在運行;
所述掃描模組,還用於當該測試專案完成測試後,掃描所述測試主機的進程列表以檢測該測試專案的測試程式是否已退出該進程列表;及
記錄模組,用於當該測試專案的測試程式有實際運行且該測試程式退出所述進程列表後,將該測試專案的測試結果加密並寫入到測試日誌文檔中。
A motherboard functional test management system runs on a test host, the system comprising:
a preset module for presetting the test sequence of the test project to be executed by the device under test;
Calling a module for invoking a corresponding test program for testing according to a preset test sequence;
a scanning module, configured to scan a process list of the test host after starting one of the test projects to detect whether the test program of the test project is running;
The scanning module is further configured to: after the test project completes the test, scan a list of processes of the test host to detect whether the test program of the test project has exited the process list; and the recording module is used for the test After the project test program is actually running and the test program exits the process list, the test result of the test project is encrypted and written into the test log file.
如申請專利範圍第1項所述的主機板功能測試管控系統,所述測試專案的測試程式按照相應的測試專案命名並儲存在記憶體中。For example, in the motherboard functional test and control system described in claim 1, the test program of the test project is named according to the corresponding test project and stored in the memory. 如申請專利範圍第2項所述的主機板功能測試管控系統,所述掃描模組掃描所述測試主機的進程列表,並從該進程列表中檢測是否存在按照該測試專案命名的測試程式,從而檢測該測試專案的測試程式是否正在運行或已退出進程列表。The motherboard function test and control system according to claim 2, wherein the scan module scans a process list of the test host, and detects from the process list whether there is a test program named according to the test project, thereby Check if the test program of the test project is running or has exited the process list. 一種主機板功能測試管控方法,運用於測試主機,該方法包括:
預設步驟,預設被測設備所要執行的測試專案的測試順序;
調用步驟,根據所預設的測試順序調用相應的測試程式進行測試;
第一掃描步驟,在啟動其中一項測試專案後掃描所述測試主機的進程列表以檢測該測試專案的測試程式是否正在運行;
第二掃描步驟,當該測試專案完成測試後,掃描所述測試主機的進程列表以檢測該測試專案的測試程式是否已退出該進程列表;及
記錄步驟,當該測試專案的測試程式有實際運行且該測試程式退出所述進程列表後,將該測試專案的測試結果加密並寫入到測試日誌文檔中。
A method for controlling and controlling a motherboard function is applied to a test host, and the method includes:
a preset step of presetting the test sequence of the test project to be executed by the device under test;
Invoking the step, calling the corresponding test program according to the preset test sequence for testing;
a first scanning step of scanning a process list of the test host after starting one of the test projects to detect whether the test program of the test project is running;
a second scanning step, after the test project completes the test, scanning a list of processes of the test host to detect whether the test program of the test project has exited the process list; and recording the step, when the test program of the test project is actually running After the test program exits the process list, the test result of the test project is encrypted and written into the test log document.
如申請專利範圍第4項所述的主機板功能測試管控方法,所述測試專案的測試程式按照相應的測試專案命名並儲存在記憶體中。The method for controlling and controlling the motherboard function according to the fourth aspect of the patent application, wherein the test program of the test project is named according to the corresponding test project and stored in the memory. 如申請專利範圍第5項所述的主機板功能測試管控方法,於所述第一及第二掃描步驟掃描所述測試主機的進程列表,並從該進程列表中檢測是否存在按照該測試專案命名的測試程式,從而檢測該測試專案的測試程式是否正在運行或已退出進程列表。The method for controlling and controlling a motherboard function according to claim 5, wherein the first and second scanning steps scan a process list of the test host, and check whether the existence of the test program is named according to the test program. Test program to detect if the test program of the test project is running or has exited the process list.
TW101144071A 2012-11-21 2012-11-23 System and method of testing motherboard TW201421233A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210475412.1A CN103838651A (en) 2012-11-21 2012-11-21 Mainboard function test management and control system and method

Publications (1)

Publication Number Publication Date
TW201421233A true TW201421233A (en) 2014-06-01

Family

ID=50802179

Family Applications (1)

Application Number Title Priority Date Filing Date
TW101144071A TW201421233A (en) 2012-11-21 2012-11-23 System and method of testing motherboard

Country Status (2)

Country Link
CN (1) CN103838651A (en)
TW (1) TW201421233A (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105759785A (en) * 2016-02-16 2016-07-13 珠海格力电器股份有限公司 Test equipment control method and device
CN107590389B (en) * 2017-10-18 2020-09-11 北京奇虎科技有限公司 Security testing method and device, electronic equipment and computer storage medium
CN111193638A (en) * 2019-12-20 2020-05-22 曙光信息产业股份有限公司 Linux platform based network card automatic testing method and device
CN111506465A (en) * 2020-04-20 2020-08-07 北京易点淘网络技术有限公司 Computer function testing method and device
CN114020649B (en) * 2022-01-05 2022-08-02 锱云(上海)物联网科技有限公司 Quality inspection result verification method, system, test equipment and storage medium

Also Published As

Publication number Publication date
CN103838651A (en) 2014-06-04

Similar Documents

Publication Publication Date Title
US10691806B2 (en) Self-measuring nonvolatile memory device systems and methods
TWI575397B (en) Point-wise protection of application using runtime agent and dynamic security analysis
US8931102B2 (en) Testing web applications for file upload vulnerabilities
TWI541669B (en) Detection systems and methods for static detection applications, and computer program products
CN108763951B (en) Data protection method and device
TW201421233A (en) System and method of testing motherboard
US9201769B2 (en) Progressive black-box testing of computer software applications
US8015553B2 (en) Method and apparatus for testing execution flow of program
JP5832954B2 (en) Tag assignment device and tag assignment method
US20140201842A1 (en) Identifying stored security vulnerabilities in computer software applications
WO2019019713A1 (en) Method for detecting memory leak of application program, and terminal and readable storage medium
US11055416B2 (en) Detecting vulnerabilities in applications during execution
JP6023317B2 (en) Information processing apparatus and information processing method
US20160014123A1 (en) Apparatus and method for verifying integrity of applications
KR20210001057A (en) Method for detecting and blocking ransomware
US8732843B2 (en) Software validity period changing apparatus, method, and installation package
Peng et al. {GLeeFuzz}: Fuzzing {WebGL} Through Error Message Guided Mutation
CN107368713A (en) Protect the method and security component of software
JP6018344B2 (en) Dynamic reading code analysis apparatus, dynamic reading code analysis method, and dynamic reading code analysis program
KR101306656B1 (en) Apparatus and method for providing dynamic analysis information of malignant code
US20230222224A1 (en) System and method for analyzing and testing privacy of mobile applications
CN113569246B (en) Vulnerability detection method, vulnerability detection device, computer equipment and storage medium
KR20190062134A (en) Method and server for analyzing weak point through library injection
EP3848835B1 (en) Systems and methods for protecting against unauthorized memory dump modification
KR102310766B1 (en) Application Integrity Checking Method