CN114968795A - Test method, test device, electronic equipment and computer storage medium - Google Patents

Test method, test device, electronic equipment and computer storage medium Download PDF

Info

Publication number
CN114968795A
CN114968795A CN202210633287.6A CN202210633287A CN114968795A CN 114968795 A CN114968795 A CN 114968795A CN 202210633287 A CN202210633287 A CN 202210633287A CN 114968795 A CN114968795 A CN 114968795A
Authority
CN
China
Prior art keywords
test
target
service requirement
outline
target service
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
CN202210633287.6A
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202210633287.6A priority Critical patent/CN114968795A/en
Publication of CN114968795A publication Critical patent/CN114968795A/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/368Test management for test version control, e.g. updating test cases to a new software version
    • 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

Landscapes

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

Abstract

The application discloses a testing method, a testing device, electronic equipment and a computer storage medium, which can be applied to the field of big data or the field of finance. The method comprises the steps of obtaining a target service requirement of a service to be tested; when the target service requirement is determined to have change, adjusting a target test outline based on the changed requirement data in the target service requirement, wherein the target test outline is determined based on an incidence relation model, and the incidence relation model is used for storing incidence relations between all original service requirements and the test outline, between the test outline and a test case and between the test case and a test script; generating a corresponding target test case based on the target test outline; and generating a test case of the target service requirement based on the target test script to test the service to be tested, wherein the target test script is generated based on the target test case. By the method, the testing efficiency can be improved.

Description

Test method, test device, electronic equipment and computer storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a test method, an apparatus, an electronic device, and a computer storage medium.
Background
Currently, testing is generally divided into several levels, namely unit testing, component testing, interface/contract testing, UI testing, and E2E testing.
The banking system has a wide range of related services and more accumulated test scripts. When testing, only the full-scale automation script can be executed, so that the testing workload is increased, and the testing efficiency is low.
Disclosure of Invention
In view of this, embodiments of the present invention provide a testing method, an apparatus, an electronic device, and a computer storage medium, so as to solve the problem of low testing efficiency in the prior art.
In order to achieve the above purpose, the embodiments of the present invention provide the following technical solutions:
a first aspect of an embodiment of the present invention shows a test method, where the method includes:
acquiring a target service requirement of a service to be tested;
when the target service requirement is determined to have change, adjusting a target test outline based on the changed requirement data in the target service requirement to obtain an adjusted target test outline, wherein the target test outline is determined based on an incidence relation model, and the incidence relation model is used for storing incidence relations between all original service requirements and the test outline, between the test outline and a test case and between the test case and a test script;
generating a corresponding target test case based on the target test outline;
and generating a test case of the target service requirement based on a target test script to test the service to be tested, wherein the target test script is generated based on the target test case.
Optionally, determining that there is a change in the target service requirement includes:
determining a first original service requirement corresponding to the identification of the target service requirement;
comparing whether the first original service requirement and the target service requirement have changes or not;
if the first original service requirement and the target service requirement have changes, determining that the target service requirement has changes;
and if the first original service requirement and the target service requirement have no change, determining that no change exists in the target service requirement.
Optionally, the method further includes:
if it is determined that no change exists in the target service requirement, determining a first original service requirement corresponding to the identifier of the target service requirement;
determining a test script corresponding to the first original service requirement based on the incidence relation model;
and taking the test script corresponding to the first original service requirement as a test execution case of the target service requirement.
Optionally, the process of determining the target test outline based on the association relationship model includes:
determining a first original service requirement corresponding to the identification of the target service requirement;
inquiring a test outline corresponding to the first original service requirement based on the incidence relation model;
and taking the test outline corresponding to the first original service requirement as a target test outline corresponding to the target service requirement.
Optionally, the adjusting the target test schema according to the changed demand data in the target service demand includes:
carrying out structuralization processing on the changed demand data to obtain first data for adjusting the target test outline;
and processing the content corresponding to the changed demand data in the target test outline based on the first data.
A second aspect of an embodiment of the present invention shows a test apparatus, including:
the acquisition unit is used for acquiring the target service requirement of the service to be tested;
the adjusting unit is used for adjusting the target test outline based on the changed demand data in the target service demand to obtain an adjusted target test outline when the target service demand is determined to have a change, wherein the target test outline is determined based on an incidence relation model, and the incidence relation model is used for storing incidence relations between all original service demands and the test outline, between the test outline and a test case and between the test case and a test script;
the generating unit is used for generating a corresponding target test case based on the target test outline;
and the processing unit is used for generating a test case of the target service requirement based on a target test script so as to test the service to be tested, and the target test script is generated based on the target test case.
Optionally, the adjusting unit that determines that there is a change in the target service requirement is specifically configured to:
determining a first original service requirement corresponding to the identification of the target service requirement;
comparing whether the first original service requirement and the target service requirement have changes or not;
if the first original service requirement and the target service requirement have changes, determining that the target service requirement has changes;
and if the first original service requirement and the target service requirement are not changed, determining that no change exists in the target service requirement.
Optionally, the processing unit is further configured to:
if it is determined that no change exists in the target service requirement, determining a first original service requirement corresponding to the identifier of the target service requirement;
determining a test script corresponding to the first original service requirement based on the incidence relation model;
and taking the test script corresponding to the first original service requirement as a test execution case of the target service requirement.
A third aspect of the embodiment of the present invention shows an electronic device, where the electronic device is configured to run a program, where the program executes the test method shown in the first aspect of the embodiment of the present invention when running.
A fourth aspect of the embodiments of the present invention shows a computer storage medium, where the storage medium includes a storage program, and when the program runs, a device on which the storage medium is located is controlled to execute the test method shown in the first aspect of the embodiments of the present invention.
Based on the test method, the test device, the electronic equipment and the computer storage medium provided by the embodiment of the invention, the method comprises the following steps: acquiring a target service requirement of a service to be tested; when the target service requirement is determined to have change, adjusting the target test outline based on changed requirement data in the target service requirement, wherein the target test outline is determined based on an incidence relation model, and the incidence relation model is used for storing the incidence relation between all original service requirements and the test outline, the incidence relation between the test outline and a test case and the incidence relation between the test case and a test script; generating a corresponding target test case based on the target test outline; and generating a test case of the target service requirement based on a target test script to test the service to be tested, wherein the target test script is generated based on the target test case. In the embodiment of the invention, when the obtained target service requirement is determined to have change, a target test outline corresponding to the target service requirement is determined through an incidence relation model, and data in the target test outline is adjusted based on the changed requirement data in the target service requirement to obtain a new target test outline; further determining a test case and a test script corresponding to the target test outline; and generating a test case of the target service requirement based on the target test script so as to test. By the method, the testing efficiency can be improved.
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, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic flow chart of a testing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a construction of an association model according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a testing apparatus 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.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
As can be seen from the background art, no explicit correspondence relationship is established between the existing test script and the service requirement, so that only a full-scale automation script can be executed under the condition of requirement modification, which not only increases the test workload, but also fails to achieve the purpose of accurate test requirement; in addition, for the related scripts with new requirements, there is not enough time for writing and debugging, so that the testing efficiency is low.
It should be noted that the testing method, the testing device, the electronic equipment and the computer storage medium provided by the invention can be used in the field of big data or the field of finance. The foregoing is merely an example, and does not limit the application fields of the testing method, the testing apparatus, the electronic device, and the computer storage medium provided by the present invention.
In the embodiment of the invention, when the obtained target service requirement is determined to have change, a target test outline corresponding to the target service requirement is determined through an incidence relation model, and data in the target test outline is adjusted based on the changed requirement data in the target service requirement to obtain a new target test outline; further determining a test case and a test script corresponding to the target test outline; and generating a test case of the target service requirement based on the target test script so as to test. By the method, the testing efficiency can be improved.
Referring to fig. 1, a schematic flow chart of a testing method according to an embodiment of the present invention is shown, where the method includes:
step S101: and acquiring the target service requirement of the service to be tested.
In the process of implementing step S101 specifically, a target service requirement of a service to be tested that needs to be tested is obtained.
Step S102: determining whether there is a change in the target business requirement, if so, executing steps S103 to S105, and if not, executing steps S106 to S107.
In the process of implementing step S102 specifically, a first original service requirement corresponding to the identifier of the target service requirement is determined; comparing whether the first original service requirement and the target service requirement have changes or not; if the first original service requirement and the target service requirement have a change, determining that the target service requirement has a change, and performing steps S103 to S105, and if the first original service requirement and the target service requirement have no change, determining that the target service requirement has no change, and performing steps S106 to S107.
Step S103: and adjusting the target test outline based on the changed demand data in the target service demand to obtain the adjusted target test outline.
In step S103, the target test schema is determined based on an association model, where the association model is used to store the association between all the original service requirements and the test schema, the association between the test schema and the test cases, and the association between the test cases and the test scripts.
It should be noted that, the process of constructing the association relationship model, as shown in fig. 2, includes the following steps:
step S201: and acquiring all original business requirements in the bank system.
In the process of implementing step S201 specifically, all original service requirements in the banking system within a preset time period are acquired.
It should be noted that the preset time period refers to a historical time period preset according to multiple experiences or multiple experiments, and is, for example, the past 1 year.
Step S202: compiling all the test schemas of the original service requirements in the bank system, and establishing the association relationship between the original service requirements and the corresponding test schemas.
In the process of specifically implementing the step S202, for each original service requirement, performing structuring processing on the original service requirement to obtain processed data, and writing the processed data into a first preset template to obtain a corresponding test outline; and establishing an association relation between each original service requirement and the test outline corresponding to the service requirement.
It should be noted that the first preset template is written according to multiple experiences or experiments, so as to facilitate fast understanding of the corresponding data such as the demand point, the data preparation, the operation steps, the expected result, and the like.
The test schema includes demand points, data preparation, operational steps, expected results, and the like.
One original test requirement corresponds to one test outline.
Optionally, a unique prefix identifier may be set for the demand point of each test outline, so as to subsequently determine the corresponding demand point.
Step S203: and generating a corresponding test case based on the test outline, and establishing an association relation between the test outline and the test case.
In the process of specifically implementing step S203, analyzing the data corresponding to each demand point in the test outline to obtain analyzed data; and inputting the analyzed data into a corresponding second preset template to obtain a corresponding test case. And establishing an incidence relation between the test outline and the content of the test case according to the prefix identification of each key node of the test outline.
It should be noted that one requirement point may correspond to at least one test case, and thus the test outline corresponds to a plurality of test cases.
The test case mainly comprises a module, a data preparation step, a test step, an expected result and the like, wherein the module is matched with the demand point, and the data preparation step, the test step and the expected result are consistent with corresponding contents in the test outline.
It should be noted that, when it is determined that the target service requirement changes, the name of the corresponding requirement point does not change, and the data corresponding to the requirement point changes.
Step S204: and establishing an incidence relation between the test case and the test script.
In step S204, a technician writes a plurality of scenario-level scripts in advance when testing the scripts.
In the process of implementing step S204, the content prepared by each data in the test case corresponds to the scene level script keywords in the automation script one by one, and the corresponding association relationship is established by tagging the keywords.
Optionally, the connection between the keywords is realized by parameter transmission assignment, and each transaction-level script keyword contains an assertion, so as to verify the correctness of the transaction function. And connecting the keywords in series according to the logic sequence of the data preparation-operation steps through the incidence relation between the cases and the scripts, and finally forming the automatic script cases which can be independently executed.
It should be noted that each test case corresponds to one test script.
Step S205: and combining the obtained incidence relation between all the original service requirements and the test outline, the incidence relation between the test outline and the test case and the incidence relation between the test case and the test script to generate an incidence relation model.
Preferably, the process of determining the target test schema based on the association relationship between all the original service requirements and the test schema includes the following steps:
step S11: and determining a first original service requirement corresponding to the identification of the target service requirement.
In the process of implementing step S11 specifically, the original service requirement identical to the requirement point identifier of the target service requirement is determined, and is taken as the first original service requirement.
Step S12: and inquiring a test outline corresponding to the first original service requirement based on the incidence relation model.
In the process of specifically implementing step S12, based on the requirement point identifier in the first original service requirement, a test schema associated with the first original service requirement in the association relationship model is searched.
Step S13: and taking the test outline corresponding to the first original service requirement as a target test outline corresponding to the target service requirement.
In the process of implementing step S13, the test schema queried in step S12 is used as the target test schema.
Specifically, the step S103 of adjusting the target test schema according to the changed demand data in the target service demand and determining the adjusted first data in the target test schema includes the following steps:
step S21: and structuring the changed demand data to obtain first data for adjusting the target test outline.
In the process of implementing step S21 specifically, demand data different from the first original business demand is determined from the target business demand, and the changed demand data is subjected to structuring processing to obtain first data for adjusting the target test schema.
Step S22: and processing the content corresponding to the changed demand data in the target test outline based on the first data.
In the process of specifically implementing step S22, the corresponding content in the target test schema is adjusted by using the first data, so as to obtain the adjusted target test schema.
Step S104: and generating a corresponding target test case based on the target test outline.
In the process of specifically implementing step S104, determining a target demand point corresponding to the first data in the target test outline and data corresponding to the target demand point according to the first data obtained in step S21; analyzing the data to obtain analyzed data; inputting the analyzed data into a corresponding second preset template to obtain a corresponding first test case; and combining the first test case and second test cases corresponding to other unchanged demand points in the target test outline to generate a corresponding target test case.
It should be noted that the second test case is obtained by querying the association relation model through other unchanged demand points in the target test outline.
Step S105: and generating a test case of the target service requirement based on the target test script so as to test the service to be tested.
In step S105, the target test script is generated based on the target test case.
In the process of implementing step S105 specifically, traversing all the test scripts according to the content prepared by each data in the first test case, and searching for the first test scripts corresponding to the scene-level script keywords one to one; querying the incidence relation between the test case and the test script in the incidence relation model to determine a second test script corresponding to the second test case; and combining the first test script and the second test script to generate a target test script. And using the target test script as a test case of the target service requirement so as to test the service to be tested.
Step S106: and determining a first original service requirement corresponding to the identification of the target service requirement.
In the process of implementing step S106 specifically, an original service requirement identical to the requirement point identifier of the target service requirement is determined, and is taken as a first original service requirement.
Step S107: and determining a test script corresponding to the first original service requirement based on the incidence relation model.
In the process of implementing step S107 specifically, traversing the association between the original service requirement and the test schema in the association model, the association between the test schema and the test case, and the association between the test case and the test script, and searching for the test schema corresponding to the first original service requirement, the test case corresponding to the test schema, and the test script corresponding to the test case as the test script corresponding to the first original service requirement.
Step S108: and taking the test script corresponding to the first original service requirement as a test execution case of the target service requirement so as to test the service to be tested.
In the embodiment of the invention, when the obtained target service requirement is determined to have change, a target test outline corresponding to the target service requirement is determined through an incidence relation model, and data in the target test outline is adjusted based on the changed requirement data in the target service requirement to obtain a new target test outline; further determining a test case and a test script corresponding to the target test outline; and generating a test case of the target service requirement based on the target test script so as to test. By the method, the testing efficiency can be improved.
Based on the testing method shown in the above embodiment of the present invention, correspondingly, the embodiment of the present invention further discloses a testing apparatus, as shown in fig. 3, which is a schematic structural diagram of the testing apparatus shown in the embodiment of the present invention, and the apparatus includes:
an obtaining unit 301, configured to obtain a target service requirement of a service to be tested;
an adjusting unit 302, configured to, when it is determined that the target service requirement has a change, adjust the target test schema based on changed requirement data in the target service requirement to obtain an adjusted target test schema, where the target test schema is determined based on an association model 305, and the association model 305 is configured to store associations between all original service requirements and test schemas, associations between test schemas and test cases, and associations between test cases and test scripts;
a generating unit 303, configured to generate a corresponding target test case based on the target test outline;
a processing unit 304, configured to generate a test case of the target service requirement based on a target test script, so as to test the service to be tested, where the target test script is generated based on the target test case.
It should be noted that, the specific principle and the implementation process of each unit in the test apparatus disclosed in the embodiment of the present application are the same as those of the test method shown in the implementation of the present application, and reference may be made to corresponding parts in the test method disclosed in the embodiment of the present application, and details are not repeated here.
In the embodiment of the invention, when the obtained target service requirement is determined to have change, a target test outline corresponding to the target service requirement is determined through an incidence relation model, and data in the target test outline is adjusted based on the changed requirement data in the target service requirement to obtain a new target test outline; further determining a test case and a test script corresponding to the target test outline; and generating a test case of the target service requirement based on the target test script so as to test. By the method, the testing efficiency can be improved.
Optionally, based on the testing apparatus shown in the foregoing embodiment of the present invention, the adjusting unit 302 for determining that there is a change in the target service requirement is specifically configured to:
determining a first original service requirement corresponding to the identification of the target service requirement;
comparing whether the first original service requirement and the target service requirement have changes or not;
if the first original service requirement and the target service requirement have changes, determining that the target service requirement has changes;
and if the first original service requirement and the target service requirement are not changed, determining that no change exists in the target service requirement.
Optionally, based on the testing apparatus shown in the foregoing embodiment of the present invention, the processing unit 304 is further configured to:
if it is determined that no change exists in the target service requirement, determining a first original service requirement corresponding to the identifier of the target service requirement;
determining a test script corresponding to the first original service requirement based on the incidence relation model;
and taking the test script corresponding to the first original service requirement as a test execution case of the target service requirement.
Optionally, based on the test apparatus shown in the foregoing embodiment of the present invention, the adjusting unit 302 for determining the target test outline based on the association relation model is specifically configured to:
determining a first original service requirement corresponding to the identification of the target service requirement;
inquiring a test outline corresponding to the first original service requirement based on the incidence relation model;
and taking the test outline corresponding to the first original service requirement as a target test outline corresponding to the target service requirement.
Optionally, based on the testing apparatus shown in the foregoing embodiment of the present invention, the adjusting unit 302 for adjusting the target testing schema according to the requirement data that changes in the target service requirement is specifically configured to:
carrying out structuralization processing on the changed demand data to obtain first data for adjusting the target test outline;
and processing the content corresponding to the changed demand data in the target test outline based on the first data.
Based on the testing apparatus disclosed in the embodiments of the present disclosure, the modules may be implemented by a hardware device including a processor and a memory. Specifically, the modules are stored in a memory as program units, and a processor executes the program units stored in the memory to implement a test process.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more, and mirror image security reinforcement is realized by adjusting kernel parameters.
The embodiment of the disclosure provides a computer storage medium, which includes a stored text processing program, wherein the program implements the testing method described in fig. 1 and 2 when being executed by a processor.
The embodiment of the disclosure provides a processor, which is used for running a program, wherein the program executes the test method described in fig. 1 and 2 when running.
The disclosed embodiment provides an electronic device, and the electronic device in the disclosed embodiment can be a server, a PC, a PAD, a mobile phone and the like.
The electronic device includes at least one processor, and at least one memory connected with the processor, and a bus.
The processor and the memory complete mutual communication through the bus. A processor for executing the program stored in the memory.
A memory for storing a program for at least: acquiring a target service requirement of a service to be tested; when the target business requirements are determined to have changes, adjusting the target test outline based on changed demand data in the target business requirements, wherein the target test outline is determined based on an incidence relation model, and the incidence relation model is used for storing incidence relations between all original business requirements and the test outline, between the test outline and a test case and between the test case and a test script; generating a corresponding target test case based on the target test outline; and generating a test case of the target service requirement based on a target test script to test the service to be tested, wherein the target test script is generated based on the target test case.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on an electronic device:
acquiring a target service requirement of a service to be tested; when the target business requirements are determined to have changes, adjusting the target test outline based on changed demand data in the target business requirements, wherein the target test outline is determined based on an incidence relation model, and the incidence relation model is used for storing incidence relations between all original business requirements and the test outline, between the test outline and a test case and between the test case and a test script; generating a corresponding target test case based on the target test outline; and generating a test case of the target service requirement based on a target test script to test the service to be tested, wherein the target test script is generated based on the target test case.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory computer readable media (transmyedia) such as modulated data signals and carrier waves.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed 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 modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of testing, the method comprising:
acquiring a target service requirement of a service to be tested;
when the target service requirement is determined to have change, adjusting a target test outline based on the changed requirement data in the target service requirement to obtain an adjusted target test outline, wherein the target test outline is determined based on an incidence relation model, and the incidence relation model is used for storing incidence relations between all original service requirements and the test outline, between the test outline and a test case and between the test case and a test script;
generating a corresponding target test case based on the target test outline;
and generating a test case of the target service requirement based on a target test script to test the service to be tested, wherein the target test script is generated based on the target test case.
2. The method of claim 1, wherein determining that there is a change in the target traffic demand comprises:
determining a first original service requirement corresponding to the identification of the target service requirement;
comparing whether the first original service requirement and the target service requirement have changes or not;
if the first original service requirement and the target service requirement have changes, determining that the target service requirement has changes;
and if the first original service requirement and the target service requirement are not changed, determining that no change exists in the target service requirement.
3. The method of claim 1, further comprising:
if it is determined that no change exists in the target service requirement, determining a first original service requirement corresponding to the identifier of the target service requirement;
determining a test script corresponding to the first original service requirement based on the incidence relation model;
and taking the test script corresponding to the first original service requirement as a test execution case of the target service requirement.
4. The method of claim 1, wherein the process of determining a target test schema based on the incidence relation model comprises:
determining a first original service requirement corresponding to the identification of the target service requirement;
inquiring a test outline corresponding to the first original service requirement based on the incidence relation model;
and taking the test outline corresponding to the first original service requirement as a target test outline corresponding to the target service requirement.
5. The method of claim 1, wherein the adjusting the demand data for changes in the target business demand to the target test schema comprises:
carrying out structuralization processing on the changed demand data to obtain first data for adjusting the target test outline;
and processing the content corresponding to the changed demand data in the target test outline based on the first data.
6. A test apparatus, the apparatus comprising:
the acquisition unit is used for acquiring the target service requirement of the service to be tested;
the adjusting unit is used for adjusting the target test outline based on changed demand data in the target service demand when the target service demand is determined to have a change, so as to obtain the adjusted target test outline, wherein the target test outline is determined based on an incidence relation model, and the incidence relation model is used for storing the incidence relation between all original service demands and the test outline, the incidence relation between the test outline and a test case, and the incidence relation between the test case and a test script;
the generating unit is used for generating a corresponding target test case based on the target test outline;
and the processing unit is used for generating a test case of the target service requirement based on a target test script so as to test the service to be tested, and the target test script is generated based on the target test case.
7. The apparatus according to claim 6, wherein the adjusting unit for determining that there is a change in the target service requirement is specifically configured to:
determining a first original service requirement corresponding to the identification of the target service requirement;
comparing whether the first original service requirement and the target service requirement have changes or not;
if the first original service requirement and the target service requirement have changes, determining that the target service requirement has changes;
and if the first original service requirement and the target service requirement are not changed, determining that no change exists in the target service requirement.
8. The apparatus of claim 6, wherein the processing unit is further configured to:
if it is determined that no change exists in the target service requirement, determining a first original service requirement corresponding to the identifier of the target service requirement;
determining a test script corresponding to the first original service requirement based on the incidence relation model;
and taking the test script corresponding to the first original service requirement as a test execution case of the target service requirement.
9. An electronic device, characterized in that the electronic device is adapted to run a program, wherein the program when running performs the testing method according to any of claims 1-5.
10. A computer storage medium, characterized in that the storage medium comprises a stored program, wherein the apparatus on which the storage medium is located is controlled to perform the test method according to any one of claims 1-5 when the program is run.
CN202210633287.6A 2022-06-07 2022-06-07 Test method, test device, electronic equipment and computer storage medium Pending CN114968795A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210633287.6A CN114968795A (en) 2022-06-07 2022-06-07 Test method, test device, electronic equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210633287.6A CN114968795A (en) 2022-06-07 2022-06-07 Test method, test device, electronic equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN114968795A true CN114968795A (en) 2022-08-30

