CN113204495A - Automatic testing method and device based on B/S architecture, storage medium and equipment - Google Patents

Automatic testing method and device based on B/S architecture, storage medium and equipment Download PDF

Info

Publication number
CN113204495A
CN113204495A CN202110604298.7A CN202110604298A CN113204495A CN 113204495 A CN113204495 A CN 113204495A CN 202110604298 A CN202110604298 A CN 202110604298A CN 113204495 A CN113204495 A CN 113204495A
Authority
CN
China
Prior art keywords
user
case
event
test
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110604298.7A
Other languages
Chinese (zh)
Inventor
熊盛
陈俊宇
翁国川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Cubesili Information Technology Co Ltd
Original Assignee
Guangzhou Cubesili Information 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 Guangzhou Cubesili Information Technology Co Ltd filed Critical Guangzhou Cubesili Information Technology Co Ltd
Priority to CN202110604298.7A priority Critical patent/CN113204495A/en
Publication of CN113204495A publication Critical patent/CN113204495A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • Debugging And Monitoring (AREA)

Abstract

When a user needs to self-customize an automatic test case by using an automatic test tool, a case creating request can be sent, a client receives the case creating request, a case event is newly created, a corresponding custom interface is displayed for the user to set parameters, and after the user sets the parameters, the client receives parameter information input by the user and generates corresponding test data according to the parameter information, so that a server can analyze the test data and extract corresponding case information to automatically test appointed equipment; above-mentioned whole test flow need not research and development personnel's intervention, and the user can directly accomplish above operation through the interaction of page by oneself, effectively improves efficiency of software testing and user experience to reduce the human cost.

Description

