CN112597051B - 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 PDF

Info

Publication number
CN112597051B
CN112597051B CN202011608571.5A CN202011608571A CN112597051B CN 112597051 B CN112597051 B CN 112597051B CN 202011608571 A CN202011608571 A CN 202011608571A CN 112597051 B CN112597051 B CN 112597051B
Authority
CN
China
Prior art keywords
test
interface
return value
program
page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011608571.5A
Other languages
Chinese (zh)
Other versions
CN112597051A (en
Inventor
孙文博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Teamsun Technology Co ltd
Original Assignee
Beijing Teamsun Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Teamsun Technology Co ltd filed Critical Beijing Teamsun Technology Co ltd
Priority to CN202011608571.5A priority Critical patent/CN112597051B/en
Publication of CN112597051A publication Critical patent/CN112597051A/en
Application granted granted Critical
Publication of CN112597051B publication Critical patent/CN112597051B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods 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 disclosure relates to a method and a device for obtaining a test result, an electronic device and a storage medium, wherein the method comprises the following steps: accessing a preconfigured interface, triggering to open an automatic deployment tool page when accessing, and creating and executing a test task in the automatic deployment tool page; acquiring a test return value through the interface; and comparing the test return value with an expected return value, and determining 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, in particular to the test result for checking whether the bottom layer resource of the linux system is successfully created.

Description

Method and device for obtaining test result, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of software testing, and in particular relates to a method and device for acquiring a test result, electronic equipment and a storage medium.
Background
The software automation test is relatively manual, and a tester performs the test step by step according to the rules described in the test cases, so that the actual result is compared with the expected result. Compared with manual testing, the automatic software testing method is labor-saving, time-saving or hardware resource-saving and high in testing efficiency. In the prior art, when testing the resources of the bottom layer of the linux system, the existing automatic testing tool cannot be used for obtaining the testing result, so that whether the bottom layer (k 8s, ceph, apache, mysql, etc.) resources of the linux system are successfully created cannot be checked.
Disclosure of Invention
The disclosure provides a method and a device for acquiring a test result, electronic equipment and a storage medium, which can acquire the test result, in particular to test results for checking whether the 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 preconfigured interface, triggering to open an automatic deployment tool page when accessing, and creating and automatically executing a test task in the automatic deployment tool page;
Acquiring a test return value through the interface;
and comparing the test return value with an expected return value, and determining 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, UI automation tool development is adopted in the interface, and an automation deployment tool page is triggered to be opened by a UI automation program in the interface when the interface is accessed, and test tasks are created and executed in the automation deployment tool page; business logic for executing the test is written in the UI automation program.
In some possible embodiments, the obtaining, through the interface, a test return value includes:
positioning and acquiring output information in the automated deployment tool page through a UI (user interface) automation program in the interface;
and acquiring the output information through the interface to serve as a test return value.
In some possible embodiments, the number of interfaces is a plurality;
Business logic executed by the UI automation program within the different interfaces is different for creating and executing different test tasks.
In some possible embodiments, the determining the test result corresponding to the test task according to the comparison between the test return value and the expected return value further includes:
And determining whether the test result is successful or failed in response to whether the test return value and the expected return value are consistent.
According to a second aspect of the present disclosure, there is provided an apparatus for acquiring test results, comprising:
The triggering module is used for triggering and opening an automatic deployment tool page when a preconfigured 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 a test result of the test task, wherein the expected return value comprises expected result information corresponding to the test task.
In some possible implementations, 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 (user interface) automation program in the interface when the automatic deployment tool page is accessed, and creating and automatically executing a test task in the automatic deployment tool page; ; business logic for executing the test is written in the UI automation program.
In some possible embodiments, the return module is further configured to locate and obtain, via a UI automation program within the interface, output information in the automated deployment tool page; and obtaining the output information through the interface to serve 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 instructions stored in the memory 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 testing tool can be utilized to access the created interface, the creation and execution of the testing task in the automatic deployment tool page are realized through the access interface, and the testing 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, in particular to the test result for checking whether the bottom layer resource of the linux system is successfully created.
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 disclosure and together with the description, serve to explain the technical aspects of the disclosure.
FIG. 1 illustrates a flow chart 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 illustrates a block diagram of an apparatus for obtaining test results, according to an embodiment of the present disclosure;
FIG. 4 illustrates a block diagram of an electronic device, according to an embodiment of the present disclosure;
Fig. 5 shows a block diagram of another electronic device according to an embodiment of the disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the disclosure will be described in detail below with reference to the drawings. In the drawings, like reference numbers indicate identical or functionally similar elements. Although various aspects of the embodiments are illustrated in the accompanying drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used 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" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, 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, may mean including any one or more elements selected from the group consisting of A, B and C.
Furthermore, numerous specific details are set forth in the following detailed description 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 well known to those skilled in the art have not been described in detail in order not to obscure the present disclosure.
The main implementation body of the method for obtaining the test result may be any device that may be used for testing, for example, the method may be performed 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 (Personal DIGITAL ASSISTANT, PDA), a handheld device, a computing device, an in-vehicle device, a wearable device, etc. In some possible implementations, the method may be implemented by way of a processor invoking computer readable instructions stored in a memory.
It will be appreciated that the above-mentioned method embodiments of the present disclosure may be combined with each other to form a combined embodiment without departing from the principle logic, and are limited to the description of the present disclosure.
Fig. 1 shows a flowchart of a method of obtaining test results according to an embodiment of the present disclosure, as shown in fig. 1, the method of obtaining test results includes:
S10: accessing a preconfigured interface, triggering to open an automatic deployment tool page when accessing, and creating and executing a test task in the automatic deployment tool page;
S20: acquiring a test return value through the interface;
s30: and comparing the test return value with an expected return value, and determining 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 test tool, and the program test tool is preferably an interface test tool Postman, and in the related art, in order to test whether the bottom layer resource of the linux system is successfully created, the adopted postman software performs an automatic test, and the automatic test is found in the test process: the test result cannot be obtained, so that whether the creation of the underlying (k 8s, ceph, apache, mysql, etc.) resource of the linux system is successful cannot be verified. Therefore, the embodiment of the disclosure combines the automatic deployment tool page and the preconfigured interface to obtain the test return value in a matching way so as to verify whether the underlying resource of the linux system is successfully created. Of course, in practical applications, other corresponding tools may be used as the software testing tool, for example: jmeter, etc.
Embodiments of the present disclosure include, prior to performing a test, i.e., prior to accessing a pre-configured interface with a program test tool: the user configures the interface, which is preferably: and a flash interface, namely. Of course, other types of interfaces may be used in practical applications, such as: django interface.
UI automation tool development (i.e., IU automation program in the interface) can be adopted in the interface of the embodiment of the disclosure, the UI automation program in the interface triggers to open the automation deployment tool page when the UI automation program is accessed, and test tasks are created and automatically executed in the automation deployment tool page, wherein business logic for executing the 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 automated deployment tool page is jenkins WEB pages. Of course, in practical application, the invention is not limited to this, the UI automation tool may be Robot Framework, UTF, and the automation deployment tool may further include tekton, clone, jenkins x.
Therefore, in the embodiment of the disclosure, the third party library flash is used to develop a flash interface for the program test tool postman to access, and the automation deployment tool page jenkins WEB can be operated through the selenium program in the flash interface, so that when the program test tool postman accesses the flash interface, the selenium program in the interface is triggered to execute operations such as opening the automation deployment tool, creating a test task, executing the test task, and the like.
Selenium is a tool for Web application testing, among other things. Selenium the test runs directly in the browser as if the real user were operating. Flask is a lightweight Web application framework written in the Python language; jenkins is an open source software project, is a continuous integration tool based on Java development, is used for monitoring continuous repeated work, and aims to provide an open and easy-to-use software platform so that continuous integration of software is possible.
With the above configuration, an interface for the program test tool postman to access can be created through the third party library flash, within which interface the UI automation tool selenium development is utilized. The program testing tool postman of the embodiment of the disclosure accesses an interface, and is used for opening an automatic deployment tool page, positioning task nodes executed by the automatic deployment tool page, and acquiring information such as a test result generated in the automatic deployment tool page. By postman accessing the interface, an automated deployment tool page may be invoked to automatically perform test tasks and obtain test results. Specifically, postman accesses to the flash interface trigger the selenium program, which opens jenkins WEB pages, and the selenium program drives to create a new job task (test task) in the jobs on pages jenkins WEB. And then, executing the test task according to service logic information related to the test task in the selenium program, so that the job task is executed in the linux system, and returning an execution result to the jenkins WEB page after the execution is completed.
During execution of the software program test, the created interface may 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, may include a test for whether k8s resources under the bottom layer of the linux system are created successfully, a test for whether mysql resources under the bottom layer of the linux system are created successfully, and the present disclosure does not specifically limit this. Moreover, different interfaces in the embodiments of the present disclosure refer to different business logic executed by the UI automation program in the different interfaces, and may be used to create and execute different test tasks.
In an embodiment of the present disclosure, when the access interface opens the automated deployment tool page, the program testing tool postman further includes: authentication information, which may include a user name and a password, needs to be acquired, and the automated deployment tool page is opened whenever the input authentication information matches the pre-registered information.
Specifically, fig. 2 shows a flowchart of step S20 in a method of obtaining a test result according to an embodiment of the present disclosure. The obtaining the test return value through the interface includes:
S21: positioning and acquiring output information in the automated deployment tool page through a UI (user interface) automation program in the interface;
s22: and obtaining 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 located and acquired through the selenium, and returned to postman through the flash interface, so that the postman can acquire a return value; the embodiment of the disclosure can store the obtained information in real time. In the disclosed embodiment, job is a task or item jenkins that is configurable and executable. Executing tasks in a linux system; the console is a console in jenkins WEB pages for printing out 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 a test result of the test task is determined according to a comparison result of the test return value and the expected return value, wherein the test result comprises the construction condition of an underlying architecture corresponding to the test task.
In particular, the expected return value may comprise 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 underlying resource constructed may be included, which is not specifically limited in the present disclosure, and any parameter or result that can be obtained by executing the test task may be used as the expected return value.
Under the condition that the test return value is obtained, the test return value and the expected return value can be compared, and if the test return value and the expected return value are the same, the state of the application program which is tested currently by the test task is consistent with the expected state, namely the test result is successful. If the two are different, it can be determined that the state of the currently tested application program has faults or errors, i.e. the test result is failure, and the application program needs to be improved and modified.
In some possible embodiments, the expected return value may include at least one return value, where the return value may be matched with an underlying resource of the application program, and if the corresponding underlying resource runs error-free and is successfully created during the execution of the test task, the return value corresponding to the underlying resource may be generated, that is, the test return value. Thus, the test return value may represent whether the underlying resource in the application corresponding to the test task was successfully created. In the disclosed embodiments, the underlying resources may include at least one of k8s, ceph, apache, mysql. The generated return value may be the first identifier when the corresponding underlying resource is created, the second identifier when the corresponding underlying resource fails to be created, or no identifier may be generated. The corresponding generated test return value may be a sequence of the first identity and the second identity. Wherein the first identifier may be 1 and the second identifier may be 0, which is not particularly limited in the embodiments of the present 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 the 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 underlying resource that is successfully created is included in the test return value, and the underlying resource corresponding to the corresponding first identifier that is not generated fails to be created.
In some possible implementations, where the expected return value is different from a corresponding parameter value in the test return value, the different parameter values may be utilized to determine the underlying resource that failed to create. As described above, when the creation of the underlying resource fails, the second identifier corresponding to the underlying resource is generated. Thus, each first identifier in the expected return value can represent an expected result that each underlying resource within the tested application is created, at which time the number of test return values and return values in the expected return value are the same, a second identifier corresponding to the underlying resource that failed to be created is different from the first identifier in the expected return value, and the underlying resource that failed to be created can be determined using the different identifiers. Conversely, if the test return value is consistent with the expected return value, determining that the underlying resource construction was successful.
In summary, in the embodiment of the disclosure, the program test tool may access the created interface, trigger the creation and automatic execution of the test task in the automated deployment tool page when accessing, obtain the test return value, and determine the test result of the test task by using the comparison result of the test return value and the expected return value. The embodiment of the disclosure can obtain the test result of the program, in particular to the test result for checking whether the bottom layer resource of the linux system is successfully created.
It will be appreciated by those skilled in the art that in the above-described method of the specific embodiments, the written order of steps is not meant to imply a strict order of execution but rather should be construed according to the function and possibly inherent logic of the steps.
Fig. 3 shows a block diagram of a device for obtaining test results according to an embodiment of the present disclosure, as shown in fig. 3, the device for obtaining test results includes:
a triggering module 10, configured to trigger opening an automated deployment tool page when accessing a preconfigured interface, and create and automatically execute a test task in the automated deployment tool page;
a return module 20, configured to obtain a test return value through the interface;
and the comparison module 30 is 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 implementations, UI automation tool development is employed within the interface;
The triggering module is further used for triggering and opening an automatic deployment tool page through a UI (user interface) automation program in the interface when the automatic deployment tool page is accessed, and creating and automatically executing a test task in the automatic deployment tool page, wherein business logic for executing the test is written in the UI automation program.
In some possible embodiments, the return module is further configured to locate and obtain, via a UI automation program within the interface, output information in the automated deployment tool page; and obtaining the output information through the interface to serve as a test return value.
In some embodiments, functions or modules included in an apparatus provided by the embodiments of the present disclosure may be used to perform a method described in the foregoing method embodiments, and specific implementations thereof may refer to descriptions of the foregoing method embodiments, which are not repeated herein for brevity.
In addition, the disclosure further provides a device, an electronic device, a computer readable storage medium and a program for obtaining a test result, which can be used for implementing any one of the methods for obtaining a test result provided in the disclosure, and corresponding technical schemes and descriptions and corresponding descriptions of method parts are omitted.
The disclosed embodiments also provide a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described method. The computer readable storage medium may be a non-volatile computer readable storage medium.
The embodiment of the disclosure also provides an electronic device, which comprises: a processor; a memory for storing processor-executable instructions; wherein the processor is configured as the method described above.
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, according to an embodiment of the disclosure. For example, electronic device 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 4, the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a 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 component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interactions 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 nonvolatile 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 disk.
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 sources, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen between the electronic device 800 and the user that provides an output interface. 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 input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operational mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
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 be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 further 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 a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of the electronic device 800. For example, the sensor assembly 814 may detect an on/off state of the electronic device 800, a relative positioning of the components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in position of the electronic device 800 or a component of the electronic device 800, the presence or absence of a user's contact with the electronic device 800, an orientation or acceleration/deceleration of the electronic device 800, and a change in temperature of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects 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 gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the electronic device 800 and other devices, either wired or wireless. 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 one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one 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, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 804 including computer program instructions executable by processor 820 of 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, electronic device 1900 may be provided as a server. Referring to FIG. 5, electronic device 1900 includes a processing component 1922 that further includes one or more processors and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by processing component 1922. The application programs stored in memory 1932 may include one or more modules each corresponding to a set of instructions. Further, processing component 1922 is configured to execute instructions to perform the methods described above.
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 is also provided, such as memory 1932, including computer program instructions executable by processing component 1922 of electronic device 1900 to perform the methods described above.
The present disclosure may be a system, method, and/or computer program product. The computer program product may include a computer readable storage medium having computer readable program instructions embodied thereon for causing a processor to implement aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage 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: portable computer disks, hard disks, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static Random Access Memory (SRAM), portable compact disk read-only memory (CD-ROM), digital Versatile Disks (DVD), memory sticks, floppy disks, mechanical coding devices, punch cards or in-groove structures such as punch cards or grooves having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media, as used herein, are not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., optical pulses through fiber optic cables), or electrical signals transmitted through 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 over 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 transmissions, wireless transmissions, routers, firewalls, switches, gateway computers and/or edge servers. The network interface 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 performing the operations of the present disclosure may be assembly 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 be executed 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present disclosure are implemented by personalizing electronic circuitry, such as programmable logic circuitry, field Programmable Gate Arrays (FPGAs), or Programmable Logic Arrays (PLAs), with state information of computer readable program instructions, which can execute the computer readable program instructions.
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 having the instructions stored therein includes 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 flowcharts 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.
The foregoing description of the embodiments of the present disclosure has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the technical improvements in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (6)

