CN116501637A - Printing test method and device, electronic equipment and storage medium - Google Patents

Printing test method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116501637A
CN116501637A CN202310477535.7A CN202310477535A CN116501637A CN 116501637 A CN116501637 A CN 116501637A CN 202310477535 A CN202310477535 A CN 202310477535A CN 116501637 A CN116501637 A CN 116501637A
Authority
CN
China
Prior art keywords
test
target
task
tested
print
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310477535.7A
Other languages
Chinese (zh)
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.)
Xiamen Hanyin Electronic Technology Co Ltd
Original Assignee
Xiamen Hanyin Electronic 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 Xiamen Hanyin Electronic Technology Co Ltd filed Critical Xiamen Hanyin Electronic Technology Co Ltd
Priority to CN202310477535.7A priority Critical patent/CN116501637A/en
Publication of CN116501637A publication Critical patent/CN116501637A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Tests Of Electronic Circuits (AREA)

Abstract

The application discloses a printing test method, a printing test device, electronic equipment and a storage medium, and relates to the technical field of automatic testing. Wherein the method comprises the following steps: when the triggering operation of the printing test is detected, generating a case calling instruction, and acquiring a test case list from a server based on the case calling instruction; determining a target test case corresponding to the task to be tested from the test case list based on the task to be tested; and executing the target test case to obtain a test result of the task to be tested. According to the technical scheme, the purpose of simplicity in operation can be achieved, the testing efficiency can be improved, the testing time can be shortened, and the testing accuracy can be greatly improved.

Description

Printing test method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of automated testing technologies, and in particular, to a print testing method, a print testing device, an electronic device, and a storage medium.
Background
In developing a printer firmware program, it is often necessary to verify that the print function of the firmware program is normal through a print test. The specific test process is as follows: the terminal equipment is connected with the printer through a universal serial bus (Universal Serial Bus, USB), a serial port, a network port or a wireless network (Wireless Fidelity, wi-Fi), the terminal equipment sends various different types of instructions, print out printing contents corresponding to the various instructions through the printer, and judge whether the printing functions of the printer firmware program are normal or not by checking whether the printing contents are consistent with the corresponding instructions through naked eyes.
The printing test mode has the following defects: (1) Because of the multiple instruction types and the multiple instruction contents, a tester executing the printing test method needs to know the related knowledge of the printing instruction, so that the threshold selected by the tester is high. (2) The printed content needs to be identified by naked eyes to meet the corresponding instruction, so that the testing time is long, the time and the labor are consumed, the efficiency is low, and the error is easy to occur.
Therefore, there is a need for a method that can automatically test the print function of a printer firmware program.
Disclosure of Invention
The application provides a printing test method, a printing test device, electronic equipment and a storage medium, which can realize the purpose of simple operation, improve test efficiency, shorten test time and greatly improve test accuracy.
In a first aspect, the present application provides a print testing method, the method comprising:
when the triggering operation of the printing test is detected, generating a case calling instruction, and acquiring a test case list from a server based on the case calling instruction;
determining a target test case corresponding to the task to be tested from the test case list based on the task to be tested;
and executing the target test case to obtain a test result of the task to be tested.
The embodiment of the application provides a printing test method, a test case list is obtained from a server through a case calling instruction, a tester can automatically test by one key by selecting a target test case from the test case list, the related knowledge of instruction operation is not required to be known, and whether generated pictures accord with corresponding instructions or not is not required to be compared manually; in addition, the test case list contains test cases corresponding to various tasks to be tested, when various tasks to be tested need to be tested, the test program does not need to be rewritten, and the test result can be obtained by one-key automatic test only by selecting the corresponding test cases.
Further, the target test case comprises a test step and a standard bitmap file, wherein the standard bitmap file is used for checking whether the printing function of a firmware program of the printer is normal or not; the step of executing the target test case to obtain a test result of the task to be tested includes: analyzing the testing steps in the target test case into corresponding task instructions; the task instruction is sent to a printer, so that the printer generates a target bitmap file based on the task instruction; and receiving the target bitmap file sent by the printer, and analyzing the target bitmap file based on the standard bitmap file to obtain a test result of the task to be tested.
Further, the analyzing the target bitmap file based on the standard bitmap file to obtain a test result of the task to be tested includes: comparing the pixel values of the corresponding pixel points in the standard bitmap file and the target bitmap file; if the pixel values of at least one pixel point are different, determining that the test result is abnormal in printing function of the firmware program of the printer; and if the pixel values of all the pixel points are the same, determining that the test result is that the printing function of the firmware program of the printer is normal.
Further, the test case list is formulated as follows: a corresponding test compression packet is formulated for each task to be tested in a plurality of tasks to be tested, and a plurality of test compression packets are obtained; preparing a test case list for the plurality of test compression packets; and storing the plurality of test compression packages and the test case list to the server.
Further, the step of formulating a corresponding test compression packet for each of the plurality of tasks to be tested includes: determining a testing step and a task instruction corresponding to each task to be tested; writing the testing step and the task instruction to obtain a corresponding test case; drawing the task instruction corresponding to each task to be tested into a corresponding standard bitmap file; and compressing the test cases and the standard bitmap file into corresponding test compression packages, so as to obtain the test compression packages corresponding to each task to be tested.
Further, before the target test case is executed to obtain the test result of the task to be tested, the method further includes: generating a data calling instruction; acquiring a target compression packet corresponding to the target test case from the server based on the data calling instruction; and decompressing the target compressed package to obtain the target test case.
Further, before the determining, based on the task to be tested, the target test case corresponding to the task to be tested from the test case list, the method further includes: displaying a print setting interface; receiving a selection operation aiming at the printing setting interface, and determining target printing content; generating the task to be tested based on the target printing content; wherein the print settings interface includes, but is not limited to, at least one of: setting a font option, setting a text option, setting a font height option, setting a font width option, setting a font aspect ratio option, setting a font angle option, setting a canonical mark option, setting a print position option, the target print content including, but not limited to, at least one of: target font, target text, target font height, target font width, target font aspect ratio, target font angle, target specification label, target print position.
In a second aspect, the present application provides a print testing apparatus comprising:
the system comprises a case list acquisition module, a print test module and a print test module, wherein the case list acquisition module is used for generating a case calling instruction when detecting the triggering operation of the print test, and acquiring a test case list from a server based on the case calling instruction;
the target case determining module is used for determining a target test case corresponding to the task to be tested from the test case list based on the task to be tested;
and the test result determining module is used for executing the target test case to obtain the test result of the task to be tested.
In a third aspect, the present application provides an electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the print test method of any embodiment of the present application.
In a fourth aspect, the present application provides a computer readable storage medium storing computer instructions for causing a processor to execute a print test method according to any embodiment of the present application.
It should be noted that the above-mentioned computer instructions may be stored in whole or in part on a computer-readable storage medium. The computer readable storage medium may be packaged together with the processor of the print test device or may be packaged separately from the processor of the print test device, which is not limited in this application.
The description of the second, third and fourth aspects of the present application may refer to the detailed description of the first aspect; moreover, the advantages described in the second aspect, the third aspect and the fourth aspect may refer to the analysis of the advantages of the first aspect, and are not described herein.
It should be understood that the description of this section is not intended to identify key or critical features of the embodiments of the application or to delineate the scope of the application. Other features of the present application will become apparent from the description that follows.
It can be appreciated that before using the technical solutions disclosed in the embodiments of the present application, the user should be informed and authorized by appropriate means of the type, the usage range, the usage scenario, etc. of the personal information related to the present application according to the relevant laws and regulations.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a print test method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a second flow chart of a print test method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a print test device according to an embodiment of the present application;
fig. 4 is a block diagram of an electronic device for implementing a print test method according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," "target," and "original," etc. in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the present application described herein may be capable of executing sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1 is a schematic flow chart of a print test method according to an embodiment of the present application, where the embodiment may be adapted to verify whether a print function of a firmware program of a printer is normal by an automated print test method. The print test method provided by the embodiment of the invention can be executed by the print test device provided by the embodiment of the invention, and the device can be realized by software and/or hardware and is integrated in the electronic equipment for executing the method. Preferably, the electronic device in the embodiment of the application may be a test tool.
Referring to fig. 1, the method of the present embodiment includes, but is not limited to, the following steps:
s110, when the triggering operation of the printing test is detected, a case calling instruction is generated, and a test case list is obtained from a server based on the case calling instruction.
The print test refers to that a printer executes a certain print instruction to obtain corresponding print content, so as to check whether the print function of a firmware program of the printer is normal, for example: whether the print instruction can be analyzed, whether the analysis is correct, and the like. The case calling instruction is used for the testing tool to call the test case list from the server.
In the embodiment of the application, when a tester checks the printing function of the printer firmware program, triggering a physical key or a virtual key corresponding to the printing test function configured on the printer or the test tool; when the test tool detects that the print test function is triggered, the test tool generates a use case retrieval instruction. The test tool transmits the case call instruction to the server, and after the server receives the case call instruction, the test case list is sent to the test tool based on the case call instruction.
S120, determining a target test case corresponding to the task to be tested from the test case list based on the task to be tested.
Preferably, before determining the target test case corresponding to the task to be tested from the test case list based on the task to be tested, the method further comprises: displaying a print setting interface, wherein the print setting interface is used for displaying various print setting options; receiving a selection operation aiming at a printing setting interface, and determining target printing content, wherein the target printing content refers to the content of the printing test; and generating a task to be tested based on the target printing content, wherein the task to be tested refers to the task of the printing test, and corresponds to the target printing content. The display mode of the print setting interface is not limited.
Wherein the print settings interface includes, but is not limited to, at least one of: setting a font option, setting a text option, setting a font height option, setting a font width option, setting a font aspect ratio option, setting a font angle option, setting a canonical mark option, setting a print position option, the target print content including, but not limited to, at least one of: target font, target text, target font height, target font width, target font aspect ratio, target font angle, target specification label, target print position.
In the embodiment of the application, each test case in the test case list corresponds to a printing test task, and after the task to be tested is determined, a target test case corresponding to the task to be tested is determined from the test case list based on the task to be tested.
S130, executing the target test case to obtain a test result of the task to be tested.
Preferably, before the target test case is executed to obtain the test result of the task to be tested, the method further comprises: generating a data calling instruction, wherein the data calling instruction is used for calling a compressed packet corresponding to the test case from the server by the test tool; the test tool transmits the data calling instruction to the server, and after the server receives the data calling instruction, the server transmits a target compression packet corresponding to the target test case to the test tool based on the data calling instruction; after the test tool receives the target test case, decompressing the target compressed packet to obtain the target test case.
Optionally, the target test case includes a test step and a standard Bitmap file, where the standard Bitmap file is used to verify whether the printing function of the firmware program of the printer is normal, and the standard Bitmap file (Bitmap, bmp) is a Bitmap format image file, and the position and color value of the Bitmap pixels in the image file are represented by using the pixel array.
Further, executing the target test case to obtain a test result of the task to be tested includes: clicking to start testing, and automatically executing a test step in the target test case by a test tool to analyze the test step into a corresponding task instruction; sending a task instruction to a printer; after receiving the task instruction, the printer generates a target bitmap file based on the task instruction; and receiving a target bitmap file sent by the printer, and analyzing the target bitmap file based on the standard bitmap file to obtain a test result of the task to be tested.
The printer does not need to print the target printing content based on the task instruction, but only generates the corresponding target bitmap file based on the task instruction, so that the purpose of paperless printing test can be realized.
The task instruction at least comprises an instruction corresponding to the printing text and an instruction corresponding to the printing two-dimensional code, for example: if the instruction is to print text, the coordinates are (0, 1), the font is Song Ti, the rotation angle is 90, the font width is 10, the font height is 15, and the print content is "test text", the corresponding instruction is: TEXT 0,1, "Song Ti", 90,10,15, "test TEXT"; if the instruction is to print a two-dimensional code, the coordinates are (0, 10), the standard label is M, the unit width/unit height is 2, the print content is "123456789", the corresponding instruction is: BARCODE 0,10, m,2, u,2,123456789.
Further, analyzing the target bitmap file based on the standard bitmap file to obtain a test result of the task to be tested, including: the testing tool receives a target bitmap file sent by the printer, and compares pixel values of corresponding pixel points in the standard bitmap file and the target bitmap file; if the pixel values of at least one pixel point are different, determining that the test result is abnormal printing function of the firmware program of the printer, and if the test result is abnormal printing function of the firmware program of the printer, the printing test is not passed; if the pixel values of all the pixel points are the same, determining that the test result is that the printing function of the firmware program of the printer is normal, and then passing the printing test to obtain a test log.
Alternatively, step information that the print test does not pass may be displayed in the test log.
According to the technical scheme provided by the embodiment, when the triggering operation of the printing test is detected, a case calling instruction is generated, and a test case list is obtained from a server based on the case calling instruction; determining a target test case corresponding to the task to be tested from the test case list based on the task to be tested; and executing the target test case to obtain a test result of the task to be tested. According to the method and the device, the test case list is obtained from the server through the case calling instruction, a tester can automatically test by one key by selecting the target test case from the test case list, the related knowledge of instruction operation is not required to be known, and whether the generated picture accords with the corresponding instruction or not is not required to be compared manually; in addition, the test case list contains test cases corresponding to various tasks to be tested, when various tasks to be tested need to be tested, the test program does not need to be rewritten, and the test result can be obtained by one-key automatic test only by selecting the corresponding test cases.
The print test method provided in the embodiment of the present application is further described below, and fig. 2 is a schematic second flow chart of the print test method provided in the embodiment of the present application. The embodiment of the application is optimized based on the embodiment, and is specifically: the present embodiment explains the process of creating the test case list in detail.
Referring to fig. 2, the method of the present embodiment includes, but is not limited to, the following steps:
s210, determining a testing step and a task instruction corresponding to each task to be tested.
In the embodiment of the application, when the printing function of the printer firmware program is checked, the number of the instruction types to be tested is large, so that the number of the print test tasks to be tested is large. The testing tool analyzes each task to be tested to obtain testing steps and task instructions corresponding to each task to be tested.
S220, writing the testing steps and the task instructions to obtain corresponding testing cases.
In the embodiment of the application, after analyzing the testing steps and the task instructions corresponding to each task to be tested, the testing tool writes the testing steps and the task instructions to obtain corresponding testing cases, so that the testing cases corresponding to each task to be tested are obtained. The test cases in this embodiment are configurable and readable.
S230, drawing the task instruction corresponding to each task to be tested into a corresponding standard bitmap file.
In this embodiment of the present application, the test tool parses the task instruction corresponding to each task to be tested, so as to draw the task instruction into a standard bitmap file, where the standard bitmap file may be a bitmap-format image file, such as a bmp picture, and represents the position and color value of the image pixel corresponding to the task instruction by using the pixel array.
S240, compressing the test cases and the standard bitmap files into corresponding test compression packages, so as to obtain the test compression packages corresponding to each task to be tested.
In the embodiment of the application, the test case is encrypted, and finally the encrypted test case and the standard bitmap file in the test case are compressed into the corresponding test compression packet, wherein the test compression packet can also comprise a word stock corresponding to the task to be tested. Based on the above, a test compression packet corresponding to each task to be tested can be obtained.
S250, a test case list is formulated for the plurality of test compression packages, and the plurality of test compression packages and the test case list are stored in a server.
In the embodiment of the application, the test case list includes an identification number of a task to be tested and an identification number of a test compression packet corresponding to the task to be tested, and a plurality of test compression packets and the test case list are stored in a server.
According to the technical scheme provided by the embodiment, the testing steps and the task instructions corresponding to each task to be tested are determined; writing the testing step and the task instruction to obtain a corresponding testing case; drawing a task instruction corresponding to each task to be tested into a corresponding standard bitmap file; compressing the test cases and the standard bitmap files into corresponding test compression packages, so as to obtain the test compression packages corresponding to each task to be tested; and formulating a test case list for the plurality of test compression packages, and storing the plurality of test compression packages and the test case list to a server. According to the method and the device, the corresponding test cases are written for each task to be tested, so that a test case list and a test compression packet are obtained. The test case list contains test cases corresponding to various tasks to be tested, when various tasks to be tested need to be tested, the test program does not need to be rewritten, and the test result can be obtained by one-key automatic test only by selecting the corresponding test cases.
Fig. 3 is a schematic structural diagram of a print testing apparatus according to an embodiment of the present application, and as shown in fig. 3, the apparatus 300 may include:
the case list obtaining module 310 is configured to generate a case calling instruction when a triggering operation of a print test is detected, and obtain a test case list from a server based on the case calling instruction;
the target case determining module 320 is configured to determine, based on a task to be tested, a target test case corresponding to the task to be tested from the test case list;
and the test result determining module 330 is configured to execute the target test case to obtain a test result of the task to be tested.
Optionally, the target test case includes a test step and a standard bitmap file, where the standard bitmap file is used to check whether the printing function of the firmware program of the printer is normal;
further, the test result determining module 330 may be specifically configured to: analyzing the testing steps in the target test case into corresponding task instructions; the task instruction is sent to a printer, so that the printer generates a target bitmap file based on the task instruction; and receiving the target bitmap file sent by the printer, and analyzing the target bitmap file based on the standard bitmap file to obtain a test result of the task to be tested.
Further, the above-mentioned test result determining module 330 may be further specifically configured to: comparing the pixel values of the corresponding pixel points in the standard bitmap file and the target bitmap file; if the pixel values of at least one pixel point are different, determining that the test result is abnormal in printing function of the firmware program of the printer; and if the pixel values of all the pixel points are the same, determining that the test result is that the printing function of the firmware program of the printer is normal.
Further, the print test device may further include: a use case list determining module;
the use case list determining module is used for formulating a corresponding test compression packet for each task to be tested in a plurality of tasks to be tested to obtain a plurality of test compression packets; preparing a test case list for the plurality of test compression packets; and storing the plurality of test compression packages and the test case list to the server.
Further, the use case list determining module may be specifically configured to: determining a testing step and a task instruction corresponding to each task to be tested; writing the testing step and the task instruction to obtain a corresponding test case; drawing the task instruction corresponding to each task to be tested into a corresponding standard bitmap file; and compressing the test cases and the standard bitmap file into corresponding test compression packages, so as to obtain the test compression packages corresponding to each task to be tested.
Further, the print test device may further include: a target use case calling module;
the target case calling module is used for generating a data calling instruction before the target test case is executed to obtain a test result of the task to be tested; acquiring a target compression packet corresponding to the target test case from the server based on the data calling instruction; and decompressing the target compressed package to obtain the target test case.
Further, the print test device may further include: the task determination module to be tested;
the task to be tested determining module is used for displaying a print setting interface before the target test case corresponding to the task to be tested is determined from the test case list based on the task to be tested; receiving a selection operation aiming at the printing setting interface, and determining target printing content; generating the task to be tested based on the target printing content; wherein the print settings interface includes, but is not limited to, at least one of: setting a font option, setting a text option, setting a font height option, setting a font width option, setting a font aspect ratio option, setting a font angle option, setting a canonical mark option, setting a print position option, the target print content including, but not limited to, at least one of: target font, target text, target font height, target font width, target font aspect ratio, target font angle, target specification label, target print position.
The printing test device provided by the embodiment is applicable to the printing test method provided by any embodiment, and has corresponding functions and beneficial effects.
Fig. 4 is a block diagram of an electronic device for implementing a print test method according to an embodiment of the present application. The electronic device 10 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the applications described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the respective methods and processes described above, such as a print test method.
In some embodiments, the print testing method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the print test method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the print test method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above can be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this application, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server) or that includes a middleware component (e.g., an application server) or that includes a front-end component through which a user can interact with an implementation of the systems and techniques described here, or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
Note that the above is only a preferred embodiment of the present application and the technical principle applied. Those skilled in the art will appreciate that the present application is not limited to the particular embodiments described herein, but is capable of numerous obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the present application. For example, one skilled in the art may use the various forms of flow shown above to reorder, add, or delete steps; the steps recited in the present application may be performed in parallel, sequentially or in a different order, as long as the desired results of the technical solutions of the present application are achieved, and are not limited herein.
The above embodiments do not limit the scope of the application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application are intended to be included within the scope of the present application.

Claims (10)

1. A print testing method, the method comprising:
when the triggering operation of the printing test is detected, generating a case calling instruction, and acquiring a test case list from a server based on the case calling instruction;
determining a target test case corresponding to the task to be tested from the test case list based on the task to be tested;
and executing the target test case to obtain a test result of the task to be tested.
2. The print test method according to claim 1, wherein the target test case includes a test step and a standard bitmap file, the standard bitmap file being used for checking whether a print function of a firmware program of the printer is normal; the step of executing the target test case to obtain a test result of the task to be tested includes:
analyzing the testing steps in the target test case into corresponding task instructions;
the task instruction is sent to a printer, so that the printer generates a target bitmap file based on the task instruction;
and receiving the target bitmap file sent by the printer, and analyzing the target bitmap file based on the standard bitmap file to obtain a test result of the task to be tested.
3. The print test method according to claim 2, wherein the analyzing the target bitmap file based on the standard bitmap file to obtain the test result of the task to be tested includes:
comparing the pixel values of the corresponding pixel points in the standard bitmap file and the target bitmap file;
if the pixel values of at least one pixel point are different, determining that the test result is abnormal in printing function of the firmware program of the printer;
and if the pixel values of all the pixel points are the same, determining that the test result is that the printing function of the firmware program of the printer is normal.
4. The print test method of claim 1, wherein the list of test cases is formulated by:
a corresponding test compression packet is formulated for each task to be tested in a plurality of tasks to be tested, and a plurality of test compression packets are obtained;
preparing a test case list for the plurality of test compression packets;
and storing the plurality of test compression packages and the test case list to the server.
5. The print testing method of claim 4, wherein the formulating a corresponding test compression package for each of the plurality of tasks to be tested comprises:
determining a testing step and a task instruction corresponding to each task to be tested;
writing the testing step and the task instruction to obtain a corresponding test case;
drawing the task instruction corresponding to each task to be tested into a corresponding standard bitmap file;
and compressing the test cases and the standard bitmap file into corresponding test compression packages, so as to obtain the test compression packages corresponding to each task to be tested.
6. The print test method according to claim 1, further comprising, before the executing the target test case obtains the test result of the task under test:
generating a data calling instruction;
acquiring a target compression packet corresponding to the target test case from the server based on the data calling instruction;
and decompressing the target compressed package to obtain the target test case.
7. The print testing method according to claim 1, further comprising, before the determining, based on the task to be tested, a target test case corresponding to the task to be tested from the test case list:
displaying a print setting interface;
receiving a selection operation aiming at the printing setting interface, and determining target printing content;
generating the task to be tested based on the target printing content;
wherein the print settings interface includes, but is not limited to, at least one of: setting a font option, setting a text option, setting a font height option, setting a font width option, setting a font aspect ratio option, setting a font angle option, setting a canonical mark option, setting a print position option, the target print content including, but not limited to, at least one of: target font, target text, target font height, target font width, target font aspect ratio, target font angle, target specification label, target print position.
8. A print testing apparatus, the apparatus comprising:
the system comprises a case list acquisition module, a print test module and a print test module, wherein the case list acquisition module is used for generating a case calling instruction when detecting the triggering operation of the print test, and acquiring a test case list from a server based on the case calling instruction;
the target case determining module is used for determining a target test case corresponding to the task to be tested from the test case list based on the task to be tested;
and the test result determining module is used for executing the target test case to obtain the test result of the task to be tested.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the print test method of any one of claims 1 to 7.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the print test method of any one of claims 1 to 7 when executed.
CN202310477535.7A 2023-04-28 2023-04-28 Printing test method and device, electronic equipment and storage medium Pending CN116501637A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310477535.7A CN116501637A (en) 2023-04-28 2023-04-28 Printing test method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310477535.7A CN116501637A (en) 2023-04-28 2023-04-28 Printing test method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116501637A true CN116501637A (en) 2023-07-28

Family

ID=87321225

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310477535.7A Pending CN116501637A (en) 2023-04-28 2023-04-28 Printing test method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116501637A (en)

Similar Documents

Publication Publication Date Title
CN114996103A (en) Page abnormity detection method and device, electronic equipment and storage medium
CN110267215B (en) Data detection method, equipment and storage medium
CN113821433A (en) Method, device, equipment, medium and product for testing cloud mobile phone application program
CN114389969A (en) Client test method and device, electronic equipment and storage medium
CN116738091A (en) Page monitoring method and device, electronic equipment and storage medium
CN111538994A (en) System security detection and repair method, device, storage medium and terminal
CN116501637A (en) Printing test method and device, electronic equipment and storage medium
CN113807410B (en) Image recognition method and device and electronic equipment
CN114003497A (en) Method, device and equipment for testing service system and storage medium
CN113313125A (en) Image processing method and device, electronic equipment and computer readable medium
CN110515834B (en) Interface testing method and device, mobile terminal and storage medium
CN114116688A (en) Data processing and data quality inspection method, device and readable storage medium
CN112966671A (en) Contract detection method and device, electronic equipment and storage medium
CN113674246B (en) Method, device, electronic equipment and storage medium for auditing picture files
CN113034337B (en) Image detection method and related device
CN113886745B (en) Page picture testing method and device and electronic equipment
CN117251769B (en) Abnormal data identification method, device, equipment and medium based on monitoring component
CN115953889B (en) Anti-disassembly function detection method, system, device, equipment and storage medium
CN114511535A (en) White screen detection method and device, electronic equipment, medium and product
CN114116512A (en) Test method, test device, electronic equipment and storage medium
CN117632670A (en) Fault warning method and device for test environment, electronic equipment and storage medium
CN113641885A (en) Document detection method, device, equipment and storage medium
CN117609064A (en) Unit test method and device, electronic equipment and storage medium
CN116993365A (en) Identification method, device, equipment and storage medium of cheating equipment
CN114741291A (en) Method, device, equipment and medium for automatically submitting vulnerability information

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