Automatic testing method and device based on B/S architecture, storage medium and equipment
Technical Field
The invention relates to the technical field of automated testing, in particular to a method, a device, a storage medium and equipment for automated testing based on a B/S (browser/Server) architecture.
Background
Automated testing refers to the process of automatically performing tests, comparing actual results to expectations, and generating test reports in software testing using other software independent of the software under test. After the test flow has been established, the test automation may automatically perform some repetitive but necessary test work, as well as perform tests that are nearly impossible to perform manually. Test automation is crucial to the way in which continuous delivery and continuous integration are developed.
Currently, each automatic test platform is oriented to research and development personnel, if a user needs to use an automatic test tool to self-customize an automatic test case or flexibly combine a plurality of cases to test a software product, the intervention of the research and development personnel and the input of manpower are needed, and the automatic test platform cannot directly complete corresponding operation according to an interactive instruction of the user, so that the test efficiency is influenced and the labor cost is increased; in addition, the automation degree of the automatic test platform is low, and the user experience is poor.
Disclosure of Invention
The invention aims to at least solve one of the technical defects, and particularly, an automatic test platform in the prior art cannot directly complete corresponding operation according to an interactive instruction of a user, so that the test efficiency is influenced and the labor cost is increased; in addition, the automation degree of the automatic test platform is low, and the technical defect of poor user experience is caused.
The invention provides an automatic testing method based on a B/S framework, which comprises the following steps:
responding to a case creating request of a user, and creating a custom interface corresponding to a case event, wherein the custom interface comprises a plurality of parameter options;
receiving parameter information corresponding to each parameter option input by the user;
and generating test data corresponding to the case event according to the parameter information, and sending the test data to a server, wherein the server is used for analyzing the test data, extracting case information and automatically testing the specified equipment based on the case information.
Optionally, before the step of responding to the user's request for creating a use case, the method further includes:
responding to an automatic test request of a user, and generating a corresponding equipment management interface, wherein the equipment management interface comprises historical equipment and newly-added equipment;
and receiving the selection operation of the user on the historical equipment or the newly added equipment, and generating a corresponding use case management page according to the selection operation.
Optionally, the automated testing method based on the B/S architecture further includes:
and sending a device connection instruction to a server based on the selection operation of the user so that the server performs connection operation on the historical device or the newly added device according to the device connection instruction.
Optionally, the automated testing method based on the B/S architecture further includes:
and receiving an execution case selected by a user on the case management page, and sending the execution case selected by the user to the server so that the server can automatically test the connecting equipment.
Optionally, the step of creating a custom interface corresponding to the use case event in response to the use case creation request of the user includes:
responding to a use case creating request of a user;
creating a new use case event based on the create use case request;
and generating a custom interface corresponding to the use case event.
Optionally, the parameter information at least includes an event type, an event description, a control ID, and an inner loop number.
Optionally, the step of generating test data corresponding to the use case event according to the parameter information includes:
generating an event to be tested corresponding to the use case event according to the event type;
generating a test flow corresponding to the event to be tested according to the event description;
generating a test object corresponding to the test flow according to the control ID;
and generating the testing times corresponding to the testing object according to the internal circulation times.
The invention also provides an automatic testing device based on the B/S architecture, which comprises:
the response module is used for responding to a case creating request of a user and creating a custom interface corresponding to a case event, and the custom interface comprises a plurality of parameter options;
the information receiving module is used for receiving the parameter information which is input by the user and corresponds to each parameter option;
and the automatic test module is used for generating test data corresponding to the case event according to the parameter information and sending the test data to a server, and the server is used for analyzing the test data, extracting case information and automatically testing the specified equipment based on the case information.
The present invention also provides a storage medium having stored therein computer readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the automated testing method based on the B/S architecture as described in any one of the above embodiments.
The present invention also provides a computer device having stored therein computer readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the automated testing method based on B/S architecture as described in any of the above embodiments.
According to the technical scheme, the embodiment of the invention has the following advantages:
when a user needs to self-customize an automatic test case by using an automatic test tool, a case creating request can be sent, a client receives the case creating request, a case event is newly created, a corresponding custom interface is displayed for the user to set parameters, and after the user sets the parameters, the client receives parameter information input by the user and generates corresponding test data according to the parameter information, so that a server can analyze the test data and extract corresponding case information to automatically test appointed equipment; above-mentioned whole test flow need not research and development personnel's intervention, and the user can directly accomplish above operation through the interaction of page by oneself, effectively improves efficiency of software testing and user experience to reduce the human cost.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a schematic diagram of an application environment provided by an embodiment of the present invention;
FIG. 2 is a schematic flow chart of an automated testing method based on a B/S architecture according to an embodiment of the present invention;
fig. 3 is a schematic page diagram of a use case page generated automatically according to an embodiment of the present invention;
fig. 4 is a page schematic diagram of a mobile phone management page provided in an embodiment of the present invention;
fig. 5 is a page schematic diagram of a use case management page provided in the embodiment of the present invention;
fig. 6 is a schematic page view of a custom interface of a new use case event according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a page after a task event is added according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of an information interaction structure according to an embodiment of the present invention;
FIG. 9 is a schematic structural diagram of an automated testing apparatus based on a B/S architecture according to an embodiment of the present invention;
fig. 10 is a schematic internal structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It will be understood by those within the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
Automated testing refers to the process of automatically performing tests, comparing actual results to expectations, and generating test reports in software testing using other software independent of the software under test. After the test flow has been established, the test automation may automatically perform some repetitive but necessary test work, as well as perform tests that are nearly impossible to perform manually. Test automation is crucial to the way in which continuous delivery and continuous integration are developed.
Currently, each automatic test platform is oriented to research and development personnel, if a user needs to use an automatic test tool to self-customize an automatic test case or flexibly combine a plurality of cases to test a software product, the intervention of the research and development personnel and the input of manpower are needed, and the automatic test platform cannot directly complete corresponding operation according to an interactive instruction of the user, so that the test efficiency is influenced and the labor cost is increased; in addition, the automation degree of the automatic test platform is low, and the user experience is poor.
Therefore, the invention aims to solve the problems that the automatic test platform in the prior art cannot directly complete corresponding operation according to the interactive instruction of the user, the test efficiency is influenced and the labor cost is increased; in addition, the automation degree of the automatic test platform is low, and the technical problem of poor user experience is also caused, and the following technical scheme is provided:
the application environment of the present invention is first explained, referring to fig. 1, fig. 1 is a schematic diagram of the application environment provided by the embodiment of the present invention; the technical scheme of the application can be realized on a base client 101, for example, in fig. 1, the client 101 responds to a case creating request of a user, creates a custom interface corresponding to a case event, receives parameter information corresponding to each parameter option input on the custom interface by the user, and realizes related functions; in the embodiment of the application, the client 101 may customize an automated test case according to a user's requirement, when the user sends a request for creating a case, the client 101 creates a custom interface corresponding to a case event for the user, the custom interface includes a plurality of parameter options, after the user inputs parameter information corresponding to each parameter option, the client 101 may generate test data corresponding to the case event according to the parameter information, and send the test data to the server 102, the server 102 extracts the case information after analyzing the test data, and performs an automated test on the specified device 103 based on the case information, thereby implementing an automated test function.
It should be noted that, the client 101 includes a smart phone, a tablet computer, an e-reader, a desktop computer or a notebook computer, and the like, which is not limited herein; in addition, a browser, such as Netscape Navigator or Internet Explorer, is installed in the client 101, and a user can log in the corresponding browser and then perform a self-customizing use case operation; the server 102 here refers to an independent server or a server cluster composed of a plurality of servers for providing the automated testing service for the client 101; the Server 102 of the application is provided with databases such as SQL Server, Oracle, MYSQL and the like, and the browser performs data interaction with the databases through the Web Server; the designated device 103 herein refers to a smart phone, a smart watch, or the like, in which an ios/Android/hongmeng system is installed.
The following will illustrate the specific implementation of the present invention by several embodiments:
in an embodiment, as shown in fig. 2, fig. 2 is a schematic flowchart of an automated testing method based on a B/S architecture according to an embodiment of the present invention, and the present invention provides an automated testing method based on a B/S architecture, which specifically includes the following steps:
s110: responding to a use case creating request of a user, and creating a custom interface corresponding to the use case event.
In this step, the client 101 may customize an automated test case according to the requirement of the user, and when the user sends a request for creating a case, the client 101 creates a custom interface corresponding to a new case event for the user, where the custom interface may include a plurality of parameter options, so that the user can set the interface conveniently.
For example, after the user successfully establishes and connects the specified device 103 to the server 102 through the browser in the client 101, the user may continue to perform other operations on the relevant interface of the browser, such as customizing an automated test case, combining multiple cases to perform a test task on a software product, and the like.
Schematically, as shown in fig. 3, fig. 3 is a page schematic diagram of a case page generated automatically according to an embodiment of the present invention; in fig. 3, after a user enters an automated generation case interface of an intermodal automated test management system through a browser, the interface displays currently connected device information and a task to be created, the user can initiate a case creation request in the automated generation case interface, after receiving the case creation request initiated by the user, a client 101 creates a custom interface corresponding to a case event, the custom interface may include task descriptions of the task to be added, the task descriptions include but are not limited to event types, event descriptions, control IDs, and the like, and the user can select corresponding parameters by himself and then save the parameters to form a customized test case.
S120: and receiving parameter information input by a user.
In this step, after the user-defined interface corresponding to the new use case event is created in step S110, the user-defined interface includes a plurality of parameter options, and the user can set corresponding parameter information according to different parameter options, and at this time, after the client 101 receives the parameter information input by the user, the subsequent operation flow is performed.
S130: and generating test data corresponding to the case event according to the parameter information, and sending the test data to a server for automatic testing.
In this step, after the client 101 receives the parameter information input by the user, test data corresponding to the use case event may be generated according to the received parameter information, and the test data is sent to the server 102, and the server 102 analyzes the test data, extracts the use case information, and performs an automated test on the specified device 103 based on the use case information.
Further, the test data received by the server 102 refers to data generated by the client 101 after performing format conversion according to the relevant parameters selected by the user, and the data may be json data or other types of data that can be analyzed by the analyzer in the server 102.
After receiving the test data, the server 102 sends the test data to a corresponding resolver for resolution, and the resolver resolves the received json data according to different selected devices (ios or Android) to obtain resolved data.
For example, after the server 102 parses and extracts the case information in the test data, the step of executing the automated test flow on the specified device 103 using the case information may include: automatically opening a certain app, automatically clicking to skip advertisements, automatically clicking to live a tag, automatically entering a channel, and automatically repeating the up-and-down sliding switching of the live broadcasting rooms.
After the test flow is finished, the server 102 may send the test result executed this time to some authorized software of the specified device 103 for the user to check. For example, the test result can be sent to the enterprise wechat group through the enterprise wechat robot; in addition, some test cases also include excel tables to show test results.
Further, when the use case information in the test data input by the user is the user-customized test use case, the use case information can be stored in the database, so that the use case stored in the database and related to the current connection device can be displayed at the corresponding position of the browser for the user to select, and the user experience is further improved.
In addition, the present application is an automated testing method based on a B/S architecture, where the B/S architecture refers to a B/S architecture (Browser/Server mode), which is a network architecture mode after WEB is emerging, and a WEB Browser is the most main application software of the client 101. The mode unifies the client 101, and the core part of the system function realization is centralized on the server 102, thereby simplifying the development, maintenance and use of the system. For example, a browser, such as Netscape Navigator or Internet Explorer, is installed on the client, the Server 102 installs a database such as SQL Server, Oracle, MYSQL, etc., and the browser performs data interaction with the database through the Web Server.
In the embodiment, when a user needs to use an automatic test tool to self-customize an automatic test case, a case creating request can be sent, after the client receives the case creating request, a case event is created, a corresponding self-defined interface is displayed for the user to set parameters, and after the user sets the parameters, the client receives parameter information input by the user and generates corresponding test data according to the parameter information, so that the server can analyze the test data and extract corresponding case information to automatically test specified equipment; above-mentioned whole test flow need not research and development personnel's intervention, and the user can directly accomplish above operation through the interaction of page by oneself, effectively improves efficiency of software testing and user experience to reduce the human cost.
In an embodiment, before the step of responding to the user' S request for creating a use case in step S110, the method may further include:
s101: and responding to an automatic test request of a user, and generating a corresponding equipment management interface, wherein the equipment management interface comprises historical equipment and newly-added equipment.
S102: and receiving the selection operation of the user on the historical equipment or the newly added equipment, and generating a corresponding use case management page according to the selection operation.
In this embodiment, since the present application is an automated testing method based on a B/S (Browser/Server) architecture, only one Browser, such as Netscape Navigator or Internet Explorer, needs to be installed on the client 101, and the Server 102 installs databases such as SQL Server, Oracle, MYSQL, and the like, so that the Browser can perform data interaction with the databases through the Web Server.
Therefore, when a user needs to use an automatic test tool to self-customize an automatic test case or flexibly combine a plurality of cases to perform a test task on a software product, a browser in the client 101 can be opened and log in an automatic test system, the browser generates a corresponding device management interface according to an automatic test request initiated by the user in the automatic test system, the device management interface comprises history devices and newly-added devices, the user can select the history devices or the newly-added devices to execute an automatic test process according to the own requirements, and the client 101 can generate a corresponding case management page according to the selection operation after receiving the selection operation of the history devices or the newly-added devices by the user.
Schematically, as shown in fig. 4, fig. 4 is a page schematic diagram of a mobile phone management page provided in an embodiment of the present invention; in fig. 4, after the user opens the browser, logs in the intermodal transportation automatic test management system, and opens the mobile phone management page in the system, the page displays the relevant filling information of the newly added device and the relevant information of the historical device connected to the system in the past, where the information may include the model, system, operation, and the like of the mobile phone, and the operation may include connecting the mobile phone and disconnecting the mobile phone.
When a user wants to connect to the historical device, the user can click to connect to the mobile phone at the corresponding mobile phone model below the page, and the browser can generate a corresponding device connection instruction according to the selection operation of the user and send the device connection instruction to the server 102, so that the server 102 can be connected with the specified device 103 according to the device connection instruction.
When the user does not find the device to be tested in the history device, the newly added device may be selected, and device information, such as an IP of the device in a local area network, may be input through an information input box corresponding to the newly added device, and after the user inputs the device information of the corresponding newly added device, the client 101 may generate a corresponding use case management page according to the device information input by the user.
In an embodiment, the automated testing method based on the B/S architecture may further include:
s103: and sending a device connection instruction to a server based on the selection operation of the user so that the server performs connection operation on the historical device or the newly added device according to the device connection instruction.
In this embodiment, before the user selects the historical device or the newly added device to perform the automatic test, the client 101 may send a device connection instruction to the server 102 according to the selection operation of the user, so that the server performs a connection operation on the historical device or the newly added device according to the device connection instruction.
For example, when a user logs in a corresponding automated testing system through a browser, then clicks a corresponding page in the automated testing system, and selects a historical device or a newly added device to connect, the browser sends a device connection request initiated by the user to the server 102, after receiving the device connection request, the server 102 performs a connection operation on the historical device or the newly added device according to the device connection request, and the connected device is called as the designated device 103.
For example, the application may be to test software in an ios/Android mobile phone, generally, for the software of the type, adb is used to perform connection debugging with the device, and two ways of connection may be available by using adb, one is wired connection, and the other is wireless connection.
It can be appreciated that the full name of adb is the Android debug bridge. adb is a tool in the Android SDK with which the Android simulator or real Android devices (e.g. G1 cell phone) can be directly operated and managed. The use of the adb tool presupposes that the USB debug on the mobile phone is turned on and then connected to the computer through the data line. adb works in a special way that monitors Socket TCP 5554 and other ports to allow IDE and Qemu communication, by default adb will daemon the relevant network ports, so when we run Eclipse, the adb process will run automatically.
Further, a corresponding device pool is provided in the server 102, and the device pool is used for storing the device information. When the device management interface is generated, device information of a plurality of existing devices is displayed in the device management interface for a user to select, after the user selects a corresponding device, the browser submits a corresponding device connection request, and after receiving the device connection request, the server 102 performs a connection operation on the specified device 103 according to the device information transmitted in the device connection request.
If the device to be connected by the user is not the existing device in the device pool, the user is required to add device information of the device to be connected, such as IP information in a local area network, at the corresponding position of the browser, and after the user fills and confirms, the browser can submit a corresponding device connection request to the server 102, so that the server 102 performs a connection operation on the specified device 103 according to the device information transmitted in the device connection request.
When the device information corresponding to the device connection request input by the user through the browser is not the device information already stored in the device pool of the server 102, the device information may be added to the device pool, so that when the user subsequently executes the automated testing process, the currently connected device information may be displayed in the corresponding interface of the browser, thereby further improving the user experience, reducing the testing process, and improving the testing efficiency.
In an embodiment, as shown in fig. 5, fig. 5 is a page schematic diagram of a use case management page provided by the embodiment of the present invention; the automated testing method based on the B/S architecture can further comprise the following steps:
s104: and receiving an execution case selected by a user on the case management page, and sending the execution case selected by the user to the server so that the server can automatically test the connecting equipment.
In this embodiment, as shown in fig. 5, a use case management page is displayed in fig. 5, where the use case management page is a related use case page generated according to a history device or a newly added device selected by a user, a test use case in the page is a use case already stored in a database of the server 102, and the user may select a corresponding use case to execute according to a requirement of the user. After the user selects a use case, the browser may invoke the use case controller of the server 102 using ajax technology, and then execute specific operation logic according to the connected device.
It is understood that the use cases herein include, but are not limited to, performance tests performed on software products in different types of mobile phones, etc.; ajax herein refers to a technique for creating a fast dynamic web page that enables asynchronous updates to the web page by exchanging a small amount of data with the server 102 in the background, meaning that some portion of the web page can be updated without reloading the entire web page.
In an embodiment, as shown in fig. 6, fig. 6 is a schematic page diagram of a custom interface of a new use case event provided in the embodiment of the present invention; in step S110, in response to the use case creating request of the user, the step of creating a custom interface corresponding to the use case event may include:
s111: in response to a create use case request from a user.
S112: and requesting a new use case event based on the created use case.
S113: and generating a custom interface corresponding to the use case event.
In this embodiment, as shown in fig. 6, when a user needs to create a use case, a request for creating the use case may be initiated in an automatic generation use case interface, and the client 101 responds to the request initiated by the user and displays a custom interface with a new use case event; the parameter options in the custom interface include, but are not limited to, event types, event descriptions, control IDs, input box values, YYP values, and other attributes, and when a user clicks a corresponding parameter and selects or fills in the corresponding parameter, the user clicks a parameter saving button, and then the currently added test task can be saved, and parameter information is formed.
In an embodiment, as shown in fig. 7, fig. 7 is a schematic diagram of a page after a task event is added according to an embodiment of the present invention; the parameter information may include at least an event type, an event description, a widget ID, and a number of inner loops.
In this embodiment, after the user adds the task event in the user-defined interface and sets the corresponding parameter, the system display page may change.
Specifically, after the user adds the task event in the custom interface, the client 101 may adjust the original automatic generation case interface according to the parameter information submitted by the user, and the adjusted page is as shown in fig. 7, where in a column of the event type, a newly added task event and corresponding event parameter information are added.
It is understood that the event types herein refer to different test events contained in the currently added test task; the event description refers to a test flow to be executed by an event type corresponding to the currently added test task; the control ID refers to a test object executed when the current event type is tested; the number of inner loops here refers to the iterative process from local encoding, local building, local debugging and testing to the completion of code submission, i.e., the number of tests.
For example, when the task ID of the current test task is 2 and the task is described as a channel entry, the event type corresponding to the test task may include a click event and an input event, the control ID corresponding to the click event may be com.
Further, the parameter information may further include an input box value corresponding to the widget ID, an outer loop number, a delay before the event starts, a delay after the event ends, and the like, where the outer loop number refers to an iterative process that is gradually deployed from the change of the code to the product environment.
In an embodiment, the step of generating test data corresponding to the use case event according to the parameter information in step S130 may include:
s131: and generating an event to be tested corresponding to the use case event according to the event type.
S132: and generating a test flow corresponding to the event to be tested according to the event description.
S133: and generating a test object corresponding to the test flow according to the control ID.
S134: and generating the testing times corresponding to the testing object according to the internal circulation times.
In this embodiment, after determining the parameter information, the client 101 may perform format conversion according to the parameter information selected by the user, and the data may be json data or other types of data that can be analyzed by the analyzer in the server 102.
For example, the client 101 may generate an event to be tested corresponding to a case event according to an event type input by a user, then generate a test flow corresponding to the event to be tested according to an event description input by the user, then generate a test object corresponding to the test flow according to a control ID input by the user, and finally generate the test times corresponding to the test object according to the internal cycle times input by the user.
The above embodiments describe the automated testing method based on the B/S architecture in the present invention, and the automated testing process of the present invention will be further described by a set of examples.
Schematically, as shown in fig. 8, fig. 8 is a schematic diagram of an information interaction structure provided in the embodiment of the present invention;
in fig. 8, a user enters a corresponding interactive page after opening a browser, and when the user needs to perform use case management, a use case can be selected according to equipment, and a use case controller of the server 102 is invoked according to ajax technology, and then a specific operation logic is executed according to a connected mobile phone; when a user needs to perform mobile phone management, if no current equipment exists, inputting information such as IP (Internet protocol) of equipment in a local area network, then building a connectable device, immediately connecting the mobile phone in the local area network through adb after the server 102 receives the mobile phone connection information, and then storing the connected information in an equipment pool; when a user needs to automatically generate a use case, the user selects equipment management on a page, namely, selects connected equipment, the system can automatically select equipment connection from an equipment pool, then selects/creates the use case on the page, self-customizes an automatic test case according to requirements, sets various parameters, a browser can convert the input various parameters into json data in a default mode, then the json data are transmitted to a database to be stored, an analyzer in the server 102 analyzes the received json data according to different selected equipment, then the analyzed data are stored in the corresponding database, and finally an automatic test flow is executed according to the analyzed data.
In an embodiment, as shown in fig. 9, fig. 9 is a schematic structural diagram of an automated testing apparatus based on a B/S architecture according to an embodiment of the present invention; the invention also provides an automated testing device based on the B/S architecture, which comprises a response module 210, an information receiving module 220 and an automated testing module 230, and specifically comprises the following components:
the response module 210 is configured to respond to a use case creating request of a user, and create a custom interface corresponding to a use case event, where the custom interface includes multiple parameter options;
an information receiving module 220, configured to receive parameter information corresponding to each parameter option input by the user;
and the automated testing module 230 is configured to generate test data corresponding to the case event according to the parameter information, and send the test data to a server, where the server is configured to extract the case information after analyzing the test data, and perform automated testing on the specified device based on the case information.
In the embodiment, when a user needs to use an automatic test tool to self-customize an automatic test case, a case creating request can be sent, after the client receives the case creating request, a case event is created, a corresponding self-defined interface is displayed for the user to set parameters, and after the user sets the parameters, the client receives parameter information input by the user and generates corresponding test data according to the parameter information, so that the server can analyze the test data and extract corresponding case information to automatically test specified equipment; above-mentioned whole test flow need not research and development personnel's intervention, and the user can directly accomplish above operation through the interaction of page by oneself, effectively improves efficiency of software testing and user experience to reduce the human cost.
In one embodiment, the present invention also provides a storage medium having computer-readable instructions stored therein, which when executed by one or more processors, cause the one or more processors to perform the steps of the automated testing method based on the B/S architecture as described in any one of the above embodiments.
In one embodiment, the present invention also provides a computer device having stored therein computer readable instructions, which when executed by one or more processors, cause the one or more processors to perform the steps of the automated testing method based on B/S architecture as described in any one of the above embodiments.
Fig. 10 is a schematic diagram illustrating an internal structure of a computer device according to an embodiment of the present invention, and the computer device 300 may be provided as a server, as shown in fig. 10. Referring to fig. 10, computer device 300 includes a processing component 302 that further includes one or more processors, and memory resources, represented by memory 301, for storing instructions, such as application programs, that are executable by processing component 302. The application programs stored in memory 301 may include one or more modules that each correspond to a set of instructions. Further, the processing component 302 is configured to execute instructions to perform the automated testing method based on the B/S architecture of any of the embodiments described above.
The computer device 300 may also include a power component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input output (I/O) interface 305. The computer device 300 may operate based on an operating system stored in memory 301, such as Windows Server, Mac OS XTM, Unix, Linux, Free BSDTM, or the like.
Those skilled in the art will appreciate that the architecture shown in fig. 10 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. An automated testing method based on a B/S architecture, the method comprising:
responding to a case creating request of a user, and creating a custom interface corresponding to a case event, wherein the custom interface comprises a plurality of parameter options;
receiving parameter information corresponding to each parameter option input by the user;
and generating test data corresponding to the case event according to the parameter information, and sending the test data to a server, wherein the server is used for analyzing the test data, extracting case information and automatically testing the specified equipment based on the case information.
2. The automated testing method based on the B/S architecture of claim 1, wherein the step of responding to the user' S request for creating a use case is preceded by the steps of:
responding to an automatic test request of a user, and generating a corresponding equipment management interface, wherein the equipment management interface comprises historical equipment and newly-added equipment;
and receiving the selection operation of the user on the historical equipment or the newly added equipment, and generating a corresponding use case management page according to the selection operation.
3. The automated testing method based on the B/S architecture of claim 2, further comprising:
and sending a device connection instruction to a server based on the selection operation of the user so that the server performs connection operation on the historical device or the newly added device according to the device connection instruction.
4. The automated testing method based on the B/S architecture of claim 3, further comprising:
and receiving an execution case selected by a user on the case management page, and sending the execution case selected by the user to the server so that the server can automatically test the connecting equipment.
5. The automated testing method based on the B/S architecture of claim 1, wherein the step of creating a custom interface corresponding to a use case event in response to a user request for creating a use case comprises:
responding to a use case creating request of a user;
creating a new use case event based on the create use case request;
and generating a custom interface corresponding to the use case event.
6. The automated testing method based on B/S architecture of claim 1, wherein the parameter information comprises at least event type, event description, control ID and inner loop number.
7. The automated testing method based on the B/S architecture as claimed in claim 6, wherein the step of generating the test data corresponding to the use case event according to the parameter information comprises:
generating an event to be tested corresponding to the use case event according to the event type;
generating a test flow corresponding to the event to be tested according to the event description;
generating a test object corresponding to the test flow according to the control ID;
and generating the testing times corresponding to the testing object according to the internal circulation times.
8. An automated testing device based on a B/S architecture, comprising:
the response module is used for responding to a case creating request of a user and creating a custom interface corresponding to a case event, and the custom interface comprises a plurality of parameter options;
the information receiving module is used for receiving the parameter information which is input by the user and corresponds to each parameter option;
and the automatic test module is used for generating test data corresponding to the case event according to the parameter information and sending the test data to a server, and the server is used for analyzing the test data, extracting case information and automatically testing the specified equipment based on the case information.
9. A storage medium, characterized by: the storage medium having stored thereon computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the automated B/S architecture-based testing method of any one of claims 1-7.
10. A computer device, characterized by: the computer device has stored therein computer-readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the automated B/S architecture-based testing method of any one of claims 1-7.
CN202110604298.7A 2021-05-31 2021-05-31 Automatic testing method and device based on B/S architecture, storage medium and equipment Pending CN113204495A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110604298.7A CN113204495A (en) 2021-05-31 2021-05-31 Automatic testing method and device based on B/S architecture, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110604298.7A CN113204495A (en) 2021-05-31 2021-05-31 Automatic testing method and device based on B/S architecture, storage medium and equipment

