CN112181368A - Mobile application development method based on behavior description - Google Patents

Mobile application development method based on behavior description Download PDF

Info

Publication number
CN112181368A
CN112181368A CN202010942235.8A CN202010942235A CN112181368A CN 112181368 A CN112181368 A CN 112181368A CN 202010942235 A CN202010942235 A CN 202010942235A CN 112181368 A CN112181368 A CN 112181368A
Authority
CN
China
Prior art keywords
state
page
data
behavior
view
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.)
Granted
Application number
CN202010942235.8A
Other languages
Chinese (zh)
Other versions
CN112181368B (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.)
Shanghai Secco Travel Technology Service Co ltd
Original Assignee
Shanghai Secco Travel Technology Service 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 Shanghai Secco Travel Technology Service Co ltd filed Critical Shanghai Secco Travel Technology Service Co ltd
Priority to CN202010942235.8A priority Critical patent/CN112181368B/en
Publication of CN112181368A publication Critical patent/CN112181368A/en
Application granted granted Critical
Publication of CN112181368B publication Critical patent/CN112181368B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

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)
  • Human Computer Interaction (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a mobile application development method based on behavior description, which comprises the following steps: s1) disassembling the functional behaviors by taking the page as a unit, and segmenting data and states required by describing functional requirements; s2) binding data and states in a development stage; s3) automatically generating and exporting the template code file of the current page corresponding class according to the configured data and state; s4) selecting or combining the corresponding data and status to configure the buried point; configuring a unit test case according to the data and the state; s5) assigning values to the data in the template codes and coding to realize the template functions; s6) sending the unit test case to the mobile client; s7) issuing the buried point configuration information to the mobile client; s8) performing location diagnosis on the on-line problem. The invention uses the change of the state and the data value to represent the occurrence of the user operation or the function behavior; therefore, the function description, the code implementation, the point burying, the unit test and the diagnosis are communicated, and the development and the test are easy.

Description

