CN115686268B - Testing method and device suitable for various touch panels - Google Patents

Testing method and device suitable for various touch panels Download PDF

Info

Publication number
CN115686268B
CN115686268B CN202211712326.8A CN202211712326A CN115686268B CN 115686268 B CN115686268 B CN 115686268B CN 202211712326 A CN202211712326 A CN 202211712326A CN 115686268 B CN115686268 B CN 115686268B
Authority
CN
China
Prior art keywords
test
touch panel
executor
resource file
testing
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
CN202211712326.8A
Other languages
Chinese (zh)
Other versions
CN115686268A (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.)
Kunshan Longyu Intelligent Technology Co ltd
Original Assignee
Kunshan Longyu Intelligent Technology 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 Kunshan Longyu Intelligent Technology Co ltd filed Critical Kunshan Longyu Intelligent Technology Co ltd
Priority to CN202211712326.8A priority Critical patent/CN115686268B/en
Publication of CN115686268A publication Critical patent/CN115686268A/en
Application granted granted Critical
Publication of CN115686268B publication Critical patent/CN115686268B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a testing method and a testing device suitable for various touch panels, wherein the method comprises the following steps: starting test software deployed at a user terminal, and determining a test instrument for testing the touch panel; based on the model of the touch panel, acquiring test parameters of the touch panel from a resource file; loading the actuator based on the user interface, and transmitting the test parameters of the touch panel and the attribute information of the test instrument to the actuator as parameters; and loading a resource file corresponding to the touch panel by the executor, checking the resource file, and analyzing the resource file by the executor after the checking is passed to obtain a test script, and testing the touch panel based on the test script. The method provided by the invention can be compatible with different types of touch panels, is suitable for testing various touch panels, and meets different testing requirements.

Description

Testing method and device suitable for various touch panels
Technical Field
The present invention relates to the field of electronic products, and in particular, to a method and an apparatus for testing a plurality of touch panels.
Background
With the continuous development of economy, electronic products represented by mobile phones and wearable devices are increasingly developed like spring bamboo shoots after rain, which greatly stimulates the test requirements of various touch panels. At present, for touch panels with different specifications and different requirements, unified standards are not available.
In the prior art, for each touch panel, a mode of creating a test item to perform a test independently is mostly adopted, so that touch panels with different specifications and different test requirements cannot be compatible under the same system architecture. This reduces the software performance of the software used to test the touch panel.
The invention provides a testing method and a testing device suitable for various touch panels, which take information such as specification, size and the like of the touch panel to be tested as resource files and separate a user interface from a testing logic module at the bottom layer. Under the condition of being compatible with touch panels with different test models and test precision, the modularized development of software for testing the touch panels can be realized, and the development efficiency is improved.
Disclosure of Invention
In view of the above, the present invention provides a method and apparatus for testing a plurality of touch panels, which can solve the technical problem that the prior art cannot be compatible with touch panels of different specifications and different testing requirements under the same system architecture.
The present invention is so implemented as to solve the above-mentioned technical problems.
A test method suitable for a plurality of touch panels, the method comprising the steps of:
step S1: starting test software deployed at a user terminal, and determining a test instrument for testing the touch panel; based on the model of the touch panel, acquiring test parameters of the touch panel from a resource file; the test software comprises a plurality of resource files, an executor, a management module and a user interface;
step S2: the user terminal displays a user interface, loads the actuator based on the user interface, and transmits the test parameters of the touch panel and the attribute information of the test instrument to the actuator as parameters;
step S3: the executor loads a resource file corresponding to the touch panel, checks the resource file, analyzes the resource file after the verification is passed, and obtains a test script, and tests the touch panel based on the test script; in the process of testing the executor, the management module obtains test data obtained by testing each test point of the touch panel by the executor through a pipeline mechanism, matches the test data with a preset regular expression, characterizes the test data according to the matched regular expression, and the characterized test data are used for displaying the test point executed by the touch panel, the test state corresponding to the test point, the test information and the test result.
Preferably, the step S1 includes: starting test software deployed at a user terminal, searching a test instrument for testing the touch panel through the test software, further determining the test instrument for testing the touch panel, and displaying the instrument number of the test instrument on the user interface; based on the model of the touch panel, test parameters of the touch panel are obtained from a resource file.
Preferably, the resource files are multiple, and each resource file corresponds to a touch panel of one model; the resource file comprises product test specifications and sizes of touch panels of corresponding models, information required by a test algorithm, compensation files required in a test process and test scripts.
Preferably, the executor loads a resource file corresponding to the touch panel, and checks the resource file in the following way: calculating the hash value of the resource file by adopting an MD5 information abstract algorithm, and if the calculated hash value is different from the pre-stored hash value of the resource file corresponding to the touch panel, checking the resource file not to pass; otherwise, checking is passed.
Preferably, the executor parses the resource file to obtain a test script, and tests the touch panel based on the test script, including:
the executor analyzes the resource file to obtain a test script, and based on the test script, the test steps, the test contents, the test specification and the test method of the touch panel are obtained from the test script;
the executor initializes the testing steps into classes using a reflection mechanism; the class can execute the method, in the course of executing the method, calculate the test value corresponding to each test point of the said touch panel based on the test algorithm appointed by the test step, compare each test value with corresponding target value, get the test result of each test point;
the management module obtains text information generated when the execution method is executed through a pipeline between the management module and the executor, the text information comprises a test point, a test state corresponding to the test point, test information and a test result, the text information is used as test data, the test data is matched with a preset regular expression, the test data is represented in a matched regular expression mode, and the represented test data is displayed on the user interface and used for displaying the test point executed by the touch panel, the test state corresponding to the test point, the test information and the test result.
Preferably, if an abnormality occurs in the actuator in the test process or a test value exceeds a test specification, the test fails, the actuator sets the test instrument to a safe state, test data are stored, the operation of the actuator is finished, and the method is finished; otherwise, if the executor has no abnormality in the test process, and all the test values are in the specification range, the test is successful, the executor sets the test instrument to a safe state, test data are saved, the executor ends the operation, and the method ends.
The invention provides a testing device suitable for various touch panels, which comprises:
and a starting module: the testing software is configured to be started and deployed in the user terminal, and a testing instrument for testing the touch panel is determined; based on the model of the touch panel, acquiring test parameters of the touch panel from a resource file; the test software comprises a plurality of resource files, an executor, a management module and a user interface;
and the parameter transmission module is used for: the user terminal is configured to display a user interface, load the actuator based on the user interface, and transmit the test parameters of the touch panel and the attribute information of the test instrument to the actuator as parameters;
and a testing module: the method comprises the steps that the executor loads a resource file corresponding to the touch panel, the resource file is checked, after the verification is passed, the executor analyzes the resource file to obtain a test script, and the touch panel is tested based on the test script; in the process of testing the executor, the management module obtains test data obtained by testing each test point of the touch panel by the executor through a pipeline mechanism, matches the test data with a preset regular expression, characterizes the test data according to the matched regular expression, and the characterized test data are used for displaying the test point executed by the touch panel, the test state corresponding to the test point, the test information and the test result.
The invention provides a computer readable storage medium, wherein a plurality of instructions are stored in the storage medium; the plurality of instructions are for loading and executing by a processor the method as described above.
The invention provides an electronic device, which is characterized by comprising:
a processor for executing a plurality of instructions;
a memory for storing a plurality of instructions;
wherein the plurality of instructions are for storage by the memory and loading and executing by the processor the method as described above.
The beneficial effects are that:
(1) The invention can be compatible with different types of touch panels, provides a universal test method applicable to various touch panels, can be compatible with different touch panels, and meets different test requirements.
(2) The invention can realize the modularized development of the software for testing the touch panel, improve the flexibility of the software and improve the development efficiency of research personnel.
(3) The invention reduces the software coupling degree of the test touch panel, can expand the test content, has strong universality, ensures that the software design of the test touch panel is more flexible, and improves the working efficiency of related personnel.
(4) The scheme of the invention is simple to execute and easy to execute.
Drawings
Fig. 1 is a schematic flow chart of a testing method applicable to various touch panels according to the present invention;
FIG. 2 is a schematic diagram of a test architecture suitable for a plurality of touch panels according to the present invention;
fig. 3 is a schematic structural diagram of a testing device suitable for various touch panels according to the present invention.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and examples.
As shown in fig. 1-2, the present invention provides a testing method suitable for various touch panels, the method includes the following steps:
step S1: starting test software deployed at a user terminal, and determining a test instrument for testing the touch panel; based on the model of the touch panel, acquiring test parameters of the touch panel from a resource file; the test software comprises a plurality of resource files, an executor, a management module and a user interface;
step S2: the user terminal displays a user interface, loads the actuator based on the user interface, and transmits the test parameters of the touch panel and the attribute information of the test instrument to the actuator as parameters;
step S3: the executor loads a resource file corresponding to the touch panel, checks the resource file, analyzes the resource file after the verification is passed, and obtains a test script, and tests the touch panel based on the test script; in the process of testing the executor, the management module obtains test data obtained by testing each test point of the touch panel by the executor through a pipeline mechanism, matches the test data with a preset regular expression, characterizes the test data according to the matched regular expression, and the characterized test data are used for displaying the test point executed by the touch panel, the test state corresponding to the test point, the test information and the test result.
The step S1 includes: starting test software deployed at a user terminal, searching a test instrument for testing the touch panel through the test software, further determining the test instrument for testing the touch panel, and displaying the instrument number of the test instrument on the user interface; based on the model of the touch panel, test parameters of the touch panel are obtained from a resource file.
Further, the test instrument is connected to the touch panel through a carrier.
Further, the number of the resource files is multiple, and each resource file corresponds to a type of touch panel; the resource file comprises product testing specifications and sizes of touch panels of corresponding models, information required by a testing algorithm, compensation files required in a testing process, testing scripts and the like.
The number of the resource files can be expanded, so that when a new touch panel needs to be tested, only the resource files are required to be updated, and the bottom test software code does not need to be modified; the information recorded by the resource file can be expanded, so that different test panels and test requirements can be better compatible.
Further, the tester sends a test command for starting the test by triggering a button on the user interface or triggering the user interface through a network port and/or a serial port by an external device.
In this embodiment, different test instruments have different test methods and principles and modes of use. After the testing instrument is identified, attribute information of the testing instrument is used as parameters to be transmitted to the executor, so that the executor can conveniently test the touch panel by using a testing method and a using mode corresponding to the testing instrument.
The executor loads a resource file corresponding to the touch panel, and checks the resource file in the following way: calculating the hash value of the resource file by adopting an MD5 information abstract algorithm, and if the calculated hash value is different from the pre-stored hash value of the resource file corresponding to the touch panel, checking the resource file not to pass; otherwise, checking is passed.
The purpose of the verification is to prevent the resource file from being modified in the event of an error or unauthorized.
If the verification is passed, calling the resource file by an executor, and testing the touch panel; if the verification is not passed, the resource file is abnormal, the test is terminated, error reporting information is generated, and the method is ended.
Further, based on the test script, acquiring a test step, test content, test specification and a test method of the touch panel from the test script; and testing the touch panel based on the testing step, the testing content, the testing specification and the testing method of the touch panel.
The executor analyzes the resource file to obtain a test script, and tests the touch panel based on the test script, including:
the executor analyzes the resource file to obtain a test script, and based on the test script, the test steps, the test contents, the test specification and the test method of the touch panel are obtained from the test script;
the executor initializes the testing steps into classes using a reflection mechanism; the class can execute the method, and in the process of executing the method, test values corresponding to all test points calculated according to a test algorithm specified by the test step are generated, and all the test values are compared with corresponding target values to obtain test results of all the test points;
the management module obtains text information generated when the execution method is executed through a pipeline between the management module and the executor, the text information comprises a test point, a test state corresponding to the test point, test information and a test result, the text information is used as test data, the test data is matched with a preset regular expression, the test data is represented in a matched regular expression mode, and the represented test data is displayed on the user interface and used for displaying the test point executed by the touch panel, the test state corresponding to the test point, the test information and the test result.
Further, if an abnormality occurs in the test process or a test value exceeds a test specification, the test fails, the executor sets the test instrument to a safe state, test data are stored, the executor ends operation, and the method ends; otherwise, no abnormality exists in the test process, all the test values are in the specification range, the test is successful, the executor sets the test instrument to a safe state, test data are stored, the executor ends the operation, and the method ends.
The invention also provides a testing device suitable for various touch panels, as shown in fig. 3, the device comprises:
and a starting module: the testing software is configured to be started and deployed in the user terminal, and a testing instrument for testing the touch panel is determined; based on the model of the touch panel, acquiring test parameters of the touch panel from a resource file; the test software comprises a plurality of resource files, an executor, a management module and a user interface;
and the parameter transmission module is used for: the user terminal is configured to display a user interface, load the actuator based on the user interface, and transmit the test parameters of the touch panel and the attribute information of the test instrument to the actuator as parameters;
and a testing module: the method comprises the steps that the executor loads a resource file corresponding to the touch panel, the resource file is checked, after the verification is passed, the executor analyzes the resource file to obtain a test script, and the touch panel is tested based on the test script; in the process of testing the executor, the management module obtains test data obtained by testing each test point of the touch panel by the executor through a pipeline mechanism, matches the test data with a preset regular expression, characterizes the test data according to the matched regular expression, and the characterized test data are used for displaying the test point executed by the touch panel, the test state corresponding to the test point, the test information and the test result.
The above specific embodiments merely describe the design principle of the present invention, and the shapes of the components in the description may be different, and the names are not limited. Therefore, the technical scheme described in the foregoing embodiments can be modified or replaced equivalently by those skilled in the art; such modifications and substitutions do not depart from the spirit and technical scope of the invention, and all of them should be considered to fall within the scope of the invention.

Claims (4)

1. The method for testing the multiple touch panels suitable for the mobile phone and the wearable equipment is characterized by comprising the following steps of:
step S1: starting test software deployed at a user terminal, and determining a test instrument for testing the touch panel; based on the model of the touch panel, acquiring test parameters of the touch panel from a resource file; the test software comprises a plurality of resource files, an executor, a management module and a user interface;
step S2: the user terminal displays a user interface, loads the actuator based on the user interface, and transmits the test parameters of the touch panel and the attribute information of the test instrument to the actuator as parameters;
step S3: the executor loads a resource file corresponding to the touch panel, checks the resource file, analyzes the resource file after the verification is passed, and obtains a test script, and tests the touch panel based on the test script; in the process of testing the executor, the management module acquires test data obtained by testing each test point of the touch panel by the executor through a pipeline mechanism, matches the test data with a preset regular expression, characterizes the test data according to the matched regular expression, and is used for displaying the test point executed by the touch panel, the test state corresponding to the test point, the test information and the test result;
the executor analyzes the resource file to obtain a test script, and tests the touch panel based on the test script, including:
the executor analyzes the resource file to obtain a test script, and based on the test script, the test steps, the test contents, the test specification and the test method of the touch panel are obtained from the test script;
the executor initializes the testing steps into classes using a reflection mechanism; the class can execute the method, in the course of executing the method, calculate the test value corresponding to each test point of the said touch panel based on the test algorithm appointed by the test step, compare each test value with corresponding target value, get the test result of each test point;
the management module obtains text information generated when an execution method is executed through a pipeline between the management module and the executor, the text information comprises a test point, a test state corresponding to the test point, test information and a test result, the text information is used as test data, the test data is matched with a preset regular expression, the test data is represented in a matched regular expression mode, and the represented test data is displayed on the user interface and is used for displaying the test point executed by the touch panel, the test state corresponding to the test point, the test information and the test result;
the step S1 includes: starting test software deployed at a user terminal, searching a test instrument for testing the touch panel through the test software, further determining the test instrument for testing the touch panel, and displaying the instrument number of the test instrument on the user interface; based on the model of the touch panel, acquiring test parameters of the touch panel from a resource file;
the number of the resource files is multiple, and each resource file corresponds to one type of touch panel; the resource file comprises product test specifications and sizes of touch panels of corresponding models, information required by a test algorithm, compensation files required in a test process and test scripts;
the executor loads a resource file corresponding to the touch panel, and checks the resource file in the following way: calculating the hash value of the resource file by adopting an MD5 information abstract algorithm, and if the calculated hash value is different from the pre-stored hash value of the resource file corresponding to the touch panel, checking the resource file not to pass; otherwise, checking is passed;
if the executor is abnormal in the test process or the test value exceeds the test specification, the test fails, the executor sets the test instrument to a safe state, test data are stored, the executor is finished in operation, and the method is finished; otherwise, if the executor has no abnormality in the test process, and all the test values are in the specification range, the test is successful, the executor sets the test instrument to a safe state, test data are saved, the executor ends the operation, and the method ends.
2. A testing device for a plurality of touch panels suitable for mobile phones and wearable devices, the device comprising:
and a starting module: the testing software is configured to be started and deployed in the user terminal, and a testing instrument for testing the touch panel is determined; based on the model of the touch panel, acquiring test parameters of the touch panel from a resource file; the test software comprises a plurality of resource files, an executor, a management module and a user interface;
and the parameter transmission module is used for: the user terminal is configured to display a user interface, load the actuator based on the user interface, and transmit the test parameters of the touch panel and the attribute information of the test instrument to the actuator as parameters;
and a testing module: the method comprises the steps that the executor loads a resource file corresponding to the touch panel, the resource file is checked, after the verification is passed, the executor analyzes the resource file to obtain a test script, and the touch panel is tested based on the test script; in the process of testing the executor, the management module acquires test data obtained by testing each test point of the touch panel by the executor through a pipeline mechanism, matches the test data with a preset regular expression, characterizes the test data according to the matched regular expression, and is used for displaying the test point executed by the touch panel, the test state corresponding to the test point, the test information and the test result;
the executor analyzes the resource file to obtain a test script, and tests the touch panel based on the test script, including:
the executor analyzes the resource file to obtain a test script, and based on the test script, the test steps, the test contents, the test specification and the test method of the touch panel are obtained from the test script;
the executor initializes the testing steps into classes using a reflection mechanism; the class can execute the method, in the course of executing the method, calculate the test value corresponding to each test point of the said touch panel based on the test algorithm appointed by the test step, compare each test value with corresponding target value, get the test result of each test point;
the management module obtains text information generated when an execution method is executed through a pipeline between the management module and the executor, the text information comprises a test point, a test state corresponding to the test point, test information and a test result, the text information is used as test data, the test data is matched with a preset regular expression, the test data is represented in a matched regular expression mode, and the represented test data is displayed on the user interface and is used for displaying the test point executed by the touch panel, the test state corresponding to the test point, the test information and the test result;
the starting module is configured to: starting test software deployed at a user terminal, searching a test instrument for testing the touch panel through the test software, further determining the test instrument for testing the touch panel, and displaying the instrument number of the test instrument on the user interface; based on the model of the touch panel, acquiring test parameters of the touch panel from a resource file;
the number of the resource files is multiple, and each resource file corresponds to one type of touch panel; the resource file comprises product test specifications and sizes of touch panels of corresponding models, information required by a test algorithm, compensation files required in a test process and test scripts;
the executor loads a resource file corresponding to the touch panel, and checks the resource file in the following way: calculating the hash value of the resource file by adopting an MD5 information abstract algorithm, and if the calculated hash value is different from the pre-stored hash value of the resource file corresponding to the touch panel, checking the resource file not to pass; otherwise, checking is passed;
if the executor is abnormal in the test process or the test value exceeds the test specification, the test fails, the executor sets the test instrument to a safe state, test data are stored, and the executor ends operation; otherwise, if the executor has no abnormality in the test process, all the test values are in the specification range, the test is successful, the executor sets the test instrument to a safe state, test data are saved, and the executor ends operation.
3. A computer-readable storage medium having stored therein a plurality of instructions; the plurality of instructions for loading and executing the method of claim 1 by a processor.
4. An electronic device, the electronic device comprising:
a processor for executing a plurality of instructions;
a memory for storing a plurality of instructions;
wherein the plurality of instructions are for storage by the memory and loading and executing by the processor the method of claim 1.
CN202211712326.8A 2022-12-30 2022-12-30 Testing method and device suitable for various touch panels Active CN115686268B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211712326.8A CN115686268B (en) 2022-12-30 2022-12-30 Testing method and device suitable for various touch panels

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211712326.8A CN115686268B (en) 2022-12-30 2022-12-30 Testing method and device suitable for various touch panels