Publications (1)

Publication Number Publication Date
CN113204495A true CN113204495A (en) 2021-08-03

Family

ID=77024298

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110604298.7A Pending CN113204495A (en) 2021-05-31 2021-05-31 Automatic testing method and device based on B/S architecture, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN113204495A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113849356A (en) * 2021-09-07 2021-12-28 深圳Tcl新技术有限公司 Equipment testing method and device, electronic equipment and storage medium
CN113900874A (en) * 2021-10-18 2022-01-07 海光信息技术股份有限公司 Test vector management system and test vector management method
CN114327085A (en) * 2021-11-25 2022-04-12 浪潮软件集团有限公司 Input method interaction method and system for web-side remote real machine and mobile phone

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984388A (en) * 2018-06-01 2018-12-11 平安壹钱包电子商务有限公司 A kind of method and terminal device generating automatic test cases
CN110659198A (en) * 2018-06-28 2020-01-07 亿度慧达教育科技(北京)有限公司 Application program test case execution method and device and software test system
US20200110694A1 (en) * 2018-10-09 2020-04-09 Charter Communications Operating, Llc System and computer implemented method for generating test scripts
CN112631939A (en) * 2020-12-31 2021-04-09 广州方硅信息技术有限公司 Use case configuration method, use case configuration device, and readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984388A (en) * 2018-06-01 2018-12-11 平安壹钱包电子商务有限公司 A kind of method and terminal device generating automatic test cases
CN110659198A (en) * 2018-06-28 2020-01-07 亿度慧达教育科技(北京)有限公司 Application program test case execution method and device and software test system
US20200110694A1 (en) * 2018-10-09 2020-04-09 Charter Communications Operating, Llc System and computer implemented method for generating test scripts
CN112631939A (en) * 2020-12-31 2021-04-09 广州方硅信息技术有限公司 Use case configuration method, use case configuration device, and readable storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113849356A (en) * 2021-09-07 2021-12-28 深圳Tcl新技术有限公司 Equipment testing method and device, electronic equipment and storage medium
CN113849356B (en) * 2021-09-07 2024-04-30 深圳Tcl新技术有限公司 Equipment testing method and device, electronic equipment and storage medium
CN113900874A (en) * 2021-10-18 2022-01-07 海光信息技术股份有限公司 Test vector management system and test vector management method
CN114327085A (en) * 2021-11-25 2022-04-12 浪潮软件集团有限公司 Input method interaction method and system for web-side remote real machine and mobile phone

