CN112597051A - Method and device for obtaining test result, electronic equipment and storage medium - Google Patents
Method and device for obtaining test result, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN112597051A CN112597051A CN202011608571.5A CN202011608571A CN112597051A CN 112597051 A CN112597051 A CN 112597051A CN 202011608571 A CN202011608571 A CN 202011608571A CN 112597051 A CN112597051 A CN 112597051A
- Authority
- CN
- China
- Prior art keywords
- test
- return value
- interface
- automation
- deployment tool
- 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.)
- Granted
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 178
- 238000000034 method Methods 0.000 title claims abstract description 49
- 238000004590 computer program Methods 0.000 claims description 11
- 238000011161 development Methods 0.000 claims description 6
- 238000013522 software testing Methods 0.000 claims description 4
- 230000001960 triggered effect Effects 0.000 claims description 4
- 230000004044 response Effects 0.000 claims description 2
- 238000012545 processing Methods 0.000 description 21
- 238000010586 diagram Methods 0.000 description 17
- 229910052711 selenium Inorganic materials 0.000 description 11
- 238000004891 communication Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 7
- BUGBHKTXTAQXES-UHFFFAOYSA-N Selenium Chemical compound [Se] BUGBHKTXTAQXES-UHFFFAOYSA-N 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 5
- 239000011669 selenium Substances 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000010354 integration Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000001902 propagating effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- RYGMFSIKBFXOCR-UHFFFAOYSA-N Copper Chemical compound [Cu] RYGMFSIKBFXOCR-UHFFFAOYSA-N 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 239000010949 copper Substances 0.000 description 1
- 229910052802 copper Inorganic materials 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000007639 printing Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3696—Methods or tools to render software testable
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)
- Debugging And Monitoring (AREA)
Abstract
The present disclosure relates to a method and an apparatus for obtaining a test result, an electronic device, and a storage medium, wherein the method includes: accessing a pre-configured interface, triggering and opening an automatic deployment tool page during access, and creating and executing a test task in the automatic deployment tool page; obtaining a test return value through the interface; and comparing the test return value with an expected return value to determine a test result corresponding to the test task, wherein the expected return value comprises expected result information corresponding to the test task. The embodiment of the disclosure can obtain the test result, and particularly can obtain the test result for checking whether the bottom layer resource creation of the linux system is successful.
Description
Technical Field
The present disclosure relates to the field of software testing technologies, and in particular, to a method and an apparatus for obtaining a test result, an electronic device, and a storage medium.
Background
Software automated testing exists in contrast to manual testing, where testing is performed step by a tester according to the procedures described in the test case, resulting in a comparison of actual results with expected results. Compared with manual testing, the automatic software testing method saves labor, time or hardware resources and has high testing efficiency. In the prior art, when testing the resources at the bottom layer of the linux system, the existing automatic testing tool cannot obtain the testing result, so that whether the resource creation at the bottom layer (k8s, Ceph, apache, mysql, etc.) of the linux system is successful or not cannot be verified.
Disclosure of Invention
The present disclosure provides a method and an apparatus for obtaining a test result, an electronic device, and a storage medium, which can obtain a test result, and in particular, can obtain a test result for verifying whether a bottom layer resource of a linux system is successfully created.
According to a first aspect of the present disclosure, there is provided a method of obtaining test results, comprising:
accessing a pre-configured interface, triggering and opening an automatic deployment tool page during access, and creating and automatically executing a test task in the automatic deployment tool page;
obtaining a test return value through the interface;
and comparing the test return value with an expected return value to determine a test result corresponding to the test task, wherein the expected return value comprises expected result information corresponding to the test task.
In some possible embodiments, a UI automation tool is used for development in the interface, and when accessing, an automation deployment tool page is triggered to open by a UI automation program in the interface, and a test task is created and executed in the automation deployment tool page; the UI automation program has business logic written therein for performing the tests.
In some possible embodiments, the obtaining, through the interface, a test return value includes:
positioning and acquiring output information in the automatic deployment tool page through a UI automation program in the interface;
and acquiring the output information as a test return value through the interface.
In some possible embodiments, the number of the interfaces is plural;
and the UI automation programs in different interfaces execute different business logics for creating and executing different test tasks.
In some possible embodiments, the determining a test result corresponding to the test task according to the comparison between the test return value and the expected return value further includes:
in response to whether the test return value and the expected return value are consistent, determining that the test result is a success or a failure.
According to a second aspect of the present disclosure, there is provided an apparatus for obtaining test results, comprising:
the system comprises a triggering module, a test module and a test module, wherein the triggering module is used for triggering and opening an automatic deployment tool page when a pre-configured interface is accessed, and creating and automatically executing a test task in the automatic deployment tool page;
the return module is used for acquiring a test return value through the interface;
and the comparison module is used for comparing the test return value with an expected return value to determine the test result of the test task, wherein the expected return value comprises expected result information corresponding to the test task.
In some possible embodiments, UI automation tool development is employed within the interface;
the triggering module is also used for triggering and opening an automatic deployment tool page through a UI automation program in the interface during access, and creating and automatically executing a test task in the automatic deployment tool page; (ii) a The UI automation program has business logic written therein for performing the tests.
In some possible embodiments, the return module is further configured to locate and obtain, by a UI automation program within the interface, the output information in the automation deployment tool page; and acquiring the output information through the interface as a test return value.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to invoke the memory-stored instructions to perform the method of any of the first aspects.
According to a fourth aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method of any one of the first aspects.
In the embodiment of the disclosure, a program test tool can be used to access the created interface, the creation and execution of a test task in an automated deployment tool page can be realized through the access interface, and a test return value is obtained through the interface; and comparing the test return value with the expected return value to determine a test result corresponding to the test task. The embodiment of the disclosure can obtain the test result, and particularly can obtain the test result for checking whether the bottom layer resource creation of the linux system is successful.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
FIG. 1 shows a flow diagram of a method of obtaining test results according to an embodiment of the present disclosure;
fig. 2 shows a flowchart of step S20 in a method of obtaining test results according to an embodiment of the present disclosure;
FIG. 3 shows a block diagram of an apparatus for obtaining test results according to an embodiment of the present disclosure;
FIG. 4 shows a block diagram of an electronic device in accordance with an embodiment of the disclosure;
fig. 5 shows a block diagram of another electronic device in accordance with an embodiment of the disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
The main body of the method for obtaining the test result may be any device that can be used for testing, for example, the method may be executed by a terminal device or a server or other processing device, where the terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, and the like. In some possible implementations, the method may be implemented by a processor calling computer readable instructions stored in a memory.
It is understood that the above-mentioned method embodiments of the present disclosure can be combined with each other to form a combined embodiment without departing from the logic of the principle, which is limited by the space, and the detailed description of the present disclosure is omitted.
Fig. 1 shows a flowchart of a method for obtaining a test result according to an embodiment of the present disclosure, as shown in fig. 1, the method for obtaining a test result includes:
s10: accessing a pre-configured interface, triggering and opening an automatic deployment tool page during access, and creating and executing a test task in the automatic deployment tool page;
s20: obtaining a test return value through the interface;
s30: and comparing the test return value with an expected return value to determine a test result corresponding to the test task, wherein the expected return value comprises expected result information corresponding to the test task.
In the embodiment of the disclosure, the execution main body of the method for obtaining the test result is a program testing tool, the program testing tool is preferably an interface testing tool Postman, in the related art, in order to test whether the bottom layer resource of the linux system is successfully created, Postman software is adopted to perform an automatic test, and in the test process, it is found that: the failure to obtain the test results in the failure to verify whether the underlying (k8s, Ceph, apache, mysql, etc.) resources of the linux system were created successfully. Therefore, the embodiment of the disclosure combines the automatic deployment tool page and the pre-configured interface to cooperate to obtain the test return value so as to verify whether the underlying resource of the linux system is successfully created. Of course, in practical application, the software testing tool may also adopt other corresponding tools, such as: jmeter, etc.
Before the test is executed, that is, before the pre-configured interface is accessed by using a program test tool, the embodiment of the disclosure includes: the user configures the interface, which is preferably: flash interface, i.e. Of course, other types of interfaces may be used in practical applications, such as: the django interface.
The interface of the embodiment of the present disclosure may be developed by using a UI automation tool (that is, an IU automation program is in the interface), and when accessing, an automation deployment tool page is triggered and opened by the UI automation program in the interface, and a test task is created and automatically executed in the automation deployment tool page, where a service logic for executing a test is written in the UI automation program. In this embodiment, the UI automation tool is preferably selenium; the automated deployment tool is preferably jenkins; the automatic deployment tool page is a jenkins WEB page. Of course, in practical applications, the invention is not limited thereto, the UI automation tool may also be a Robot Framework, UTF, and the automation deployment tool may also include tekton, drone, jenkins x.
Therefore, the flash interface for the program testing tool postman software to access is developed by using the third-party library flash, the tool page jenkins WEB page can be automatically deployed through the operation of the selenium program in the flash interface, and the purpose is to trigger the selenium program in the interface when the program testing tool postman accesses the flash interface, and to execute the operations of opening the automatic deployment tool, creating a testing task, executing the testing task and the like.
Among them, Selenium is a tool for Web application testing. The Selenium test runs directly in the browser, just as a real user is operating. The flash is a lightweight Web application framework written by using Python language; jenkins is an open source software project, is a continuous integration tool developed based on Java, is used for monitoring continuous and repeated work, and aims to provide an open and easy-to-use software platform to enable continuous integration of software.
Through the configuration, an interface for a program testing tool postman to access can be created through the third-party library flash, and UI automation tool selenium development is utilized in the interface. The postman access interface of the program testing tool in the embodiment of the disclosure is used for opening an automatic deployment tool page, positioning task nodes executed by the automatic deployment tool page and acquiring information such as testing results generated in the automatic deployment tool page. And the automatic deployment tool page can be called to automatically execute the test task and obtain the test result by accessing the interface through postman. Specifically, the postman accesses a flash interface to trigger a selenium program, opens a jenkins WEB page through the selenium program, and the selenium program drives a new job task (test task) to be created in the job of the jenkins WEB page. And then, the test task can be executed according to the business logic information related to the test task in the selenium program, so that the job task is executed in the linux system, and the execution result is returned to the jenkins WEB page after the execution is finished.
During the execution of the software program test, the created interface can be accessed through the program test tool postman. In the embodiment of the present disclosure, the number of created interfaces may be multiple, and different interfaces may be used to complete different tests of an application program, for example, the number of the created interfaces may include a number of interfaces used to test whether a k8s resource under the linux system bottom layer is created successfully, a number of interfaces used to test whether a mysql resource under the linux system bottom layer is created successfully, and the like, which is not specifically limited by the present disclosure. Moreover, different interfaces in the embodiment of the present disclosure mean that the UI automation programs in different interfaces execute different business logics, and can be used for creating and executing different test tasks.
In the embodiment of the present disclosure, when the access interface opens the page of the automation deployment tool, the program testing tool postman further includes: authentication information, which may include a username and password, needs to be obtained, and the automated deployment tool page is opened only if the entered authentication information matches the pre-registered information.
Specifically, fig. 2 shows a flowchart of step S20 in the method for obtaining a test result according to the embodiment of the present disclosure. Wherein the obtaining a test return value through the interface comprises:
s21: positioning and acquiring output information in the automatic deployment tool page through a UI automation program in the interface;
s22: and acquiring the output information through the interface and returning the output information as a test value.
Specifically, the content output by the console in the jenkins WEB page can be positioned and obtained through the selenium, and is returned to the postman through the flash interface, so that the postman can obtain a return value; the embodiment of the disclosure can store the obtained information in real time. In the embodiment of the disclosure, jobis a task or project of jenkins, which is configurable and executable. Executing a task in the linux system; the console is a console in a jenkins WEB page and is used for printing output logs and outputting results.
Further, under the condition that the test return value is obtained, the test return value and an expected return value corresponding to the test task can be compared, and the test result of the test task is determined according to the comparison result of the test return value and the expected return value, wherein the test result comprises the construction condition of the bottom layer architecture corresponding to the test task.
In particular, the expected return value may include an expected generated result for the test task, i.e., a result that is predicted to be generated when the test task is executed on the corresponding application. For example, information such as expected intermediate parameters and final execution results (success or failure) may be included, or information of the constructed underlying resources may also be included, which is not specifically limited by the present disclosure, and any parameter or result that can be obtained by executing the test task may be used as an expected return value.
In the case of obtaining the test return value, the test return value and the expected return value may be compared, and if the test return value and the expected return value are the same, it indicates that the state of the application currently tested by the test task is consistent with the expectation, that is, the test result is successful. If there is a difference between the two, it can be determined that there is a failure or error in the state of the currently tested application, i.e. the test result is a failure, and then the application needs to be improved and modified.
In some possible embodiments, the expected return value may include at least one return value, and the return value may be matched with an underlying resource of the application program, and during the process of executing the test task, if the corresponding underlying resource runs error-free and is successfully created, the return value corresponding to the underlying resource may be generated, i.e., the test return value. Thus, the test return value may indicate whether the underlying resource in the application corresponding to the test task was successfully created. In the disclosed embodiment, the underlying resource may include at least one of k8s, Ceph, apache, mysql. When the corresponding underlying resource is created, the generated return value may be the first identifier, and when the corresponding underlying resource is failed to be created, the generated return value may be the second identifier, or no identifier is generated. The corresponding generated test return value may be a sequence of the first identity and the second identity. The first identifier may be 1, and the second identifier may be 0, which is not specifically limited in this embodiment of the disclosure.
In some possible real-time approaches, where the expected return value includes a parameter value other than the test return value, the parameter value may be utilized to determine an underlying resource that failed to create. As described above, when the underlying resource is failed to be created, the second identifier corresponding to the underlying resource may not be generated, and therefore, only the first identifier corresponding to the successfully created underlying resource is included in the test return value, and the underlying resource corresponding to the corresponding un-generated first identifier fails to be created.
In some possible implementations, where the expected return value is different from the corresponding parameter value in the test return value, the underlying resource that failed to be created may be determined using the different parameter value. As described above, when the underlying resource creation fails, a second identifier corresponding to the underlying resource is generated. Therefore, each first identifier in the expected return value can represent an expected result of being created by each underlying resource in the tested application program, the number of return values in the test return value and the expected return value is the same, the second identifier corresponding to the underlying resource which fails to be created is different from the first identifier in the expected return value, and the underlying resource which fails to be created can be determined by using different identifiers. Conversely, if the test return value and the expected return value are consistent, it is determined that the underlying resource build is successful.
In summary, in the embodiment of the present disclosure, the created interface may be accessed by using a program test tool, and the created interface is triggered to create and automatically execute a test task in the automated deployment tool page during the access, so as to obtain a test return value, and the program test tool determines a test result of the test task by using a comparison result between the test return value and an expected return value. The embodiment of the disclosure can obtain the test result of the program, and particularly can obtain the test result of whether the creation of the bottom layer resource of the linux system is successful.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Fig. 3 is a block diagram of an apparatus for obtaining test results according to an embodiment of the present disclosure, as shown in fig. 3, the apparatus for obtaining test results includes:
the system comprises a triggering module 10, a service module and a service module, wherein the triggering module is used for triggering and opening an automatic deployment tool page when a pre-configured interface is accessed, and creating and automatically executing a test task in the automatic deployment tool page;
a return module 20, configured to obtain a test return value through the interface;
and a comparison module 30, configured to compare the test return value with an expected return value, and determine a test result of the test task, where the expected return value includes expected result information corresponding to the test task.
In some possible embodiments, UI automation tool development is employed within the interface;
the triggering module is further configured to trigger and open an automated deployment tool page through a UI automation program in the interface during access, and create and automatically execute a test task in the automated deployment tool page, where a service logic for executing a test is written in the UI automation program.
In some possible embodiments, the return module is further configured to locate and obtain, by a UI automation program within the interface, the output information in the automation deployment tool page; and acquiring the output information through the interface as a test return value.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.
In addition, the present disclosure also provides a device, an electronic device, a computer-readable storage medium, and a program for obtaining a test result, which can be used to implement any method for obtaining a test result provided by the present disclosure, and the corresponding technical solutions and descriptions and corresponding descriptions in the method section are referred to, and are not described again.
Embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the above-mentioned method. The computer readable storage medium may be a non-volatile computer readable storage medium.
An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured as the above method.
The electronic device may be provided as a terminal, server, or other form of device.
Fig. 4 illustrates a block diagram of an electronic device 800 in accordance with an embodiment of the disclosure. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like terminal.
Referring to fig. 4, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 800 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the electronic device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the electronic device 800 to perform the above-described methods.
Fig. 5 illustrates a block diagram of another electronic device 1900 in accordance with an embodiment of the disclosure. For example, the electronic device 1900 may be provided as a server. Referring to fig. 5, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 1932, is also provided that includes computer program instructions executable by the processing component 1922 of the electronic device 1900 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: 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), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
Claims (10)
1. A method for obtaining test results, which is applied to a software test tool, comprises the following steps:
accessing a pre-configured interface, triggering and opening an automatic deployment tool page during access, and creating and automatically executing a test task in the automatic deployment tool page;
obtaining a test return value through the interface;
and comparing the test return value with an expected return value to determine a test result corresponding to the test task, wherein the expected return value comprises expected result information corresponding to the test task.
2. The method according to claim 1, characterized in that a UI automation tool is adopted in the interface for development, when accessing, an automation deployment tool page is triggered to open by a UI automation program in the interface, and a test task is created and executed in the automation deployment tool page; the UI automation program has business logic written therein for performing the tests.
3. The method of claim 2, wherein obtaining the test return value through the interface comprises:
positioning and acquiring output information in the automatic deployment tool page through a UI automation program in the interface;
and acquiring the output information as a test return value through the interface.
4. The method of claim 3, wherein the number of interfaces is plural;
and the UI automation programs in different interfaces execute different business logics for creating and executing different test tasks.
5. The method of claim 1, wherein determining a test result corresponding to the test task based on the comparison of the test return value and the expected return value further comprises:
in response to whether the test return value and the expected return value are consistent, determining that the test result is a success or a failure.
6. An apparatus for obtaining test results, applied to a software testing tool, comprising:
the system comprises a triggering module, a test module and a test module, wherein the triggering module is used for triggering and opening an automatic deployment tool page when a pre-configured interface is accessed, and creating and automatically executing a test task in the automatic deployment tool page;
the return module is used for acquiring a test return value through the interface;
and the comparison module is used for comparing the test return value with an expected return value to determine the test result of the test task, wherein the expected return value comprises expected result information corresponding to the test task.
7. The apparatus for obtaining test results according to claim 6, wherein UI automation tool development is adopted in the interface;
the triggering module is also used for triggering and opening an automatic deployment tool page through a UI automation program in the interface during access, and creating and automatically executing a test task in the automatic deployment tool page; the UI automation program has business logic written therein for performing the tests.
8. The apparatus for obtaining test results according to claim 7, wherein the return module is further configured to locate and obtain the output information in the automated deployment tool page through a UI automation program in the interface; and acquiring the output information through the interface as a test return value.
9. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to invoke the memory-stored instructions to perform the method of any of claims 1-5.
10. A computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the method of any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011608571.5A CN112597051B (en) | 2020-12-30 | 2020-12-30 | Method and device for obtaining test result, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011608571.5A CN112597051B (en) | 2020-12-30 | 2020-12-30 | Method and device for obtaining test result, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112597051A true CN112597051A (en) | 2021-04-02 |
CN112597051B CN112597051B (en) | 2024-09-20 |
Family
ID=75206525
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011608571.5A Active CN112597051B (en) | 2020-12-30 | 2020-12-30 | Method and device for obtaining test result, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112597051B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113468009A (en) * | 2021-07-21 | 2021-10-01 | 宁畅信息产业(北京)有限公司 | Pressure testing method and device, electronic equipment and storage medium |
CN114938342A (en) * | 2022-01-27 | 2022-08-23 | 浙江浩瀚能源科技有限公司 | Automatic testing and monitoring method capable of remotely triggering local UI |
CN115525576A (en) * | 2022-10-31 | 2022-12-27 | 广州市易鸿智能装备有限公司 | MES communication interface device, test method, test equipment and computer storage medium |
CN116680194A (en) * | 2023-06-29 | 2023-09-01 | 广州形银科技有限公司 | Implementation method of efficient semi-automatic artificial intelligence software |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101201776A (en) * | 2006-12-14 | 2008-06-18 | 英业达股份有限公司 | Method for integrating and testing platform of multiple operating systems |
CN105550080A (en) * | 2015-11-26 | 2016-05-04 | 广州华多网络科技有限公司 | Method, apparatus and system for performing server program fault injection based on Linux |
CN108334449A (en) * | 2018-01-26 | 2018-07-27 | 北京京东金融科技控股有限公司 | A kind of method and apparatus of interface automatic test |
CN108491319A (en) * | 2018-02-11 | 2018-09-04 | 广州小百合信息技术有限公司 | Web automated testing methods and system based on this method |
US20180267887A1 (en) * | 2017-03-16 | 2018-09-20 | Wipro Limited | Method and system for automatic generation of test script |
CN109101415A (en) * | 2018-06-25 | 2018-12-28 | 平安科技(深圳)有限公司 | Interface test method, system, equipment and the storage medium compared based on database |
CN109446071A (en) * | 2018-09-26 | 2019-03-08 | 深圳壹账通智能科技有限公司 | Interface test method, interface test device, electronic equipment and storage medium |
CN109828903A (en) * | 2018-12-14 | 2019-05-31 | 中国平安人寿保险股份有限公司 | Automated testing method, device, computer installation and storage medium |
CN110032511A (en) * | 2019-03-19 | 2019-07-19 | 深圳市买买提信息科技有限公司 | A kind of interface test method and interface testing equipment |
CN110704304A (en) * | 2019-09-06 | 2020-01-17 | 平安普惠企业管理有限公司 | Application program testing method and device, storage medium and server |
CN111679982A (en) * | 2020-06-08 | 2020-09-18 | 广东赛百威信息科技有限公司 | Automatic testing method for REST API (representational State transfer) interface software |
-
2020
- 2020-12-30 CN CN202011608571.5A patent/CN112597051B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101201776A (en) * | 2006-12-14 | 2008-06-18 | 英业达股份有限公司 | Method for integrating and testing platform of multiple operating systems |
CN105550080A (en) * | 2015-11-26 | 2016-05-04 | 广州华多网络科技有限公司 | Method, apparatus and system for performing server program fault injection based on Linux |
US20180267887A1 (en) * | 2017-03-16 | 2018-09-20 | Wipro Limited | Method and system for automatic generation of test script |
CN108334449A (en) * | 2018-01-26 | 2018-07-27 | 北京京东金融科技控股有限公司 | A kind of method and apparatus of interface automatic test |
CN108491319A (en) * | 2018-02-11 | 2018-09-04 | 广州小百合信息技术有限公司 | Web automated testing methods and system based on this method |
CN109101415A (en) * | 2018-06-25 | 2018-12-28 | 平安科技(深圳)有限公司 | Interface test method, system, equipment and the storage medium compared based on database |
CN109446071A (en) * | 2018-09-26 | 2019-03-08 | 深圳壹账通智能科技有限公司 | Interface test method, interface test device, electronic equipment and storage medium |
CN109828903A (en) * | 2018-12-14 | 2019-05-31 | 中国平安人寿保险股份有限公司 | Automated testing method, device, computer installation and storage medium |
CN110032511A (en) * | 2019-03-19 | 2019-07-19 | 深圳市买买提信息科技有限公司 | A kind of interface test method and interface testing equipment |
CN110704304A (en) * | 2019-09-06 | 2020-01-17 | 平安普惠企业管理有限公司 | Application program testing method and device, storage medium and server |
CN111679982A (en) * | 2020-06-08 | 2020-09-18 | 广东赛百威信息科技有限公司 | Automatic testing method for REST API (representational State transfer) interface software |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113468009A (en) * | 2021-07-21 | 2021-10-01 | 宁畅信息产业(北京)有限公司 | Pressure testing method and device, electronic equipment and storage medium |
CN113468009B (en) * | 2021-07-21 | 2024-05-24 | 宁畅信息产业(北京)有限公司 | Pressure testing method and device, electronic equipment and storage medium |
CN114938342A (en) * | 2022-01-27 | 2022-08-23 | 浙江浩瀚能源科技有限公司 | Automatic testing and monitoring method capable of remotely triggering local UI |
CN115525576A (en) * | 2022-10-31 | 2022-12-27 | 广州市易鸿智能装备有限公司 | MES communication interface device, test method, test equipment and computer storage medium |
CN115525576B (en) * | 2022-10-31 | 2023-08-25 | 广州市易鸿智能装备有限公司 | MES communication interface device, test method, test equipment and computer storage medium |
CN116680194A (en) * | 2023-06-29 | 2023-09-01 | 广州形银科技有限公司 | Implementation method of efficient semi-automatic artificial intelligence software |
CN116680194B (en) * | 2023-06-29 | 2024-05-28 | 广州形银科技有限公司 | Implementation method of efficient semi-automatic artificial intelligence software |
Also Published As
Publication number | Publication date |
---|---|
CN112597051B (en) | 2024-09-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112597051B (en) | Method and device for obtaining test result, electronic equipment and storage medium | |
CN110941942A (en) | Method, device and system for checking circuit schematic diagram | |
EP3125163A1 (en) | Method and device for flight notification, and method and device for flight setting | |
CN104468329A (en) | Member adding method and device based on instant messaging | |
CN111294850B (en) | Measurement reporting method and device, and terminal equipment information acquisition method and device | |
CN111031124B (en) | Home equipment networking deployment method and device, electronic equipment and storage medium | |
CN107562500B (en) | Debugging device, method and equipment | |
CN114741292A (en) | Test script management method and device, electronic equipment and storage medium | |
CN113377664A (en) | Model testing method and device, electronic device and storage medium | |
CN105530129A (en) | Router reset method and device | |
CN105550260A (en) | Picture display method and device | |
CN112395192A (en) | Information processing method and device | |
CN109992503B (en) | Automatic testing method and device | |
CN112650686A (en) | Method and device for obtaining test result, electronic equipment and storage medium | |
CN111694571B (en) | Compiling method and device | |
CN115033469A (en) | Website system performance test method and device, equipment and storage medium | |
CN115562681A (en) | Cloud application management method, device and system, electronic equipment and storage medium | |
CN106354595B (en) | Mobile terminal, hardware component state detection method and device | |
CN115098390A (en) | Automatic testing method and device, storage medium and electronic equipment | |
CN109144054B (en) | Intelligent driving drive test control method and device, electronic equipment and storage medium | |
CN108549570B (en) | User interface updating method and device | |
CN106709285B (en) | Display method and device of application lock interface | |
CN110413525B (en) | Safety testing method and device | |
CN111343272B (en) | Cross-node request retry method of star network architecture and electronic equipment | |
CN116450534B (en) | Method, device, equipment and medium for generating mobile terminal application program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |