Nothing Special   »   [go: up one dir, main page]

TWI425353B - System and method for simulating testing at command of mobile phone - Google Patents

System and method for simulating testing at command of mobile phone Download PDF

Info

Publication number
TWI425353B
TWI425353B TW98116274A TW98116274A TWI425353B TW I425353 B TWI425353 B TW I425353B TW 98116274 A TW98116274 A TW 98116274A TW 98116274 A TW98116274 A TW 98116274A TW I425353 B TWI425353 B TW I425353B
Authority
TW
Taiwan
Prior art keywords
command
request
state
mobile phone
module
Prior art date
Application number
TW98116274A
Other languages
Chinese (zh)
Other versions
TW201040716A (en
Inventor
Li-Hai Chen
Original Assignee
Chi Mei Comm Systems Inc
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 Chi Mei Comm Systems Inc filed Critical Chi Mei Comm Systems Inc
Priority to TW98116274A priority Critical patent/TWI425353B/en
Publication of TW201040716A publication Critical patent/TW201040716A/en
Application granted granted Critical
Publication of TWI425353B publication Critical patent/TWI425353B/en

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)
  • Telephonic Communication Services (AREA)

Description

類比手機AT命令測試的系統及方法 System and method for analog mobile phone AT command test

本發明涉及一種類比手機AT命令測試的系統及方法。 The invention relates to a system and method for analog phone AT command testing.

隨著移動通訊技術的發展及移動業務的不斷豐富,手機成為了人們日常生活中的必不可少的高科技產品,手機產業也越來越強大,競爭也越來越激烈,對於手機研發企業來說如何快速的開發出新型的、具備豐富軟體功能的手機,已經成為增強市場競爭力的重要砝碼。 With the development of mobile communication technology and the continuous enrichment of mobile services, mobile phones have become an indispensable high-tech product in people's daily life. The mobile phone industry is also becoming more and more powerful, and the competition is becoming more and more fierce. It is said that how to quickly develop a new type of mobile phone with rich software functions has become an important weight to enhance market competitiveness.