Similar Documents

Publication Publication Date Title
CN113204495A (en) Automatic testing method and device based on B/S architecture, storage medium and equipment
CN108347358B (en) Method and system for automatically testing cloud connection
US8584079B2 (en) Quality on submit process
CN105224458B (en) A kind of data library test method and system
CN103995777A (en) Automatic embedded software block box testing system and method
CN107608901B (en) Jmeter-based testing method and device, storage medium and electronic equipment
CN108958843A (en) Plug-in unit construction method, system, equipment and medium based on lightweight script
CN111221729B (en) Automatic testing method and system for separating platform service from testing service
EP4195108A1 (en) Method and apparatus for generating and applying deep learning model based on deep learning framework
CN112199355A (en) Data migration method and device, electronic equipment and storage medium
CN110109684B (en) Block chain link point management proxy service installation method, electronic device and storage medium
CN111769979A (en) Cloud resource arranging method, system, terminal and storage medium
CN113760462A (en) Method and device for constructing verification environment of dispatching automation system
CN111523676B (en) Method and device for assisting machine learning model to be online
CN116974927A (en) Performance automatic test method, system, computer equipment and storage medium
CN112416747A (en) Test case execution method, device, equipment and medium
CN114968823A (en) Automatic testing method, device, equipment and storage medium
CN115934559A (en) Testing method of intelligent form testing system
Voutama et al. Android-Based Claim System for Electricity Network Customers of PLN Padang Branch
WO2021115314A1 (en) Method, apparatus, and device for implementing logic simulation of nuclear power plant onsite control objects
CN114925516A (en) Method and device for automatic modeling and simulation
CN109359044B (en) Codecep-based test-oriented automation system
CN114297057A (en) Design and use method of automatic test case
CN114564213A (en) Pre-installed software deployment method, system, terminal and storage medium
CN114385258A (en) Automatic testing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210803

RJ01 Rejection of invention patent application after publication