CN116361164A - Test frame adjustment method and device, storage medium and electronic equipment - Google Patents

Test frame adjustment method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN116361164A
CN116361164A CN202310284534.0A CN202310284534A CN116361164A CN 116361164 A CN116361164 A CN 116361164A CN 202310284534 A CN202310284534 A CN 202310284534A CN 116361164 A CN116361164 A CN 116361164A
Authority
CN
China
Prior art keywords
test
adjustment parameter
parameter item
environment
adjusted
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
CN202310284534.0A
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.)
Beijing Jinxun Ruibo Network Technology Co Ltd
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Jinxun Ruibo Network Technology Co Ltd
Beijing Kingsoft Cloud Network 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 Jinxun Ruibo Network Technology Co Ltd, Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Jinxun Ruibo Network Technology Co Ltd
Priority to CN202310284534.0A priority Critical patent/CN116361164A/en
Publication of CN116361164A publication Critical patent/CN116361164A/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/3664Environments for testing or debugging software

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)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a test frame adjusting method, a test frame adjusting device, a storage medium and electronic equipment. The method comprises the following steps: under the condition that the test frame is applied to the target test environment, acquiring an adjustment parameter item corresponding to the target test environment, wherein the adjustment parameter item is a parameter item of a parameter value to be adjusted in the test frame; prompting for adjusting parameter items; in the case of receiving the adjustment parameter value of the adjustment parameter item, replacing the original parameter value of the adjustment parameter item with the adjustment parameter value; and executing the test by using the adjusted test frame. The invention solves the technical problem of low parameter adjustment efficiency in an automatic test framework.

Description

Test frame adjustment method and device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of testing, and in particular, to a method and apparatus for adjusting a test frame, a storage medium, and an electronic device.
Background
In the prior art, after the automated test framework is applied to a specific test environment, because the specific test environment is different, parameter values of parameter items in the automated test framework need to be adjusted so as to match the parameter values with the test environment.
The current adjustment means is to open the maintained automated test framework program, retrieve the parameters again and make modifications and adjustments. However, this approach is inefficient in adjusting parameters in the test framework.
Disclosure of Invention
The embodiment of the invention provides a test frame adjusting method, a device, a storage medium and electronic equipment, which are used for at least solving the technical problem of low parameter adjusting efficiency in an automatic test frame.
According to an aspect of an embodiment of the present invention, there is provided a test frame adjustment method including: under the condition that the test framework is applied to a target test environment, acquiring an adjustment parameter item corresponding to the target test environment, wherein the adjustment parameter item is a parameter item of a parameter value to be adjusted in the test framework; prompting the adjustment parameter item; when receiving the adjustment parameter value of the adjustment parameter item, replacing the original parameter value of the adjustment parameter item by using the adjustment parameter value; and executing the test by using the adjusted test framework.
According to another aspect of an embodiment of the present invention, there is provided a test frame adjustment apparatus including: the acquisition module is used for acquiring adjustment parameter items corresponding to the target test environment under the condition that the test frame is applied to the target test environment, wherein the adjustment parameter items are parameter items of parameter values to be adjusted in the test frame; the prompting module is used for prompting the adjustment parameter items; a replacing module, configured to replace an original parameter value of the adjustment parameter item with the adjustment parameter value when receiving the adjustment parameter value of the adjustment parameter item; and the execution module is used for executing the test by using the adjusted test framework.
As an optional example, the acquiring module includes: the traversing unit is used for traversing the association relation between the test environment and the parameter item to be adjusted by using the target environment identifier of the target test environment; and the first determining unit is used for determining the parameter items to be adjusted, of which the environment identifiers are the same as the target environment identifiers, in the association relation as the adjustment parameter items.
As an alternative example, the above apparatus further includes: the receiving module is used for receiving an incidence relation setting instruction before the adjustment parameter item is determined from the parameter items to be adjusted of the test frame according to the target test environment, wherein the incidence relation setting instruction comprises an environment identifier and the parameter items to be adjusted; the association module is used for establishing an association relationship between the environment identifier and the parameter item to be adjusted according to the association relationship setting instruction; and the storage module is used for taking the environment identifier as a key in the key value pair, taking the parameter item to be adjusted as a value in the key value pair, and storing the association relation into a key value database.
As an optional example, the above-mentioned acquisition module further includes: the second determining unit is used for determining all test environments to which the test framework is applied before traversing the association relation between the test environment and the parameter item to be adjusted by using the target environment identifier of the target test environment; and a third determining unit, configured to determine a union of the adjustment parameter items corresponding to each of the test environments as the parameter item to be adjusted.
As an alternative example, the execution module includes: the execution unit is used for executing the automatic test modules in the test framework under the condition that the test instruction for starting the test is acquired, and obtaining the execution result of each automatic test module; the classification unit is used for classifying the execution results and generating a test report; and the display unit is used for displaying the test report.
As an optional example, the prompting module includes: and the prompting unit is used for displaying all the adjustment parameter items in a visual mode.
As an alternative example, the above-mentioned prompting unit includes: and the determining subunit is used for determining the position of the adjustment parameter item in the visual interface according to the type of the adjustment parameter value of the adjustment parameter item.
According to still another aspect of the embodiments of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program when executed by a processor performs the above-described test frame adjustment method.
According to still another aspect of the embodiments of the present invention, there is also provided an electronic device including a memory in which a computer program is stored, and a processor configured to execute the above-described test frame adjustment method by the above-described computer program.
In the embodiment of the invention, under the condition that the test frame is applied to the target test environment, an adjustment parameter item corresponding to the target test environment is obtained, wherein the adjustment parameter item is a parameter item of a parameter value to be adjusted in the test frame; prompting the adjustment parameter item; when receiving the adjustment parameter value of the adjustment parameter item, replacing the original parameter value of the adjustment parameter item by using the adjustment parameter value; in the method, under the condition that the test frame is applied to the target test environment, the method can acquire the adjustment parameter item corresponding to the target test environment, prompt the adjustment parameter item, receive the adjustment parameter value for adjusting the adjustment parameter item by a user in a prompting way, replace the original parameter value by the adjustment parameter value, and obtain the adjusted test frame, thereby realizing the purposes of re-searching parameters and modifying and adjusting without re-opening the maintained automatic test frame program by the user, and further solving the technical problem of low parameter adjustment efficiency in the automatic test frame.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a flow chart of an alternative test framework adjustment method according to an embodiment of the present invention;
FIG. 2 is a correspondence diagram of an alternative test framework adjustment method according to an embodiment of the present invention;
FIG. 3 is a diagram of prompt adjustment parameters for an alternative test framework adjustment method according to an embodiment of the present invention;
FIG. 4 is a system flow diagram of an alternative test framework adjustment method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an alternative test frame adjustment device according to an embodiment of the invention;
fig. 6 is a schematic diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to a first aspect of an embodiment of the present invention, there is provided a test frame adjustment method, optionally, as shown in fig. 1, the method includes:
s102, under the condition that the test framework is applied to a target test environment, acquiring an adjustment parameter item corresponding to the target test environment, wherein the adjustment parameter item is a parameter item of a parameter value to be adjusted in the test framework;
s104, prompting to adjust parameter items;
s106, under the condition that the adjustment parameter values of the adjustment parameter items are received, replacing the original parameter values of the adjustment parameter items with the adjustment parameter values;
s108, executing the test by using the adjusted test frame.
Alternatively, the test frame may be an automated test frame. An automated test framework is a framework for automated testing. May be applied to a test environment to perform automated test tasks.
The parameter item to be adjusted in this embodiment may be, but is not limited to, a permission Authorization, cookie file in a web page or a reminder Host, account number password, website address of a fixed parameter, etc., and if applied to other items, parameters may be defined according to specific situations.
In this embodiment, the parameter item to be adjusted of the test frame and the test environment may have a corresponding relationship. For example, the test environment 1 corresponds to the parameter item to be adjusted 1 and the parameter item to be adjusted 2 of the test frame, and the test environment 2 corresponds to the parameter item to be adjusted 3 and the parameter item to be adjusted 4 of the test frame. The test framework may include one or more parameter items to be adjusted. The test environment is different, and the parameter items to be adjusted can be different. The parameter items to be adjusted corresponding to the test environment may be referred to as adjustment parameter items. And determining which parameters need to be adjusted by acquiring adjustment parameter items of the target test environment.
In this embodiment, the prompting method may be multiple types of prompting adjustment parameter items. The most intuitive way is to prompt the adjustment parameter items in a visual way. Such as displaying the tuning parameter items in the page. In addition, the adjustment parameter item may be prompted by voice, which is not limited in this embodiment.
After prompting for the adjustment parameter item, an adjustment parameter value given by the user for the adjustment parameter item may be received. I.e. the value to which the user wishes to adjust the adjustment parameter item. The adjustment parameter values may be, but are not limited to, in any one or more of an alphanumeric, numeric, string, web site, etc.
The user may enter a corresponding adjustment parameter value for each adjustment parameter item. If there is a case where the adjustment parameter value is not input, the adjustment parameter item to which the adjustment parameter value is not input may be replaced with a default parameter value. Or, for the adjustment parameter item without input of the adjustment parameter value, marking with different colors and different forms is carried out, so that the user is prompted, and the adjustment parameter value without input is present.
After the user inputs the tuning parameter values, the original parameter values are replaced with the tuning parameter values, and then the tuned test framework can be used to perform automated test tasks in the current test environment.
For example. Taking a test environment as an example for logging in a certain webpage, taking an adjustment parameter item as an account password, after the test framework is applied to the test environment, obtaining adjustment parameter items corresponding to the test environment, namely an account and a password (which can be original parameter items or blank), and prompting the adjustment parameter items, namely prompting a user to input the account password in the test environment. After the user inputs the account number and the password, the original parameter item is replaced by the account number and the password input by the user, and then the automatic test is executed by using the test framework. If the same test frame is applied to another test environment, the adjustment parameter item corresponding to the other test environment is a website, the adjustment parameter item determined by the test frame is the website after the test frame is applied to the other test environment, at this time, the prompted adjustment parameter item is the website, and the user inputs the website corresponding to the test environment so as to perform automatic test, so that the user does not need to input an account number and a password.
In the method, under the condition that the test frame is applied to the target test environment, the adjustment parameter item corresponding to the target test environment can be obtained, the adjustment parameter item is prompted, the adjustment parameter value for adjusting the adjustment parameter item by a user is received in a prompting mode, the original parameter value is replaced by the adjustment parameter value, and the adjusted test frame is obtained, so that the purposes of re-searching parameters and modifying and adjusting the parameters without the need of a user to re-open a maintained automatic test frame program are achieved, and the technical problem of low parameter adjustment efficiency in the automatic test frame is solved.
As an optional example, in a case where the test framework is applied to the target test environment, acquiring the adjustment parameter item corresponding to the target test environment includes: traversing the association relation between the test environment and the parameter item to be adjusted by using a target environment identifier of the target test environment; and determining the parameter items to be adjusted, which are the same as the target environment identifier, in the association relation as adjustment parameter items.
Optionally, in this embodiment, after the test framework is applied to a certain target test environment, an adjustment parameter item corresponding to the target test environment in all the parameter items to be adjusted of the test framework may be determined according to an association relationship between the test environment and the parameter items to be adjusted. When the adjustment parameter item corresponding to the target test environment is determined, the environment identifier of the target test environment can be obtained. The environment identifier may be a character string, and the environment identifier may uniquely identify the test environment. And comparing the environment identifier of the passing target test environment with the environment identifier of the test environment in the association relation. When comparing, the first character can be compared, the disagreement is filtered out, and then the second character is compared. And determining the test environment with consistent environment identification from the target test environment through layer-by-layer comparison, and further determining the adjustment parameter item.
As an optional example, before determining the adjustment parameter item from the parameter items to be adjusted of the test framework according to the target test environment, the method further includes: receiving an incidence relation setting instruction, wherein the incidence relation setting instruction comprises an environment identifier and a parameter item to be adjusted; establishing an association relation between the environment identifier and the parameter item to be adjusted according to the association relation setting instruction; and taking the environment identifier as a key in the key value pair, taking the parameter item to be adjusted as a value in the key value pair, and storing the association relation into the key value database.
In this embodiment, an association relationship may be established between the testing environment and the parameter item to be adjusted in advance. And taking the parameter items to be adjusted, which are required to be changed by the test environment, in the test framework as adjustment parameter items corresponding to the test environment. The association relationship may be one-to-one, many-to-one, or one-to-many.
For example, as shown in fig. 2. In fig. 2, the test environment and the parameter items to be adjusted may be one-to-one, one-to-many, or many-to-one.
As an optional example, before traversing the association relationship between the test environment and the parameter item to be adjusted using the target environment identifier of the target test environment, the method further includes: determining all test environments to which the test framework is to be applied; and determining the union of the adjustment parameter items corresponding to each test environment as the parameter item to be adjusted.
Optionally, in this embodiment, for determining parameter items to be adjusted of a test framework, it is first determined in which test environments the test framework is applied. If the test framework is applied to the test environment 1 and the test environment 2, the adjustment parameter items corresponding to the test environment 1 and the test environment 2 are used as the parameter items to be adjusted of the test framework. Otherwise, the number of parameter items to be adjusted of the test frame is excessive due to the diversity of the test environments.
As an alternative example, performing a test using the adjusted test framework includes: under the condition that a test instruction for starting the test is obtained, executing an automatic test module in a test framework to obtain an execution result of each automatic test module; classifying the execution result to generate a test report; a test report is displayed.
Alternatively, in this embodiment, after the user fills in the adjustment test value, a one-touch test may be performed. The page can be provided with a button for one-key test, and the automation test can be performed through the button for one-key test. And after receiving the user instruction, the system background executes each automatic test module in the test framework. The execution may be parallel or serial. And executing each automatic test module to obtain an execution result. And classifying and summarizing all the execution results to generate a test report. The test report may be automatically displayed in the foreground such that the user clicking on the one-click test to begin and displaying the test report to end is automated.
The execution results are classified according to the data types of the execution results, so that the test results of the same data type are classified into one type, and a user can conveniently check a test report.
As an alternative example, prompting for adjustment parameter items includes: all adjustment parameter items are displayed in visual form.
As an alternative example, displaying all adjustment parameter items in visual form includes: and determining the position of the adjustment parameter item in the visual interface according to the type of the adjustment parameter value of the adjustment parameter item.
Optionally, in this embodiment, after determining the adjustment parameter item corresponding to the target test environment, the adjustment parameter item is to be prompted to the user, and the prompting method may be a voice prompt or a visual prompt or a combination of the two. The visual cues may be cues that are visualized through interfaces, pages, files, etc. For example, taking page hints as an example, in a page, adjustment parameter items are displayed. When the adjustment parameter items are displayed, all adjustment parameter items or a part of adjustment parameter items may be displayed. Each adjustment parameter item corresponds to an input area with prompt information and adjustment parameter values. The prompt information prompts the user what the adjustment parameter items to input are, and specific adjustment parameter values input by the user are acquired through the input area.
In this embodiment, when the adjustment parameter items are displayed, the order of the adjustment parameter items before and after the display may be determined according to the order of the input of the adjustment parameter values of the adjustment parameter items. For example, a certain adjustment parameter item is first filled with adjustment parameter values after each display, and then in the subsequent display, the adjustment parameter item is preferentially displayed and is located at the first position of the display sequence. The user can move the adjustment parameter item and the position of the input area of the adjustment parameter value by an operation such as a drag on the interface. After adjusting the position, the adjusted position may be set as a default position. And displaying the subsequent adjustment parameter items according to the default positions adjusted by the user.
In this embodiment, when the adjustment parameter item is displayed, the original parameter value may also be displayed in the input area of the adjustment parameter value of the adjustment parameter item. The displayed original parameter value does not need to be deleted when the adjustment parameter value is input, and the input adjustment parameter value automatically covers the original parameter value.
In this embodiment, the commonly used adjustment parameter value may also be set as a shortcut key, so that the adjustment parameter value is quickly input. Or, the commonly used adjustment parameter value is displayed in the interface, and the user can quickly input the adjustment parameter value into the input area through operations such as clicking, dragging and the like.
For example, as shown in fig. 3, fig. 3 is an exemplary visual display interface. An identifier 302 of the test environment 1 where the test framework is located is displayed, the account number and the password are adjustment parameter items, and the adjustment parameter values can be input through an input area 304. One or more auxiliary parameter values 306 may be displayed after each adjustment parameter item for shortcut entry. "Abc", "Ace", "Adc", etc. in fig. 3 are exemplary account numbers, and "123", "231", "222" are exemplary passwords. Can be a common account number password.
Fig. 4 is a system flowchart of the present embodiment. In fig. 4, the page is first registered. After successful login, the adjustment parameter value is input according to the prompted adjustment parameter item. After submission, the test framework executes the automation script to perform the automation test. And entering a report check page after the test is completed.
And developing front-end pages and combining an automatic test framework, and replacing parameters needing to be changed, such as test case parameters or new environment Cookie\ak\sk. Firstly, designing a front-end page, setting a submit frame by considering parameters needing to be replaced, and giving a friendly prompt. An automation framework for an application program interface, many parameters change with the change of the environment. For example, the common parameters in the data folder need to be replaced every time the login context information: the token, cookie, etc. are also needed to change some parameters in the test case, then the back end sets up the interface to pass through the front end, and the parameters needed to be changed are changed. The front end gives an input box of parameters corresponding to interface substitution. After the click is submitted, the parameters in the automation framework can be replaced.
Finally, by setting a button for immediately executing the automation script, after the button issues an execution command and is received by the rear end, the script is executed. In addition, after the execution of the automation script is completed, html reports, logs or the like can be output, and the front end can introduce reports or view links, so that a user can take a visual automation tool to operate the visual automation tool for testing, and a non-professional tester can also operate the visual automation tool. Thereby saving the manpower and improving the human efficiency.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present invention. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present invention.
According to another aspect of the embodiments of the present application, there is further provided a test frame adjustment device, as shown in fig. 5, including:
the obtaining module 502 is configured to obtain an adjustment parameter item corresponding to a target test environment when the test frame is applied to the target test environment, where the adjustment parameter item is a parameter item of a parameter value to be adjusted in the test frame;
a prompting module 504, configured to prompt for an adjustment parameter item;
a replacing module 506, configured to replace an original parameter value of the adjustment parameter item with the adjustment parameter value if the adjustment parameter value of the adjustment parameter item is received;
an execution module 508 is configured to execute a test using the adjusted test framework.
Alternatively, the test frame may be an automated test frame. An automated test framework is a framework for automated testing. May be applied to a test environment to perform automated test tasks.
The parameter item to be adjusted in this embodiment may be, but is not limited to, at least one of a permission Authorization, cookie file in a web page or a reminder Host of a fixed parameter, an account password, a website, and the like.
In this embodiment, the test environment and the parameter item to be adjusted of the test frame may have a correspondence relationship. For example, the test environment 1 corresponds to the parameter item to be adjusted 1 and the parameter item to be adjusted 2 of the test frame, and the test environment 2 corresponds to the parameter item to be adjusted 3 and the parameter item to be adjusted 4 of the test frame. The test framework may include one or more parameter items to be adjusted. The test environment is different, and the parameter items to be adjusted can be different. The parameter items to be adjusted corresponding to the test environment may be referred to as adjustment parameter items. And determining which parameters need to be adjusted by acquiring adjustment parameter items of the target test environment.
In this embodiment, the prompting method may be multiple types of prompting adjustment parameter items. The most intuitive way is to prompt the adjustment parameter items in a visual way. Such as displaying the tuning parameter items in the page. In addition, the adjustment parameter item may be prompted by voice, which is not limited in this embodiment.
After prompting for the adjustment parameter item, an adjustment parameter value given by the user for the adjustment parameter item may be received. I.e. the value to which the user wishes to adjust the adjustment parameter item. The adjustment parameter values may be, but are not limited to, in any one or more of an alphanumeric, numeric, string, web site, etc.
The user may enter a corresponding adjustment parameter value for each adjustment parameter item. If there is a case where the adjustment parameter value is not input, the adjustment parameter item to which the adjustment parameter value is not input may be replaced with a default parameter value. Or, for the adjustment parameter item without input of the adjustment parameter value, marking with different colors and different forms is carried out, so that the user is prompted, and the adjustment parameter value without input is present.
After the user inputs the tuning parameter values, the original parameter values are replaced with the tuning parameter values, and then the tuned test framework can be used to perform automated test tasks in the current test environment.
For example. Taking a test environment as an example for logging in a certain webpage, taking an adjustment parameter item as an account password, after the test framework is applied to the test environment, obtaining adjustment parameter items corresponding to the test environment, namely an account and a password (which can be original parameter items or blank), and prompting the adjustment parameter items, namely prompting a user to input the account password in the test environment. After the user inputs the account number and the password, the original parameter item is replaced by the account number and the password input by the user, and then the automatic test is executed by using the test framework. If the same test frame is applied to another test environment, the adjustment parameter item corresponding to the other test environment is a website, the adjustment parameter item determined by the test frame is the website after the test frame is applied to the other test environment, at this time, the prompted adjustment parameter item is the website, and the user inputs the website corresponding to the test environment so as to perform automatic test, so that the user does not need to input an account number and a password.
In the method, under the condition that the test frame is applied to the target test environment, the adjustment parameter item corresponding to the target test environment can be obtained, the adjustment parameter item is prompted, the adjustment parameter value for adjusting the adjustment parameter item by a user is received in a prompting mode, the original parameter value is replaced by the adjustment parameter value, and the adjusted test frame is obtained, so that the purposes of re-searching parameters and modifying and adjusting the parameters without the need of a user to re-open a maintained automatic test frame program are achieved, and the technical problem of low parameter adjustment efficiency in the automatic test frame is solved.
For other examples of this embodiment, please refer to the above examples, and are not described herein.
Fig. 6 is a schematic diagram of an alternative electronic device, as shown in fig. 6, including a processor 602, a communication interface 604, a memory 606, and a communication bus 608, wherein the processor 602, the communication interface 604, and the memory 606 communicate with one another via the communication bus 608, wherein,
a memory 606 for storing a computer program;
the processor 602, when executing the computer program stored on the memory 606, performs the following steps:
under the condition that the test frame is applied to the target test environment, acquiring an adjustment parameter item corresponding to the target test environment, wherein the adjustment parameter item is a parameter item of a parameter value to be adjusted in the test frame;
prompting for adjusting parameter items;
in the case of receiving the adjustment parameter value of the adjustment parameter item, replacing the original parameter value of the adjustment parameter item with the adjustment parameter value;
and performing testing by using the adjusted testing framework.
Alternatively, in the present embodiment, the above-described communication bus may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or an EISA (Extended Industry Standard Architecture ) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, only one thick line is shown in fig. 6, but not only one bus or one type of bus. The communication interface is used for communication between the electronic device and other devices.
The memory may include RAM or may include non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
As an example, the memory 606 may include, but is not limited to, the acquisition module 502, the prompt module 504, the replacement module 506, and the execution module 508 in the test frame adjustment device. In addition, other module units in the above-mentioned test frame adjusting device may be included, but are not limited to, and are not described in detail in this example.
The processor may be a general purpose processor and may include, but is not limited to: CPU (Central Processing Unit ), NP (Network Processor, network processor), etc.; but also DSP (Digital Signal Processing, digital signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field-Programmable Gate Array, field programmable gate array) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 is only illustrative, and the device implementing the above-mentioned test frame adjustment method may be a terminal device, and the terminal device may be a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a palmtop computer, a mobile internet device (Mobile Internet Devices, MID), a PAD, etc. Fig. 6 does not limit the structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 6, or have a different configuration than shown in FIG. 6.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program for instructing a terminal device to execute in association with hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, etc.
According to yet another aspect of embodiments of the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program when executed by a processor performs the steps in the above-described test frame adjustment method.
Alternatively, in this embodiment, it will be understood by those skilled in the art that all or part of the steps in the methods of the above embodiments may be performed by a program for instructing a terminal device to execute the steps, where the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present invention may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the method of the various embodiments of the present invention.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (10)

