CN109271311B - Demand scene method and demand scene device - Google Patents

Demand scene method and demand scene device Download PDF

Info

Publication number
CN109271311B
CN109271311B CN201710586174.4A CN201710586174A CN109271311B CN 109271311 B CN109271311 B CN 109271311B CN 201710586174 A CN201710586174 A CN 201710586174A CN 109271311 B CN109271311 B CN 109271311B
Authority
CN
China
Prior art keywords
description
scenario
node
test
field
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710586174.4A
Other languages
Chinese (zh)
Other versions
CN109271311A (en
Inventor
李韧
王少磊
闫浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Machine Co Ltd
Original Assignee
Huawei Machine 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 Huawei Machine Co Ltd filed Critical Huawei Machine Co Ltd
Priority to CN201710586174.4A priority Critical patent/CN109271311B/en
Publication of CN109271311A publication Critical patent/CN109271311A/en
Application granted granted Critical
Publication of CN109271311B publication Critical patent/CN109271311B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a demand scenario method and a demand scenario device, which are used for realizing conversion among different scenario descriptions of a demand scenario, so that the description consistency of the demand scenario is ensured, and the efficiency and accuracy of software development are improved. The method in the embodiment of the application comprises the following steps: displaying a first scenario description and a conversion button corresponding to the first scenario description, wherein the first scenario description is a scenario description mode of a task requirement, and the first scenario description is any one of a scenario flow chart, a scenario description statement and a test case; when the click operation of a conversion button corresponding to the first scenarization description is detected, converting the first scenarization description into a second scenarization description, wherein the second scenarization description is one or two of a scene flow diagram, a scene description statement and a test case, which are different from the first scenarization description; and displaying the second scenized description.

Description

Demand scene method and demand scene device
Technical Field
The present application relates to the field of computers, and in particular, to a demand scenarization method and a demand scenization apparatus.
Background
Software development originates from a development task set forth by a customer, and the industry generally defines the specific development task set forth by the customer as a requirement. For example, the customer requires the operator's mall to support the WeChat Payment, and the task requirement is "the mall needs to support the WeChat Payment". Typically a task requirement consists of one or more requirement scenarios. Software development for task requirements generally includes a requirement analysis phase, a software development phase, and a software testing phase.
In the stage of demand analysis, demand analysts need to use documents with fixed templates to perform scene description on demands, and the description documents of the demand scenes use various forms of combinations such as characters, flow charts or interface diagrams to describe the demand scenes as preconditions, processes and results. Requirements can also be scenarized using standardized requirements scene description statements, e.g., GWT (Given When Then) statements. The field of the 'Given' key in the GWT statement describes the precondition of the requirement scenario, the field of the 'When' key describes the process of the requirement scenario, and the field of the 'Then' key describes the result of the requirement scenario. In a software testing stage after the required software is developed, a test engineer needs to test the required software, the testing work depends on a set of test reference objects, the test reference objects are defined in the industry as test cases, and the test cases generally comprise three parts, namely testing conditions, testing processes and expected results. Under the condition of no error in understanding the same requirement, the description document, the requirement scene description statement and the requirement data of the test case of one requirement scene are homologous.
However, the description document of the demand scenario does not strictly specify the description format and method, and the knowledge background and experience capability of the demand analyst and the tester are different, so that the writing contents of the description document, the demand scenario description statement and the test case of the demand scenario are different, which causes inaccuracy in software development and affects development efficiency.
Disclosure of Invention
The application provides a demand scenario method and a demand scenario device, which are used for realizing conversion among different scenario descriptions of a demand scenario, so that the description consistency of the demand scenario is ensured, and the efficiency and accuracy of software development are improved.
A first aspect of the present application provides a demand scenario method, including:
displaying a first scenario description and a conversion button corresponding to the first scenario description, wherein the first scenario description is a scenario description mode of a task requirement, the first scenario description is any one of a scenario flow chart, a scenario description statement and a test case, the scenario flow chart comprises a precondition node, a process node and a result node, the scenario description statement comprises a precondition field, a process field and a result field, and the test case comprises a test condition, a test process and an expected result;
when a click operation on a conversion button corresponding to the first scenarization description is detected, converting the first scenarization description into a second scenarization description, wherein the second scenarization description is one or two of the scene flow diagram, the scene description statement and the test case, and the second scenarization description is different from the first scenarization description;
displaying the second scenic description.
In the process of software development, in order to facilitate software development, task requirements of software development tasks proposed by clients need to be described in a scene mode, one task requirement comprises one or more requirement scenes, the requirement scenes in the task requirements are described in a scene description mode, and the scene description can be a scene flow chart, a scene description statement and a test case. The description of the demand scene can be generally divided into three parts of a precondition, a process and a result, and then a scene flow chart comprises a precondition node, a process node and a result node; the scene description statement comprises a precondition field, a process field and a result field; the test case includes test conditions, test procedures, and expected results. After a first scenario description is obtained according to a task requirement, displaying the first scenario description and a conversion button corresponding to the first scenario description, wherein the first scenario description is a scenario description mode of the task requirement, the first scenario description is any one of a scenario flow chart, a scenario description statement and a test case, when a click operation on the conversion button corresponding to the first scenario description is detected, the first scenario description is converted into a second scenario description, the second scenario description is one or two of the scenario flow chart, the scenario description statement and the test case, which are different from the first scenario description, and the converted second scenario description is displayed. Compared with the situation that the scene flow diagram, the scene description statement and the test case in the prior art need to be written independently, the scenario description method and the device can convert the first scenario description into the second scenario description, the first scenario description is one of the scene flow diagram, the scene description statement and the test case, and the second scenario description is one or two of the scene flow diagram, the scene description statement and the test case which are different from the first scenario description.
With reference to the first aspect of the present application, in a first implementation manner of the first aspect of the present application, the first scenario description is a scenario flowchart, the second scenario description is a scenario description statement and/or a test case,
the converting the first scenized description into a second scenized description includes:
converting the precondition nodes, the process nodes and the result nodes into scene description sentences, wherein the field content of precondition fields of the scene description sentences is consistent with the node content of the precondition nodes, the field content of process fields of the scene description sentences is consistent with the node content of the process nodes, and the field content of result fields of the scene description sentences is consistent with the node content of the result nodes;
and/or the presence of a gas in the gas,
and converting the precondition nodes, the process nodes and the result nodes into test cases, wherein the test content of the test conditions of the test cases is consistent with the node content of the precondition nodes, the test content of the test processes of the test cases is consistent with the node content of the process nodes, and the test content of the expected results of the test cases is consistent with the node content of the result nodes.
Assuming that the first scenario description in the first aspect is a scenario flow diagram, the second scenario description is a scenario description statement and/or a test case. The displayed scene flow chart comprises nodes with three types of attributes, namely a precondition node, a process node and a result node, wherein the node content of the precondition node is used for describing preconditions of a demand scene; the node content of the process node is used for describing the process of the demand scene; the node content of the result node is used to describe the result of the demand scenario. Converting the first scenario description into a second scenario description, which is substantially to convert the precondition node, the process node and the result node into scenario description statements; and/or converting the precondition nodes, the process nodes and the result nodes into test cases. In the obtained scene description statement, the field content of the precondition field is consistent with the node content of the precondition node, the field content of the process field is consistent with the node content of the process node, and the field content of the result field of the scene description statement is consistent with the node content of the result node; in the obtained test case, the test content of the test condition is consistent with the node content of the precondition node, the test content of the test process is consistent with the node content of the process node, and the test content of the expected result is consistent with the node content of the result node. Specifically, when the first scenario description is a scenario flow diagram, the essence of the scenario flow diagram being converted into a scenario description statement and/or a test case is that the node contents of the precondition node, the process node and the result node are replaced with the field contents of the precondition field, the process field and the result field in the scenario description statement; and/or replacing the node contents of the precondition node, the process node and the result node with the test contents of the test condition, the test process and the expected result in the test case. Therefore, the requirement scene description can be ensured to be consistent while the mutual conversion among different scene descriptions is realized.
With reference to the first embodiment of the first aspect of the present application, in a second embodiment of the first aspect of the present application, before displaying the first scenarization description and the transition button corresponding to the first scenarization description, the method further includes:
displaying a demand flow diagram of a task demand, wherein the demand flow diagram comprises at least three flow diagram nodes;
and detecting a scene flow chart selected by a user from the requirement flow chart, and acquiring node attributes of scene nodes in the scene flow chart set by the user, wherein the node attributes are used for indicating that the scene nodes are precondition nodes, process nodes or result nodes.
In the first embodiment of the first aspect, it is assumed that the first scenario description is a scenario flowchart, how the displayed scenario flowchart comes and how the precondition node, the process node, or the result node in the scenario flowchart is set, and it needs to be described below that, first, a requirement flowchart of the task requirement is displayed, where the requirement flowchart is generated according to the task requirement, and the requirement flowchart includes at least three flowchart nodes; the method comprises the steps that after a user sees a displayed demand flow diagram, demand scene division is carried out on task demands according to comprehension, one task demand comprises one or more demand scenes, at least three flow diagram nodes are selected from frames in the demand flow diagram as one scene flow diagram according to the divided demand scenes, for a demand scene device, the scene flow diagram selected from the demand flow diagram by the user is detected, node attributes of the scene nodes in the scene flow diagram set by the user are obtained, and the node attributes are used for indicating the scene nodes as precondition nodes, process nodes or result nodes.
With reference to the first aspect of the present application, in a third implementation manner of the first aspect of the present application, the first scenario description is a scenario description statement, the second scenario description is a scenario flowchart and/or a test case,
the converting the first scenized description to the second scenized description comprises:
converting the precondition field, the process field and the result field into a scene flow chart, wherein the node content of the precondition node of the scene flow chart is consistent with the field content of the precondition field, the node content of the process node of the scene flow chart is consistent with the field content of the process field, and the node content of the result node of the scene flow chart is consistent with the field content of the result field;
and/or the presence of a gas in the gas,
and converting the precondition field, the process field and the result field into a test case, wherein the test content of the test condition of the test case is consistent with the field content of the precondition field, the test content of the test process of the test case is consistent with the field content of the process field, and the test content of the expected result of the test case is consistent with the field content of the result field.
Assuming that the first scenario description in the first aspect is a scenario description statement, the second scenario description is a scenario flow diagram and/or a test case. The displayed scene description statement comprises three types of fields, namely a precondition field, a process field and a result field, wherein the field content of the precondition field is used for describing preconditions of a demand scene; the field content of the process field is used for describing the process of the requirement scene; the field contents of the result field are used to describe the result of the demand scenario. Converting the first scenarized description into a second scenarized description, which essentially converts the precondition field, the process field, and the result field into a scene flow diagram; and/or converting the precondition field, the process field and the result field into a test case. In the obtained scene flow chart, the node content of the precondition node is consistent with the field content of the precondition field, the node content of the process node is consistent with the field content of the process field, and the node content of the result node is consistent with the field content of the result field; in the obtained test case, the test content of the test condition is consistent with the field content of the precondition field, the test content of the test process is consistent with the field content of the process field, and the test content of the expected result is consistent with the field content of the result field. Specifically, when the first scenario description is a scenario description statement, the essence of the scenario description statement being converted into a scenario flow chart and/or a test case is that the field contents of the precondition field, the process field and the result field are replaced with the node contents of the precondition node, the process node and the result node in the scenario flow chart; and/or replacing the field contents of the precondition field, the process field and the result field with the test contents of the test condition, the test process and the expected result in the test case. Therefore, the requirement scene description can be ensured to be consistent while the mutual conversion among different scene descriptions is realized.
With reference to the first aspect of the present application, in a fourth implementation manner of the first aspect of the present application, the first scenario description is a test case, the second scenario description is a scenario flowchart and/or a scenario description statement,
the converting the first scenized description to the second scenized description comprises:
converting the test condition, the test process and the expected result into a scene flow chart, wherein the node content of the precondition node of the scene flow chart is consistent with the test content of the test condition, the node content of the process node of the scene flow chart is consistent with the test content of the test condition, and the node content of the result node of the scene flow chart is consistent with the test content of the expected result;
and/or the presence of a gas in the gas,
and converting the test condition, the test process and the expected result into a scene description statement, wherein the field content of a precondition field of the scene description statement is consistent with the test content of the test condition, the field content of a process field of the scene description statement is consistent with the test content of the test process, and the field content of a result field of the scene description statement is consistent with the test content of the expected result.
Assuming that the first scenario description in the first aspect is a test case, the second scenario description is a scenario flowchart and/or a scenario description statement. The displayed test case comprises a test condition, a test process and an expected result, and the test content of the test condition is used for describing the precondition of a demand scene; the test content of the test process is used for describing the process of the demand scene; the test content of the expected results is used to describe the results of the demand scenario. Converting the first scenario description into a second scenario description, which substantially converts the test conditions, the test process and the expected results into a scenario flow chart; and/or converting the test conditions, the test process and the expected result into a scenario description statement. In the obtained scene flow chart, the node content of the precondition node is consistent with the test content of the test condition, the node content of the process node is consistent with the test content of the test process, and the node content of the result node is consistent with the test content of the expected result; in the obtained scene description statement, the field content of the precondition field is consistent with the test content of the test condition, the field content of the process field is consistent with the test content of the test process, and the field content of the result field is consistent with the test content of the expected result. Specifically, when the first scenario description is a test case, the essence of converting the test case into a scenario flow chart and/or a scenario description statement is to replace the test contents of the test conditions, the test process and the expected results with the contents of the preconditions, the process nodes and the results in the scenario flow chart; and/or replacing the test contents of the test conditions, the test processes and the expected results with the field contents of the precondition fields, the process fields and the result fields in the scene description statement. Therefore, the requirement scene description can be ensured to be consistent while the mutual conversion among different scene descriptions is realized.
With reference to the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, the third implementation manner of the first aspect, or the fourth implementation manner of the first aspect, in a fifth implementation manner of the first aspect of the present application, after the displaying the second scenic description, the method further includes:
when a user modifies the first scenarized description, displaying the modified first scenarized description, converting the modified first scenarized description into a modified second scenarized description, and displaying the modified second scenarized description;
or when the user modifies the second scenarized description, displaying the modified second scenarized description, converting the modified second scenarized description into a modified first scenarized description, and displaying the modified first scenarized description.
When the task requirement changes or the user understands that the requirement scene description changes due to the change of the requirement scene and other reasons, the user modifies the first scenarization description or the second scenarization description, when the user modifies the first scenarization description, the modified first scenarization description is displayed, the modified first scenarization description is converted into the modified second scenarization description, and the modified second scenarization description is displayed; or when the user modifies the second scenarized description, displaying the modified second scenarized description, converting the modified second scenarized description into a modified first scenarized description, and displaying the modified first scenarized description. After the modification of one scene description is realized, other scene descriptions can be automatically modified, and the operation step of modifying other scene descriptions by a user is omitted.
A second aspect of the present application provides a demand scenario apparatus, including:
a processor, a display, and a memory, wherein the memory may be used to store code executed by the processor;
the display is used for displaying a first scenario description and a conversion button corresponding to the first scenario description, the first scenario description is a scenario description mode of a task requirement, the first scenario description is any one of a scenario flow chart, a scenario description statement and a test case, the scenario flow chart comprises a precondition node, a process node and a result node, the scenario description statement comprises a precondition field, a process field and a result field, and the test case comprises a test condition, a test process and an expected result;
the processor is configured to, when a click operation on a conversion button corresponding to the first scenario description is detected, convert the first scenario description into a second scenario description, where the second scenario description is one or two of the scenario flowchart, the scenario description statement, and the test case that are different from the first scenario description;
the display is further configured to display the second scenized description.
In the process of software development, in order to facilitate software development, task requirements of software development tasks proposed by clients need to be described in a scene mode, one task requirement comprises one or more requirement scenes, the requirement scenes in the task requirements are described in a scene description mode, and the scene description can be a scene flow chart, a scene description statement and a test case. The description of the demand scene can be generally divided into three parts of a precondition, a process and a result, and then a scene flow chart comprises a precondition node, a process node and a result node; the scene description statement comprises a precondition field, a process field and a result field; the test case includes test conditions, test procedures, and expected results. After the first scenario description is obtained according to the task requirement, a display of the requirement scenario device displays the first scenario description and a conversion button corresponding to the first scenario description, the first scenario description is a scenario description mode of the task requirement, the first scenario description is any one of a scenario flow diagram, a scenario description statement and a test case, when the processor detects a click operation on the conversion button corresponding to the first scenario description, the processor converts the first scenario description into a second scenario description, the second scenario description is one or two of the scenario flow diagram, the scenario description statement and the test case, wherein the two or more scenarios descriptions are different from the first scenario description, and the display displays the converted second scenario description. Compared with the prior art that the scene flow diagram, the scene description statement and the test case are required to be independently written, the first scene description can be converted into the second scene description, the first scene description is one of the scene flow diagram, the scene description statement and the test case, and the second scene description is one or two of the scene flow diagram, the scene description statement and the test case which are different from the first scene description.
In combination with the second aspect of the present application, in the first embodiment of the second aspect of the present application, the first scenario description is a scenario flowchart, the second scenario description is a scenario description statement and/or a test case,
the processor is further configured to convert the precondition node, the process node, and the result node into a scene description statement, where field content of a precondition field of the scene description statement is consistent with node content of the precondition node, field content of a process field of the scene description statement is consistent with node content of the process node, and field content of a result field of the scene description statement is consistent with node content of the result node;
and/or the presence of a gas in the gas,
the processor is further configured to convert the precondition node, the process node, and the result node into a test case, where test content of a test condition of the test case is consistent with node content of the precondition node, test content of a test process of the test case is consistent with node content of the process node, and test content of an expected result of the test case is consistent with node content of the result node.
Assuming that the first scenario description in the second aspect is a scenario flow diagram, the second scenario description is a scenario description statement and/or a test case. The method comprises the steps that a scene flow diagram displayed on a display comprises nodes with three types of attributes, namely a precondition node, a process node and a result node, wherein the node content of the precondition node is used for describing preconditions of a demand scene; the node content of the process node is used for describing the process of the demand scene; the node content of the result node is used to describe the result of the demand scenario. The processor converts the first scenario description into a second scenario description, and substantially converts the precondition node, the process node and the result node into a scenario description statement; and/or converting the precondition nodes, the process nodes and the result nodes into test cases. In the obtained scene description statement, the field content of the precondition field is consistent with the node content of the precondition node, the field content of the process field is consistent with the node content of the process node, and the field content of the result field of the scene description statement is consistent with the node content of the result node; in the obtained test case, the test content of the test condition is consistent with the node content of the precondition node, the test content of the test process is consistent with the node content of the process node, and the test content of the expected result is consistent with the node content of the result node. Specifically, when the first scenario description is a scenario flow diagram, the essence of the scenario flow diagram being converted into a scenario description statement and/or a test case is that the node contents of the precondition node, the process node and the result node are replaced with the field contents of the precondition field, the process field and the result field in the scenario description statement; and/or replacing the node contents of the precondition node, the process node and the result node with the test contents of the test condition, the test process and the expected result in the test case. Therefore, the requirement scene description can be ensured to be consistent while the mutual conversion among different scene descriptions is realized.
In combination with the first embodiment of the second aspect of the present application, in the second embodiment of the second aspect of the present application,
the display is further used for displaying a requirement flow chart of the task requirement, and the requirement flow chart comprises at least three flow chart nodes;
the processor is further configured to detect a scene flow chart selected by a user from the demand flow chart, and acquire a node attribute of a scene node in the scene flow chart set by the user, where the node attribute is used to indicate that the scene node is a precondition node, a process node, or a result node.
In the first embodiment of the second aspect, assuming that the first scenario is described as a scenario flowchart, how the scenario flowchart displayed by the display is coming and how the precondition nodes, the process nodes or the result nodes in the scenario flowchart are set, it needs to be explained below that firstly, the display displays a requirement flowchart of the task requirement, the requirement flowchart is generated according to the task requirement, and the requirement flowchart includes at least three flowchart nodes; the method comprises the steps that after a user sees a displayed demand flow diagram, demand scene division is carried out on task demands according to comprehension, one task demand comprises one or more demand scenes, at least three flow diagram nodes are selected from frames in the demand flow diagram as one scene flow diagram according to the divided demand scenes, for a demand scene device, a processor detects the scene flow diagram selected from the demand flow diagram by the user, node attributes of the scene nodes in the scene flow diagram set by the user are obtained, and the node attributes are used for indicating the scene nodes as precondition nodes, process nodes or result nodes.
In combination with the second aspect of the present application, in a third embodiment of the second aspect of the present application, the first scenario description is a scenario description statement, the second scenario description is a scenario flowchart and/or a test case,
the processor is further configured to convert the precondition field, the process field, and the result field into a scene flow chart, where node content of a precondition node of the scene flow chart is consistent with field content of the precondition field, node content of a process node of the scene flow chart is consistent with field content of the process field, and node content of a result node of the scene flow chart is consistent with field content of the result field;
and/or the presence of a gas in the gas,
the processor is further configured to convert the precondition field, the process field, and the result field into a test case, where test content of a test condition of the test case is consistent with field content of the precondition field, test content of a test process of the test case is consistent with field content of the process field, and test content of an expected result of the test case is consistent with field content of the result field.
Assuming that the first scenario description in the second aspect is a scenario description statement, the second scenario description is a scenario flow diagram and/or a test case. The scene description statement displayed on the display comprises three types of fields, namely a precondition field, a process field and a result field, wherein the field content of the precondition field is used for describing preconditions of a demand scene; the field content of the process field is used for describing the process of the requirement scene; the field contents of the result field are used to describe the result of the demand scenario. The processor converts the first scenario description into a second scenario description, which essentially converts the precondition field, the process field, and the result field into a scenario flow chart; and/or converting the precondition field, the process field and the result field into the test case. In the obtained scene flow chart, the node content of the precondition node is consistent with the field content of the precondition field, the node content of the process node is consistent with the field content of the process field, and the node content of the result node is consistent with the field content of the result field; in the obtained test case, the test content of the test condition is consistent with the field content of the precondition field, the test content of the test process is consistent with the field content of the process field, and the test content of the expected result is consistent with the field content of the result field. Specifically, when the first scenario description is a scenario description statement, the essence of the scenario description statement being converted into a scenario flow chart and/or a test case is that the field contents of the precondition field, the process field and the result field are replaced with the node contents of the precondition node, the process node and the result node in the scenario flow chart; and/or replacing the field contents of the precondition field, the process field and the result field with the test contents of the test condition, the test process and the expected result in the test case. Therefore, the requirement scene description can be ensured to be consistent while the mutual conversion among different scene descriptions is realized.
In a fourth embodiment of the second aspect of the present application, in combination with the second aspect of the present application, the first scenario description is a test case, the second scenario description is a scenario flowchart and/or a scenario description statement,
the processor is further configured to convert the test condition, the test process, and the expected result into a scene flow chart, where node contents of precondition nodes of the scene flow chart are consistent with test contents of the test condition, node contents of process nodes of the scene flow chart are consistent with test contents of the test condition, and node contents of result nodes of the scene flow chart are consistent with test contents of the expected result;
and/or the presence of a gas in the gas,
the processor is further configured to convert the test condition, the test procedure, and the expected result into a scenario description statement, where field content of a precondition field of the scenario description statement is consistent with test content of the test condition, field content of a procedure field of the scenario description statement is consistent with test content of the test procedure, and field content of a result field of the scenario description statement is consistent with test content of the expected result.
Assuming that the first scenario description in the second aspect is a test case, the second scenario description is a scenario flowchart and/or scenario description statement. The test case displayed on the display comprises test conditions, a test process and an expected result, and the test content of the test conditions is used for describing the precondition of a demand scene; the test content of the test process is used for describing the process of the demand scene; the test content of the expected results is used to describe the results of the demand scenario. The processor converts the first scenario description into a second scenario description, which substantially converts the test conditions, the test process and the expected results into a scenario flow chart; and/or converting the test conditions, the test process and the expected result into a scenario description statement. In the obtained scene flow chart, the node content of the precondition node is consistent with the test content of the test condition, the node content of the process node is consistent with the test content of the test process, and the node content of the result node is consistent with the test content of the expected result; in the obtained scene description statement, the field content of the precondition field is consistent with the test content of the test condition, the field content of the process field is consistent with the test content of the test process, and the field content of the result field is consistent with the test content of the expected result. Specifically, when the first scenario description is a test case, the essence of converting the test case into the scenario flow diagram and/or the scenario description statement is to replace the test contents of the test conditions, the test process and the expected results with the contents of the preconditions node, the process node and the result node in the scenario flow diagram; and/or replacing the test contents of the test conditions, the test processes and the expected results with the field contents of the precondition fields, the process fields and the result fields in the scene description statement. Therefore, the requirement scene description can be ensured to be consistent while the mutual conversion among different scene descriptions is realized.
With reference to the second aspect of the present application, the first embodiment of the second aspect, the second embodiment of the second aspect, the third embodiment of the second aspect, or the fourth embodiment of the second aspect, in the fifth embodiment of the second aspect of the present application,
the display is further used for displaying the modified first scenarized description when the user modifies the first scenarized description;
the processor is further configured to convert the modified first scenized description into a modified second scenized description;
the display is further used for displaying the modified second scenarized description;
alternatively, the first and second electrodes may be,
the display is further used for displaying the modified second scenarized description when the user modifies the second scenarized description;
the processor is further configured to convert the modified second scenarized description into a modified first scenarized description;
the display is further configured to display the modified first scenarized description.
When the task requirement changes or the user understands that the requirement scene description changes due to the change of the requirement scene and other reasons, the user modifies the first scenarization description or the second scenarization description, when the user modifies the first scenarization description, the display displays the modified first scenarization description, the processor converts the modified first scenarization description into the modified second scenarization description, and the display displays the modified second scenarization description; or when the user modifies the second scenarized description, the display displays the modified second scenarized description, the processor converts the modified second scenarized description into the modified first scenarized description, and the display displays the modified first scenarized description. After the modification of one scene description is realized, other scene descriptions can be automatically modified, and the operation step of modifying other scene descriptions by a user is omitted.
A third aspect of the present application provides a demand scenario apparatus, including:
the system comprises a display module, a task processing module and a task execution module, wherein the display module is used for displaying a first scenario description and a conversion button corresponding to the first scenario description, the first scenario description is a scenario description mode of a task requirement, the first scenario description is any one of a scenario flow chart, a scenario description statement and a test case, the scenario flow chart comprises a precondition node, a process node and a result node, the scenario description statement comprises a precondition field, a process field and a result field, and the test case comprises a test condition, a test process and an expected result;
the processing module is used for converting the first scenarization description into a second scenarization description when a click operation on a conversion button corresponding to the first scenarization description is detected, wherein the second scenarization description is one or two of the scene flow diagram, the scene description statement and the test case, and is different from the first scenarization description;
the display module is further configured to display the second scenized description.
In the process of software development, in order to facilitate software development, task requirements of software development tasks proposed by clients need to be described in a scene mode, one task requirement comprises one or more requirement scenes, the requirement scenes in the task requirements are described in a scene description mode, and the scene description can be a scene flow chart, a scene description statement and a test case. The description of the demand scene can be generally divided into three parts of a precondition, a process and a result, and then a scene flow chart comprises a precondition node, a process node and a result node; the scene description statement comprises a precondition field, a process field and a result field; the test case includes test conditions, test procedures, and expected results. After the first scenario description is obtained according to the task requirement, a display module of the requirement scenario device displays the first scenario description and a conversion button corresponding to the first scenario description, the first scenario description is a scenario description mode of the task requirement, the first scenario description is any one of a scenario flow diagram, a scenario description statement and a test case, when a processing module detects a click operation on the conversion button corresponding to the first scenario description, the processing module converts the first scenario description into a second scenario description, the second scenario description is one or two of the scenario flow diagram, the scenario description statement and the test case, which are different from the first scenario description, and the display module displays the converted second scenario description. Compared with the prior art that the scene flow diagram, the scene description statement and the test case are required to be independently written, the first scene description can be converted into the second scene description, the first scene description is one of the scene flow diagram, the scene description statement and the test case, and the second scene description is one or two of the scene flow diagram, the scene description statement and the test case which are different from the first scene description.
With reference to the third aspect of the present application, in the first embodiment of the third aspect of the present application, the first scenario description is a scenario flowchart, the second scenario description is a scenario description statement and/or a test case,
the processing module is further configured to convert the precondition nodes, the process nodes, and the result nodes into scene description statements, where field contents of precondition fields of the scene description statements are consistent with node contents of the precondition nodes, field contents of process fields of the scene description statements are consistent with node contents of the process nodes, and field contents of result fields of the scene description statements are consistent with node contents of the result nodes;
and/or the presence of a gas in the gas,
the processing module is further configured to convert the precondition node, the process node, and the result node into a test case, where test content of a test condition of the test case is consistent with node content of the precondition node, test content of a test process of the test case is consistent with node content of the process node, and test content of an expected result of the test case is consistent with node content of the result node.
Assuming that the first scenario description in the third aspect is a scenario flow diagram, the second scenario description is a scenario description statement and/or a test case. The scene flow chart displayed by the display module comprises nodes with three types of attributes, namely a precondition node, a process node and a result node, wherein the node content of the precondition node is used for describing preconditions of a demand scene; the node content of the process node is used for describing the process of the demand scene; the node content of the result node is used to describe the result of the demand scenario. The processing module converts the first scenario description into a second scenario description, and substantially converts the precondition node, the process node and the result node into a scenario description statement; and/or converting the precondition nodes, the process nodes and the result nodes into test cases. In the obtained scene description statement, the field content of the precondition field is consistent with the node content of the precondition node, the field content of the process field is consistent with the node content of the process node, and the field content of the result field of the scene description statement is consistent with the node content of the result node; in the obtained test case, the test content of the test condition is consistent with the node content of the precondition node, the test content of the test process is consistent with the node content of the process node, and the test content of the expected result is consistent with the node content of the result node. Specifically, when the first scenario description is a scenario flow diagram, the essence of the scenario flow diagram being converted into a scenario description statement and/or a test case is that the node contents of the precondition node, the process node and the result node are replaced with the field contents of the precondition field, the process field and the result field in the scenario description statement; and/or replacing the node contents of the precondition node, the process node and the result node with the test contents of the test condition, the test process and the expected result in the test case. Therefore, the requirement scene description can be ensured to be consistent while the mutual conversion among different scene descriptions is realized.
In combination with the first embodiment of the third aspect of the present application, in the second embodiment of the third aspect of the present application,
the display module is further used for displaying a requirement flow chart of the task requirement, and the requirement flow chart comprises at least three flow chart nodes;
the processing module is further configured to detect a scene flow chart selected by a user from the demand flow chart, and acquire a node attribute of a scene node in the scene flow chart set by the user, where the node attribute is used to indicate that the scene node is a precondition node, a process node, or a result node.
In the first embodiment of the third aspect, assuming that the first scenario is described as a scenario flowchart, how the scenario flowchart displayed by the display module comes and how the precondition node, the process node, or the result node in the scenario flowchart is set, it needs to be explained below that, first, the display module displays a requirement flowchart of the task requirement, where the requirement flowchart is generated according to the task requirement, and the requirement flowchart includes at least three flowchart nodes; the method comprises the steps that after a user sees a displayed demand flow diagram, demand scene division is carried out on task demands according to comprehension, one task demand comprises one or more demand scenes, at least three flow diagram nodes are selected from frames in the demand flow diagram as one scene flow diagram according to the divided demand scenes, for a demand scene device, a processing module detects the scene flow diagram selected from the demand flow diagram by the user, node attributes of the scene nodes in the scene flow diagram set by the user are obtained, and the node attributes are used for indicating the scene nodes as precondition nodes, process nodes or result nodes.
With reference to the third aspect of the present application, in a third embodiment of the third aspect of the present application, the first scenario description is a scenario description statement, the second scenario description is a scenario flowchart and/or a test case,
the processing module is further configured to convert the precondition field, the process field, and the result field into a scene flowchart, where the node content of the precondition node of the scene flowchart is consistent with the field content of the precondition field, the node content of the process node of the scene flowchart is consistent with the field content of the process field, and the node content of the result node of the scene flowchart is consistent with the field content of the result field;
and/or the presence of a gas in the gas,
the processing module is further configured to convert the precondition field, the process field, and the result field into a test case, where test content of a test condition of the test case is consistent with field content of the precondition field, test content of a test process of the test case is consistent with field content of the process field, and test content of an expected result of the test case is consistent with field content of the result field.
Assuming that the first scenario description in the third aspect is a scenario description statement, the second scenario description is a scenario flowchart and/or a test case. The scene description statement displayed by the display module comprises three types of fields, namely a precondition field, a process field and a result field, wherein the field content of the precondition field is used for describing preconditions of a demand scene; the field content of the process field is used for describing the process of the requirement scene; the field contents of the result field are used to describe the result of the demand scenario. The processing module converts the first scenario description into a second scenario description, and substantially converts the precondition field, the process field and the result field into a scenario flow chart; and/or converting the precondition field, the process field and the result field into a test case. In the obtained scene flow chart, the node content of the precondition node is consistent with the field content of the precondition field, the node content of the process node is consistent with the field content of the process field, and the node content of the result node is consistent with the field content of the result field; in the obtained test case, the test content of the test condition is consistent with the field content of the precondition field, the test content of the test process is consistent with the field content of the process field, and the test content of the expected result is consistent with the field content of the result field. Specifically, when the first scenario description is a scenario description statement, the essence of the scenario description statement being converted into a scenario flow chart and/or a test case is that the field contents of the precondition field, the process field and the result field are replaced with the node contents of the precondition node, the process node and the result node in the scenario flow chart; and/or replacing the field contents of the precondition field, the process field and the result field with the test contents of the test condition, the test process and the expected result in the test case. Therefore, the requirement scene description can be ensured to be consistent while the mutual conversion among different scene descriptions is realized.
With reference to the third aspect of the present application, in a fourth embodiment of the third aspect of the present application, the first scenario description is a test case, the second scenario description is a scenario flowchart and/or a scenario description statement,
the processing module is further configured to convert the test condition, the test process, and the expected result into a scenario flow chart, where node content of a precondition node of the scenario flow chart is consistent with test content of the test condition, node content of a process node of the scenario flow chart is consistent with test content of the test condition, and node content of a result node of the scenario flow chart is consistent with test content of the expected result;
and/or the presence of a gas in the gas,
the processing module is further configured to convert the test condition, the test procedure, and the expected result into a scenario description statement, where a field content of a precondition field of the scenario description statement is consistent with a test content of the test condition, a field content of a procedure field of the scenario description statement is consistent with a test content of the test procedure, and a field content of a result field of the scenario description statement is consistent with a test content of the expected result.
Assuming that the first scenario in the third aspect is described as a test case, the second scenario is described as a scenario flow diagram and/or scenario description statement. The test case displayed by the display module comprises test conditions, a test process and expected results, and the test content of the test conditions is used for describing the precondition of the demand scene; the test content of the test process is used for describing the process of the demand scene; the test content of the expected results is used to describe the results of the demand scenario. The processing module converts the first scenario description into a second scenario description, and substantially converts the test conditions, the test process and the expected results into a scenario flow chart; and/or converting the test conditions, the test process and the expected result into a scenario description statement. In the obtained scene flow chart, the node content of the precondition node is consistent with the test content of the test condition, the node content of the process node is consistent with the test content of the test process, and the node content of the result node is consistent with the test content of the expected result; in the obtained scene description statement, the field content of the precondition field is consistent with the test content of the test condition, the field content of the process field is consistent with the test content of the test process, and the field content of the result field is consistent with the test content of the expected result. Specifically, when the first scenario description is a test case, the essence of converting the test case into the scenario flow diagram and/or the scenario description statement is to replace the test contents of the test conditions, the test process and the expected results with the contents of the preconditions node, the process node and the result node in the scenario flow diagram; and/or replacing the test contents of the test conditions, the test processes and the expected results with the field contents of the precondition fields, the process fields and the result fields in the scene description statement. Therefore, the requirement scene description can be ensured to be consistent while the mutual conversion among different scene descriptions is realized.
With reference to the third aspect of the present application, the first embodiment of the third aspect, the second embodiment of the third aspect, the third embodiment of the third aspect, or the fourth embodiment of the third aspect of the present application, in the fifth embodiment of the third aspect of the present application,
the display module is further used for displaying the modified first scenarized description when the user modifies the first scenarized description;
the processing module is further configured to convert the modified first scenized description into a modified second scenized description;
the display module is further configured to display the modified second scenario description;
alternatively, the first and second liquid crystal display panels may be,
the display module is further configured to display the modified second scenarized description when the user modifies the second scenarized description;
the processing module is further configured to convert the modified second scenario description into a modified first scenario description;
the display module is further configured to display the modified first scenarized description.
When the task requirement changes or the user understands that the requirement scene description changes due to the change and other reasons, the user modifies the first scenarization description or the second scenarization description, when the user modifies the first scenarization description, the display module displays the modified first scenarization description, the processing module converts the modified first scenarization description into the modified second scenarization description, and the display module displays the modified second scenarization description; or when the user modifies the second scenarized description, the display module displays the modified second scenarized description, the processing module converts the modified second scenarized description into a modified first scenarized description, and the display module displays the modified first scenarized description. After the modification of one scene description is realized, other scene descriptions can be automatically modified, and the operation step of modifying other scene descriptions by a user is omitted.
A fourth aspect of the present application is a computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the demand scenario method of the above-described aspects.
A fifth aspect of the present application is a computer program product containing instructions which, when run on a computer, cause the computer to perform the demand scenario method of the above-described aspects.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the description of the embodiments and the prior art will be briefly described below.
FIG. 1 is a schematic flow chart diagram illustrating an embodiment of a demand scenarization method provided herein;
FIG. 2 is a schematic diagram of a first scenario description and transition button provided herein;
FIG. 3 is a schematic diagram of a first scenario description, a second scenario description, and a transition button provided in the present application;
FIG. 4 is a schematic flow chart diagram illustrating another embodiment of a demand scenario method provided by the present application;
FIG. 5 is a schematic diagram of a scenario flow diagram of a demand scenario 1 provided herein;
FIG. 6 is a schematic diagram illustrating a scenario flowchart provided by the present application converted into scenario description statements and test cases;
FIG. 7 is a diagram of a scenario description statement of a requirement scenario 1 provided by the present application;
FIG. 8 is a schematic diagram of a test case of a requirement scenario 1 provided by the present application;
FIG. 9 is a schematic diagram of a requirements flow diagram for a task requirement provided herein;
FIG. 10 is a schematic diagram of a scenario flow diagram of two requirement scenarios of task requirements provided herein;
FIG. 11 is a diagram of scenario description statements for two requirement scenarios of task requirements provided by the present application;
FIG. 12 is a schematic flow chart diagram illustrating a method for providing a need scenario in accordance with another embodiment of the present application;
FIG. 13 is a schematic flow chart diagram illustrating a method for providing a demand scenario in accordance with another embodiment of the present application;
FIG. 14 is a schematic structural diagram illustrating an embodiment of a demand scenarization apparatus provided by the present application;
FIG. 15 is a schematic structural diagram of another embodiment of a demand scenarizing apparatus provided by the present application;
FIG. 16 is a schematic block diagram illustrating an exemplary modular structure of a demand scenarization apparatus provided herein.
Detailed Description
The application provides a demand scenario method and a demand scenario device, which are used for realizing conversion among different scenario descriptions of a demand scenario, so that the description consistency of the demand scenario is ensured, and the efficiency and the accuracy of software development are improved.
The technical solutions in the present application will be clearly and completely described below with reference to the accompanying drawings in the present application.
First, a system architecture or scenario in which the present application is applied will be briefly described.
The demand scenario method and the demand scenario device are mainly applied to the field of software development. In the field of software development, a specific software development task set forth by a customer is generally defined as a task requirement. For example, a mobile phone produced by a mobile phone manufacturer needs to have an intelligent interception function, and intelligent interception is to intercept a call according to a tag, so that the task requirement is that the intelligent interception adds a function of intercepting a call according to a tag, and a software developer realizes the function by writing a corresponding code in a mobile phone program according to the task requirement. The function to be realized by one task requirement may include a plurality of functions to be realized specifically, and the task requirement may include a plurality of scenes, for example, the task requirement "intelligent interception increase according to the function of marking interception telephone" includes a requirement scene "intelligent interception switch is closed by default, and a user may open" and "prompt the user to possibly intercept a useful number by mistake in guidance". Each requirement scene can be generally decomposed into three parts of descriptions of preconditions, processes and results in a specific implementation process, and the description of the requirement scene can clearly understand the task requirements proposed by a client for software developers, so that software development is facilitated.
However, in the field of software development, generally, a requirement analyst serves as a contact between a client and a software developer, that is, a task requirement proposed by the client is generally that the requirement analyst creates a description document, the description document uses a combination of various forms such as a text, a flowchart, or an interface diagram to convey the task requirement of the client to the software developer, and the task requirement can also be conveyed by writing a scenario description statement (for example, a GWT statement).
In order to solve the problem that the descriptions of the different scenario descriptions for the demand scenarios are inconsistent, the application provides a demand scenario method and a demand scenario device, and the demand scenario method is explained in detail through an embodiment.
Referring to fig. 1, the present application provides a demand scenario method, including:
101. displaying the first scenarization description and a conversion button corresponding to the first scenarization description;
in this embodiment, in the process of software development, in order to facilitate software development, a task requirement of a software development task proposed by a client needs to be described in a scenic manner, where one task requirement includes one or more requirement scenes, and the requirement scenes in the task requirement are described in a scenic description manner, where the scenic description may be a scene flowchart, a scene description statement, and a test case. The description of the demand scene can be generally divided into three parts of a precondition, a process and a result, so that the scene flow chart comprises a precondition node, a process node and a result node, the precondition node is connected with the process node in the scene flow chart, the process node is connected with the result node, and the sequence of the flow is 'precondition node → process node → result node'; the scene description statement comprises a precondition field, a process field and a result field; the test case includes test conditions, test procedures, and expected results. After the first scenario description is obtained according to the task requirement, the first scenario description and a conversion button corresponding to the first scenario description are displayed, the first scenario description is a scenario description mode of the task requirement, and the first scenario description is any one of a scenario flow chart, a scenario description statement and a test case. It should be noted that the function of the conversion button corresponding to the first scenized description is to trigger the conversion of the first scenized description into the second scenized description, and the specific display form of the conversion button may be an icon, or may be other forms, which is not limited. As shown in fig. 2, the conversion button is outside the frame displayed by the first scenario description, and besides, may also be inside the frame displayed by the first scenario description, which is not limited in particular.
102. When the click operation of a conversion button corresponding to the first scenarization description is detected, converting the first scenarization description into a second scenarization description;
in this embodiment, when a click operation on a conversion button corresponding to a first scenarization description is detected, the first scenarization description is converted into a second scenarization description, where the second scenarization description is one or two of a scene flowchart, a scene description statement, and a test case that are different from the first scenarization description, so that if the first scenarization description is the scene flowchart, the scene flowchart can be converted into the scene description statement and/or the test case; if the first scenario description is a scenario description statement, the scenario description statement can be converted into a scenario flow chart and/or a test case; if the first scenario description is a test case, the test case can be converted into a scenario flowchart and/or a scenario description statement.
103. And displaying the second scenized description.
In this embodiment, as shown in fig. 3, after the first scenario description is converted into the second scenario description, the second scenario description is displayed. It should be noted that, for the convenience of the user, the first scenized description and the second scenized description may be displayed simultaneously, or in addition, only the second scenized description may be displayed without displaying the first scenized description.
In the embodiment of the application, compared with the situation that a scene flow chart, a scene description statement and a test case in the prior art need to be independently written, a first scene description can be converted into a second scene description, the first scene description is one of the scene flow chart, the scene description statement and the test case, and the second scene description is one or two of the scene flow chart, the scene description statement and the test case different from the first scene description.
In the embodiment shown in fig. 1, according to the specific types of the first scenario description and the second scenario description, three cases can be distinguished: the first scenario description is a scenario flow chart, and the second scenario description is a scenario description statement and/or a test case; the first scenario description is a scenario description statement, and the second scenario description is a scenario flow chart and/or a test case; the first scenario description is a test case, and the second scenario description is a scenario flowchart and/or a scenario description statement. In each case, the conversion from the first scenario description to the second scenario description is different, and the above three cases are respectively explained in detail by the embodiments below.
1. The first scenario description is a scenario flow chart, and the second scenario description is a scenario description statement and/or a test case;
referring to fig. 4, the present application provides a method for demand scenization, including:
401. displaying a scene flow chart and a conversion button corresponding to the scene flow chart;
in this embodiment, a scene flow diagram and a conversion button corresponding to the scene flow diagram are displayed on a display interface of a demand scenario device, and assuming that a task demand is "intelligent interception adds a function of intercepting a call according to a label", the task demand includes a demand scenario 1 "incoming call of an unknown call, a user has a label locally", a demand scenario 2 "incoming call of an unknown call, and a user has no label locally", the demand scenario 1 is taken as an example, as shown in fig. 5, the scene flow diagram of the demand scenario 1 is provided, wherein the scene flow diagram has 5 scene nodes in a front-back connection relationship, wherein a third scene node "user has a label locally" is a demand scenario precondition of the demand scenario 1, a node content of a first scene node belonging to a precondition node is "intelligent interception function is set by default or closed", and a precondition that the intelligent interception function is set by default or closed is indicated for the demand scenario 1; the node content of the scene node belonging to the process node is a strange number incoming call, which indicates that the process of the requirement scene 1 is a certain strange number incoming call; the two scene nodes belong to the result node, the contents of the nodes are respectively 'no incoming call interception' and 'local mark display in call record', the result of the requirement scene 1 is that when a strange number displays the local mark in the call record, the incoming call of the strange number is not intercepted, according to the sequence of the two results in the requirement scene 1, the local mark display in the call record is required, and the incoming call is not intercepted, so that the two result nodes are required to be connected according to the sequence. It should be noted that the number of the precondition nodes, the process nodes, and the result nodes shown in fig. 5 is only a specific example, and in practical application, there may be a plurality of precondition nodes, process nodes, and result nodes in one scene flow chart, and the specific number is not limited.
402. When the clicking operation of a conversion button corresponding to the scene flow chart is detected, converting the precondition nodes, the process nodes and the result nodes of the scene flow chart into scene description statements and/or test cases;
in this embodiment, when a click operation on a conversion button corresponding to a scene flow chart is detected, a precondition node, a process node, and a result node of the scene flow chart are converted into a scene description statement and/or a test case, as shown in fig. 6, a precondition field in the converted scene description statement corresponds to the precondition node, a process field corresponds to the process node, and a result field corresponds to the result node; the test conditions in the test case obtained by conversion correspond to the precondition nodes, the test process corresponds to the process nodes, and the expected result corresponds to the result nodes. Under the above correspondence, the essence of the conversion is: in the scene description statement, the field content of the precondition field is consistent with the node content of the precondition node, the field content of the process field is consistent with the node content of the process node, and the field content of the result field of the scene description statement is consistent with the node content of the result node; in the test case, the test content of the test condition is consistent with the node content of the precondition node, the test content of the test process is consistent with the node content of the process node, and the test content of the expected result is consistent with the node content of the result node. As shown in fig. 7, the Scenario description statement takes a GWT statement as an example, where the field content of the "scene output" keyword indicates that a Scenario 1 "strange number incoming call is required, the user has a local tag", the precondition field is a field of the "Given" keyword, and the field content "intelligent interception function is set by default or turned off" is consistent with the node content of the precondition node in the Scenario flowchart shown in fig. 6; the process field is a field of a 'When' keyword, and the content of the field 'strange number incoming call' is consistent with the content of the node of the process node; the result fields are fields of the key word 'Then' And subsequent key words 'And', and the field contents 'display local mark in call record' And 'not intercept the incoming call' are respectively consistent with the node contents of the two result nodes. As shown in fig. 8, the test case is in a table form, the content of the test case _ name is "strange phone incoming call, and the user local label" indicates that the requirement scenario 1 is; the test content of the test condition is that "the intelligent interception function is set or closed by default", and is consistent with the node content of the precondition node in the scene flowchart shown in fig. 6; the test content of the test process is 'strange number incoming call', and is consistent with the node content of the process node; the test content of the expected result is '1', and a local mark is displayed in the call record; 2. the incoming call is not intercepted, and the content of the two result nodes is consistent.
403. And displaying the scene description statement and/or the test case.
In this embodiment, after the scene description statement and/or the test case are obtained through conversion, the scene description statement and/or the test case are displayed, so that a user can visually see field contents of each field in the scene description statement and test contents of each stage in the test case. The displayed scenario description statement may be as shown in fig. 7, and the test case may be as shown in fig. 8, it should be noted that fig. 7 and fig. 8 are only illustrations of display forms of the scenario description statement and the test case in this embodiment, and in a specific implementation process, the scenario description statement and the test case may also be displayed in alternative forms, which is not limited.
In the embodiment of the present application, it is specifically stated that when the first scenario description is a scenario flow diagram, the essence of the scenario flow diagram being converted into a scenario description statement and/or a test case is that the node contents of the precondition node, the process node, and the result node are replaced with the field contents of the precondition field, the process field, and the result field in the scenario description statement; and/or replacing the node contents of the precondition node, the process node and the result node with the test contents of the test condition, the test process and the expected result in the test case. Therefore, the requirement scene description can be ensured to be consistent while the mutual conversion among different scene descriptions is realized.
In the embodiment shown in fig. 4, it is assumed that the first scenario is described as a scenario flowchart, how the scenario flowchart is displayed, and how the precondition node, the process node, or the result node in the scenario flowchart is set, and the following is specifically described by the embodiment.
Optionally, in some embodiments of the application, before displaying the scene flowchart and the transition button corresponding to the scene flowchart, the method further includes:
displaying a requirement flow chart of the task requirement, wherein the requirement flow chart comprises at least three flow chart nodes;
and detecting a scene flow chart selected by a user from the demand flow chart, and acquiring node attributes of scene nodes in the scene flow chart set by the user, wherein the node attributes are used for indicating the scene nodes as precondition nodes, process nodes or result nodes.
In the embodiment of the application, a requirement flow chart of a task requirement is generated according to the task requirement, the requirement flow chart comprises at least three flow chart nodes, the task requirement is assumed to be 'intelligent interception adds a function of intercepting a call according to a mark', when a user makes the requirement flow chart, the two branches of the task requirement are 'strange call incoming call, the user has a mark locally' and 'strange call incoming call, the user is not marked locally', specific contents required by conditions, steps and results of the two branches are extracted, and finally the requirement flow chart shown in fig. 9 is obtained, wherein the requirement flow chart comprises flow chart nodes 701-709. The user carries out requirement scene division on task requirements according to understanding, one task requirement comprises one or more requirement scenes, and the specific requirement scene division can select at least three flow chart nodes from a requirement flow chart in a frame selection mode to serve as a scene flow chart. According to the analysis, the task requirements comprise a requirement scene 1 of 'strange telephone incoming call, a user local marked' and a requirement scene 2 of 'strange telephone incoming call, and a user local unmarked', the detection user selects flow chart nodes 701, 702, 703, 704 and 705 from fig. 9 as a scene flow chart of the requirement scene 1, selects flow chart nodes 701, 702, 706, 707, 708, 709 and 705 as a scene flow chart of the requirement scene 2, and specifically as shown in fig. 10, the node attributes of each scene node in the scene flow chart set by the user are obtained, the node attributes of the scene node 701 in the scene flow chart of the requirement scene 1 are used for indicating that the scene node 701 is a precondition node, the node attributes of the scene node 702 are used for indicating that the scene node 702 is a process node, and the node attributes of the scene nodes 704 and 705 are used for indicating that the scene nodes 704 and 705 are result nodes; in the scenario flow diagram of the requirement scenario 2, the node attribute of the scenario node 701 is used to indicate that the scenario node 701 is a precondition node, the node attributes of the scenario nodes 702 and 707 are used to indicate that the scenario nodes 702 and 707 are process nodes, and the node attributes of the scenario nodes 708, 709, and 705 are result nodes.
It should be noted that, in the requirement flowchart shown in fig. 10, two Scenario flowcharts are included, and the two Scenario flowcharts may also be displayed at the same time, so that when the two Scenario flowcharts are converted into other Scenario descriptions, two Scenario description statements are correspondingly obtained, for example, when the two Scenario flowcharts shown in fig. 10 are simultaneously converted into Scenario description statements, the number of the displayed Scenario description statements is also two, as shown in fig. 11, the field content of the field of the "Scenario Outline" keyword is "strange phone call, the user has a local tag", which corresponds to the requirement Scenario 1, and the field content of the field of the "Scenario Outline" keyword is "strange phone call, and the user has no local tag", which corresponds to the requirement Scenario 2.
2. The first scenario description is a scenario description statement, and the second scenario description is a scenario flow chart and/or a test case;
referring to fig. 12, the present application provides a method for demand scenization, including:
1201. displaying a scene description sentence and a conversion button corresponding to the scene description sentence;
in this embodiment, a scene description statement And a conversion button corresponding to the scene description statement are displayed on a display interface of a demand scenarization device, the scene description statement may be received from other devices or compiled from user analysis task demands, and assuming that the task demand is "intelligent interception adds a function of intercepting a call according to a tag", two demand scenes are obtained through analysis, a demand scene 1 "strange call, a user local tag" And a demand scene 2 "strange call, and a user local unmarked", the scene description statement for the demand scene 1 takes a GWT statement as an example, specifically as shown in fig. 7, where a field content of a "screen ario out" keyword represents that the demand scene 1 "strange number call And the user local tag", a precondition field is a field of a "Given" keyword, a process field is a field of a "When" a "keyword", and a result field is a field of a "Then" keyword And a subsequent "And" key field of an "ad" keyword.
1202. When the click operation of a conversion button corresponding to the scene description statement is detected, converting a precondition field, a process field and a result field of the scene description statement into a scene flow chart and/or a test case;
in this embodiment, when a click operation on a conversion button corresponding to a scene description statement is detected, the scene description statement is converted into a scene flowchart and/or a test case, where: converting the precondition field, the process field and the result field into a scene flow chart, wherein the node content of the precondition node of the scene flow chart is consistent with the field content of the precondition field, the node content of the process node of the scene flow chart is consistent with the field content of the process field, and the node content of the result node of the scene flow chart is consistent with the field content of the result field; and/or converting the precondition field, the process field and the result field into a test case, wherein the test content of the test condition of the test case is consistent with the field content of the precondition field, the test content of the test process of the test case is consistent with the field content of the process field, and the test content of the expected result of the test case is consistent with the field content of the result field.
1203. And displaying the scene flow chart and/or the test case.
In this embodiment, after the scene flow chart and/or the test case are obtained through conversion, the scene flow chart and/or the test case are displayed, so that a user can visually see node contents of each node in the scene flow chart and test contents of each stage in the test case.
In the embodiment of the present application, it is specifically stated that when the first scenario description is a scenario description statement, the essence of the scenario description statement being converted into a scenario flow chart and/or a test case is that the field contents of the precondition field, the process field, and the result field are replaced with the node contents of the precondition node, the process node, and the result node in the scenario flow chart; and/or replacing the field contents of the precondition field, the process field and the result field with the test contents of the test condition, the test process and the expected result in the test case. Therefore, the requirement scene description can be ensured to be consistent while the mutual conversion among different scene descriptions is realized.
3. The first scenario description is a test case, and the second scenario description is a scenario flowchart and/or a scenario description statement.
Referring to fig. 13, the present application provides a method for demand scenario, including:
1301. displaying the test cases and the conversion buttons corresponding to the test cases;
in this embodiment, a test case and a conversion button corresponding to the test case are displayed on a display interface of a demand scenario device, where the test case may be obtained by writing a user analysis task demand or by other methods, and two demand scenarios are obtained by analyzing the task demand as "intelligent interception adds a function of intercepting a call according to a mark", where a demand scenario 1 "incoming call of a strange call, a user local mark" and a demand scenario 2 "incoming call of a strange call, and a user local unmarked", and a test case for the demand scenario 1 is specifically shown in fig. 8, where a content "incoming call of a strange call" corresponding to a column of a test case _ name is a demand scenario 1, and a test content "intelligent interception function of a test condition is a precondition that a default setting or a closing" indicates the demand scenario 1, a test content "incoming call of the test process" strange number "indicates a process of the demand scenario 1, and a local mark is displayed in a test content" 1 "of an expected result and a call record; 2. not intercepting the incoming call "indicates that the result of the demand scenario 1 is present.
1302. When the clicking operation of a conversion button corresponding to the test case is detected, converting the test condition, the test process and the expected result of the test case into a scene flow chart and/or a scene description statement;
in this embodiment, when a click operation on a conversion button corresponding to a test case is detected, the test case is converted into a scene flow chart and/or a scene description statement, which are respectively: converting the test condition, the test process and the expected result into a scene flow chart, wherein the node content of the precondition node of the scene flow chart is consistent with the test content of the test condition, the node content of the process node of the scene flow chart is consistent with the test content of the test condition, and the node content of the result node of the scene flow chart is consistent with the test content of the expected result; and/or converting the test condition, the test process and the expected result into a scene description statement, wherein the field content of the precondition field of the scene description statement is consistent with the test content of the test condition, the field content of the process field of the scene description statement is consistent with the test content of the test process, and the field content of the result field of the scene description statement is consistent with the test content of the expected result.
1303. And displaying the scene flow chart and/or the scene description statement.
In this embodiment, after the scene flow chart and/or the scene description sentence are obtained through conversion, the scene flow chart and/or the scene description sentence are displayed, so that a user can visually see the node content of each node in the scene flow chart and the field content of each field in the scene description sentence.
In the embodiment of the present application, it is specifically described that when the first scenario description is a test case, the essence of converting the test case into the scenario flow chart and/or the scenario description statement is to replace the test contents of the test condition, the test process, and the expected result with the node contents of the precondition node, the process node, and the result node in the scenario flow chart; and/or replacing the test contents of the test conditions, the test processes and the expected results with the field contents of the precondition fields, the process fields and the result fields in the scene description statement. Therefore, the requirement scene description can be ensured to be consistent while the mutual conversion among different scene descriptions is realized.
In the above embodiment, after the first scenario description is converted into the second scenario description, if one scenario description changes, the description consistency of the requirement scenario cannot be guaranteed if the other scenario descriptions do not change correspondingly, and therefore, automatic modification between the scenario descriptions is required to guarantee the description consistency of the requirement scenario, which is explained by the following embodiment.
Optionally, in some embodiments of the application, after displaying the second scenario description, the method further includes:
when a user modifies the first scenarization description, displaying the modified first scenarization description, converting the modified first scenarization description into a modified second scenarization description, and displaying the modified second scenarization description;
or when the user modifies the second scenarized description, displaying the modified second scenarized description, converting the modified second scenarized description into a modified first scenarized description, and displaying the modified first scenarized description.
In the embodiment of the application, when the description of the demand scene is changed due to reasons such as change of task demand or change of understanding of a user, the user modifies the first scenarization description or the second scenarization description, when the user modifies the first scenarization description, the modified first scenarization description is displayed, the modified first scenarization description is converted into the modified second scenarization description, and the modified second scenarization description is displayed; or when the user modifies the second scenarized description, displaying the modified second scenarized description, converting the modified second scenarized description into the modified first scenarized description, and displaying the modified first scenarized description. After one scene description is modified, other scene descriptions can be automatically modified, so that the operation step of modifying other scene descriptions by a user is omitted, and the description consistency of a required scene is further ensured.
In the above embodiments, the requirement scenario method of the present application is described, and the requirement scenario apparatus is described in detail through the embodiments below.
Referring to fig. 14, an embodiment of the present application provides a demand scenario apparatus, including:
a processor 1402, a display 1401, and a memory 1403, wherein the memory 1403 may be used to store code that is executed by the processor 1402;
a display 1401, configured to display a first scenario description and a transition button corresponding to the first scenario description, where the first scenario description is a scenario description manner of a task requirement, the first scenario description is any one of a scenario flow diagram, a scenario description statement, and a test case, the scenario flow diagram includes a precondition node, a process node, and a result node, the scenario description statement includes a precondition field, a process field, and a result field, and the test case includes a test condition, a test process, and an expected result;
the processor 1402 is configured to, when a click operation on a conversion button corresponding to the first scenarization description is detected, convert the first scenarization description into a second scenarization description, where the second scenarization description is one or two of a scene flowchart, a scene description statement, and a test case that are different from the first scenarization description;
display 1401, also for displaying a second scenarized description.
In the embodiment of the application, in the process of software development, in order to facilitate software development, a task requirement of a software development task proposed by a client needs to be described in a scenic manner, wherein one task requirement comprises one or more requirement scenes, the requirement scenes in the task requirement are described in a scenic description manner, and the scenic description can be a scene flow chart, a scene description statement and a test case. The description of the demand scene can be generally divided into three parts of a precondition, a process and a result, and then a scene flow chart comprises a precondition node, a process node and a result node; the scene description statement comprises a precondition field, a process field and a result field; the test case includes test conditions, test procedures, and expected results. After the first scenario description is obtained according to the task requirement, a display 1401 of the requirement scenario apparatus displays the first scenario description and a transition button corresponding to the first scenario description, the first scenario description is a scenario description manner of the task requirement, the first scenario description is any one of a scenario flowchart, a scenario description statement, and a test case, when the processor 1402 detects a click operation on the transition button corresponding to the first scenario description, the first scenario description is converted into a second scenario description, the second scenario description is one or two of the scenario flowchart, the scenario description statement, and the test case, which are different from the first scenario description, and the display 1401 displays the converted second scenario description. Compared with the prior art that the scene flow diagram, the scene description statement and the test case are required to be independently written, the first scene description can be converted into the second scene description, the first scene description is one of the scene flow diagram, the scene description statement and the test case, and the second scene description is one or two of the scene flow diagram, the scene description statement and the test case which are different from the first scene description.
Optionally, in some embodiments of the present application, the first scenario description is a scenario flowchart, the second scenario description is a scenario description statement and/or a test case,
the processor 1402 is further configured to convert the precondition nodes, the process nodes, and the result nodes into scene description statements, where field contents of precondition fields of the scene description statements are consistent with node contents of the precondition nodes, field contents of process fields of the scene description statements are consistent with node contents of the process nodes, and field contents of result fields of the scene description statements are consistent with node contents of the result nodes;
and/or the presence of a gas in the gas,
the processor 1402 is further configured to convert the precondition nodes, the process nodes, and the result nodes into test cases, where test contents of the test conditions of the test cases are consistent with node contents of the precondition nodes, test contents of the test processes of the test cases are consistent with node contents of the process nodes, and test contents of expected results of the test cases are consistent with node contents of the result nodes.
In the embodiment of the present application, the first scenario description is a scenario flowchart, and then the second scenario description is a scenario description statement and/or a test case. The scene flow chart displayed on the display 1401 includes nodes of three types of attributes, which are a precondition node, a process node and a result node, respectively, and the node content of the precondition node is used for describing the precondition of the demand scene; the node content of the process node is used for describing the process of the demand scene; the node content of the result node is used to describe the result of the demand scenario. The processor 1402 converts the first scenario description into a second scenario description, which is substantially a scenario description statement that converts the precondition node, the process node, and the result node into scenario description statements; and/or converting the precondition nodes, the process nodes and the result nodes into test cases. In the obtained scene description statement, the field content of the precondition field is consistent with the node content of the precondition node, the field content of the process field is consistent with the node content of the process node, and the field content of the result field of the scene description statement is consistent with the node content of the result node; in the obtained test case, the test content of the test condition is consistent with the node content of the precondition node, the test content of the test process is consistent with the node content of the process node, and the test content of the expected result is consistent with the node content of the result node. Specifically, when the first scenario description is a scenario flow diagram, the essence of the scenario flow diagram being converted into a scenario description statement and/or a test case is that the node contents of the precondition node, the process node and the result node are replaced with the field contents of the precondition field, the process field and the result field in the scenario description statement; and/or replacing the node contents of the precondition node, the process node and the result node with the test contents of the test condition, the test process and the expected result in the test case. Therefore, the requirement scene description can be ensured to be consistent while the mutual conversion among different scene descriptions is realized.
Alternatively, in some embodiments of the present application,
the display 1401 is further configured to display a requirement flowchart of the task requirement, where the requirement flowchart includes at least three flowchart nodes;
the processor 1402 is further configured to detect a scene flow diagram selected by a user from the demand flow diagram, and obtain a node attribute of a scene node in the scene flow diagram set by the user, where the node attribute is used to indicate the scene node as a precondition node, a process node, or a result node.
In the embodiment of the present application, a first scenario is described as a scenario flowchart, how the scenario flowchart displayed by the display 1401 comes, and how the precondition node, the process node, or the result node in the scenario flowchart is set, which needs to be described below, first, the display 1401 displays a requirement flowchart of a task requirement, where the requirement flowchart is generated according to the task requirement, and the requirement flowchart includes at least three flowchart nodes; after a user sees a displayed demand flow diagram, demand scene division is performed on task demands according to understanding, one task demand comprises one or more demand scenes, at least three flow diagram nodes are selected from frames in the demand flow diagram as one scene flow diagram according to the divided demand scenes, for a demand scenarization device, a processor 1402 detects the scene flow diagram selected from the demand flow diagram by the user, and node attributes of the scene nodes in the scene flow diagram set by the user are obtained, wherein the node attributes are used for indicating the scene nodes as precondition nodes, process nodes or result nodes.
Optionally, in some embodiments of the present application, the first scenario description is a scenario description statement, the second scenario description is a scenario flowchart and/or a test case,
the processor 1402 is further configured to convert the precondition field, the process field, and the result field into a scene flow chart, where node content of a precondition node of the scene flow chart is consistent with field content of the precondition field, node content of a process node of the scene flow chart is consistent with field content of the process field, and node content of a result node of the scene flow chart is consistent with field content of the result field;
and/or the presence of a gas in the gas,
the processor 1402 is further configured to convert the precondition field, the process field, and the result field into a test case, where test content of a test condition of the test case is consistent with field content of the precondition field, test content of a test process of the test case is consistent with field content of the process field, and test content of an expected result of the test case is consistent with field content of the result field.
In the embodiment of the present application, the first scenario description is a scenario description statement, and then the second scenario description is a scenario flowchart and/or a test case. The scene description sentence displayed on the display 1401 includes three types of fields, which are a precondition field, a process field, and a result field, respectively, and the field content of the precondition field is used to describe the precondition of the demand scene; the field content of the process field is used for describing the process of the requirement scene; the field contents of the result field are used to describe the result of the demand scenario. The processor 1402 converts the first scenarized description into a second scenarized description, which essentially converts the precondition field, the process field, and the result field into a scene flow diagram; and/or converting the precondition field, the process field and the result field into a test case. In the obtained scene flow chart, the node content of the precondition node is consistent with the field content of the precondition field, the node content of the process node is consistent with the field content of the process field, and the node content of the result node is consistent with the field content of the result field; in the obtained test case, the test content of the test condition is consistent with the field content of the precondition field, the test content of the test process is consistent with the field content of the process field, and the test content of the expected result is consistent with the field content of the result field. Specifically, when the first scenario description is a scenario description statement, the essence of the scenario description statement being converted into a scenario flow chart and/or a test case is that the field contents of the precondition field, the process field and the result field are replaced with the node contents of the precondition node, the process node and the result node in the scenario flow chart; and/or replacing the field contents of the precondition field, the process field and the result field with the test contents of the test condition, the test process and the expected result in the test case. Therefore, the requirement scene description can be ensured to be consistent while the mutual conversion among different scene descriptions is realized.
Optionally, in some embodiments of the present application, the first scenario description is a test case, the second scenario description is a scenario flowchart and/or a scenario description statement,
the processor 1402 is further configured to convert the test condition, the test process, and the expected result into a scene flow chart, where node contents of precondition nodes of the scene flow chart are consistent with test contents of the test condition, node contents of process nodes of the scene flow chart are consistent with test contents of the test condition, and node contents of result nodes of the scene flow chart are consistent with test contents of the expected result;
and/or the presence of a gas in the gas,
the processor 1402 is further configured to convert the test condition, the test procedure, and the expected result into a scenario description statement, where a field content of a precondition field of the scenario description statement is consistent with a test content of the test condition, a field content of a procedure field of the scenario description statement is consistent with a test content of the test procedure, and a field content of a result field of the scenario description statement is consistent with a test content of the expected result.
In the embodiment of the present application, the first scenario is described as a test case, and then the second scenario is described as a scenario flowchart and/or a scenario description statement. The test case displayed on the display 1401 comprises test conditions, a test process and an expected result, and the test content of the test conditions is used for describing the precondition of a demand scene; the test content of the test process is used for describing the process of the demand scene; the test content of the expected results is used to describe the results of the demand scenario. Processor 1402 converts the first scenario description into a second scenario description, which is essentially a scenario flow chart that converts the test conditions, test procedures, and expected results into a scenario flow chart; and/or converting the test conditions, the test process and the expected result into a scenario description statement. In the obtained scene flow chart, the node content of the precondition node is consistent with the test content of the test condition, the node content of the process node is consistent with the test content of the test process, and the node content of the result node is consistent with the test content of the expected result; in the obtained scene description statement, the field content of the precondition field is consistent with the test content of the test condition, the field content of the process field is consistent with the test content of the test process, and the field content of the result field is consistent with the test content of the expected result. Specifically, when the first scenario description is a test case, the essence of converting the test case into a scenario flow chart and/or a scenario description statement is to replace the test contents of the test conditions, the test process and the expected results with the contents of the preconditions, the process nodes and the results in the scenario flow chart; and/or replacing the test contents of the test conditions, the test processes and the expected results with the field contents of the precondition fields, the process fields and the result fields in the scene description statement. Therefore, the requirement scene description can be ensured to be consistent while the mutual conversion among different scene descriptions is realized.
Alternatively, in some embodiments of the present application,
a display 1401, further configured to display the modified first scenarized description when the user modifies the first scenarized description;
a processor 1402, further configured to convert the modified first scenized description into a modified second scenized description;
a display 1401 for displaying the modified second scenarized description;
alternatively, the first and second electrodes may be,
a display 1401, further configured to display the modified second scenarized description when the user modifies the second scenarized description;
a processor 1402, further configured to convert the modified second scenarized description into a modified first scenarized description;
the display 1401 is further configured to display the modified first scenarized description.
In the embodiment of the application, when the description of the demand scene changes due to reasons such as change of task demand or change of understanding of a user, the user modifies the first scenarization description or the second scenarization description, when the user modifies the first scenarization description, the display 1401 displays the modified first scenarization description, the processor 1402 converts the modified first scenarization description into the modified second scenarization description, and the display 1401 displays the modified second scenarization description; alternatively, when the user modifies the second scenarized description, display 1401 displays the modified second scenarized description, processor 1402 converts the modified second scenarized description to the modified first scenarized description, and display 1401 displays the modified first scenarized description. After the change of one scenized description is realized, other scenized descriptions can be automatically changed, and the operation step of changing other scenized descriptions by a user is omitted.
It should be noted that, in the above embodiment, the number of the displays 1401 in fig. 14 is only one, and in the implementation, as shown in fig. 15, the specific number of the displays 1501 is not limited, and if multiple scenic descriptions are shared by multiple users, the first scenic description, the transition button, and the second scenic description may be simultaneously displayed on each display; if a user is directed to a scenario description, a scenario description may be displayed on a display, for example, the first scenario description and the transition button are displayed on the display 1, and the second scenario description is displayed on the displays 2 to N.
The above embodiment is an explanation of the requirement scenario apparatus as an entity apparatus, and a requirement scenario apparatus with a modularized function is explained through the embodiment below.
Referring to fig. 16, an embodiment of the present application provides a demand scene apparatus, including:
the display module 1601 is configured to display a first scenario description and a conversion button corresponding to the first scenario description, where the first scenario description is a scenario description manner of a task requirement, the first scenario description is any one of a scenario flow chart, a scenario description statement, and a test case, the scenario flow chart includes a precondition node, a process node, and a result node, the scenario description statement includes a precondition field, a process field, and a result field, and the test case includes a test condition, a test process, and an expected result;
a processing module 1602, configured to, when a click operation on a conversion button corresponding to a first scenarization description is detected, convert the first scenarization description into a second scenarization description, where the second scenarization description is one or two of a scene flowchart, a scene description statement, and a test case that are different from the first scenarization description;
the display module 1601 is further configured to display the second scenarized description.
In this embodiment of the application, the display module 1601 displays a first scenario description and a transition button corresponding to the first scenario description, where the first scenario description is a scenario description manner of a task requirement, the first scenario description is any one of a scenario flowchart, a scenario description statement, and a test case, the processing module 1602 converts the first scenario description into a second scenario description when a click operation on the transition button corresponding to the first scenario description is detected, the second scenario description is one or two of the scenario flowchart, the scenario description statement, and the test case that are different from the first scenario description, and the display module 1601 displays the converted second scenario description. Compared with the prior art that the scene flow diagram, the scene description statement and the test case are required to be independently written, the first scene description can be converted into the second scene description, the first scene description is one of the scene flow diagram, the scene description statement and the test case, and the second scene description is one or two of the scene flow diagram, the scene description statement and the test case which are different from the first scene description.
Optionally, in some embodiments of the present application, the first scenario description is a scenario flowchart, the second scenario description is a scenario description statement and/or a test case,
the processing module 1602 is further configured to convert the precondition nodes, the process nodes, and the result nodes into scene description statements, where field contents of precondition fields of the scene description statements are consistent with node contents of the precondition nodes, field contents of process fields of the scene description statements are consistent with node contents of the process nodes, and field contents of result fields of the scene description statements are consistent with node contents of the result nodes;
and/or the presence of a gas in the atmosphere,
the processing module 1602 is further configured to convert the precondition nodes, the process nodes, and the result nodes into test cases, where test contents of the test conditions of the test cases are consistent with node contents of the precondition nodes, test contents of the test processes of the test cases are consistent with node contents of the process nodes, and test contents of expected results of the test cases are consistent with node contents of the result nodes.
In the embodiment of the present application, the first scenario description is a scenario flowchart, and then the second scenario description is a scenario description statement and/or a test case. A scene flow chart displayed by the display module 1601 includes nodes of three types of attributes, which are a precondition node, a process node, and a result node, and node contents of the precondition node are used for describing preconditions of a demand scene; the node content of the process node is used for describing the process of the demand scene; the node content of the result node is used to describe the result of the demand scenario. The processing module 1602 converts the first scenario description into a second scenario description, which is substantially a scenario description statement that converts the precondition node, the process node, and the result node into a scenario description statement; and/or the processing module 1602 converts the precondition nodes, the process nodes, and the result nodes into test cases. In the obtained scene description statement, the field content of the precondition field is consistent with the node content of the precondition node, the field content of the process field is consistent with the node content of the process node, and the field content of the result field of the scene description statement is consistent with the node content of the result node; in the obtained test case, the test content of the test condition is consistent with the node content of the precondition node, the test content of the test process is consistent with the node content of the process node, and the test content of the expected result is consistent with the node content of the result node. Specifically, when the first scenario description is a scenario flow diagram, the essence of the scenario flow diagram being converted into a scenario description statement and/or a test case is that the node contents of the precondition node, the process node and the result node are replaced with the field contents of the precondition field, the process field and the result field in the scenario description statement; and/or replacing the node contents of the precondition node, the process node and the result node with the test contents of the test condition, the test process and the expected result in the test case. Therefore, the requirement scene description can be ensured to be consistent while the mutual conversion among different scene descriptions is realized.
Alternatively, in some embodiments of the present application,
the display module 1601 is further configured to display a requirement flowchart of the task requirement, where the requirement flowchart includes at least three flowchart nodes;
the processing module 1602 is further configured to detect a scene flow diagram selected by a user from the requirement flow diagram, and obtain a node attribute of a scene node in the scene flow diagram set by the user, where the node attribute is used to indicate the scene node as a precondition node, a process node, or a result node.
In this embodiment of the application, a first scenario is described as a scenario flowchart, how the scenario flowchart displayed by the display module 1601 is coming and how a precondition node, a process node, or a result node in the scenario flowchart is set is described below, first, the display module 1601 displays a requirement flowchart of a task requirement, where the requirement flowchart is generated according to the task requirement, and the requirement flowchart includes at least three flowchart nodes; after a user sees a displayed demand flow chart, demand scene division is carried out on task demands according to understanding, one task demand comprises one or more demand scenes, at least three flow chart nodes are selected from frames in the demand flow chart as a scene flow chart according to the divided demand scenes, for a demand scene device, a processing module 1602 detects the scene flow chart selected from the demand flow chart by the user, node attributes of the scene nodes in the scene flow chart set by the user are obtained, and the node attributes are used for indicating the scene nodes as precondition nodes, process nodes or result nodes.
Optionally, in some embodiments of the present application, the first scenario description is a scenario description statement, the second scenario description is a scenario flowchart and/or a test case,
the processing module 1602 is further configured to convert the precondition field, the process field, and the result field into a scene flow chart, where node content of the precondition node of the scene flow chart is consistent with field content of the precondition field, node content of the process node of the scene flow chart is consistent with field content of the process field, and node content of the result node of the scene flow chart is consistent with field content of the result field;
and/or the presence of a gas in the gas,
the processing module 1602 is further configured to convert the precondition field, the process field, and the result field into a test case, where test content of a test condition of the test case is consistent with field content of the precondition field, test content of a test process of the test case is consistent with field content of the process field, and test content of an expected result of the test case is consistent with field content of the result field.
In the embodiment of the present application, the first scenario description is a scenario description statement, and then the second scenario description is a scenario flowchart and/or a test case. The scene description sentence displayed by the display module 1601 includes three types of fields, which are a precondition field, a process field, and a result field, and the field content of the precondition field is used for describing the preconditions of the required scene; the field content of the process field is used for describing the process of the requirement scene; the field contents of the result field are used to describe the result of the demand scenario. The processing module 1602 converts the first scenario description into a second scenario description, which is substantially a scenario flowchart that converts the precondition field, the process field, and the result field into a scenario flowchart; and/or converting the precondition field, the process field and the result field into a test case. In the obtained scene flow chart, the node content of the precondition node is consistent with the field content of the precondition field, the node content of the process node is consistent with the field content of the process field, and the node content of the result node is consistent with the field content of the result field; in the obtained test case, the test content of the test condition is consistent with the field content of the precondition field, the test content of the test process is consistent with the field content of the process field, and the test content of the expected result is consistent with the field content of the result field. Specifically, when the first scenario description is a scenario description statement, the essence of the scenario description statement being converted into a scenario flow chart and/or a test case is that the field contents of the precondition field, the process field and the result field are replaced with the node contents of the precondition node, the process node and the result node in the scenario flow chart; and/or replacing the field contents of the precondition field, the process field and the result field with the test contents of the test condition, the test process and the expected result in the test case. Therefore, the requirement scene description can be ensured to be consistent while the mutual conversion among different scene descriptions is realized.
Optionally, in some embodiments of the present application, the first scenario description is a test case, the second scenario description is a scenario flowchart and/or a scenario description statement,
the processing module 1602 is further configured to convert the test condition, the test process, and the expected result into a scene flow chart, where the node content of the precondition node of the scene flow chart is consistent with the test content of the test condition, the node content of the process node of the scene flow chart is consistent with the test content of the test condition, and the node content of the result node of the scene flow chart is consistent with the test content of the expected result;
and/or the presence of a gas in the gas,
the processing module 1602 is further configured to convert the test condition, the test procedure, and the expected result into a scenario description statement, where a field content of a precondition field of the scenario description statement is consistent with a test content of the test condition, a field content of a procedure field of the scenario description statement is consistent with a test content of the test procedure, and a field content of a result field of the scenario description statement is consistent with a test content of the expected result.
In the embodiment of the present application, the first scenario is described as a test case, and then the second scenario is described as a scenario flowchart and/or a scenario description statement. The test cases displayed by the display module 1601 include test conditions, test procedures and expected results, and the test contents of the test conditions are used for describing the preconditions of the demand scenario; the test content of the test process is used for describing the process of the demand scene; the test content of the expected results is used to describe the results of the demand scenario. The processing module 1602 converts the first scenario description into a second scenario description, which is substantially a scenario flowchart that converts the test conditions, the test process, and the expected results into a scenario flowchart; and/or converting the test conditions, the test process and the expected result into a scene description statement. In the obtained scene flow chart, the node content of the precondition node is consistent with the test content of the test condition, the node content of the process node is consistent with the test content of the test process, and the node content of the result node is consistent with the test content of the expected result; in the obtained scene description statement, the field content of the precondition field is consistent with the test content of the test condition, the field content of the process field is consistent with the test content of the test process, and the field content of the result field is consistent with the test content of the expected result. Specifically, when the first scenario description is a test case, the essence of converting the test case into a scenario flow chart and/or a scenario description statement is to replace the test contents of the test conditions, the test process and the expected results with the contents of the preconditions, the process nodes and the results in the scenario flow chart; and/or replacing the test contents of the test conditions, the test processes and the expected results with the field contents of the precondition fields, the process fields and the result fields in the scene description statement. Therefore, the requirement scene description can be ensured to be consistent while the mutual conversion among different scene descriptions is realized.
Alternatively, in some embodiments of the present application,
the display module 1601 is further configured to display the modified first scenarized description when the user modifies the first scenarized description;
a processing module 1602, further configured to convert the modified first scenized description into a modified second scenized description;
a display module 1601, further configured to display the modified second scenarized description;
alternatively, the first and second electrodes may be,
a display module 1601, further configured to display the modified second scenarized description when the user modifies the second scenarized description;
a processing module 1602, further configured to convert the modified second scenized description into a modified first scenized description;
the display module 1601 is further configured to display the modified first scenarized description.
In the embodiment of the application, when the description of the demand scenario changes due to a change in task demand or a change in user understanding, the user modifies the first scenario description or the second scenario description, when the user modifies the first scenario description, the display module 1601 displays the modified first scenario description, the processing module 1602 converts the modified first scenario description into the modified second scenario description, and the display module 1601 displays the modified second scenario description; alternatively, when the user modifies the second scenized description, the display module 1601 displays the modified second scenized description, the processing module 1602 converts the modified second scenized description into the modified first scenized description, and the display module 1601 displays the modified first scenized description. After the modification of one scene description is realized, other scene descriptions can be automatically modified, and the operation step of modifying other scene descriptions by a user is omitted.
The present application also provides a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to perform the demand scenario method described in the above embodiments.
The present application also provides a computer program product containing instructions which, when run on a computer, cause the computer to perform the demand scenario method described in the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and these modifications or substitutions do not depart from the scope of the technical solutions of the embodiments of the present application.

Claims (13)

1. A method for demand scenarization, comprising:
displaying a first scenario description and a conversion button corresponding to the first scenario description, wherein the first scenario description is a scenario description mode of a task requirement, the first scenario description is any one of a scenario flow chart, a scenario description statement and a test case, the scenario flow chart comprises a precondition node, a process node and a result node, the scenario description statement comprises a precondition field, a process field and a result field, and the test case comprises a test condition, a test process and an expected result;
when a click operation on a conversion button corresponding to the first scenarization description is detected, converting the first scenarization description into a second scenarization description, wherein the second scenarization description is one or two of the scene flow diagram, the scene description statement and the test case, and the second scenarization description is different from the first scenarization description;
displaying the second scenic description.
2. The method of claim 1, wherein the first scenario description is a scenario flow diagram, wherein the second scenario description is a scenario description statement and/or a test case,
the converting the first scenized description into a second scenized description includes:
converting the precondition nodes, the process nodes and the result nodes into scene description sentences, wherein the field content of precondition fields of the scene description sentences is consistent with the node content of the precondition nodes, the field content of process fields of the scene description sentences is consistent with the node content of the process nodes, and the field content of result fields of the scene description sentences is consistent with the node content of the result nodes;
and/or the presence of a gas in the gas,
and converting the precondition nodes, the process nodes and the result nodes into test cases, wherein the test content of the test conditions of the test cases is consistent with the node content of the precondition nodes, the test content of the test processes of the test cases is consistent with the node content of the process nodes, and the test content of the expected results of the test cases is consistent with the node content of the result nodes.
3. The method of claim 2, wherein before displaying the first scenarized description and the transition button corresponding to the first scenarized description, further comprising:
displaying a demand flow diagram of a task demand, wherein the demand flow diagram comprises at least three flow diagram nodes;
and detecting a scene flow chart selected by a user from the requirement flow chart, and acquiring node attributes of scene nodes in the scene flow chart set by the user, wherein the node attributes are used for indicating that the scene nodes are precondition nodes, process nodes or result nodes.
4. The method of claim 1, wherein the first scenario description is a scenario description statement, the second scenario description is a scenario flow diagram and/or a test case,
the converting the first scenized description to the second scenized description comprises:
converting the precondition field, the process field and the result field into a scene flow chart, wherein the node content of the precondition node of the scene flow chart is consistent with the field content of the precondition field, the node content of the process node of the scene flow chart is consistent with the field content of the process field, and the node content of the result node of the scene flow chart is consistent with the field content of the result field;
and/or the presence of a gas in the atmosphere,
and converting the precondition field, the process field and the result field into a test case, wherein the test content of the test condition of the test case is consistent with the field content of the precondition field, the test content of the test process of the test case is consistent with the field content of the process field, and the test content of the expected result of the test case is consistent with the field content of the result field.
5. The method according to claim 1, wherein the first scenario description is a test case, the second scenario description is a scenario flow diagram and/or a scenario description statement,
the converting the first scenized description to the second scenized description comprises:
converting the test condition, the test process and the expected result into a scene flow chart, wherein the node content of the precondition node of the scene flow chart is consistent with the test content of the test condition, the node content of the process node of the scene flow chart is consistent with the test content of the test condition, and the node content of the result node of the scene flow chart is consistent with the test content of the expected result;
and/or the presence of a gas in the gas,
and converting the test condition, the test process and the expected result into a scene description statement, wherein the field content of a precondition field of the scene description statement is consistent with the test content of the test condition, the field content of a process field of the scene description statement is consistent with the test content of the test process, and the field content of a result field of the scene description statement is consistent with the test content of the expected result.
6. The method of any of claims 1-5, wherein after said displaying said second scenized description, further comprising:
when a user modifies the first scenarized description, displaying the modified first scenarized description, converting the modified first scenarized description into a modified second scenarized description, and displaying the modified second scenarized description;
or when the user modifies the second scenarized description, displaying the modified second scenarized description, converting the modified second scenarized description into a modified first scenarized description, and displaying the modified first scenarized description.
7. A demand scenarizing apparatus comprising:
a processor, a display, and a memory, wherein the memory may be used to store code executed by the processor;
the display is used for displaying a first scenario description and a conversion button corresponding to the first scenario description, the first scenario description is a scenario description mode of a task requirement, the first scenario description is any one of a scenario flow chart, a scenario description statement and a test case, the scenario flow chart comprises a precondition node, a process node and a result node, the scenario description statement comprises a precondition field, a process field and a result field, and the test case comprises a test condition, a test process and an expected result;
the processor is configured to, when a click operation on a conversion button corresponding to the first scenario description is detected, convert the first scenario description into a second scenario description, where the second scenario description is one or two of the scenario flowchart, the scenario description statement, and the test case that are different from the first scenario description;
the display is further configured to display the second scenized description.
8. The apparatus of claim 7, wherein the first scenario description is a scenario flow diagram, the second scenario description is a scenario description statement and/or a test case,
the processor is further configured to convert the precondition nodes, the process nodes, and the result nodes into scene description statements, where field contents of precondition fields of the scene description statements are consistent with node contents of the precondition nodes, field contents of process fields of the scene description statements are consistent with node contents of the process nodes, and field contents of result fields of the scene description statements are consistent with node contents of the result nodes;
and/or the presence of a gas in the atmosphere,
the processor is further configured to convert the precondition node, the process node, and the result node into a test case, where test content of a test condition of the test case is consistent with node content of the precondition node, test content of a test process of the test case is consistent with node content of the process node, and test content of an expected result of the test case is consistent with node content of the result node.
9. The apparatus of claim 8,
the display is further used for displaying a requirement flow chart of the task requirement, and the requirement flow chart comprises at least three flow chart nodes;
the processor is further configured to detect a scene flow chart selected by a user from the demand flow chart, and acquire a node attribute of a scene node in the scene flow chart set by the user, where the node attribute is used to indicate that the scene node is a precondition node, a process node, or a result node.
10. The apparatus of claim 7, wherein the first scenario description is a scenario description statement, and the second scenario description is a scenario flowchart and/or a test case,
the processor is further configured to convert the precondition field, the process field, and the result field into a scene flow chart, where node content of a precondition node of the scene flow chart is consistent with field content of the precondition field, node content of a process node of the scene flow chart is consistent with field content of the process field, and node content of a result node of the scene flow chart is consistent with field content of the result field;
and/or the presence of a gas in the gas,
the processor is further configured to convert the precondition field, the process field, and the result field into a test case, where test content of a test condition of the test case is consistent with field content of the precondition field, test content of a test process of the test case is consistent with field content of the process field, and test content of an expected result of the test case is consistent with field content of the result field.
11. The apparatus of claim 7, wherein the first scenario description is a test case, wherein the second scenario description is a scenario flowchart and/or a scenario description statement,
the processor is further configured to convert the test condition, the test process, and the expected result into a scene flow chart, where node contents of precondition nodes of the scene flow chart are consistent with test contents of the test condition, node contents of process nodes of the scene flow chart are consistent with test contents of the test condition, and node contents of result nodes of the scene flow chart are consistent with test contents of the expected result;
and/or the presence of a gas in the gas,
the processor is further configured to convert the test condition, the test procedure, and the expected result into a scenario description statement, where field content of a precondition field of the scenario description statement is consistent with test content of the test condition, field content of a procedure field of the scenario description statement is consistent with test content of the test procedure, and field content of a result field of the scenario description statement is consistent with test content of the expected result.
12. The apparatus according to any one of claims 7 to 11,
the display is further used for displaying the modified first scenarized description when the user modifies the first scenarized description;
the processor is further configured to convert the modified first scenized description into a modified second scenized description;
the display is further used for displaying the modified second scenarized description;
alternatively, the first and second electrodes may be,
the display is further used for displaying the modified second scenarized description when the user modifies the second scenarized description;
the processor is further configured to convert the modified second scenarized description into a modified first scenarized description;
the display is further configured to display the modified first scenarized description.
13. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of any of claims 1 to 6.
CN201710586174.4A 2017-07-18 2017-07-18 Demand scene method and demand scene device Active CN109271311B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710586174.4A CN109271311B (en) 2017-07-18 2017-07-18 Demand scene method and demand scene device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710586174.4A CN109271311B (en) 2017-07-18 2017-07-18 Demand scene method and demand scene device

Publications (2)

Publication Number Publication Date
CN109271311A CN109271311A (en) 2019-01-25
CN109271311B true CN109271311B (en) 2022-11-25

Family

ID=65152667

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710586174.4A Active CN109271311B (en) 2017-07-18 2017-07-18 Demand scene method and demand scene device

Country Status (1)

Country Link
CN (1) CN109271311B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126411A (en) * 2016-06-13 2016-11-16 广州酷狗计算机科技有限公司 A kind of method and apparatus that tested program code is tested

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7313564B2 (en) * 2002-12-03 2007-12-25 Symbioware, Inc. Web-interactive software testing management method and computer system including an integrated test case authoring tool
CN100472470C (en) * 2005-12-22 2009-03-25 中兴通讯股份有限公司 Method for realizing test exemple automation operation
CN102901896B (en) * 2012-10-12 2016-03-02 上海金智晟东电力科技有限公司 The presetting system feeder test method of distribution network
CN104484419B (en) * 2014-12-17 2018-02-13 上海斐讯数据通信技术有限公司 A kind of converting system and method for test case document
CN105426309B (en) * 2015-11-13 2018-04-06 上海斐讯数据通信技术有限公司 Automatic example generation method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126411A (en) * 2016-06-13 2016-11-16 广州酷狗计算机科技有限公司 A kind of method and apparatus that tested program code is tested

Also Published As

Publication number Publication date
CN109271311A (en) 2019-01-25

Similar Documents

Publication Publication Date Title
US6898764B2 (en) Method, system and program product for determining differences between an existing graphical user interface (GUI) mapping file and a current GUI
US20090319995A1 (en) Enhancing source code debugging and readability using visual symbols
JP2005251173A (en) Method and system for masking dynamic region in user interface to enable testing of user interface consistency
US10019426B2 (en) Generating data format description language schema
JP2011192296A (en) Help utility application program
US11741002B2 (en) Test automation systems and methods using logical identifiers
CN111736840A (en) Compiling method and running method of applet, storage medium and electronic equipment
CN111881054B (en) User interface automatic test method, system, equipment and storage medium
CN111897740A (en) User interface testing method and device, electronic equipment and computer readable medium
US20100077325A1 (en) In Situ Editing of GUI Features
US20140082582A1 (en) Resource Tracker
CN112433730A (en) Code detection rule generation method and device and electronic equipment
JP6440895B2 (en) Software analysis apparatus and software analysis method
CN113836014A (en) Interface testing method and device, electronic equipment and storage medium
WO2023151397A1 (en) Application program deployment method and apparatus, device, and medium
CN109271311B (en) Demand scene method and demand scene device
CN111124541A (en) Configuration file generation method, device, equipment and medium
CN105739717A (en) Information input method and device
US7712030B1 (en) System and method for managing messages and annotations presented in a user interface
CN113495651B (en) Window control method and device
CN109948251B (en) CAD-based data processing method, device, equipment and storage medium
CN113849416A (en) Test method, test device, storage medium and electronic equipment
CN113220596B (en) Application testing method, device, equipment, storage medium and program product
US20130151964A1 (en) Displaying dynamic and shareable help data for images a distance from a pointed-to location
US12001501B1 (en) System and method for using inspect element framework for building mobile DAP content

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant