WO2019061783A1 - Procédé et appareil de test de données, dispositif électronique et support de stockage lisible par ordinateur - Google Patents

Procédé et appareil de test de données, dispositif électronique et support de stockage lisible par ordinateur Download PDF

Info

Publication number
WO2019061783A1
WO2019061783A1 PCT/CN2017/112952 CN2017112952W WO2019061783A1 WO 2019061783 A1 WO2019061783 A1 WO 2019061783A1 CN 2017112952 W CN2017112952 W CN 2017112952W WO 2019061783 A1 WO2019061783 A1 WO 2019061783A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
layer
data
data file
file
Prior art date
Application number
PCT/CN2017/112952
Other languages
English (en)
Chinese (zh)
Inventor
尹成
陈少杰
张文明
Original Assignee
武汉斗鱼网络科技有限公司
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 武汉斗鱼网络科技有限公司 filed Critical 武汉斗鱼网络科技有限公司
Publication of WO2019061783A1 publication Critical patent/WO2019061783A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management

Definitions

  • the present invention relates to the field of testing technologies, and in particular, to a data testing method, apparatus, electronic device, and computer readable storage medium.
  • program testing is an important and necessary part of the formal submission of the program to the tester for large-scale functional testing.
  • the so-called program test usually refers to the logic check and verification of the smallest testable unit in the program. After the test is passed, the program can be submitted to the test department for the next stage of test work. According to the research of the inventor, the existing program testing scheme is more complicated, and the testing efficiency needs to be improved.
  • an object of the embodiments of the present invention is to provide a data testing method, apparatus, electronic device, and computer readable storage medium to improve the problem that the testing efficiency in the prior art needs to be improved.
  • a preferred embodiment of the present invention provides a test method, including:
  • the Instrumentation test project is divided into the Model layer, the View layer, and the Presenter layer using the Model-View-Presenter (MVP) architecture;
  • MVP Model-View-Presenter
  • Running a test of the test case of the Model layer and the Presenter layer on a Java virtual machine obtaining a first data file of test pass rate and coverage of the test case of the Model layer, and a test case of the Presenter layer a second data file for testing pass rate and coverage, wherein the first data file is an ec file, and the second data file is an ec file;
  • the first data file, the second data file, and the third data file are combined to generate test report data.
  • test of the test layer of the Model layer, the View layer, and the Presenter layer is run in a concurrent mode.
  • the method further includes dynamically controlling the test process of the test cases of the Model layer, the View layer, and the Presenter layer by using Boolean logic instrumentation.
  • the step of dynamically controlling the test process of the test cases of the Model layer, the View layer, and the Presenter layer by using Boolean logic instrumentation includes:
  • S is the execution test pass rate estimate
  • P is the corresponding component test case set test Boolean function
  • the value range is (0, 1]
  • x is the test case execution pass rate
  • m is an integer greater than 2
  • n is greater than An integer of 2;
  • the component test function set dynamically calculates the test pass rate estimate S of the Model layer, the View layer, and the Presenter layer test case respectively;
  • testing of the test case of the Model layer is run during a compilation phase of the test case, and the first data file is obtained when the compilation is completed;
  • the testing of the test case of the Presenter layer and the View layer is performed after the test case is compiled and an installation package is generated.
  • the step of running a test of the test case of the Model layer and the Presenter layer on the Java virtual machine includes:
  • the method further includes: masking code snippets that depend on the Android SDK source code.
  • the steps of blocking code snippets that rely on the source code of the Android SDK include:
  • the step of combining the first data file, the second data file, and the third data file to generate test report data includes:
  • the data in the first Excel spreadsheet file and the second Excel spreadsheet file are combined and calculated to generate report data, and the report data includes a pass rate and a coverage ratio.
  • Another preferred embodiment of the present invention provides a data testing method, including:
  • the Instrumentation test project is divided into the Model layer, the View layer, and the Presenter layer using the MVP architecture;
  • the first data file, the second data file, and the third data file are combined to generate test report data.
  • the first virtual machine is a Java virtual machine
  • the first data file is an ec file
  • the second data file is an ec file
  • the second virtual machine is a Dalvik virtual machine or an ART virtual machine.
  • the third data file is an exec file.
  • the first data file includes a test pass rate and a coverage ratio of a test case of the Model layer
  • the second data file includes a test pass rate and a coverage rate of the test case of the Presenter layer
  • the third data file includes the test pass rate and coverage of the test case of the View layer.
  • test of the test layer of the Model layer, the View layer, and the Presenter layer is run in a concurrent mode.
  • the method further includes: dynamically controlling a test process of the test cases of the Model layer, the View layer, and the Presenter layer by using Boolean logic instrumentation, and dynamically controlling the Model layer by using Boolean logic instrumentation.
  • the steps of the test process of the test case of the View layer and the Presenter layer including:
  • S is the execution test pass rate estimate
  • P is the corresponding component test case set test Boolean function
  • the value range is (0, 1]
  • x is the test case execution pass rate
  • m is an integer greater than 2
  • n is greater than An integer of 2;
  • the component test function set dynamically calculates the test pass rate estimate S of the Model layer, the View layer, and the Presenter layer test case respectively;
  • testing of the test case of the Model layer is run during a compilation phase of the test case, and the first data file is obtained when the compilation is completed;
  • the testing of the test case of the Presenter layer and the View layer is performed after the test case is compiled and an installation package is generated.
  • the step of testing the test cases of the Model layer and the Presenter layer on the first virtual machine includes:
  • the method further includes: masking code snippets that depend on the Android SDK source code.
  • the steps of blocking code snippets that rely on the source code of the Android SDK include:
  • the step of combining the first data file, the second data file, and the third data file to generate test report data includes:
  • the data in the first Excel spreadsheet file and the second Excel spreadsheet file are combined and calculated to generate report data, and the report data includes a pass rate and a coverage ratio.
  • Another preferred embodiment of the present invention provides a data testing apparatus, including:
  • the test engineering partitioning module is configured to divide the Instrumentation test engineering into a Model layer, a View layer, and a Presenter layer by using an MVP architecture;
  • a first test execution module configured to run a test on the test layer of the Model layer and the Presenter layer on a Java virtual machine, to obtain a first data file of a test pass rate and a coverage ratio of the test case of the Model layer, and a second data file of a test pass rate and a coverage ratio of the test case of the Presenter layer, wherein the first data file is an ec file, and the second data file is an ec file;
  • a second test execution module configured to run a test of the test case of the View layer on the Dalvik virtual machine or the ART virtual machine, to obtain a third data file of the test pass rate and the coverage rate of the test case of the View layer,
  • the third data file is an exec file
  • a report generating module configured to combine the first data file, the second data file, and the third data file to generate test report data.
  • Another preferred embodiment of the present invention provides an electronic device including a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein the processor performs the above data test when the program is executed method.
  • a further preferred embodiment of the present invention provides a computer readable storage medium, the readable storage medium comprising a computer program, the computer program controlling the electronic device where the readable storage medium is located to execute the data testing method described above .
  • the data testing method, device, electronic device and computer readable storage medium provided by the embodiments of the present invention use the MVP architecture mode to layer the Instrumentation test project into a Model layer, a View layer, and a Presenter layer, a Model layer and a Presenter layer.
  • the test of the test case runs on the first virtual machine
  • the test of the test case of the View layer runs on the second virtual machine
  • the first virtual machine is different from the second virtual machine, by layering the test project and in different virtual On-board testing can improve the output efficiency of test reports and achieve efficient testing of test cases.
  • test case of the Model layer, the View layer, and the Presenter layer is run in a concurrent mode
  • the Boolean logic instrumentation method is used to dynamically control the test process, thereby further improving the test efficiency and outputting the test report quickly.
  • FIG. 1 is a block diagram of an electronic device 10 according to a preferred embodiment of the present invention.
  • FIG. 2 is a flow chart of a data testing method according to a preferred embodiment of the present invention.
  • FIG. 3 is another flow chart of a data testing method according to a preferred embodiment of the present invention.
  • FIG. 4 is still another flowchart of a data testing method according to a preferred embodiment of the present invention.
  • Figure 5 is a schematic illustration of the sub-steps included in step S24 of Figure 2 in an embodiment.
  • FIG. 6 is a block diagram of a data testing device 20 according to a preferred embodiment of the present invention.
  • Icons 10-electronic device; 11-memory; 12-processor; 13-network module; 20-data test device; 21-test engineering partition module; 22-first test execution module; 23-second test execution module; 24-Report generation module.
  • the program test mainly includes the virtual machine test JVM (Java Virtual Machine) Test and the device test Instrumentation Test.
  • JVM Test generally runs a test stub Test Case written in pure Java code, without relying on other components, because it runs on the JVM virtual machine, so it is faster.
  • Instrumentation Test includes Dalvik virtual machine or ART virtual machine test. Because it needs to rely on the components provided by Android system, it needs to be deployed and run on real machine or simulator. It needs to be pre-compiled, so it is slow.
  • the Android development environment (Android Studio, Eclipse) needs to test the test case every time.
  • it is also called the test case, which is pre-compiled into a bytecode file, and then the joint resource file is packaged into an installation package (Android Package). , apk) file, and finally deploy the apk file to the test device to run the test program.
  • the whole process is very time consuming and slow. It is currently estimated that for large apk files over 50M, it takes more than 1 minute to run more than 100 test cases in a single run.
  • an embodiment of the present invention provides a hybrid Android program testing scheme: using an MVP architecture to divide an Instrumentation test project into a Model layer, a View layer, and a Presenter layer; running the Model layer and the Presenter on the first virtual machine. Testing the test case of the layer, obtaining a first data file of the test case of the Model layer, and a second data file of the test case of the Presenter layer; running a test case for the View layer on the second virtual machine Testing, obtaining a third data file of the test case of the View layer; combining the first data file, the second data file, and the third data file to generate test report data.
  • the first virtual machine is different from the second virtual machine, and the two are flexible.
  • the first virtual machine is a Java virtual machine
  • the first data file is an ec file
  • the second data file is an ec.
  • the second virtual machine is a Dalvik virtual machine or an ART virtual machine
  • the third data file is an exec file.
  • the first data file, the second data file, and the third data file may include required items according to test requirements, for example, the first data file may include a test of the test case of the Model layer.
  • the pass rate and coverage the second data file may include test pass rate and coverage of the test case of the Presenter layer
  • the third data file may include test pass rate and coverage of the test case of the View layer. rate.
  • the MVP architecture mode is used to layer the Instrumentation test project into a Model layer, a View layer, and a Presenter layer.
  • the test cases of the Model layer and the Presenter layer are run on the JVM, and the test cases of the View layer are in the Dalvik virtual machine or the ART virtual machine. Running up can improve test efficiency.
  • FIG. 1 is a block schematic diagram of an electronic device 10 provided by a preferred embodiment of the present invention.
  • the electronic device 10 in the embodiment of the present invention may be a server having data storage, transmission, and processing functions.
  • the electronic device 10 includes a memory 11, a processor 12, a network module 13, and a data testing device 20.
  • the memory 11, the processor 12 and the network module 13 are electrically connected directly or indirectly to each other to implement data transmission or interaction.
  • the components can be electrically connected to one another via one or more communication buses or signal lines.
  • a data testing device 20 comprising at least one software function module stored in the memory 11 in the form of software or firmware, the processor 12 running the software stored in the memory 11
  • the program and the module such as the data testing device 20 in the embodiment of the present invention, perform various functional applications and data processing, that is, implement the data testing method in the embodiment of the present invention.
  • the memory 11 can be, but not limited to, a random access memory (RAM), a read only memory (ROM), and a programmable read-only memory (PROM). Erasable Programmable Read-Only Memory (EPROM), Electric Erasable Programmable Read-Only Memory (EEPROM), and the like.
  • RAM random access memory
  • ROM read only memory
  • PROM programmable read-only memory
  • EPROM Erasable Programmable Read-Only Memory
  • EEPROM Electric Erasable Programmable Read-Only Memory
  • the memory 11 is used to store a program, and the processor 12 executes the program after receiving an execution instruction.
  • the processor 12 may be an integrated circuit chip with data processing capabilities.
  • the processor 12 described above may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), and the like.
  • CPU central processing unit
  • NP network processor
  • the methods, steps, and logic blocks disclosed in the embodiments of the present invention may be implemented or executed.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the network module 13 is configured to establish a communication connection between the electronic device 10 and the external communication terminal through the network, and implement the transmission and reception operations of the network signal and the data.
  • the above network signal may include a wireless signal or a wired signal.
  • FIG. 1 is merely illustrative, and the electronic device 10 may further include more or less components than those shown in FIG. 1, or have a different configuration than that shown in FIG.
  • the components shown in Figure 1 can be implemented in hardware, software, or a combination thereof.
  • the embodiment of the invention further provides a computer readable storage medium, the readable storage medium comprising a computer program.
  • FIG. 2 is a flowchart of a data testing method according to a preferred embodiment of the present invention.
  • the method steps defined by the process related to the method are applied to the electronic device 10 and can be implemented by the processor 12.
  • the specific flow shown in FIG. 2 will be described in detail below.
  • step S21 the Instrumentation test project is divided into a Model layer, a View layer, and a Presenter layer by using an MVP architecture.
  • the implementation of the instrumentation test engineering into the Model layer, the View layer, and the Presenter layer is various.
  • the embodiment is described by taking the network operation layer, the data analysis layer, and the data local persistence layer as examples.
  • the Network Layer has interaction with the server that stores the data.
  • the JVM supports asynchronous access and the Http network protocol. Therefore, the network operation layer can be used as a sublayer of the Model layer to perform unit testing on the JVM.
  • the Data Parser Layer parses the JSON or XML formatted data from the server into a JavaBean object, or directly reads the field value as a Key-Value.
  • the data is parsed into Java functional services, so the data parsing layer can be unit tested on the JVM as a sublayer of the Model layer.
  • the Local Data Lasting Layer stores data to a local device such as internal storage, SD card, etc.
  • Data local persistence needs to be tested on the device. You can use the memory fragment (Memery Fragments) to serve as internal storage to store persistent data. Therefore, the data local persistence layer can be used as a sub-layer of the Model layer to perform unit testing on the JVM.
  • Step S22 running a test of the test case of the Model layer and the Presenter layer on the Java virtual machine, obtaining a first data file of the test pass rate and the coverage rate of the test case of the Model layer, and the Presenter layer A second data file of test pass rate and coverage of the test case, wherein the first data file is an ec file and the second data file is an ec file.
  • testing of the test cases of the Model layer and the Presenter layer is run on the Java virtual machine.
  • Unit test case refers to checking and verifying the smallest testable unit in the software.
  • the unit in the unit test case in general, it is necessary to determine the specific meaning according to the actual situation, such as the unit in C language refers to a function, the unit in Java refers to a class, the unit in the graphical software can refer to a window or A menu, etc.
  • the Model layer unit test case only needs to rely on the JDK related source code, without calling the Android SDK source API, so the Model layer unit test can be directly performed on the JVM, and the JVM unit test does not need to be pre-compiled, and can be performed before pre-compilation, thereby improving the test. Efficiency and efficiency of reporting data output.
  • the JVM unit test Task and the JVM test report generation Task are inserted before executing the pre-compiled Task.
  • the Presenter layer is the middleware layer between the Model layer and the Vew layer. It is responsible for communication between the Model layer and the View layer. For example, after the Model layer obtains the server data and completes the parsing, the Presenter layer is responsible for passing the data to the View layer. Since the Presenter layer mostly relies on the JDK source code, it will also rely on the Android SDK source code a little, in order to avoid relying on the Android SDK source code to bring the JVM test to run abnormally.
  • a running code (Runtime) is used to block code fragments that rely on the Android SDK source code.
  • the embodiment blocks the code fragments that rely on the Android SDK source code by the following steps.
  • step S31 the code fragment that depends on the Android SDK source code is separately encapsulated into a function carrying the native prefix.
  • Step S32 using the @ignore annotation native prefix function, the system will automatically bypass the @ignore annotated function during the run phase.
  • step S33 a constant file is added, and the default value in the constant file is read once the native function with the return value is not executed.
  • Step S23 running a test of the test case of the View layer on the Dalvik virtual machine or the ART virtual machine, and obtaining a third data file of the test pass rate and the coverage rate of the test case of the View layer, the third data.
  • the file is an exec file.
  • the Dalvik/ART Run Test runs unit tests on a device or simulator and needs to be pre-compiled into apk files and then deployed to the device for testing. Different from the JVM unit test, once the Instrumentation Test has an exception in a single test case, the entire test program will be terminated immediately. Therefore, the scheme adopts Boolean logic instrumentation to perform the Instrumentation Test, and dynamically controls the method by Boolean logic instrumentation. Test process for test cases in the Model, View, and Presenter layers.
  • the embodiment of the present invention dynamically controls the test process of the test cases of the Model layer, the View layer, and the Presenter layer by adopting the following steps: Boolean logic instrumentation.
  • Step S41 defining an interpolation boolean function formula:
  • S is the execution test pass rate estimate
  • P is the corresponding component test case set test Boolean function
  • x is the test case execution pass rate
  • m is an integer greater than 2
  • n is an integer greater than 2.
  • step 42 the sub-assembly performs a test, and calculates and outputs an estimate of S.
  • Each component is a set of test cases.
  • the test case is dynamically calculated.
  • the output values of other unexecuted P functions are 1, where the range of P is (0, 1).
  • the component test function set dynamically calculates the test pass rate estimate S of the Model layer, the View layer, and the Presenter layer test case, respectively.
  • step S43 the test process is controlled according to the test pass rate estimate S.
  • the value of the S is used to control whether the test process needs to continue to execute:
  • test cases of the Model layer, the View layer, and the Presenter layer are tested in a concurrent mode.
  • Step S24 combining the first data file, the second data file, and the third data file to generate test report data.
  • the success rate and coverage of the Model layer and the Presenter layer are JVM unit test data, so the data file format is *.ec format, and the View layer success rate and coverage are Instrumentation unit test data, so the data file format is *.exec format.
  • FIG. 5 provides an implementation manner of step S24.
  • the merging of the first data file, the second data file, and the third data file is implemented by steps S241 to 243.
  • Step S241 converting the first data file and the second data file into a first Excel spreadsheet file.
  • Step S242 converting the third data file into a second Excel spreadsheet file.
  • Step S243 combining and calculating data in the first Excel spreadsheet file and the second Excel spreadsheet file to generate report data, where the report data includes a pass rate and a coverage ratio.
  • the testing of the test case of the Model layer is performed in a compiling phase of the test case, where the A data file is obtained when the compilation is complete.
  • the testing of the test case of the Presenter layer and the View layer is performed after the test case is compiled and an installation package is generated.
  • the MVP layered architecture mode is used to divide the test project, the test of the Model layer and the Presenter layer is performed on the JVM, and the test of the View layer is performed on the Instrumentation, thereby significantly improving the test efficiency.
  • the test pass rate is calculated by Boolean logic instrumentation, which dynamically controls the progress of the test program. It is simple and convenient to combine the JVM and Instrument test result data by using ec and exec files to Excel files.
  • the embodiment of the present invention provides a data testing device 20, which includes a test engineering division module 21, a first test execution module 22, and a second test execution module 23. And report generation module 24.
  • the test engineering division module 21 is configured to divide the Instrumentation test project into a Model layer, a View layer, and a Presenter layer by using an MVP architecture.
  • test engineering division module 21 Since the test engineering division module 21 and the implementation principle of the step S21 in FIG. 2 are similar, no further explanation is provided here.
  • the first test execution module 22 is configured to run a test on the test layer of the Model layer and the Presenter layer on the Java virtual machine, and obtain a first data file of test pass rate and coverage of the test case of the Model layer, and The second data file of the test pass rate and the coverage ratio of the test case of the Presenter layer, wherein the first data file is an ec file, and the second data file is an ec file.
  • step S22 in FIG. 2 Since the first test execution module 22 and the implementation principle of step S22 in FIG. 2 are similar, no further explanation is provided here.
  • the second test execution module 23 is configured to run a test of the test case of the View layer on the Dalvik virtual machine or the ART virtual machine, and obtain a third data file of the test pass rate and the coverage rate of the test case of the View layer.
  • the third data file is an exec file.
  • the report generation module 24 is configured to combine the first data file, the second data file, and the third data file to generate test report data.
  • report generation module 24 is similar to the implementation principle of step S24 in FIG. 2, no further explanation is provided here.
  • the data testing method, device, electronic device and computer readable storage medium in the embodiments of the present invention use the MVP architecture mode to layer the Instrumentation test project into the Model layer, the View layer and the Presenter layer, and the Model layer and the Presenter layer are tested.
  • the test of the use case runs on the Java virtual machine, while the test of the test case of the View layer runs on the Dalvik virtual machine or the ART virtual machine.
  • the coverage and success can be improved. Rate the output efficiency of the test report to achieve efficient testing of test cases.
  • Unit Test refers to the inspection and verification of the smallest testable unit in the software.
  • the unit in the unit test in general, the specific meaning should be determined according to the actual situation.
  • the unit in C language refers to a function
  • the unit in Java refers to a class.
  • Graphical software can refer to a window or a menu.
  • CC Code Coverage
  • coverage is the ratio of the code executed by the unit test to the original code. The ratio is between 0 and 1. The larger the ratio, the higher the coverage.
  • UI User Interface
  • User Interface is the abbreviation of User Interface. Refers to the user's user interface, including mobile apps, web pages, smart wearable devices, and so on.
  • Java Unit Test refers to a test program written solely on the JDK.
  • Android UI Unit Test is also called device unit testing, relying on test programs written by components provided by some Android SDKs.
  • JVM Java Virtual Machine
  • Instrumentation Test refers to running unit tests on a Dalvik virtual machine or an ART virtual machine (real machine or simulator).
  • JVM Test refers to running unit tests on a JVM virtual machine.
  • MVP Model View Presenter refers to an architectural pattern in the Android platform. It is divided into three layers: Model Layer (M), View Layer (V), and Presenter Layer (P).
  • Data-View-Gifter is an architectural pattern for Android, iOS, and Web platform development. This architectural pattern divides data and operations into the Model layer, dividing the design user operations into the View layer, and the Presenter test is responsible for Model and View. Communication between.
  • JavaBean is a reusable component written in the Java language, its class must be concrete and public, and has a parameterless constructor;
  • *.exec refers to the test result data file suffix name of the JVM unit test.
  • the file suffix is named the only suffix name specified by the JVM unit test.
  • *.ec refers to the test result data file suffix name of the Instrumentation unit test.
  • the file suffix is named the only suffix name specified by the Instrumentation unit test.
  • XML Extensible Markup Language
  • Extensible Markup Language refers to the Extensible Markup Language, a subset of the Standard Generalized Markup Language, which is a markup language used to mark electronic documents to be structured.
  • HTML HyperText Markup Language
  • the structure of the hypertext markup language includes the "head” part (English: Head), and the “body” part (English: Body), where the "head” section provides information about the web page, The "Subject” section provides the specific content of the web page;
  • CSV Common-Separated Values
  • each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more of the Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may also occur in a different order than those illustrated in the drawings.
  • each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented in a dedicated hardware-based system that performs the specified function or action. Or it can be implemented by a combination of dedicated hardware and computer instructions.
  • each functional module in each embodiment of the present invention may be integrated to form a separate part, or each module may exist separately, or two or more modules may be integrated to form a separate part.
  • the functions, if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including
  • the instructions are used to cause a computer device (which may be a personal computer, electronic device 10, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
  • the data testing method, device, electronic device and computer readable storage medium provided by the embodiments of the present invention use the MVP layered architecture mode to divide the test project, the test of the Model layer and the Presenter layer is expanded on the JVM, and the test of the View layer is performed in the Instrumentation. Expanded up, which significantly improves test efficiency.
  • the test pass rate is calculated by Boolean logic instrumentation, which dynamically controls the progress of the test program. It is simple and convenient to combine the JVM and Instrument test result data by using ec and exec files to Excel files.

Landscapes

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

Abstract

L'invention concerne un procédé et un appareil de test de données, un dispositif électronique et un support de stockage lisible par ordinateur, qui ont trait au domaine des technologies de test. Le procédé de test de données consiste à : diviser un projet de test d'instrumentation en une couche Modèle, une couche Vue et une couche Présentateur au moyen d'une architecture MVP ; exécuter, sur une machine virtuelle Java, des tests sur des scénarios de test de la couche Modèle et de la couche Présentateur pour obtenir un premier fichier de données, à savoir un taux de réussite de test et un taux de couverture du scénario de test de la couche Modèle, et un deuxième fichier de données, à savoir un taux de réussite de test et un taux de couverture du scénario de test de la couche Présentateur, le premier fichier de données étant un fichier ec, et le deuxième fichier de données étant un fichier ec ; exécuter, sur une machine virtuelle Dalvik ou une machine virtuelle ART, des tests sur un scénario de test de la couche Vue pour obtenir un troisième fichier de données, à savoir le taux de réussite de test et le taux de couverture du scénario de test de la couche Vue, le troisième fichier de données étant un fichier exec ; et fusionner le premier fichier de données, le deuxième fichier de données et le troisième fichier de données pour générer des données de rapport de test. L'utilisation du procédé et de l'appareil de test de données, du dispositif électronique et du support de stockage lisible par ordinateur peut améliorer l'efficacité de test.
PCT/CN2017/112952 2017-09-29 2017-11-24 Procédé et appareil de test de données, dispositif électronique et support de stockage lisible par ordinateur WO2019061783A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710937226.8A CN107704393B (zh) 2017-09-29 2017-09-29 数据测试方法、装置及电子设备
CN201710937226.8 2017-09-29

Publications (1)

Publication Number Publication Date
WO2019061783A1 true WO2019061783A1 (fr) 2019-04-04

Family

ID=61183462

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/112952 WO2019061783A1 (fr) 2017-09-29 2017-11-24 Procédé et appareil de test de données, dispositif électronique et support de stockage lisible par ordinateur

Country Status (2)

Country Link
CN (1) CN107704393B (fr)
WO (1) WO2019061783A1 (fr)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108388515B (zh) * 2018-03-06 2020-09-29 平安科技(深圳)有限公司 测试数据生成方法、装置、设备以及计算机可读存储介质
WO2019237239A1 (fr) * 2018-06-12 2019-12-19 优视科技新加坡有限公司 Procédé et appareil de test de données, dispositif/terminal/serveur et support d'informations lisible par ordinateur
CN109684192B (zh) * 2018-08-21 2024-03-01 天航长鹰(江苏)科技有限公司 基于数据处理的本地测试方法、设备、存储介质及装置
CN109597621B (zh) * 2018-08-24 2022-10-14 天津字节跳动科技有限公司 封装Dagger的方法、装置、终端设备及存储介质
CN111352824B (zh) * 2018-12-21 2023-07-07 北京金山云网络技术有限公司 测试方法、装置及计算机设备
CN109857637B (zh) * 2018-12-25 2022-04-15 杭州茂财网络技术有限公司 基于注解的Java语言方法覆盖率和方法输入输出统计方法
CN110309055A (zh) * 2019-05-23 2019-10-08 深圳壹账通智能科技有限公司 基于Java虚拟机的黑盒测试方法、装置、终端及存储介质
CN111782196A (zh) * 2020-07-08 2020-10-16 上海乾臻信息科技有限公司 基于mvp架构的开发方法及装置
CN112835759A (zh) * 2021-02-01 2021-05-25 百度在线网络技术(北京)有限公司 测试数据处理方法、装置、电子设备以及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012134122A2 (fr) * 2011-03-26 2012-10-04 Samsung Electronics Co., Ltd. Procédé et appareil pour éliminer des vérifications de borne de matrice partiellement redondantes dans un compilateur intégré
CN103885876A (zh) * 2012-12-21 2014-06-25 百度在线网络技术(北京)有限公司 测试方法及设备
CN104657259A (zh) * 2013-11-22 2015-05-27 中国银联股份有限公司 一种测试Android应用程序的方法和装置
CN105224449A (zh) * 2014-06-26 2016-01-06 富士通株式会社 移动终端上的应用程序的测试方法和装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060101385A1 (en) * 2004-10-22 2006-05-11 Gerken Christopher H Method and System for Enabling Roundtrip Code Protection in an Application Generator
CN105975265B (zh) * 2016-04-29 2019-04-12 掌赢信息科技(上海)有限公司 一种基于改进型mvp模式的装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012134122A2 (fr) * 2011-03-26 2012-10-04 Samsung Electronics Co., Ltd. Procédé et appareil pour éliminer des vérifications de borne de matrice partiellement redondantes dans un compilateur intégré
CN103885876A (zh) * 2012-12-21 2014-06-25 百度在线网络技术(北京)有限公司 测试方法及设备
CN104657259A (zh) * 2013-11-22 2015-05-27 中国银联股份有限公司 一种测试Android应用程序的方法和装置
CN105224449A (zh) * 2014-06-26 2016-01-06 富士通株式会社 移动终端上的应用程序的测试方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LIU, SHENGGUI, RESEARCH ON ANDROID APPLICATION IMPLEMENTATION AND UNIT TEST BASED ON MVP MODE, 25 July 2017 (2017-07-25), pages 94 - 95 *

Also Published As

Publication number Publication date
CN107704393A (zh) 2018-02-16
CN107704393B (zh) 2018-08-21

Similar Documents

Publication Publication Date Title
WO2019061783A1 (fr) Procédé et appareil de test de données, dispositif électronique et support de stockage lisible par ordinateur
RU2668973C2 (ru) Отладка машинного кода путем перехода от исполнения в собственном режиме к исполнению в интерпретируемом режиме
US11151018B2 (en) Method and apparatus for testing a code file
US10176270B2 (en) Performance of template based javascript widgets
US10521205B2 (en) Hostable compiler utilizing type information from a host application
Shao Certified software
Nelson et al. Specification and verification in the field: Applying formal methods to {BPF} just-in-time compilers in the linux kernel
US9697022B2 (en) Run time incremental compilation of script code
US9529648B2 (en) Generic declaration of bindings between events and event handlers regardless of runtime structure
US20110016449A1 (en) Method and system for integrating java and javascript technologies
US8868976B2 (en) System-level testcase generation
WO2019127904A1 (fr) Procédé d'exécution de programme d'application, appareil, dispositif d'ordinateur et support d'informations
US10664377B2 (en) Automation of software verification
CN112905447B (zh) 一种区块链虚拟机的测试方法和系统
US8117499B2 (en) Generation of a stimuli based on a test template
CN103176903B (zh) MapReduce分布式系统程序的测试方法及设备
US10606569B2 (en) Declarative configuration elements
Kneuss et al. Runtime instrumentation for precise flow-sensitive type analysis
US8639490B2 (en) Concretization of abstracted traces
US20170123959A1 (en) Optimized instrumentation based on functional coverage
Jarraya et al. Quantitative and qualitative analysis of SysML activity diagrams
Ghiduk et al. A Survey of Regression Testing Techniques.
US20230221975A1 (en) Methods, systems, and computer readable media for customizing data plane pipeline processing using berkeley packet filter (bpf) hook entry points
KR101211914B1 (ko) 운영체제 태스크 프레임워크의 자동 생성 방법 및 시스템
Xu et al. A Power-on Hardware Self-test Framework in Web-based OS

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17927423

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17927423

Country of ref document: EP

Kind code of ref document: A1