1. A method for adjusting a test frame, comprising:
under the condition that a test frame is applied to a target test environment, acquiring an adjustment parameter item corresponding to the target test environment, wherein the adjustment parameter item is a parameter item of a parameter value to be adjusted in the test frame;
prompting the adjustment parameter item;
replacing an original parameter value of the adjustment parameter item with the adjustment parameter value if the adjustment parameter value of the adjustment parameter item is received;
and executing the test by using the adjusted test frame.
2. The method according to claim 1, wherein, in the case of applying the test framework to the target test environment, the obtaining the adjustment parameter item corresponding to the target test environment includes:
traversing the association relation between the test environment and the parameter item to be adjusted by using the target environment identifier of the target test environment;
and determining the parameter items to be adjusted, which are the same as the target environment identifier, in the association relation as the adjustment parameter items.
3. The method of claim 1, wherein prior to determining the tuning parameter term from the to-be-tuned parameter terms of the test framework according to the target test environment, the method further comprises:
receiving an incidence relation setting instruction, wherein the incidence relation setting instruction comprises an environment identifier and a parameter item to be adjusted;
establishing an association relation between the environment identifier of the test environment and the parameter item to be adjusted according to the association relation setting instruction;
and taking the environment identifier as a key in a key value pair, taking the parameter item to be adjusted as a value in the key value pair, and storing the association relation into a key value database.
4. The method of claim 2, wherein prior to traversing the association of the test environment with the parameter item to be adjusted using the target environment identification of the target test environment, the method further comprises:
determining all test environments to which the test framework is to be applied;
and determining the union of the adjustment parameter items corresponding to each test environment as the parameter item to be adjusted.
5. The method of claim 1, wherein the performing a test using the adjusted test frame comprises:
under the condition that a test instruction for starting the test is obtained, executing an automatic test module in the test framework to obtain an execution result of each automatic test module;
classifying the execution result to generate a test report;
and displaying the test report.
6. The method of claim 1, wherein the prompting the adjustment parameter item comprises:
displaying all the adjustment parameter items in a visual form.
7. The method of claim 6, wherein said displaying all of said adjustment parameter items in visual form comprises:
and determining the position of the adjustment parameter item in the visual interface according to the type of the adjustment parameter value of the adjustment parameter item.
8. A test frame adjustment device, comprising:
the acquisition module is used for acquiring an adjustment parameter item corresponding to a target test environment under the condition that the test frame is applied to the target test environment, wherein the adjustment parameter item is a parameter item of a parameter value to be adjusted in the test frame;
the prompting module is used for prompting the adjustment parameter item;
a replacing module, configured to replace an original parameter value of the adjustment parameter item with the adjustment parameter value if the adjustment parameter value of the adjustment parameter item is received;
and the execution module is used for executing the test by using the adjusted test frame.
9. A computer-readable storage medium, having stored thereon a computer program, characterized in that the computer program, when executed by a processor, performs the method of any of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of the claims 1 to 7 by means of the computer program.
CN202310284534.0A 2023-03-22 2023-03-22 Test frame adjustment method and device, storage medium and electronic equipment Pending CN116361164A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310284534.0A CN116361164A (en) 2023-03-22 2023-03-22 Test frame adjustment method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310284534.0A CN116361164A (en) 2023-03-22 2023-03-22 Test frame adjustment method and device, storage medium and electronic equipment

Publications (1)

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

Family

ID=86927793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310284534.0A Pending CN116361164A (en) 2023-03-22 2023-03-22 Test frame adjustment method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116361164A (en)

Similar Documents

Publication Publication Date Title
CN108153670B (en) Interface testing method and device and electronic equipment
CN109683953B (en) Method and device for processing configuration file based on visual interface
CN108959068B (en) Software interface testing method, device and storage medium
CN107402880B (en) Test method and electronic equipment
CN110442524B (en) Method and device for testing web service interface with authentication authorization
WO2021040994A1 (en) Systems, method, and media for determining security compliance of continuous build software
US9262396B1 (en) Browser compatibility checker tool
US9848277B2 (en) High-speed application for installation on mobile devices for permitting remote configuration of such mobile devices
US9076072B2 (en) System and method for web page rendering test automation suite
WO2018120721A1 (en) Method and system for testing user interface, electronic device, and computer readable storage medium
CN105049421A (en) Authentication method based on use behavior characteristic of user, server, terminal, and system
US10896083B2 (en) Dynamic cloud deployment and calibration tool
CN108829838B (en) Batch processing method of account information and server
CN111552633A (en) Interface abnormal call testing method and device, computer equipment and storage medium
CN107741904A (en) Test machine method of automatic configuration, device, equipment and storage medium
US11714625B2 (en) Generating applications for versatile platform deployment
WO2021129335A1 (en) Operation monitoring method and apparatus, operation analysis method and apparatus
CN110737599A (en) Front-end automatic regression testing system and method based on picture comparison technology
CN114491555A (en) Equipment safety detection method and device, computer equipment and storage medium
CN113901476A (en) Vulnerability verification method, system, equipment and medium based on virtualization environment
CN110717315B (en) System data batch modification method and device, storage medium and electronic equipment
CN116361164A (en) Test frame adjustment method and device, storage medium and electronic equipment
CN112015715A (en) Industrial Internet data management service testing method and system
CN105512020A (en) Method and device for test
CN111538666B (en) Method, device, computer equipment and storage medium for collecting test results in batches

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