根據國際標準,手機終端在提供給手機應用程式服務時是透過AT命令(AT Commands)來完成,手機應用程式運行在終端設備(Terminal Equipment,TE)上,手機協定相關的程式運行在移動終端(Mobile Terminal,MT)上,TE透過終端適配器(Terminal Adapter,TA)與MT進行聯繫,其中TA提供給TE的服務即是AT命令。AT命令是非常有規律的介面,透過類比AT命令的行為可以使手機應用程式感覺到就是在真實的環境下運行,從而降低了類比機手機終端部分類比的複雜度。 According to international standards, the mobile terminal is provided by the AT commands when it is provided to the mobile application service. The mobile application runs on the terminal equipment (TE), and the mobile phone protocol related program runs on the mobile terminal ( On the Mobile Terminal (MT), the TE communicates with the MT through a Terminal Adapter (TA), wherein the service provided by the TA to the TE is an AT command. The AT command is a very regular interface. By analogizing the behavior of the AT command, the mobile application can feel that it is running in a real environment, thereby reducing the complexity of the analogy of the analog mobile terminal.

傳統的類比AT命令的方法是透過將一系列的AT命令固定的放在一個配置文檔中,當有手機應用程式提出AT命令的請求時,類比器根據請求的AT命令到配置文檔中查找到對應的條目,然後將事先 規定好的回應(response)發給手機應用程式。這種類比AT命令的方法需要TE的支援才能類比AT命令網路側行為,需要消耗大量的硬體成本。且傳統的類比方法只能對一整條AT命令進行比較和判斷,不能解析AT命令內部的參數,導致類比靈活度較低。 The traditional analog AT command method is to fix a series of AT commands in a configuration file. When a mobile application requests a AT command, the analog device finds the corresponding information in the configuration file according to the requested AT command. Entry will then be A stipulated response is sent to the mobile app. This analog-like AT command requires TE support to be analogous to AT-command network-side behavior and consumes a lot of hardware costs. Moreover, the traditional analogy method can only compare and judge an entire AT command, and cannot parse the internal parameters of the AT command, resulting in low analogity flexibility.

鑒於以上內容,有必要提供一種類比手機AT命令測試的系統及方法,可以有效類比手機AT命令的網路側行為。 In view of the above, it is necessary to provide a system and method for analog phone AT command test, which can effectively compare the network side behavior of the mobile phone AT command.

一種類比手機AT命令測試的系統,該系統運行於電腦上,該電腦包括需要測試的手機應用程式,並儲存有用於測試AT命令的AT腳本文檔,該系統包括:讀取模組,用於讀取AT腳本文檔中的一個AT狀態;執行模組,用於判斷所述AT狀態是主動請求的AT狀態還是非主動請求的AT狀態,若該AT狀態是非主動請求的AT狀態,所述執行模組執行該非主動請求的AT狀態中的內容,若該AT狀態是主動請求的AT狀態,該執行模組等待手機應用程式的AT命令請求;通信模組,用於接收來自手機應用程式發送的AT命令請求;請求管理模組,用於接收通信模組發送的AT命令請求,並將該AT命令請求轉換為AT腳本文檔所識別的環境變數;所述執行模組,還用於根據該轉換後的AT命令請求執行所述主動請求的AT狀態,生成該AT命令請求的AT命令回應;及所述通信模組,還用於將上述AT命令回應回饋給所述手機應用程式。 A system similar to the mobile phone AT command test, the system running on a computer, the computer includes a mobile phone application to be tested, and an AT script document for testing the AT command, the system includes: a read module for Reading an AT state in the AT script document; executing an module, configured to determine whether the AT state is an actively requested AT state or an inactively requested AT state, and if the AT state is an inactively requested AT state, the performing The module executes the content in the AT state of the inactive request. If the AT state is an actively requested AT state, the execution module waits for an AT command request of the mobile application, and the communication module is configured to receive the sending from the mobile application. An AT command request; a request management module, configured to receive an AT command request sent by the communication module, and convert the AT command request into an environment variable identified by the AT script document; the execution module is further configured to perform the conversion according to the a subsequent AT command requesting execution of the AT state of the active request, generating an AT command response requested by the AT command; and the communication module is further configured to respond to the AT command Feedback to the mobile app.

一種類比手機AT命令測試的方法,該方法應用在電腦上,該方法包括如下步驟:(a)讀取AT腳本文檔中的一個AT狀態;(b)若該AT狀態是非主動請求狀態,則執行該非主動請求的AT狀態中的內容;(c)若該AT狀態是主動請求的AT狀態,則等待手機應用 程式發送AT命令請求;(d)接收手機應用程式發送的AT命令請求,將所述AT命令請求轉換為AT腳本文檔所識別的環境變數;(e)根據轉換後的AT命令請求執行所述主動請求的AT狀態,生成該AT命令請求的AT命令回應;及(f)將上述AT命令回應回饋給所述手機應用程式。 A method for analog phone AT command testing, the method being applied to a computer, the method comprising the steps of: (a) reading an AT state in an AT script document; (b) if the AT state is an inactive request state, Executing the content in the AT state of the inactive request; (c) waiting for the mobile phone application if the AT state is the actively requested AT state The program sends an AT command request; (d) receives an AT command request sent by the mobile phone application, converts the AT command request into an environment variable identified by the AT script document; (e) executes the initiative according to the converted AT command request The requested AT state, generating an AT command response requested by the AT command; and (f) feeding back the AT command response to the mobile application.

相較於習知技術,所述類比手機AT命令測試的系統及方法,不需要TE的支援,對AT命令網路側行為進行類比,節約了成本。且能夠解析所類比的AT命令中的參數,提高類比靈活度。 Compared with the prior art, the system and method for analog phone AT command testing does not require TE support, and analogizes the behavior of the AT command network side, thereby saving cost. And can parse the parameters in the analog AT command to improve the analogity flexibility.

1‧‧‧電腦 1‧‧‧ computer

100‧‧‧類比AT命令測試的系統 100‧‧‧Classical system tested by AT command

101‧‧‧手機應用程式 101‧‧‧Mobile app

10‧‧‧讀取模組 10‧‧‧Reading module

12‧‧‧執行模組 12‧‧‧Execution module

14‧‧‧通信模組 14‧‧‧Communication module

16‧‧‧請求管理模組 16‧‧‧Request Management Module

圖1係本發明類比手機AT命令測試的系統較佳實施例之架構圖。 1 is a block diagram of a preferred embodiment of a system for analog AT-command testing of the present invention.

圖2係本發明類比手機AT命令測試的方法較佳實施例之方法流程圖。 2 is a flow chart of a method of a preferred embodiment of the method for testing AT-like mobile phone commands of the present invention.

如圖1所示,係本發明類比手機AT命令測試的系統較佳實施例之架構圖。該類比AT命令測試的系統100運行於電腦1上,該電腦1還包括手機應用程式101,本較佳實施例中,該手機應用程式101是指短消息、電話控制程式等。該手機應用程式101向所述類比AT命令測試的系統100發送AT命令請求,該AT命令請求包括發送短信請求,撥打電話請求等。 As shown in FIG. 1, it is an architectural diagram of a preferred embodiment of the system of the present invention analog phone AT command test. The system 100 of the analog AT test runs on the computer 1. The computer 1 further includes a mobile phone application 101. In the preferred embodiment, the mobile application 101 refers to a short message, a telephone control program, and the like. The mobile phone application 101 sends an AT command request to the system 100 that is analogous to the AT command test, the AT command request including a send SMS request, a call request, and the like.

所述類比AT命令測試的系統100儲存有用於測試AT命令的AT腳本文檔,本較佳實施例中,所述AT腳本文檔採用可擴展標記語言(Extensible Markup Langue,XML)來描述。 The system 100 of the analog AT command test stores an AT script document for testing an AT command. In the preferred embodiment, the AT script document is described by an Extensible Markup Language (XML).

所述的AT腳本文檔,由若干AT狀態組成,一個AT狀態包含完成一 次AT命令請求的所有必要的資訊,即包括主動請求、非主動請求和中間回應所需要的所有必要的資訊。所述的AT狀態分為主動請求的AT狀態和非主動請求的AT狀態,對於屬於主動請求的AT狀態只有在手機應用程式101發出AT命令時才會被執行,對於屬於非主動請求的AT狀態,則無需手機應用程式的請求進行觸發即會被執行。 The AT script document is composed of a plurality of AT states, and an AT state includes a completion one. All necessary information requested by the secondary AT command, including all necessary information required for the active request, the inactive request, and the intermediate response. The AT state is divided into an active request AT state and an inactive request AT state, and the AT state belonging to the active request is only executed when the mobile phone application 101 issues an AT command, and the AT state belongs to the inactive request. , will be executed without triggering the request from the mobile app.

所述的AT狀態由若干節點組成,透過這些節點完成對AT命令請求回應內容的規定和狀態邏輯的判斷,從而回應AT命令的請求。所述的節點透過特定的標籤標識起始和結束。例如:標籤STATE表示AT狀態標識節點,RESPONSE表示回應節點,IF表示判斷節點等。 The AT state is composed of a plurality of nodes, and the determination of the content of the AT command request response and the state logic are completed through these nodes, thereby responding to the request of the AT command. The node identifies the start and end through a specific tag. For example, the label STATE represents the AT status identification node, the RESPONSE represents the response node, and the IF represents the judgment node.

每個手機應用程式101對應一個腳本文檔,多個手機應用程式101也可以對應一個腳本文檔。所述AT腳本文檔包括AT命令請求對應的腳本文檔及回應該AT命令請求的腳本文件。 Each mobile application 101 corresponds to a script document, and the plurality of mobile applications 101 can also correspond to a script document. The AT script document includes a script file corresponding to the AT command request and a script file corresponding to the AT command request.

該類比AT命令測試的系統100包括若干個功能模組從而完成類比AT命令的測試。所述模組是具有特定功能的軟體程式段,該軟體儲存於電腦可讀儲存介質或其他儲存設備,可被電腦或其他包含處理器的計算裝置執行。所述類比AT命令測試的系統100包括:讀取模組10、執行模組12、通信模組14及請求管理模組16。 The system 100 of the analog AT command test includes a plurality of functional modules to perform the test of the analog AT command. The module is a software program having a specific function, and the software is stored in a computer readable storage medium or other storage device and can be executed by a computer or other computing device including the processor. The analog 100 command test system 100 includes a read module 10, an execution module 12, a communication module 14, and a request management module 16.

讀取模組10用於手機應用程式讀取AT腳本文檔中的一個AT狀態,並將讀取的AT狀態和該AT狀態所包含的節點儲存在鏈表樹的資料結構中。該讀取模組10還用於判斷所述AT腳本文檔中是否存在尚未讀取的AT狀態。若所述AT腳本文檔中存在沒有讀取的AT狀態,則讀取下一個AT狀態。 The reading module 10 is configured for the mobile phone application to read an AT state in the AT script document, and store the read AT state and the node included in the AT state in a data structure of the linked list tree. The reading module 10 is further configured to determine whether there is an AT state that has not been read in the AT script document. If there is an AT state that is not read in the AT script document, the next AT state is read.

執行模組12用於從所述鏈表樹的資料結構中獲取一個AT狀態並執行該AT狀態。當執行模組12執行完畢一個AT狀態後從所述鏈表樹中獲取下一個AT狀態。所述執行AT狀態是指該執行模組12透過解釋AT腳本中所描述的節點,根據AT腳本中的標籤生成AT命令回應的過程。 The execution module 12 is configured to acquire an AT state from the data structure of the linked list tree and execute the AT state. When the execution module 12 completes an AT state, the next AT state is obtained from the linked list tree. The execution of the AT state refers to a process in which the execution module 12 generates an AT command response according to a tag in the AT script by interpreting the node described in the AT script.

所述執行模組12還用於判斷所獲取的AT狀態是主動請求的AT狀態還是非主動請求的AT狀態。若所獲取的AT狀態是非主動請求的AT狀態,則所述執行模組12立即執行該AT狀態中的內容。若所獲取的AT狀態是主動請求的AT狀態時,所述執行模組12等待手機應用程式101的AT命令請求。 The execution module 12 is further configured to determine whether the acquired AT state is an actively requested AT state or an inactively requested AT state. If the acquired AT state is an AT state that is not actively requested, the execution module 12 immediately executes the content in the AT state. If the acquired AT state is an actively requested AT state, the execution module 12 waits for an AT command request from the mobile phone application 101.

所述通信模組14完成與手機應用程式101的底層通信,也即接收來自手機應用程式101發送的AT命令請求,並將該AT命令請求發送給請求管理模組16;接收來自執行模組12的AT命令回應並發送給手機應用程式101。該通信模組14一次可以接收一行或者多行AT命令請求,並逐行將AT命令請求發送給請求管理模組16或者將AT命令回應逐行發送給手機應用程式101。 The communication module 14 completes the underlying communication with the mobile phone application 101, that is, receives the AT command request sent from the mobile phone application 101, and sends the AT command request to the request management module 16; the receiving from the execution module 12 The AT command responds and sends it to the mobile app 101. The communication module 14 can receive one or more rows of AT command requests at a time, and send the AT command request to the request management module 16 line by line or send the AT command response to the mobile phone application 101 line by line.

所述請求管理模組16用於在記憶體建立一個佇列,按照一個AT命令請求為一個佇列單位將該AT命令請求放入該佇列的一端,並以同樣大小的佇列單位從該佇列的另一端讀取一個AT命令請求。該AT命令請求被讀取後,將從該佇列中刪除。 The request management module 16 is configured to create a queue in the memory, request the AT command to be placed into one end of the queue for an array unit according to an AT command, and use the same size queue unit from the The other end of the queue reads an AT command request. After the AT command request is read, it will be deleted from the queue.

該請求管理模組16從佇列中讀取一個AT命令請求後,將該AT命令請求轉換為AT腳本文檔所識別的環境變數。本較佳實施例中,AT腳本文檔的環境變數的格式為%加上正整數的方式。舉例來說,若該請求管理模組16從佇列中獲取的AT命令請求中的一條設置命 令為:ATCMD=P1,P2,P3,其中,ATCMD為命令名,“=”為設置命令的標誌符號,“P1”、“P2”及“P3”為所設置的參數,“,”為參數分隔符號。所述命令名轉換為環境變數對應於“%0”,參數“P1”、“P2”及“P3”轉換為環境變數後分別對應於“%1”,“%2”及“%3”。 The request management module 16 converts the AT command request into an environment variable identified by the AT script document after reading an AT command request from the queue. In the preferred embodiment, the format of the environment variable of the AT script document is % plus a positive integer. For example, if the request management module 16 sets a command from one of the AT command requests obtained from the queue Let: ATCMD=P1, P2, P3, where ATCMD is the command name, “=” is the glyph of the set command, “P1”, “P2” and “P3” are the set parameters, “,” is the parameter. Separation symbol. The command name is converted to an environment variable corresponding to "%0", and the parameters "P1", "P2", and "P3" are converted to environment variables and respectively correspond to "%1", "%2", and "%3".

該請求管理模組16還用於判斷轉換後的AT命令請求是否與所述AT狀態的內容對應。若當前AT狀態的內容是撥打電話的腳本文檔,但是所轉換後的AT命令請求為發送短信的請求,則該請求管理模組16判斷的結果為該轉換後的AT命令請求與所述AT狀態的內容不對應。 The request management module 16 is further configured to determine whether the converted AT command request corresponds to the content of the AT state. If the content of the current AT state is a script document for making a call, but the converted AT command requests a request for sending a short message, the result of the request management module 16 determining is the converted AT command request and the AT state. The content does not correspond.

所述通信模組14還用於當判斷的結果為轉換後的AT命令請求與所述AT狀態的內容不對應時,發送提示錯誤資訊至手機應用程式101,通知無法回應該手機應用程式101。 The communication module 14 is further configured to: when the result of the determination is that the converted AT command request does not correspond to the content of the AT state, send the prompt error information to the mobile phone application 101, and notify that the mobile phone application 101 cannot be returned.

當判斷的結果為轉換後的AT命令請求與所述AT狀態的內容對應時,所述執行模組12執行該AT狀態的內容,生成所述AT命令請求的AT命令回應,並將該AT命令回應發送給通信模組14,該通信模組14將所述AT命令回應回饋給所述手機應用程式101。 When the result of the determination is that the converted AT command request corresponds to the content of the AT state, the execution module 12 executes the content of the AT state, generates an AT command response requested by the AT command, and generates the AT command. The response is sent to the communication module 14, and the communication module 14 feeds back the AT command response to the mobile phone application 101.

如圖2所示,係本發明類比手機AT命令測試的方法較佳實施例之方法流程圖。 As shown in FIG. 2, it is a flowchart of a method for a preferred embodiment of the method for testing an AT analog command of the present invention.

步驟S30,讀取模組10讀取AT腳本文檔中的一個AT狀態,並將讀取的AT狀態和該AT狀態所包含的節點儲存在鏈表樹的資料結構中。 In step S30, the reading module 10 reads an AT state in the AT script document, and stores the read AT state and the node included in the AT state in the data structure of the linked list tree.

步驟S31,執行模組12從所述鏈表樹的資料結構中獲取一個AT狀 態,判斷該AT狀態是主動請求的AT狀態還是非主動請求的AT狀態。若所讀取的AT狀態是非主動請求的AT狀態時,進入步驟S32;若所讀取的AT狀態是主動請求的AT狀態,則進入步驟S34。 Step S31, the execution module 12 acquires an AT shape from the data structure of the linked list tree. State, determine whether the AT state is an actively requested AT state or an inactively requested AT state. If the read AT state is the AT state of the inactive request, the process proceeds to step S32; if the read AT state is the actively requested AT state, the process proceeds to step S34.

步驟S32,所述執行模組12執行該非主動請求的AT狀態中的內容,並進入步驟S33。 In step S32, the execution module 12 executes the content in the AT state of the inactive request, and proceeds to step S33.

步驟S33,所述讀取模組10判斷所述AT腳本文檔中是否存在尚未讀取的AT狀態。若所述AT腳本文檔中的AT狀態已經讀取完畢,則結束流程。若所述AT腳本文檔中存在沒有讀取的AT狀態,則轉至步驟S30。 In step S33, the reading module 10 determines whether there is an AT state that has not been read in the AT script document. If the AT state in the AT script document has been read, the process ends. If there is an AT state that is not read in the AT script document, the process goes to step S30.

步驟S34,通信模組14接收手機應用程式101所發送的AT命令請求,請求管理模組16將所接收的AT命令請求放入由請求管理模組16創建的佇列的一端。 In step S34, the communication module 14 receives the AT command request sent by the mobile phone application 101, and the request management module 16 places the received AT command request into one end of the queue created by the request management module 16.

步驟S35,所述請求管理模組16從該佇列的另一端獲取AT命令請求,將該AT命令請求轉換為AT腳本文檔所識別的環境變數。本較佳實施例中,AT腳本文檔的環境變數的格式為%加上正整數的方式。舉例來說,若該請求管理模組16從佇列中獲取的AT命令請求中的一條設置命令為:ATCMD=P1,P2,P3,其中,ATCMD為命令名,“=”為設置命令的標誌符號,“P1”,“P2”及“P3”為所設置的參數,“,”為參數分隔符號。所述命令名轉換為環境變數對應於“%0”,參數“P1”、“P2”及“P3”轉換為環境變數後分別對應於“%1”、“%2”及“%3”。 In step S35, the request management module 16 acquires an AT command request from the other end of the queue, and converts the AT command request into an environment variable identified by the AT script document. In the preferred embodiment, the format of the environment variable of the AT script document is % plus a positive integer. For example, if the request management module 16 selects one of the AT command requests obtained from the queue: ATCMD=P1, P2, P3, where ATCMD is the command name, and “=” is the flag of the set command. Symbols, "P1", "P2" and "P3" are the parameters set, and "," is the parameter separator. The command name is converted to an environment variable corresponding to "%0", and the parameters "P1", "P2", and "P3" are converted to environment variables and respectively correspond to "%1", "%2", and "%3".

步驟S36,該請求管理模組16判斷轉換後的AT命令請求是否與上述主動請求的AT狀態的內容對應。若當前AT狀態的內容是撥打電 話的腳本文檔,但是所轉換後的AT命令請求為發送短信的請求,則該請求管理模組16判斷的結果為該轉換後的AT命令請求與所述AT狀態的內容不對應,直接進入步驟S37。若轉換後的AT命令請求與所述AT狀態的內容對應,則進入步驟S38。 In step S36, the request management module 16 determines whether the converted AT command request corresponds to the content of the actively requested AT state. If the current AT status is dialed If the converted AT command requests a request to send a short message, the request management module 16 determines that the converted AT command request does not correspond to the content of the AT state, and directly enters the step. S37. If the converted AT command request corresponds to the content of the AT state, the process proceeds to step S38.

步驟S37,所述通信模組14發送提示錯誤資訊至手機應用程式101,通知無法回應該手機應用程式101,並轉至步驟S35,執行下一個AT命令請求。 In step S37, the communication module 14 sends a prompt error message to the mobile phone application 101, notifying that the mobile phone application 101 cannot be returned, and proceeds to step S35 to execute the next AT command request.

步驟S38,所述執行模組12執行該主動請求的AT狀態的內容,生成所述AT命令請求的AT命令回應,發送該AT命令回應至通信模組14。 In step S38, the execution module 12 executes the content of the AT status of the active request, generates an AT command response requested by the AT command, and sends the AT command response to the communication module 14.

步驟S39,所述通信模組14將所述AT命令回應回饋給所述手機應用程式101,並轉至步驟S33。 In step S39, the communication module 14 feeds back the AT command response to the mobile phone application 101, and proceeds to step S33.

需要指出的是,以上步驟S30至步驟S32與步驟S34至步驟S35之間沒有先後順序,所述執行步驟S30至步驟S32的進程與執行步驟S34至步驟S35的進程為相互獨立的。 It should be noted that there is no sequence between the above steps S30 to S32 and the steps S34 to S35, and the processes of the steps S30 to S32 are independent of the processes of the steps S34 to S35.

以上所述僅為本發明之較佳實施例而已,且已達廣泛之使用功效,凡其他未脫離本發明所揭示之精神下所完成之均等變化或修飾,均應包含在下述之申請專利範圍內。 The above is only the preferred embodiment of the present invention, and has been used in a wide range of applications. Any other equivalent changes or modifications which are not departing from the spirit of the present invention should be included in the following claims. Inside.

1‧‧‧電腦 1‧‧‧ computer

100‧‧‧類比AT命令測試的系統 100‧‧‧Classical system tested by AT command

101‧‧‧手機應用程式 101‧‧‧Mobile app

10‧‧‧讀取模組 10‧‧‧Reading module

12‧‧‧執行模組 12‧‧‧Execution module

14‧‧‧通信模組 14‧‧‧Communication module

16‧‧‧請求管理模組 16‧‧‧Request Management Module

Claims (10)

一種類比手機AT命令測試的系統,該系統運行於電腦上,該電腦包括需要測試的手機應用程式,並儲存有用於測試AT命令的AT腳本文檔,該系統包括:讀取模組,用於讀取AT腳本文檔中的一個AT狀態;執行模組,用於判斷所述AT狀態是主動請求的AT狀態還是非主動請求的AT狀態,若該AT狀態是非主動請求的AT狀態,所述執行模組執行該非主動請求的AT狀態中的內容,若該AT狀態是主動請求的AT狀態,該執行模組等待手機應用程式的AT命令請求;通信模組,用於接收來自手機應用程式發送的AT命令請求;請求管理模組,用於接收通信模組發送的AT命令請求,並將該AT命令請求轉換為AT腳本文檔所識別的環境變數對應的AT命令請求;所述執行模組,還用於根據該轉換後的AT命令請求執行所述主動請求的AT狀態,生成該AT命令請求的AT命令回應;及所述通信模組,還用於將上述AT命令回應回饋給所述手機應用程式。 A system similar to the mobile phone AT command test, the system running on a computer, the computer includes a mobile phone application to be tested, and an AT script document for testing the AT command, the system includes: a read module for Reading an AT state in the AT script document; executing an module, configured to determine whether the AT state is an actively requested AT state or an inactively requested AT state, and if the AT state is an inactively requested AT state, the performing The module executes the content in the AT state of the inactive request. If the AT state is an actively requested AT state, the execution module waits for an AT command request of the mobile application, and the communication module is configured to receive the sending from the mobile application. The AT command request; the request management module is configured to receive the AT command request sent by the communication module, and convert the AT command request into an AT command request corresponding to the environment variable identified by the AT script document; And configured to generate an AT command response of the AT request according to the converted AT command request, and generate the AT command response of the AT command request; and the communication module is further used to The above AT command response is fed back to the mobile application. 如申請專利範圍第1項所述之類比手機AT命令測試的系統,所述通信模組將所述AT命令請求逐行發送給請求管理模組,且將AT命令回應逐行發送給手機應用程式。 For example, in the system of the mobile phone AT command test described in claim 1, the communication module sends the AT command request to the request management module line by line, and sends the AT command response to the mobile phone application line by line. . 如申請專利範圍第1項所述之類比手機AT命令測試的系統,所述請求管理模組還用於建立一個佇列,將接收的AT命令請求放入該佇列的一端,並從該佇列的另一端獲取AT命令請求。 For example, in the system of the mobile phone AT command test described in claim 1, the request management module is further configured to establish a queue, and place the received AT command request into one end of the queue, and from the The other end of the column gets the AT command request. 如申請專利範圍第1項所述之類比手機AT命令測試的系統,所述請求管理模組還用於判斷轉換後的AT命令請求是否與所述主動請求的AT狀態的內 容對應;及當判斷的結果為轉換後的AT命令請求與所述主動請求的AT狀態的內容不對應時,所述通信模組還用於發送提示錯誤資訊至手機應用程式,通知無法回應該手機應用程式。 The system for testing the mobile phone AT command according to the first aspect of the patent application, wherein the request management module is further configured to determine whether the converted AT command request is within the AT state of the active request. Corresponding; and when the result of the judgment is that the converted AT command request does not correspond to the content of the AT status of the active request, the communication module is further configured to send a prompt error message to the mobile application, and the notification cannot be responded to Mobile app. 如申請專利範圍第1所述之類比手機AT命令測試的系統,所述讀取模組還用於判斷所述AT腳本文檔中是否存在尚未讀取的AT狀態,若該AT腳本文檔中存在還沒有讀取的AT狀態,則繼續讀取其中的一個AT狀態。 The reading module is further configured to determine whether there is an AT state that has not been read in the AT script document, if the AT script file exists in the AT script document. If there is no read AT state, then continue to read one of the AT states. 一種類比手機AT命令測試的方法,該方法應用在電腦上,該方法包括如下步驟:(a)讀取AT腳本文檔中的一個AT狀態;(b)若該AT狀態是非主動請求的AT狀態,則執行該非主動請求的AT狀態中的內容;(c)若該AT狀態是主動請求的AT狀態,則等待手機應用程式發送AT命令請求;(d)接收手機應用程式發送的AT命令請求,將所述AT命令請求轉換為AT腳本文檔所識別的環境變數對應的AT命令請求;(e)根據轉換後的AT命令請求執行所述主動請求的AT狀態,生成該AT命令請求的AT命令回應;及(f)將上述AT命令回應回饋給所述手機應用程式。 An analog phone AT command test method, the method is applied to a computer, the method comprising the steps of: (a) reading an AT state in an AT script document; (b) if the AT state is an AT state of an inactive request And executing the content in the AT state of the inactive request; (c) waiting for the mobile application to send the AT command request if the AT state is the actively requested AT state; (d) receiving the AT command request sent by the mobile application, Converting the AT command request into an AT command request corresponding to an environment variable identified by the AT script document; (e) executing an AT state of the active request according to the converted AT command request, and generating an AT command response of the AT command request And (f) giving back the above AT command response to the mobile application. 如申請專利範圍第6項所述之類比手機AT命令測試的方法,所述AT命令回應是逐行發送給手機應用程式的。 The method for testing the AT command of the mobile phone as described in claim 6 of the patent scope, the AT command response is sent to the mobile phone application line by line. 如申請專利範圍第6項所述之類比手機AT命令測試的方法,在步驟(d)還包括:建立一個佇列,將接收的AT命令請求放入該佇列的一端,並從該佇列的另一端獲取AT命令請求。 The method for testing the mobile phone AT command according to the sixth aspect of the patent application, in the step (d), further comprising: establishing a queue, placing the received AT command request at one end of the queue, and from the queue The other end gets the AT command request. 如申請專利範圍第6所述之類比手機AT命令測試的方法,在步驟(d)之 後還包括:判斷轉換後的AT命令請求是否與所述主動請求的AT狀態的內容對應;及當判斷的結果為轉換後的AT命令請求與所述主動請求的AT狀態的內容不對應時,發送提示錯誤資訊至手機應用程式,通知無法回應該手機應用程式。 The method of testing the analog AT command of the mobile phone as described in claim 6 is in step (d) The method further includes: determining whether the converted AT command request corresponds to the content of the AT status of the active request; and when the result of the determination is that the converted AT command request does not correspond to the content of the actively requested AT state, Send a notification error message to the mobile app, the notification can't respond to the phone app. 如申請專利範圍第6所述之類比手機AT命令測試的方法,在步驟(b)和步驟(f)之後還包括:判斷所述AT腳本文檔中是否存在尚未讀取的AT命令請求;若該AT腳本文檔中存在還沒有讀取的AT狀態,則轉至步驟(a);及若該AT腳本文檔中不存在還沒有讀取的AT狀態,則結束流程。 The method for testing the mobile phone AT command according to the sixth aspect of the patent application, after the step (b) and the step (f), further comprising: determining whether there is an AT command request that has not been read in the AT script document; If there is an AT state that has not been read in the AT script document, the process goes to step (a); and if there is no AT state that has not been read in the AT script document, the process ends.
TW98116274A 2009-05-15 2009-05-15 System and method for simulating testing at command of mobile phone TWI425353B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW98116274A TWI425353B (en) 2009-05-15 2009-05-15 System and method for simulating testing at command of mobile phone

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW98116274A TWI425353B (en) 2009-05-15 2009-05-15 System and method for simulating testing at command of mobile phone

Publications (2)

Publication Number Publication Date
TW201040716A TW201040716A (en) 2010-11-16
TWI425353B true TWI425353B (en) 2014-02-01

Family

ID=44996045

Family Applications (1)

Application Number Title Priority Date Filing Date
TW98116274A TWI425353B (en) 2009-05-15 2009-05-15 System and method for simulating testing at command of mobile phone

Country Status (1)

Country Link
TW (1) TWI425353B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6826259B2 (en) * 2000-12-19 2004-11-30 Tektronix International Sales Gmbh Method for emulating a terminal and test apparatus for testing a telecommunication network
TW200643709A (en) * 2005-06-02 2006-12-16 Mediatek Inc Methods and systems for cross-platform message exchange
TW200805057A (en) * 2006-03-03 2008-01-16 Ericsson Telefon Ab L M Improved subscriber identity module (SIM) application toolkit test method and system
CN101340671A (en) * 2008-08-07 2009-01-07 北京天碁科技有限公司 Inquiry method and system for AT command

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6826259B2 (en) * 2000-12-19 2004-11-30 Tektronix International Sales Gmbh Method for emulating a terminal and test apparatus for testing a telecommunication network
TW200643709A (en) * 2005-06-02 2006-12-16 Mediatek Inc Methods and systems for cross-platform message exchange
TW200805057A (en) * 2006-03-03 2008-01-16 Ericsson Telefon Ab L M Improved subscriber identity module (SIM) application toolkit test method and system
CN101340671A (en) * 2008-08-07 2009-01-07 北京天碁科技有限公司 Inquiry method and system for AT command

Also Published As

Publication number Publication date
TW201040716A (en) 2010-11-16

Similar Documents

Publication Publication Date Title
CN110300050B (en) Message pushing method and device, computer equipment and storage medium
CN111083225B (en) Data processing method and device in Internet of things platform and Internet of things platform
CN106648940B (en) Remote procedure calling method and device
WO2020233369A1 (en) Method for improving software integration system on basis of simulated port, and related device
CN104579822B (en) Mobile application automated performance testing system and method based on Http agreements
CN110532169A (en) Interface testing case generation method, device, computer equipment and storage medium
CN103442126A (en) Mobile phone communication method and system based on cloud service
CN112069034B (en) Fast application exception handling method and device, electronic equipment and storage medium
CN104239426A (en) System and method for realizing cross-platform document reading
WO2022179034A1 (en) Automatic testing method and apparatus, electronic device, and storage medium
WO2021088520A1 (en) Network data analysis method, functional entity and electronic device
CN111061464B (en) Analysis code generation method, device, equipment and storage medium
CN101930439B (en) The Website processing device of the various model mobile phone of a kind of adaptation and application thereof
CN112000566B (en) Method and device for generating test cases
CN111556158A (en) Access method, access device, access equipment and storage medium of Internet of things platform
CN112087354A (en) Communication protocol testing method and device, electronic equipment and storage medium
CN103746879A (en) Testing system and method for consistency of IPv6 (Internet Protocol Version 6) protocol
WO2021197183A1 (en) Path recognition method, device and system
CN110224972A (en) One kind is towards multi-protocols polymorphic type equipment access system, method and device
WO2015188529A1 (en) Method and system for managing embedded monitoring device
CN112131095B (en) Pressure testing method and device
CN109788251B (en) Video processing method, device and storage medium
CN106937240A (en) A kind of method and apparatus for obtaining resource
CN107357792B (en) Data analysis method and device
TWI425353B (en) System and method for simulating testing at command of mobile phone

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees