CN116361139A - Test method, device and system - Google Patents

Test method, device and system Download PDF

Info

Publication number
CN116361139A
CN116361139A CN202111611215.3A CN202111611215A CN116361139A CN 116361139 A CN116361139 A CN 116361139A CN 202111611215 A CN202111611215 A CN 202111611215A CN 116361139 A CN116361139 A CN 116361139A
Authority
CN
China
Prior art keywords
image
tested
page
hash value
browser
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
CN202111611215.3A
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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202111611215.3A priority Critical patent/CN116361139A/en
Publication of CN116361139A publication Critical patent/CN116361139A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • 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)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Quality & Reliability (AREA)
  • Storage Device Security (AREA)

Abstract

The application discloses a testing method, device and system, and belongs to the technical field of data processing. The method comprises the following steps: acquiring an image to be measured from a preset storage space according to the image information to be measured sent by the reporting node; generating a first hash value corresponding to the image to be detected according to the image to be detected; acquiring a second hash value matched with the image information to be detected from a block chain network; obtaining a verification result of the image to be tested according to the first hash value and the second hash value; and under the condition that the verification results of the plurality of images to be tested corresponding to the same page are all passed, testing the page display effect of the plurality of images to be tested in the browser, and obtaining the browser compatibility test result of the page. The method can ensure that the test data are true and accurate data, thereby ensuring the authenticity and accuracy of the browser compatibility test result.

Description

Test method, device and system
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a testing method, device, and system.
Background
The problem of browser compatibility refers to the condition that the page display effect is not uniform because different browsers analyze the same section of page codes differently. In most cases, the user wants to have a uniform display effect regardless of which browser is used to view the same website or to log in to the same system.
In the related art, the page display effect of different browsers can be tested through compatibility test, and the updated page codes are adjusted according to the test result, so that the browsers have uniform display effects. However, in the testing process, the acquired testing data cannot be ensured to be true and accurate, so that the authenticity and accuracy of the browser compatibility testing result can be affected. Moreover, the manual mode is adopted to carry out compatibility test, so that the workload is large, and the test efficiency is low.
Disclosure of Invention
Therefore, the application provides a testing method, device and system, so as to solve the problem that the authenticity and accuracy of a browser compatibility testing result can be affected because the testing data cannot be guaranteed to be true and accurate.
In order to achieve the above object, a first aspect of the present application provides a testing method applied to a testing node in a blockchain network, where the blockchain network further includes a reporting node, the testing method includes:
acquiring an image to be measured from a preset storage space according to the image information to be measured sent by the reporting node;
generating a first hash value corresponding to the image to be detected according to the image to be detected;
acquiring a second hash value matched with the image information to be detected from the blockchain network;
acquiring a verification result of the image to be detected according to the first hash value and the second hash value;
and under the condition that the verification results of the images to be tested corresponding to the same page are all passed, testing the page display effect of the images to be tested in the browser, and obtaining the browser compatibility test result of the page.
Further, the image to be detected in the preset storage space is an image obtained by the reporting node collecting the display image of the page in the browser, and the information of the image to be detected is information generated by the reporting node based on the image to be detected;
and the second hash value is obtained by carrying out hash operation on the collected image to be detected by the reporting node and uploading the hash value to the block chain network.
Further, the image information to be detected is information encrypted by the reporting node by using a preset encryption key;
the obtaining the image to be measured from the preset storage space according to the image information to be measured sent by the reporting node comprises the following steps:
decrypting the image information to be detected sent by the reporting node by using a preset decryption key to obtain decrypted image information to be detected;
and acquiring the image to be tested from the preset storage space according to the decrypted image information to be tested.
Further, the image information to be tested is characterized by comprising at least one of a test number, a page number and a browser number.
Further, the image to be measured comprises at least one page element;
the step of testing the page display effect of the images to be tested in the browser to obtain the browser compatibility test result of the page comprises the following steps:
under the condition that page display effects of page elements of a plurality of images to be detected in the browser are consistent, determining that a browser compatibility test result of the page is passed;
and under the condition that the page display effects of the page elements of the images to be detected in the browser are inconsistent, determining that the browser compatibility test result of the page is failed.
Further, the browser compatibility test result of the page is obtained by a preset compatibility test model according to a plurality of images to be tested;
the compatibility test model is used for testing the compatibility of the browser to the page.
Further, the compatibility test model is obtained through training by a deep learning method.
Further, after the verification result of the image to be detected is obtained according to the first hash value and the second hash value, the method further includes:
and generating and sending an alarm message when the verification result of the image to be detected is failed, wherein the alarm message is used for indicating that the image to be detected is not true and/or accurate.
To achieve the above object, a second aspect of the present application provides a testing device, which is disposed at a testing node in a blockchain network, the blockchain network further includes a reporting node, and the testing device includes:
the first acquisition module is configured to acquire an image to be detected from a preset storage space according to the image information to be detected sent by the reporting node;
the generation module is configured to generate a first hash value corresponding to the image to be detected according to the image to be detected;
the second acquisition module is configured to acquire a second hash value matched with the image information to be detected from the blockchain network;
the first testing module is configured to acquire a verification result of the image to be tested according to the first hash value and the second hash value;
the second testing module is configured to test the page display effect of the images to be tested in the browser under the condition that the verification results of the images to be tested corresponding to the same page are all passed, and obtain the browser compatibility testing result of the page.
In order to achieve the above object, a third aspect of the present application provides a test system, including: reporting nodes and testing nodes;
the reporting node is used for sending image information to be tested to the testing node;
the test node comprises at least one test device described in the embodiment of the present application, and is configured to implement the test method in any one of the embodiments of the present application.
The application has the following advantages:
according to the testing method, the testing device and the testing system, a testing node firstly obtains an image to be tested according to the image information to be tested provided by a reporting node, generates a first hash value according to the image to be tested, and then compares whether the first hash value is consistent with a second hash value obtained from a blockchain network or not to obtain a verification result of the image to be tested; and only if all images to be tested corresponding to the same page pass the verification, the page display effect of the images to be tested is tested to obtain the browser compatibility test result of the page, and the true accuracy of the images to be tested is ensured in the test process, so that the true and accuracy of the browser compatibility test result are improved.
Drawings
The accompanying drawings are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate the application and, together with the description, do not limit the application.
FIG. 1 is a flow chart of a testing method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a block according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating a working process of a compatibility test model according to an embodiment of the present application;
FIG. 4 is a block diagram of a testing device according to an embodiment of the present application;
FIG. 5 is a block diagram of a test system provided in an embodiment of the present application;
FIG. 6 is a schematic diagram of a test system according to an embodiment of the present application;
fig. 7 is a block diagram of an electronic device for implementing the test method of the embodiments of the present application.
Detailed Description
The following detailed description of specific embodiments of the present application refers to the accompanying drawings. It should be understood that the detailed description is presented herein for purposes of illustration and explanation only and is not intended to limit the present application.
In web site development and web page based application development, cross-browser compatibility issues are typically involved. Because the cores of different browsers are different, the information analysis modes are different, and therefore, aiming at the same page code, the display effects of different browsers can be different, so that the problem of browser compatibility occurs.
In order to solve the above-mentioned problems, in the related art, a display effect of a browser is generally tested based on a page, thereby obtaining a compatibility test result of the browser. However, the above test is usually performed by a tester, and the test efficiency is low. Moreover, the test data used in the test process cannot be guaranteed to be true and accurate, so that the authenticity and accuracy of the browser compatibility test result can be affected.
In view of this, the embodiment of the present application provides a testing method, device, and system, where first, a testing node obtains an image to be tested according to information of the image to be tested provided by a reporting node, generates a first hash value according to the image to be tested, and then compares whether the first hash value is consistent with a second hash value obtained from a blockchain network, to obtain a verification result of the image to be tested; and only if all images to be tested corresponding to the same page pass verification, testing the page display effect of the images to be tested to obtain the browser compatibility test result of the page. In the testing process, the true accuracy of the image to be tested is guaranteed, so that the true and accuracy of the browser compatibility testing result are improved.
A first aspect of the present application provides a test method. Fig. 1 is a flowchart of a testing method according to an embodiment of the present application, where the method may be applied to a testing node in a blockchain network, and the blockchain network further includes a reporting node. As shown in fig. 1, the test method includes the steps of:
step S101, according to the image information to be detected sent by the reporting node, obtaining an image to be detected from a preset storage space.
The method comprises the steps that an image to be detected in a preset storage space is an image obtained by collecting a display image of a page in a browser by a reporting node; the image information to be measured is information generated by the reporting node based on the image to be measured.
Step S102, according to the image to be detected, a first hash value corresponding to the image to be detected is generated.
The first hash value is obtained by performing hash operation on the image to be tested by the test node.
Step S103, a second hash value matched with the image information to be detected is obtained from the blockchain network.
The second hash value is a hash value obtained by the reporting node for carrying out hash operation on the collected image to be tested and uploading the hash value to the block chain network. In other words, the second hash value is a hash value obtained by the reporting node performing hash operation on the image to be measured.
Step S104, a verification result of the image to be detected is obtained according to the first hash value and the second hash value.
The verification result of the image to be tested is used for representing the authenticity and/or accuracy of the image to be tested.
Step S105, under the condition that the verification results of the plurality of images to be tested corresponding to the same page are all passed, testing the page display effect of the plurality of images to be tested in the browser, and obtaining the browser compatibility test result of the page.
In this embodiment, the test node firstly obtains an image to be tested according to the image information to be tested provided by the reporting node, generates a first hash value according to the image to be tested, and then compares whether the first hash value is consistent with a second hash value obtained from the blockchain network to obtain a verification result of the image to be tested; and only if all images to be tested corresponding to the same page pass the verification, the page display effect of the images to be tested is tested to obtain the browser compatibility test result of the page, and the true accuracy of the images to be tested is ensured in the test process, so that the true and accuracy of the browser compatibility test result are improved.
In some possible implementation manners, in order to implement the testing method provided by the embodiments of the present application, a blockchain network is first constructed, and a testing node and a reporting node access the blockchain network in a Peer-to-Peer (P2P) manner and register as a node of the blockchain network. In the blockchain network, each node is a peer node, that is, each node can participate in the recording, storing, maintaining and other tasks of data in the blockchain network. Meanwhile, all nodes audit, generate and record metadata information together so as to ensure the real validity of the metadata index. Moreover, the blocks in the block chain network have the characteristic of being unable to be tampered, so that the true accuracy of the test data can be ensured.
It should be noted that, in some possible implementations, different permissions (e.g., read-write permissions) may be set for different nodes, considering that different nodes have different functions.
In some possible implementations, before step S101, the browser loads and displays a page, the reporting node collects a display image of the page in the browser, obtains an image to be measured, and stores the image to be measured in a preset storage space. Meanwhile, the reporting node performs hash operation on the image to be tested, obtains a second hash value, and uploads the second hash value to the blockchain network. The browser comprises a plurality of browsers to be tested, and the number of the pages is one or more.
For example, the browser to be tested includes A, B and C, and the page includes i and j, and then the image to be tested includes display images Ai, bi and Ci of page i collected by the reporting node in the browsers A, B and C, and display images Aj, bj and Cj of page j collected by the reporting node in the browsers A, B and C. In addition, the reporting node performs hash operation on the image to be detected, the obtained second hash values comprise h_ai, h_Bi and h_Ci, and h_aj, h_Bj and h_cj, and the reporting node stores the second hash values into the blockchain network.
In some possible implementations, the second hash value is stored in the blockchain network in blocks.
Fig. 2 is a schematic diagram of a block according to an embodiment of the present application. Referring to fig. 2, the blockchain network includes a blockchain formed by connecting t blocks, where t is an integer greater than or equal to 1. For each block, it is composed of a block header and a block body.
The description will be given by taking the block 2 as an example. In block 2, the chunk header includes, but is not limited to, the chunk identification, the last chunk hash value (i.e., the hash value of block 1), the Merkle Root (Merkle Root), and the timestamp; the block body includes n data records, each data record includes a second hash value in a test for a page and information associated with the second hash value, and n is an integer greater than or equal to 1.
In an example, the 1 st data record includes a test number, a page number, a data record identifier, a browser number, a second hash value corresponding to the browser number, a reporting node identifier, and other information. The browser number and the second hash value corresponding to the browser number are displayed in a list form, and the browser number comprises a browser number A, a second hash value H1 corresponding to the browser number A, a browser number B, a second hash value H2 corresponding to the browser number B and a plurality of table items.
In some possible implementations, after the reporting node obtains the image to be measured, the reporting node also generates image information to be measured according to the image to be measured. In an example, the image information to be measured includes at least one of a test number, a page number, and a browser number.
It should be noted that the above description is merely illustrative of the image information to be measured, and the embodiment of the present application is not limited thereto.
In some possible implementations, in step S101, after the test node receives the image information to be measured sent by the reporting node, the test node obtains the image to be measured from the preset storage space.
In some possible implementations, in the case that the image information to be measured is information encrypted by the reporting node using the preset encryption key, step S101 includes: decrypting the image information to be detected sent by the reporting node by using a preset decryption key to obtain decrypted image information to be detected; and acquiring the image to be tested from a preset storage space according to the decrypted image information to be tested.
In an example, the reporting node may encrypt the image information to be measured using its private key as an encryption key, and correspondingly, the testing node may decrypt the image information to be measured using the public key of the reporting node as a decryption key.
In some possible implementations, after obtaining the image to be tested, the test node may obtain a first hash value corresponding to the image to be tested in step S102.
It should be noted that, in the process of performing hash operation on the image to be tested to obtain the first hash value, any hash function may be used, which is not limited in this embodiment of the present application.
In some possible implementations, after obtaining the first hash value, the test node may obtain a second hash value from the blockchain network in step S103 to verify the image to be tested according to the first hash value and the second hash value.
In an example, the test node searches for a second hash value matching the image information to be tested from a block of the blockchain network according to the image information to be tested. The second hash value matched with the image information to be detected in the blockchain network refers to a hash value corresponding to the image to be detected pointed by the image information to be detected in the blockchain network.
It should be noted that, in the embodiment of the present application, the execution sequence of the step S103 and the steps S101 to S102 is not limited. In other words, after receiving the image information to be measured sent by the reporting node, the testing node may first obtain the image to be measured from the storage space to be measured, calculate the first hash value, and then obtain the second hash value from the blockchain network; or firstly obtaining a second hash value from the blockchain network, then obtaining an image to be detected from the storage space to be detected, and calculating a first hash value; the obtaining of the image to be measured from the memory space to be measured and the obtaining of the second hash value from the blockchain network may also be performed simultaneously.
In some possible implementations, in step S104, the image to be tested may be verified according to the first hash value and the second hash value, so as to obtain a verification result of the image to be tested.
In an example, the first hash value is compared with the second hash value, and when the first hash value and the second hash value are consistent, the image to be tested is not tampered, so that a verification result of the image to be tested is obtained. Otherwise, when the first hash value is inconsistent with the second hash value, the image to be tested is tampered, so that the verification result of the image to be tested is not passed.
It should be noted that, in some possible implementations, if the first hash value is inconsistent with the second hash value, it is determined that the verification result of the image to be tested is failed, and the test node may generate and send out an alarm message. The alarm message is used for indicating that the image to be detected is not real and/or accurate.
It should be understood that the first hash value is a hash value obtained by performing a hash operation on an image to be tested obtained from a preset storage space by a test node, and the second hash value is a hash value obtained by performing a hash operation on an acquired image to be tested by a report node and storing the acquired image to a blockchain network, and since the first hash value is different from the second hash value in the main body of operation, the source of the image to be tested subjected to the hash operation is also different, the image to be tested can be checked by the first hash value and the second hash value, so as to ensure the authenticity and the accuracy of the image to be tested, thereby ensuring the authenticity and the accuracy of the browser compatibility test result.
In some possible implementations, one page corresponds to at least one image to be tested in multiple browsers, and when a browser compatibility test is performed based on a certain page, it is required to ensure that all the images to be tested corresponding to the page pass verification. Under the condition that the plurality of images to be tested corresponding to the same page are confirmed to pass the verification, in step S105, the page display effect of the image to be tested corresponding to the page in the browser can be tested, and the browser compatibility test result of the page can be obtained.
In some possible implementations, the image to be measured includes at least one page element. Testing the page display effect of a plurality of images to be tested in the browser to obtain a browser compatibility test result of the page, comprising the following steps: under the condition that page display effects of page elements of a plurality of images to be detected in a browser are consistent, determining that a browser compatibility test result of the page is passed; and under the condition that the page display effects of the page elements of the plurality of images to be detected in the browser are inconsistent, determining that the browser compatibility test result of the page is failed.
In an example, page elements include, but are not limited to, text, pictures, audio, video, and interactive effects. When the same page is in different browsers, and the text, the picture, the audio, the video and the interaction effect are consistent, the condition that each browser is compatible with the page elements is indicated, and therefore the compatibility test results of all the browsers are determined to be passed. Otherwise, if the display effect of a certain page element in a certain browser is different from that of other browsers or preset display effects, the browser is not compatible with the page element, so that the compatibility test result of the browser is failed.
It should be noted that, in some possible implementations, the browser compatibility test result of the page may be obtained by a preset compatibility test model according to a plurality of images to be tested. The compatibility test model is used for testing the compatibility of the browser to the page.
Fig. 3 is a schematic diagram illustrating a working process of a compatibility test model according to an embodiment of the present application. As shown in fig. 3, a plurality of images to be tested are input into a compatibility test model, the compatibility test model processes the input images to be tested, and a browser compatibility test result of a page is output outwards.
The input plurality of images to be measured may be all images to be measured corresponding to one page, or may be images to be measured corresponding to a plurality of pages, and a mapping relationship between the pages and the images to be measured, which is not limited in the embodiment of the present application. In other words, the compatibility test model may perform the test of each page in a single serial manner, so as to obtain the browser compatibility test result of all pages, or may perform the test of multiple pages in parallel, so as to obtain the browser compatibility test result of all pages.
In some possible implementations, the compatibility test model may be obtained through training by Deep Learning (Deep Learning) methods. The deep learning method is an algorithm for performing characterization learning on data, and in the embodiment of the application, the deep learning method is used for enabling a compatibility test model to learn how to judge the compatibility of the browser according to an image to be tested.
In an example, the deep learning method includes a back propagation method, a random gradient descent method, a learning rate attenuation method, and the like, and variations and optimizations of the above methods, and the embodiment of the present application does not limit the type of the deep learning method.
The above steps of the methods are divided, for clarity of description, and may be combined into one step or split into multiple steps when implemented, so long as they include the same logic relationship, and they are all within the protection scope of the present application; it is within the scope of this application to add insignificant modifications to the algorithm or flow or introduce insignificant designs, but not to alter the core design of its algorithm and flow.
A second aspect of the present application provides a testing device. Fig. 4 is a block diagram of a testing device according to an embodiment of the present application, where the testing device is disposed at a testing node in a blockchain network, and the blockchain network further includes a reporting node. As shown in fig. 4, the test apparatus includes the following modules:
the first obtaining module 401 is configured to obtain the image to be measured from the preset storage space according to the image information to be measured sent by the reporting node.
The method comprises the steps that an image to be detected in a preset storage space is an image obtained by collecting a display image of a page in a browser by a reporting node; the image information to be measured is information generated by the reporting node based on the image to be measured.
The generating module 402 is configured to generate a first hash value corresponding to the image to be measured according to the image to be measured.
The first hash value is obtained by performing hash operation on the image to be tested by the test node.
A second obtaining module 403 is configured to obtain a second hash value matched with the image information to be tested from the blockchain network.
The second hash value is a hash value obtained by the reporting node for carrying out hash operation on the collected image to be tested and uploading the hash value to the block chain network. In other words, the second hash value is a hash value obtained by the reporting node performing hash operation on the image to be measured.
The first test module 404 is configured to obtain a verification result of the image to be tested according to the first hash value and the second hash value.
The verification result of the image to be tested is used for representing the authenticity and/or accuracy of the image to be tested.
The second testing module 405 is configured to test the page display effect of the multiple images to be tested in the browser to obtain the browser compatibility testing result of the page when the verification results of the multiple images to be tested corresponding to the same page are all passed.
In some possible implementations, the image information to be measured is information encrypted by the reporting node using a preset encryption key. Correspondingly, the first acquisition module comprises: a decryption unit and an image acquisition unit. The decryption unit is used for decrypting the image information to be detected sent by the reporting node by using a preset decryption key, and obtaining decrypted image information to be detected; the image acquisition unit is used for acquiring the image to be detected from the preset storage space according to the decrypted image information to be detected.
In some possible implementations, the image information to be tested includes at least one of a test number, a page number, and a browser number.
In some possible implementations, after the first test module obtains the verification result of the image to be tested, if the verification result is not passed, the test device may alarm. In an example, the test apparatus further comprises an alert module. And the alarm module is used for generating and sending out alarm information under the condition that the verification result of the image to be detected is failed. The alarm message is used for indicating that the image to be detected is not real and/or accurate.
In some possible implementations, the image to be measured includes at least one page element. The second test module is used for determining that the browser compatibility test result of the page passes under the condition that the page display effect of the page elements of the plurality of images to be tested in the browser is consistent; and under the condition that the page display effects of the page elements of the plurality of images to be detected in the browser are inconsistent, determining that the browser compatibility test result of the page is failed.
In some possible implementations, the second test module may obtain the browser compatibility test result of the page through a preset compatibility test model. The compatibility test model is used for testing the compatibility of the browser to the page.
In some possible implementations, the compatibility test model may be obtained through training by a deep learning method. The deep learning method is an algorithm for performing characterization learning on data, and in the embodiment of the application, the deep learning method is used for enabling a compatibility test model to learn how to judge the compatibility of the browser according to an image to be tested.
In an example, the deep learning method includes a back propagation method, a random gradient descent method, a learning rate attenuation method, and the like, and variations and optimizations of the above methods, and the embodiment of the present application does not limit the type of the deep learning method.
In this embodiment, the first obtaining module obtains an image to be tested from a preset storage space according to the image to be tested sent by the reporting node, the generating module generates a first hash value corresponding to the image to be tested according to the image to be tested, the second obtaining module obtains a second hash value matched with the image to be tested from the blockchain network, the first testing module obtains a verification result of the image to be tested according to the first hash value and the second hash value, and the second testing module tests the page display effect of the images to be tested in the browser to obtain a browser compatibility testing result of the page under the condition that the verification results of the images to be tested corresponding to the same page are all passed. The device can ensure the authenticity and accuracy of the image to be tested, thereby improving the authenticity and accuracy of the browser compatibility test result.
A third aspect of the present application provides a test system. Fig. 5 is a block diagram of a test system according to an embodiment of the present application. As shown in fig. 5, the test system includes: reporting nodes and testing nodes. The reporting node 501 and the testing node 502 are both connected to the blockchain network 503, and are used for writing data into the blockchain network or obtaining data from the blockchain network.
In some possible implementations, the reporting node 501 is configured to send the image information to be tested to the test node 502.
In some possible implementations, the test node 502 includes at least one test apparatus of an embodiment of the present application, and is configured to implement any one of the test methods disclosed in the embodiments of the present application.
Fig. 6 is a schematic diagram of a test system according to an embodiment of the present application. In the test system, as shown in fig. 6, reporting node 610 and test node 620 access blockchain network 630 for generating blocks in the blockchain network.
The reporting node 610 includes an acquisition module 611 and a storage module 612, where the acquisition module 611 is configured to acquire a display image of a page in a browser to obtain an image to be measured, and the storage module 612 is provided with a preset storage space for storing the acquired image to be measured. And, the reporting node 610 calculates a hash value of the image to be measured, obtains a second hash value, and uploads the second hash value to the blockchain network 630 to generate a block corresponding thereto.
In some possible implementations, the reporting node 610 sends the image information to be tested to the testing node 620. After the test node 620 obtains the image information to be tested, the image obtaining module 621 obtains the image to be tested from the preset storage space set in the storage module 612 of the reporting node 610 through the image information to be tested, calculates the hash value of the image to be tested, obtains the first hash value, obtains the second hash value matched with the image information to be tested from the blockchain network 630, and the image checking module 622 checks the image to be tested according to the first hash value and the second hash value so as to ensure the true accuracy of the image to be tested. Further, in the case that the verification results of the multiple images to be tested corresponding to the same page are determined to be all passing, the test node 620 tests the page display effect of the multiple images to be tested in the browser through the compatibility test module 623, and obtains the browser compatibility test result of the page.
Fig. 7 is a block diagram of an electronic device according to an embodiment of the present application.
Fig. 7 illustrates a schematic block diagram of an example electronic device 700 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, 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 disclosure described and/or claimed herein.
As shown in fig. 7, the apparatus 700 includes a computing unit 701 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 702 or a computer program loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data required for the operation of the device 700 may also be stored. The computing unit 701, the ROM702, and the RAM703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in device 700 are connected to I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, etc.; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, an optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 701 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the respective methods and processes described above, such as a test method. For example, in some embodiments, the test method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 700 via ROM702 and/or communication unit 709. When the computer program is loaded into RAM703 and executed by computing unit 701, one or more steps of the test method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the test method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may 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.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code 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 disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable 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. 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 a computer 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 pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. 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 (e.g., a user computer having a graphical user interface or a web browser 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), and the internet.
The computer system may include a client and a server. 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.
It should be noted that each module in this embodiment is a logic module, and in practical application, one logic unit may be one physical unit, or may be a part of one physical unit, or may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present application, elements that are not so close to solving the technical problem presented in the present application are not introduced in the present embodiment, but it does not indicate that other elements are not present in the present embodiment.
It is to be understood that the above embodiments are merely illustrative of the exemplary embodiments employed to illustrate the principles of the present application, however, the present application is not limited thereto. Various modifications and improvements may be made by those skilled in the art without departing from the spirit and substance of the application, and are also considered to be within the scope of the application.

Claims (10)

1. The testing method is characterized by being applied to a testing node in a blockchain network, wherein the blockchain network also comprises a reporting node, and the method comprises the following steps:
acquiring an image to be measured from a preset storage space according to the image information to be measured sent by the reporting node;
generating a first hash value corresponding to the image to be detected according to the image to be detected;
acquiring a second hash value matched with the image information to be detected from the blockchain network;
acquiring a verification result of the image to be detected according to the first hash value and the second hash value;
and under the condition that the verification results of the images to be tested corresponding to the same page are all passed, testing the page display effect of the images to be tested in the browser, and obtaining the browser compatibility test result of the page.
2. The test method according to claim 1, wherein the image to be tested in the preset storage space is an image obtained by the reporting node collecting a display image of the page in the browser, and the image information to be tested is information generated by the reporting node based on the image to be tested;
and the second hash value is obtained by carrying out hash operation on the collected image to be detected by the reporting node and uploading the hash value to the block chain network.
3. The test method according to claim 1, wherein the image information to be tested is information encrypted by the reporting node using a preset encryption key;
the obtaining the image to be measured from the preset storage space according to the image information to be measured sent by the reporting node comprises the following steps:
decrypting the image information to be detected sent by the reporting node by using a preset decryption key to obtain decrypted image information to be detected;
and acquiring the image to be tested from the preset storage space according to the decrypted image information to be tested.
4. A test method according to any one of claims 1-3, wherein the image information to be tested comprises at least one of a test number, a page number and a browser number.
5. The method of claim 1, wherein the image to be tested comprises at least one page element;
the step of testing the page display effect of the images to be tested in the browser to obtain the browser compatibility test result of the page comprises the following steps:
under the condition that page display effects of page elements of a plurality of images to be detected in the browser are consistent, determining that a browser compatibility test result of the page is passed;
and under the condition that the page display effects of the page elements of the images to be detected in the browser are inconsistent, determining that the browser compatibility test result of the page is failed.
6. The testing method according to claim 1 or 5, wherein the browser compatibility test result of the page is obtained by a preset compatibility test model according to a plurality of images to be tested;
the compatibility test model is used for testing the compatibility of the browser to the page.
7. The test method of claim 6, wherein the compatibility test model is obtained by training a deep learning method.
8. The method according to claim 1, wherein after obtaining the verification result of the image to be tested according to the first hash value and the second hash value, further comprises:
and generating and sending an alarm message when the verification result of the image to be detected is failed, wherein the alarm message is used for indicating that the image to be detected is not true and/or accurate.
9. A test device, characterized by a test node disposed in a blockchain network, the blockchain network further comprising a reporting node, the device comprising:
the first acquisition module is configured to acquire an image to be detected from a preset storage space according to the image information to be detected sent by the reporting node;
the generation module is configured to generate a first hash value corresponding to the image to be detected according to the image to be detected;
the second acquisition module is configured to acquire a second hash value matched with the image information to be detected from the blockchain network;
the first testing module is configured to acquire a verification result of the image to be tested according to the first hash value and the second hash value;
the second testing module is configured to test the page display effect of the images to be tested in the browser under the condition that the verification results of the images to be tested corresponding to the same page are all passed, and obtain the browser compatibility testing result of the page.
10. A test system, comprising: reporting nodes and testing nodes;
the reporting node is used for sending image information to be tested to the testing node;
the test node comprising at least one test device according to claim 9 for implementing the test method according to any of claims 1-8.
CN202111611215.3A 2021-12-27 2021-12-27 Test method, device and system Pending CN116361139A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111611215.3A CN116361139A (en) 2021-12-27 2021-12-27 Test method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111611215.3A CN116361139A (en) 2021-12-27 2021-12-27 Test method, device and system