Mobile application development method based on behavior description
Technical Field
The invention relates to a mobile application development mode, in particular to a mobile application development method based on behavior description.
Background
The development mode of the current mobile application is that a product manager determines functional requirements, research and development personnel perform development work after receiving the requirements, and a tester tests the application according to a test case after completing development, and the development mode has the following problems:
1. research personnel, testing personnel and product managers understand application requirements in product development by taking respective role perspectives as references (without description of unified roles);
2. members of a research and development team only have a universal code specification standard during module development and do not have constraints associated with specific functional requirements, so that unreasonable functional block division, single interface responsibility and unclear data and state organization may exist in code implementation;
3. the testability and the testability angle of the code written by the research personnel are difficult to keep consistent with those of the test personnel;
4. after the research and development personnel complete the development, extra codes are needed to realize the requirement of embedding points;
5. after the development is completed, the developer needs to write the unit test code of each module additionally.
Disclosure of Invention
The invention aims to provide a mobile application development method based on behavior description, which can be used for connecting function description, code implementation, point burying, unit testing and remote diagnosis as a whole chain and completely conforms to a BDD development mode.
The technical scheme adopted by the invention for solving the technical problems is to provide a mobile application development method based on behavior description, which comprises the following steps: s1) taking the page as a unit, disassembling the functional behaviors and segmenting data and states required by describing functional requirements; s2) configuring data and states at the MIS end, and binding the data and the states at the development stage; s3) automatically generating and exporting a template code file of a current page corresponding class according to the configured data and state, wherein the template code file comprises a data variable name and a function name corresponding to the state; s4) selecting or combining corresponding data and states within the MIS system to configure the buried point; configuring a unit test case according to the data and the state; s5) carrying out assignment operation on the data in the template code, and coding the content in the template function; s6), issuing a unit test case to the mobile client, and verifying whether the realization of the data and the function in the template code is correct and accords with the expected behavior description; s7), issuing embedded point configuration information to the mobile client, and automatically completing the embedded point function; for the online problem fed back by the user, describing the configuration state and the expectation of data according to the behavior to be used as a use case for problem diagnosis; and detects the data and state of the use case execution to locate the on-line problem.
Further, the states in step S1 are divided into a general state and a service state, where the general state includes a control interaction state, a page interaction state, and a view interaction state, and the control interaction state corresponds to a specific operation behavior of the user, and includes a click event, a long-press gesture, a drag gesture, and a slide gesture; the step S1 determines which control has an interactive behavior and an event type corresponding to the behavior, according to the unique identifier of the control element in the page.
Further, the page is a list-ordering page, and the list-ordering page comprises 4 buttons, namely, an order ordering list, a car packing list, an order receiving list and an order sending list; the control interaction state provided in the step S1 is a click event, and the corresponding data is the type of the currently selected order; the buried point in the step S4 is configured to record a reservation order buried point if the data value of the currently selected order type is a reservation order when the click event state occurs during the control interaction; the configuration unit test case in step S4 is that when the click event occurs during the control interaction, if the control that has interacted is the order button, the data value of the currently selected order type is the order; when the response method of the event is triggered, the interactive operation behavior is performed on behalf of the user, and the relevant variable values are judged and matched in the state, so that the processing of embedding points and test cases is realized.
Further, the page interaction state represents the jump of the application page, namely the change of the page state; the mobile client tracks the interaction state of the page through monitoring the navigation stack of the system, when the navigation stack adds a new page, the application jumps to the new page, otherwise, the application leaves the current page.
Further, the page interaction state is used for configuring a PV type embedded point, and the process of configuring the embedded point at the MIS end in step S4 is to record the embedded point value when the page interaction occurs and the page entering state occurs; when a user enters an order detail page, a buried point value is recorded, the client detects whether the current page is the order detail page or not when the navigation stack changes, namely the page jumps, and if so, the buried point value is recorded.
Further, the view interaction state represents the change of the sub-view state of the current page or window, including a common view and a popup window; the common view is a view added or displayed on the current page, the popup is a view added or displayed on the window, and the unique identifier of the view is designated when the view interaction state is set.
Further, the view takes the class name as an identifier, and for a non-self-defined view, the class name plus a title text on a popup window is taken as the identifier; and step S4, configuring a buried point according to the view interaction state, and recording the buried point value when the view interaction occurs in the common view named as the charging detail view.
Further, the service state is in units of methods or functions, and a certain specified method execution represents the occurrence of the service state, including the start execution and the end execution.
Furthermore, for the lower single page, the description function requirement comprises the behavior that a user requests the journey estimated price, the journey estimated price is bound with the method request instanceprice () in the class during the development phase coding, the HOOK operation is carried out on the journey estimated price, and codes for logic processing of a buried point or unit test case are injected when the method is executed; when the service state occurs and starts to request the trip estimated price, recording the buried point value to request the trip estimated price; when the service state is finished and the journey estimated price is requested, if the return value is failure, the buried point value is recorded and the journey estimated price is requested to fail.
Further, the following remote diagnosis process is also included: after the mobile application product is online, the function expectation of the application is configured according to the behavior description to actively discover the online problem; for the next button of the landing page, the configuration of the corresponding data and state is: and entering a next click state, if the state of displaying the verification failure prompt is not executed and the page interaction state is not changed after the state is finished, prompting that the application function is wrong, and reporting the area code, the mobile phone number, the value of the service agreement clause and the return value of the service state verification mobile phone number.
Compared with the prior art, the invention has the following beneficial effects: the mobile application development method based on the behavior description provided by the invention expresses the occurrence of the operation or the function behavior of the user by the change of the state and the data value; therefore, the function description, code implementation, point burying, unit testing and remote diagnosis are connected in series as a whole chain, and the mode completely conforms to the development mode of the BDD.
Drawings
FIG. 1 is a diagram illustrating the partitioning of data and states required to describe functional requirements according to the present invention;
FIG. 2 is a diagram illustrating the general page state partitioning process according to the present invention;
FIG. 3 is a diagram illustrating the processing performed on the traffic state according to the present invention;
FIG. 4 is a flow chart of an embodiment of the present invention.
Detailed Description
The invention is further described below with reference to the figures and examples.
The occurrence of functional behavior or user interaction can result in changes to application data and state. For example, when a user clicks a button, the UI aspect may have a corresponding page switch or a change in page layout; the data aspect may be triggered, such as by a network request, and an update of the data may then occur. In fact, a change to a page is also a change to the data (the contents of the navigation stack or page level stack). In short, the functionality of an application or the interaction of a user can be described by the occurrence of a behavior, and the occurrence of all behaviors can be represented by a specific data value (or combination of values) in a specified state, i.e., the behavior is described by data and state. The occurrence of a user's operational or functional behavior can therefore always be represented by a change in the state(s) and data values; the state and data are unique and can be used as a uniform standard for describing functional requirements or behaviors.
Referring to fig. 1, the core of the mobile application development method based on behavior description provided by the present invention is to describe functional behaviors by using data and states, where the specific definitions of the data and the states are as follows:
the data of the present invention includes [ data name ], [ data variable name ], [ data value name ] and [ data variable value ]. The data name and the data value name are data descriptions appointed by a research and development staff and a product manager, and the data variable name and the data variable value are variable names and variable values bound with the data names and the variable values in the corresponding codes (namely variable attributes related to the research and development staff need to be defined according to the appointment during encoding), for example:
Figure BDA0002674024130000041
in this manner, the data can be used to describe the occurrence of application behavior. For example, when the order type is changed into the reservation order, the ordering action is represented; when the order status changes to completed, the action indicating the trip is over. Further, the product manager can configure the burial point with it, record the burial point value [ order _ finished ] when [ order status ] is [ completed ], detect the change of [ order status ] variable at runtime by the corresponding mobile client, and record the burial point [ order _ finished ] when the variable value changes and the value is equal to [3]
The state of the present invention refers to the process (including start and end) in which the functional behavior occurs, and is divided into a general state and a business state. The general states are shown in FIG. 2, including [ control interaction state ], [ page interaction state ] and [ view interaction state ], which are explained as follows:
the control interaction state represents the specific operation behaviors of the user, including [ click event ], [ long press gesture ], [ drag gesture ], and [ slide gesture ]. By combining the unique identification of the control element in the page, the user can judge which control has the interactive behavior and the event type corresponding to the behavior. The interactive state and related data of the combined control can be used for the configuration of the embedded point and unit test cases, and the simple example is that 4 buttons are arranged on a list placing page, and the list placing is respectively an appointment list, a vehicle packing list, a machine receiving list and a machine sending list. The states required to be provided in the scene are [ control interaction state ] - [ click event ], and the data is [ currently selected order type ]. Thus, the buried point is configured to record the buried point [ click _ reserve _ order _ button ] if the data value of [ currently selected order type ] is [ reservation order ] when [ control interaction ] - [ click event ] state occurs. And the configuration unit test case is that when the [ control interaction ] - [ click event ] state occurs, if the interactive control is a reservation order button, the data value of the [ currently selected order type ] is the [ reservation order ]. When the response method of the event is triggered, the interactive operation behavior is performed on behalf of the user, and the relevant variable values are judged and matched in the state, so that the processing of embedding points and test cases is realized.
The page interaction state represents a jump that occurs to the application page, i.e., a change in page state. The mobile client can track the interaction state of the page by monitoring the navigation stack of the system, when the navigation stack adds a new page, the application jumps to the new page, otherwise, the application leaves the current page. The Page interaction state is mainly used for the configuration of PV type (Page View, namely Page browsing volume) embedded points, for example, when a user enters an order detail Page, the embedded point value is recorded, when a navigation stack changes, namely the Page jumps, a client detects whether a current Page is an order detail Page, and if so, the embedded point value is recorded. In this case, the process of configuring the embedded point at the MIS end by the product manager is to record the embedded value [ view _ order _ detail _ page ] when [ page interaction ] - [ page entry ] state occurs.
The view interaction state represents the change of the sub-view state of the current page or window, and comprises a common view and a popup window, wherein the common view is a view added or displayed on the current page; popup is a view added or presented on a window. A unique identifier of the view needs to be specified when setting the view interaction state. The class name of the view is usually used as an identifier, but for non-customized views (such as a default pop-up view of the system), the class names of different popups are the same, and the identifier in such a scenario is the class name plus the title text on the pop-up (if the class name is the same and the title is also the same, the same view is considered). The buried point can be configured according to the view interaction state, such as when [ view interaction ] - [ normal view ] state occurs, when [ view name ] is [ charging detail view ], recording the buried point value [ click _ price _ detail _ view ]. It should be noted that [ view of charging details ] here also belongs to data, and variables need to be bound in advance by developers and then provided to product managers. The [ charging detail view ] will bind an identification name, i.e., a class name [ PriceDetailView ]. In addition, simple view-exposed unit test cases can be configured, for example, after a [ charging detail view button ] is clicked, a [ view name ] in a view interaction state is a [ charging detail view ].
With continued reference to fig. 3, the traffic state of the present invention is expressed in units of methods or functions, i.e., a specific method execution represents the occurrence of the traffic state, including starting execution (behavior occurrence) and ending execution (behavior end). For example, in a placing page, a product manager and a tester need to describe a behavior of a user [ request for a trip to estimate a price ], that is, a developer needs to implement the interface separately, that is, a method [ request for a trip to estimate a price ] needs to be provided in a class corresponding to the placing page, a responsibility of the method is to request for an estimated price, when the method is executed, the behavior of requesting for the estimated price is represented, the method execution end represents the behavior end, and a final state of the execution result description behavior is returned. Firstly, a developer binds a request travel estimated price and a method in a class (request EstimatePrice ()), implements HOOK operation on the method, and injects codes of logic processing of a buried point or unit test case when the method is executed. Therefore, the product manager can be used for configuring the embedded point, and when [ business state ] - [ request travel estimated price ] - [ start ] occurs, the embedded point value [ request _ estimate _ price ] is recorded. When [ business state ] - [ request travel estimated price ] - [ end ], if [ return value ] is [ failure ], recording a buried point value [ request _ estimate _ price _ failed ].
With continued reference to fig. 4, the implementation process of the present invention is as follows:
1. taking a page as a unit, a product manager, a research and development staff and a tester disassemble functional behaviors to segment data and states required by describing functional requirements;
2. configuring data and states at the MIS end (research personnel bind the data and the states and provide the data and the states for product personnel and testing personnel to configure buried points and test cases);
3. automatically generating and exporting a template code file (containing definitions of data variable names and function names corresponding to states) of a corresponding class of the current page according to the configured data and states;
4. the product manager selects (or combines) corresponding data and states in the MIS system to configure the buried points;
5. in the mode, the tester and the research and development personnel configure the unit test case according to the state in a behavior link together, so that the tester can know the implementation details in the black box and keep the test visual angles of the tester and the black box consistent;
6. the research personnel carry out assignment operation on the data in the template code and encode the content in the template function;
7. issuing the unit test case to the client, and verifying whether the data and the function in the template code are correctly realized by research personnel and according with the expected behavior description;
8. issuing embedded point configuration information to a client to automatically complete the embedded point function;
9. for the emergent problem fed back by the user, the developer describes the configuration state and the expectation of data according to the behavior and uses the expectation as a case for problem diagnosis;
10. data and status of the execution of the use case are detected to locate the on-line problem.
The following takes a login page as an example, and the implementation process of each phase and each part and the implementation specific process steps are as follows.
1. Behavioral description
Determining data and states for describing behaviors, wherein the data in the page comprises an area code, a mobile phone number, whether service terms are agreed or not, and the like, the service state is the occurrence of the behaviors, and the service state which can be resolved comprises clicking the next step, checking the mobile phone number, displaying a check failure prompt, checking the service terms of the user and the like. For example, a product manager needs to judge whether a current area number is a domestic mobile phone user when recording a buried point, and needs to judge whether the user agrees with service terms when the point is buried, and if the state required by the buried point is the state [ click next step ], [ check mobile phone number ], [ check user service terms ], and record corresponding buried point values when the three states occur. When configuring the unit test case, research personnel and testing personnel need the mobile phone number to test whether the logic of the verification mobile phone number is correct and whether the behavior of the verification failure prompt is displayed. The final required data and state for integrating the requirements of functional behavioral description and the buried point and unit test cases are shown in the following table:
Figure BDA0002674024130000071
Figure BDA0002674024130000081
thus, the functional behavior in the page can be described as that the user selects [ area code ], inputs [ mobile phone number ], selects [ agreeing with service terms ], then [ click next ], [ check mobile phone number ], if [ return value ] is [ invalid ], then [ display check failure prompt ], that is [ state content ] is [ mobile phone number format error ]. This description not only serializes data and states, but naturally forms a semantically descriptive process. After the data and the state describing the functional behavior are determined, the data and the state can be configured in the MIS system, wherein the configuration means that research and development personnel bind the data and the state at a code level, namely, the data name and the data variable name in the code, the data value name and the data variable value in the code, and the state name and the method name in the code are bound at an MIS background. The data name, data value name, and state name are then provided to the product manager and tester at the MIS side, and the latter need not be concerned with the actual data bound behind these names. After configuration is completed, a code template file (the function to be provided by the MIS) of the current class is generated and exported, and the code template file contains the data variable name and the interface function definition. And the research and development personnel assigns values to the variable names in the code template file, realizes the interface function, and organizes the code and function development according to the appointed data and state. Meanwhile, a product manager combines data and states at the MIS end to configure buried point information, and a tester and a research and development worker carry out test case communication on a state link in the functional behavior together and configure a case of unit test. After the configuration of the embedded point and the test case is finished, the embedded point and the test case are issued (pushed or long-connected) to the mobile client in a JSON form, the client identifies the data and the state according to the binding rule and realizes the logic processing of the configuration content
2. Behavior development
After defining the data and the state describing the behavior, research and development personnel bind the data at a code level and organize the function blocks and the interface functions according to the service state (code writing is carried out on an automatically generated template code file). For example, the interface method (predefined in the template code file) which is realized separately comprises the steps of [ click next step ], [ check mobile phone number ], [ display check failure prompt ], [ check user service provision ] and the like. The functions of all the methods are independent, the responsibilities are separated and single, and if the codes are not coded according to the service state, research personnel probably write the verification mobile phone number and the implementation method for displaying the verification failure prompt into a button response event method for clicking the next step, so that the high coupling of the codes is caused.
3. Buried point arrangement
With the data and the state described by the functional behaviors, a product manager can configure the embedded point at the MIS end, for example, the embedded point value [ user _ click _ logic ] is recorded by clicking the next step, and the embedded point value [ phone _ number _ version _ failed ] is recorded when the return value of the [ check mobile phone number ] is invalid. Further, the method includes the steps that when service parameter judgment is carried out, for example, when the next step is clicked, and the area number is equal to +86, a buried point value [ domestic _ user _ click _ logic ] is recorded; when [ area number ] is not equal to [ +86], recording a buried-point value [ foreign _ user _ click _ logic ].
4. Unit test case
Figure BDA0002674024130000091
The table above is a unit test case, and the conversion into a behavior description configuration is:
when the mobile phone number is equal to 1351512, triggering a next button click event, displaying a verification failure prompt, and the state content is wrong in the mobile phone number format;
and (3) case configuration logic (resolving the issued JSON file and knowing the binding relationship between data and states) corresponding to the mobile client:
(1) assigning a variable name [ phoneNumber ] corresponding to the [ mobile phone number ] as [1351512 ];
(2) HOOK (display check failure prompt) corresponding method (showWarningToastWithMessage:)
(3) Click method for triggering [ Next button ] [ didClickNextbutton: ]
Case verification logic corresponding to the mobile client:
(1) the case verification fails if the execution is not executed;
(2) the state content of the (showWarningToastWithMessage) is not equal to the mobile phone number format error, and the case verification fails;
(3) and in case of not the two cases, the case verification is successful.
And when the test case does not pass, reporting all relevant data values and state content values in the corresponding behavior of the test case and a call stack of a function method, so that research personnel can conveniently investigate the problem. In this way, the granularity corresponding to the test result can be refined to the data and method state layer, not just the function UI layer. The unit test case is used for testing whether the data assignment in the template code and the realization of the interface function have problems from the view point of functional behaviors. Therefore, the definition of data and state and the verification of implementation are combined into a whole to form a complete development link.
5. Remote diagnosis
The remote diagnosis is a tool provided for research and development personnel to debug problems, and after a product is online, the functional expectation of the application can be configured according to the behavior description, so that the online problems can be actively discovered, and the specified environmental data value can be uploaded to help the research and development personnel to quickly locate the problems when the problems occur. For example, after the next button is clicked, only two expected behavior results are obtained, one is to prompt that the mobile phone number format is not correct, and the other is to pop up a page for inputting the verification code, and if the two results are not obtained, it can be determined that the current application function is wrong. Configuration of the corresponding data and states:
and entering a state of clicking next step, and if the state of displaying verification failure prompt is not executed and the state of page interaction is not changed when the state [ end ] is reached, the application function is in error. At this time, the values of the area number, the mobile phone number and the agreement service provision and the return value of the service state check mobile phone number are reported.
The mobile application development method based on the behavior description provided by the invention has the following advantages and characteristics:
(1) describing functions and behaviors by data values and states agreed by product managers, research and development personnel and testing personnel together, so that the cognition of each role for the requirement understanding is kept consistent; (2) the development process of research personnel is driven by the functional behavior of the application, so that the compiled code has independent functions and separated responsibilities, and the code has high testability and low coupling; (3) research personnel can configure unit test cases according to agreed data and states so as to verify each interface and function without additionally compiling unit tests; (4) in the function development process of research and development personnel, a product manager can configure buried point information according to appointed data and states without waiting for the completion of function development; (5) after the product is on-line, the function expectation of the application can be configured according to the behavior description, so that the on-line problem can be actively discovered and quickly positioned; (6) function description, code implementation, point burying, unit testing and remote diagnosis can be connected in series as a whole chain, and the mode completely conforms to the development mode of BDD; (7) the combination of data and state may naturally form a semantically described process.
Although the present invention has been described with respect to the preferred embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A mobile application development method based on behavior description is characterized by comprising the following steps:
s1) taking the page as a unit, disassembling the functional behaviors and segmenting data and states required by describing functional requirements;
s2) configuring data and states at the MIS end, and binding the data and the states at the development stage;
s3) automatically generating and exporting a template code file of a current page corresponding class according to the configured data and state, wherein the template code file comprises a data variable name and a function name corresponding to the state;
s4) selecting or combining corresponding data and states within the MIS system to configure the buried point; configuring a unit test case according to the data and the state;
s5) carrying out assignment operation on the data in the template code, and coding the content in the template function;
s6), issuing a unit test case to the mobile client, and verifying whether the realization of the data and the function in the template code is correct and accords with the expected behavior description;
s7), issuing embedded point configuration information to the mobile client, and automatically completing the embedded point function;
s8), for the on-line problem fed back by the user, describing the configuration state and the expectation of data according to the behavior as a use case for problem diagnosis; and detects the data and state of the use case execution to locate the on-line problem.
2. The mobile application development method based on behavior description as claimed in claim 1, wherein the states in step S1 are divided into general states and business states, the general states include a control interaction state, a page interaction state and a view interaction state, the control interaction state corresponds to the specific operation behavior of the user, and includes a click event, a long-press gesture, a drag gesture and a slide gesture; the step S1 determines which control has an interactive behavior and an event type corresponding to the behavior, according to the unique identifier of the control element in the page.
3. The mobile application development method based on behavior description according to claim 2, wherein the page is a list-ordering page, and the list-ordering page comprises 4 buttons, namely, a reservation list, a car-packing list, a pick-up list and a pick-up list; the control interaction state provided in the step S1 is a click event, and the corresponding data is the type of the currently selected order; the buried point in the step S4 is configured to record a reservation order buried point if the data value of the currently selected order type is a reservation order when the click event state occurs during the control interaction; the configuration unit test case in step S4 is that when the click event occurs during the control interaction, if the control that has interacted is the order button, the data value of the currently selected order type is the order; when the response method of the event is triggered, the interactive operation behavior is performed on behalf of the user, and the relevant variable values are judged and matched in the state, so that the processing of embedding points and test cases is realized.
4. The behavior description-based mobile application development method of claim 2, wherein the page interaction state represents a jump that occurs to an application page, i.e., a change in page state; the mobile client tracks the interaction state of the page through monitoring the navigation stack of the system, when the navigation stack adds a new page, the application jumps to the new page, otherwise, the application leaves the current page.
5. The mobile application development method based on behavior description as claimed in claim 4, wherein the page interaction state is used for PV type embedding configuration, and the step S4 configuring embedding points at the MIS end is to record embedding point values when page interaction occurs and page entering state occurs; when a user enters an order detail page, a buried point value is recorded, the client detects whether the current page is the order detail page or not when the navigation stack changes, namely the page jumps, and if so, the buried point value is recorded.
6. The behavior description based mobile application development method of claim 2, wherein the view interaction state represents a change of a sub-view state of a current page or window, including both a normal view and a pop-up window; the common view is a view added or displayed on the current page, the popup is a view added or displayed on the window, and the unique identifier of the view is designated when the view interaction state is set.
7. The behavior description based mobile application development method of claim 6, characterized in that the view takes its class name as an identifier, and for non-self-defined views, takes the class name plus the title text on the popup as an identifier; and step S4, configuring a buried point according to the view interaction state, and recording the buried point value when the view interaction occurs in the common view named as the charging detail view.
8. The method for developing a mobile application based on behavioral description according to claim 2, characterized in that the business state is in units of methods or functions, and a specific method execution represents the occurrence of the business state, including starting execution and ending execution.
9. The mobile application development method based on behavior description as claimed in claim 8, characterized in that, for the lower single page, the description function requirement includes the behavior of user request for journey estimated price, the request journey estimated price is bound with the method request Estimetateprice () in the class during the development phase coding, and HOOK operation is carried out on the bound, and the code of logic processing of the buried point or unit test case is injected when the method is executed; when the service state occurs and starts to request the trip estimated price, recording the buried point value to request the trip estimated price; when the service state is finished and the journey estimated price is requested, if the return value is failure, the buried point value is recorded and the journey estimated price is requested to fail.
10. A method for mobile application development based on behavioral descriptions according to any one of claims 1 to 9, characterized by further comprising the following remote diagnosis process: after the mobile application product is online, the function expectation of the application is configured according to the behavior description to actively discover the online problem; for the next button of the landing page, the configuration of the corresponding data and state is: and entering a next click state, if the state of displaying the verification failure prompt is not executed and the page interaction state is not changed after the state is finished, prompting that the application function is wrong, and reporting the area code, the mobile phone number, the value of the service agreement clause and the return value of the service state verification mobile phone number.
CN202010942235.8A 2020-09-09 2020-09-09 Mobile application development method based on behavior description Active CN112181368B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010942235.8A CN112181368B (en) 2020-09-09 2020-09-09 Mobile application development method based on behavior description

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010942235.8A CN112181368B (en) 2020-09-09 2020-09-09 Mobile application development method based on behavior description