Family

ID=82958846

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210633287.6A Pending CN114968795A (en) 2022-06-07 2022-06-07 Test method, test device, electronic equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN114968795A (en)

Similar Documents

Publication Publication Date Title
CN107122296B (en) Method and apparatus for data assertion for test interface
CN110597730B (en) Automatic test case generation method and system based on scene method
CN107092535B (en) Method and apparatus for data storage of test interface
CN110019298B (en) Data processing method and device
CN111124871A (en) Interface test method and device
CN111414369A (en) Data processing method, device and equipment
CN106411970A (en) Fault handling method, device and system based on service call
CN112559606A (en) Conversion method and conversion device for JSON format data
CN111124870A (en) Interface testing method and device
CN106547658A (en) A kind of automated testing method and device
CN111198677A (en) Equipment object generation method, device and equipment
CN117234916A (en) Workflow application testing method and device, electronic equipment and storage medium
CN110689418A (en) Bill generation method and device
CN112491943A (en) Data request method, device, storage medium and electronic equipment
CN110968500A (en) Test case execution method and device
CN114968795A (en) Test method, test device, electronic equipment and computer storage medium
CN114329495A (en) Endogenous security based asset vulnerability static analysis method and device
CN110825764A (en) SQL script generation method, system, storage medium and processor
CN117130946B (en) Test scene generation method and device, electronic equipment and readable storage medium
CN110362595A (en) A kind of SQL statement dynamic analysis method
CN110851750B (en) Data acquisition method and device
CN114911709A (en) Data processing method and device, electronic equipment and computer storage medium
CN115658461A (en) Test case management method and device, electronic equipment and computer storage medium
CN113672518A (en) Test case construction method and related equipment
CN116755922A (en) Error code information management method and related equipment

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