Publications (1)

Publication Number Publication Date
CN116361139A true CN116361139A (en) 2023-06-30

Family

ID=86937275

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111611215.3A Pending CN116361139A (en) 2021-12-27 2021-12-27 Test method, device and system

Country Status (1)

Country Link
CN (1) CN116361139A (en)

Similar Documents

Publication Publication Date Title
EP3741082B1 (en) Proof chaining and decomposition
US11321305B2 (en) Utilizing independently stored validation keys to enable auditing of instrument measurement data maintained in a blockchain
JP2024015396A (en) Computer-implemented systems and methods for linking blockchain to set of digital twins
CN111625473B (en) Interface test case generation method and device, storage medium and electronic equipment
KR101948721B1 (en) Method and apparatus for examining forgery of file by using file hash value
CN111222176B (en) Block chain-based cloud storage possession proving method, system and medium
CN108959965B (en) Data compliance examination method and device
TWI574173B (en) Determine secure activity of application under test
CN109376534B (en) Method and apparatus for detecting applications
CN103428042A (en) Method and system for carrying out stress test on server
CN111611621A (en) Block chain based distributed data encryption storage method and electronic equipment
CN112506798A (en) Performance test method, device, terminal and storage medium of block chain platform
CN113656825B (en) Text watermark embedding method, text tampering detection method, text watermark embedding device, text tampering detection device and electronic equipment
CN114329644B (en) Method, device and storage medium for carrying out encryption simulation on logic system design
CN110347678B (en) Financial data storage method, system, device and equipment
CN109902493B (en) Script issuing method and server
CN107171808A (en) A kind of verification method and device of electronic record authenticity
CN111949655A (en) Form display method and device, electronic equipment and medium
CN116361139A (en) Test method, device and system
EP4365808A1 (en) Data verification method and apparatus
US20230418794A1 (en) Data processing method, and non-transitory medium and electronic device
CN111190824B (en) Monitoring method, device, terminal equipment and storage medium
CN112882948A (en) Stability testing method, device and system for application and storage medium
CN111949738A (en) Block chain-based data storage deduplication method, terminal device and storage medium
CN112579428A (en) Interface testing method and device, electronic equipment and storage medium

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