Publications (2)

Publication Number Publication Date
CN112181368A true CN112181368A (en) 2021-01-05
CN112181368B CN112181368B (en) 2023-12-26

Family

ID=73920290

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010942235.8A Active CN112181368B (en) 2020-09-09 2020-09-09 Mobile application development method based on behavior description

Country Status (1)

Country Link
CN (1) CN112181368B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090265689A1 (en) * 2008-04-16 2009-10-22 Microsoft Corporation Generic validation test famework for graphical user interfaces
CN107958016A (en) * 2017-10-16 2018-04-24 平安科技(深圳)有限公司 Function pages method for customizing and application server
CN108304176A (en) * 2017-12-14 2018-07-20 广东数果科技有限公司 Point methods are buried in a kind of visualization of cross-platform mobile terminal
CN109189379A (en) * 2018-09-04 2019-01-11 百度在线网络技术(北京)有限公司 code generating method and device
CN109933521A (en) * 2019-01-23 2019-06-25 平安科技(深圳)有限公司 Automated testing method, device, computer equipment and storage medium based on BDD

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090265689A1 (en) * 2008-04-16 2009-10-22 Microsoft Corporation Generic validation test famework for graphical user interfaces
CN107958016A (en) * 2017-10-16 2018-04-24 平安科技(深圳)有限公司 Function pages method for customizing and application server
CN108304176A (en) * 2017-12-14 2018-07-20 广东数果科技有限公司 Point methods are buried in a kind of visualization of cross-platform mobile terminal
CN109189379A (en) * 2018-09-04 2019-01-11 百度在线网络技术(北京)有限公司 code generating method and device
CN109933521A (en) * 2019-01-23 2019-06-25 平安科技(深圳)有限公司 Automated testing method, device, computer equipment and storage medium based on BDD

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
尹航;詹舒波;: "基于配置文件的web页面自动生成系统", 软件, no. 10 *

Also Published As

Publication number Publication date
CN112181368B (en) 2023-12-26

Similar Documents

Publication Publication Date Title
CN101933001B (en) Executing software performance test jobs in clustered system
KR102525502B1 (en) Method and apparatus for storing auto-drive test data, electronic device, storage medium and program
US8151248B1 (en) Method and system for software defect management
CN108959059B (en) Test method and test platform
CN101416164A (en) Method and systems for learning model-based lifecycle diagnostics
US20030204429A1 (en) Processing life and work events
US20090300585A1 (en) Method and system for testing a software development activity
US9658846B2 (en) Software configuration control wherein containers are associated with physical storage of software application versions in a software production landscape
ITTO980722A1 (en) PROCEDURE FOR INSTALLING AND / OR VERIFYING THE SOFTWARE FOR A COMPUTER SYSTEM MADE TO ORDER, AND COMPUTER SYSTEM FOR
CN103501308A (en) Distributed cloud application deployment systems and/or associated methods
US20130086420A1 (en) Method and system for implementing a test automation results importer
Stroulia et al. From legacy to web through interaction modeling
CN101384995A (en) Administration automation in application servers
CN101662463A (en) Device and method for customizing service flow for user
CN103678116A (en) Method and system for facilitating automated program testing
EP2196901A1 (en) Systems and methods for tracking software stands in a software production landscape
CN112230917B (en) Mobile application point burying method based on data and state
CN112559373B (en) Software compatibility management method and system
CN102144221B (en) Compact framework for automated testing
CN112181368B (en) Mobile application development method based on behavior description
Hess et al. Standardizing model-based in-vehicle infotainment development in the German automotive industry
CN109359044B (en) Codecep-based test-oriented automation system
Pulido Applying behavior driven development practices and tools to low-code technology
CN109669868A (en) The method and system of software test
Melin et al. Applying AUTOSAR in Practice: Available Development Tools and Migration Paths

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