1. A method for obtaining test results, applied to a software test tool, comprising:
Accessing a preconfigured interface, triggering and opening an automatic deployment tool page when accessing, and creating and automatically executing a test task in the automatic deployment tool page, wherein the test task is used for verifying the creation condition of the bottom layer resource of the linux system;
Acquiring a test return value through the interface;
comparing the test return value with an expected return value, and determining a test result corresponding to the test task, wherein the test result comprises the construction condition of a bottom layer framework corresponding to the test task, and the expected return value comprises expected result information corresponding to the test task, expected intermediate parameters and information of constructed bottom layer resources;
the obtaining the test return value through the interface includes: positioning and acquiring output information in the automated deployment tool page through a UI (user interface) automation program in the interface; acquiring the output information through the interface as a test return value;
The software testing tool is postman software, the interface is a flash interface developed by a third party library flash for the postman software to access, a selenium program developed by using a UI automation tool is arranged in the flash interface, business logic for executing testing is written in the selenium program, and the automation deployment tool page is jenkins WEB pages;
the method comprises the steps that a preconfigured interface is accessed, an automatic deployment tool page is triggered to be opened when the preconfigured interface is accessed, and a test task is created and automatically executed in the automatic deployment tool page, and the method comprises the following steps:
And accessing the flash interface by utilizing the postman software to trigger the selenium program, triggering to open the jenkins WEB page by utilizing the selenium program when accessing, creating the test task in the jenkinsWEB page by utilizing the selenium program, executing the test task in the linux system according to business logic related to the test task in the selenium program, and returning the test return value to the jenkins WEB page after the execution is completed.
2. The method of claim 1, wherein the number of interfaces is a plurality;
Business logic executed by the UI automation program within the different interfaces is different for creating and executing different test tasks.
3. The method of claim 1, wherein determining the test result corresponding to the test task based on comparing the test return value with an expected return value, further comprises:
And determining whether the test result is successful or failed in response to whether the test return value and the expected return value are consistent.
4. An apparatus for obtaining test results, the apparatus being adapted for use with a software testing tool, comprising:
the triggering module is used for triggering and opening an automatic deployment tool page when a preconfigured interface is accessed, and creating and automatically executing a test task in the automatic deployment tool page, wherein the test task is used for verifying the creation condition of the bottom layer resource of the linux system;
The return module is used for acquiring a test return value through the interface;
the comparison module is used for comparing the test return value with an expected return value to determine a test result of the test task, wherein the test result comprises construction conditions of a bottom layer framework corresponding to the test task, and the expected return value comprises expected result information corresponding to the test task, expected intermediate parameters and information of constructed bottom layer resources;
The return module is further used for positioning and acquiring output information in the automated deployment tool page through a UI (user interface) automation program in the interface; acquiring the output information through the interface to serve as a test return value;
The software testing tool is postman software, the interface is a flash interface developed by a third party library flash for the postman software to access, a selenium program developed by using a UI automation tool is arranged in the flash interface, business logic for executing testing is written in the selenium program, and the automation deployment tool page is jenkins WEB pages;
The triggering module is further configured to access the flash interface by using the postman software to trigger the selenium program, trigger to open the jenkins WEB page by using the selenium program when accessing, create the test task in the jenkinsWEB page by using the selenium program, execute the test task in the linux system according to business logic related to the test task in the selenium program, and return the test return value to the jenkins WEB page after execution is completed.
5. An electronic device, comprising:
A processor;
a memory for storing processor-executable instructions;
Wherein the processor is configured to invoke the instructions stored in the memory to perform the method of any of claims 1-3.
6. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method of any of claims 1-3.
CN202011608571.5A 2020-12-30 2020-12-30 Method and device for obtaining test result, electronic equipment and storage medium Active CN112597051B (en)

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 CN112597051A (en) 2021-04-02
CN112597051B true 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)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN115525576B (en) * 2022-10-31 2023-08-25 广州市易鸿智能装备有限公司 MES communication interface device, test method, test equipment and computer storage medium
CN116680194B (en) * 2023-06-29 2024-05-28 广州形银科技有限公司 Implementation method of efficient semi-automatic artificial intelligence software

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108334449A (en) * 2018-01-26 2018-07-27 北京京东金融科技控股有限公司 A kind of method and apparatus of interface automatic test

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100524241C (en) * 2006-12-14 2009-08-05 英业达股份有限公司 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
US10114738B2 (en) * 2017-03-16 2018-10-30 Wipro Limited Method and system for automatic generation of test script
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
CN109828903B (en) * 2018-12-14 2022-03-08 中国平安人寿保险股份有限公司 Automatic testing method and device, computer device and storage medium
CN110032511A (en) * 2019-03-19 2019-07-19 深圳市买买提信息科技有限公司 A kind of interface test method and interface testing equipment
CN110704304B (en) * 2019-09-06 2022-09-27 平安普惠企业管理有限公司 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

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108334449A (en) * 2018-01-26 2018-07-27 北京京东金融科技控股有限公司 A kind of method and apparatus of interface automatic test

Also Published As

Publication number Publication date
CN112597051A (en) 2021-04-02

Similar Documents

Publication Publication Date Title
CN112597051B (en) Method and device for obtaining test result, electronic equipment and storage medium
CN110941942B (en) Circuit schematic diagram inspection method, device and system
CN106170004B (en) Method and device for processing verification code
US9690560B2 (en) System and method for transferring software applications and data between two mobile devices with different operating systems
CN111222637A (en) Neural network model deployment method and device, electronic equipment and storage medium
CN111031124B (en) Home equipment networking deployment method and device, electronic equipment and storage medium
CN111209195B (en) Method and device for generating test case
CN114741292A (en) Test script management method and device, electronic equipment and storage medium
CN112559673A (en) Language processing model training method and device, electronic equipment and storage medium
CN112650686B (en) Method and device for obtaining test result, electronic equipment and storage medium
CN113377664A (en) Model testing method and device, electronic device and storage medium
CN116069612A (en) Abnormality positioning method and device and electronic equipment
CN109992503B (en) Automatic testing method and device
CN111694571B (en) Compiling method and device
CN113378893B (en) Data management method and device, electronic equipment and storage medium
CN113626321B (en) Bridging test method, device, system and storage medium
CN112817868B (en) Information processing method, device and medium
CN106354595B (en) Mobile terminal, hardware component state detection method and device
CN108549570B (en) User interface updating method and device
CN111221512B (en) Function module mixed use method, electronic device and storage medium
CN115098390A (en) Automatic testing method and device, storage medium and electronic equipment
CN115562681A (en) Cloud application management method, device and system, electronic equipment and storage medium
CN115033469A (en) Website system performance test method and device, equipment and storage medium
CN113869295A (en) Object detection method and device, electronic equipment and storage medium
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