Publications (2)

Publication Number Publication Date
CN115686268A CN115686268A (en) 2023-02-03
CN115686268B true CN115686268B (en) 2023-04-25

Family

ID=85055711

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211712326.8A Active CN115686268B (en) 2022-12-30 2022-12-30 Testing method and device suitable for various touch panels

Country Status (1)

Country Link
CN (1) CN115686268B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101718841B (en) * 2009-12-02 2012-07-11 江苏方天电力技术有限公司 Automatic checking system and method of relaying protection device
CN107390110A (en) * 2017-06-20 2017-11-24 广东科学技术职业学院 A kind of method, apparatus and system tested automatically PCBA
CN110399304B (en) * 2019-07-30 2023-07-25 江苏恒宝智能系统技术有限公司 Script testing method and system
CN112783794B (en) * 2021-02-10 2024-03-26 西南电子技术研究所(中国电子科技集团公司第十研究所) Aviation communication radio station software testing system

Also Published As

Publication number Publication date
CN115686268A (en) 2023-02-03

Similar Documents

Publication Publication Date Title
CN106484612B (en) The system and method tested and reported for equipment compatibility
US11048826B2 (en) FPGA device and cloud system based on FPGA device
CN108959067B (en) Method and device for testing search engine and computer readable storage medium
US8667333B2 (en) Extensible testing system
CN106649084A (en) Function call information obtaining method and apparatus, and test device
US11893331B2 (en) Device verification method, UVM verification platform, electronic apparatus and storage medium
CN111897724A (en) Automatic testing method and device suitable for cloud platform
US10824541B1 (en) System and method for test data fabrication
EP3920500A1 (en) Method and apparatus for verifying operation state of application
CN110659198A (en) Application program test case execution method and device and software test system
CN111078567A (en) Report generation method, terminal and storage medium of automatic test platform
CN110895509A (en) Test processing method and device, electronic equipment and storage medium
CN111693294A (en) Vehicle detection method and device, terminal equipment and storage medium
CN106201810A (en) A kind of method of testing, device
CN115686268B (en) Testing method and device suitable for various touch panels
CN110489347A (en) Method for edition management, device, equipment and readable storage medium storing program for executing based on GIT
CN113094251B (en) Method and device for testing embedded system, computer equipment and storage medium
CN115712559A (en) Method and device for testing hardware management software and electronic equipment
CN109471792A (en) Test control method and device, electronic equipment, medium
CN105138373A (en) Vehicle diagnosis device firmware upgrading method and device
CN115514680A (en) Method and device for verifying compatibility of module, electronic equipment and storage medium
CN111352780B (en) Method and device for determining state of path and readable storage medium
CN110659215A (en) Open type industrial APP rapid development and test verification method
CN112783788B (en) Test system, method, electronic device and storage medium
CN112650679B (en) Test verification method, device and computer system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant