CN109376087A - A kind of method for testing software, device and electronic equipment - Google Patents

A kind of method for testing software, device and electronic equipment Download PDF

Info

Publication number
CN109376087A
CN109376087A CN201811228629.6A CN201811228629A CN109376087A CN 109376087 A CN109376087 A CN 109376087A CN 201811228629 A CN201811228629 A CN 201811228629A CN 109376087 A CN109376087 A CN 109376087A
Authority
CN
China
Prior art keywords
file
test
new
ipa
compiling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811228629.6A
Other languages
Chinese (zh)
Inventor
董熠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201811228629.6A priority Critical patent/CN109376087A/en
Publication of CN109376087A publication Critical patent/CN109376087A/en
Pending legal-status Critical Current

Links

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
    • 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

Abstract

The embodiment of the invention provides a kind of method for testing software, device and electronic equipment, concrete scheme is as follows: in default iOS dynamic base, load carries out testing required test case code for software under testing, generates test file;Compile the test file, the test file after being compiled;Test file after compiling is imported in the IPA file of software under testing, obtains new IPA file;By running new IPA file, software under testing is tested.Using scheme provided in an embodiment of the present invention, the source code of software under testing can not be depended on, software test procedure is completed, reduces testing cost.

Description

A kind of method for testing software, device and electronic equipment
Technical field
The present invention relates to software testing technology fields, more particularly to a kind of method for testing software, device and electronic equipment.
Background technique
The method of software automated testing can be divided into two kinds, and one is primary tool test method, another kind is third Square test frame test method.Wherein, primary tool test method is the realization pair on the basis of known software under testing source code Software under testing automated testing method, testing efficiency is high in this way, and test speed is fast, and process is good;Third-party testing Framework test method can not depend on the source code of institute's test software, realize the method to software automated testing to be measured.
In the automatic test course of software, primary tool test method excessively relies on the source generation of software under testing due to it Code, is often only applicable to test the software of independent research.The phase needs third-party testing framework test method before testing The hierarchical structure of software under testing is fully understood, and test frame is configured according to the hierarchical structure of software.Test block in whole process Frame configuration is complex, and the operation of test frame needs to rely on specific running environment, and testing cost is relatively high.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of method for testing software, device and electronic equipment, can not depend on The source code of software under testing completes software test procedure, reduces testing cost.Specific technical solution is as follows:
The embodiment of the invention provides a kind of method for testing software, the methods, comprising:
In default iOS (iPhone OS, Apple Macintosh operating system) dynamic base, load carries out test institute for software under testing The test case code needed generates test file;
Compile the test file, the test file after being compiled;
Test file after compiling is imported to IPA (iPhone Application, the apple application journey of the software under testing Sequence) in, obtain new IPA file;
By running the new IPA file, the software under testing is tested.
Further, the compiling test file, the test file after being compiled, comprising:
Based on underlying virtual machine LLVM (Low Level Virtual Machine, underlying virtual machine) compiler, will test File is compiled as the dynamic library file of dylib (dynamic link library) type, as the test file after compiling.
Further, the IPA file includes dynamic library file set and executable file;
The test file by after compiling imports in the apple application program IPA file of the software under testing, obtains new IPA file, comprising:
Test file after compiling is imported in the dynamic library file set of the IPA file of the software under testing, is obtained new Dynamic library file set;
In the load instruction list of the executable file, the load path of the test file after addition compiling is obtained New executable file;
Generate the new IPA file comprising the new dynamic library file set and the new executable file.
Further, the executable file is Mach-O file;
It is described to add the load path of the test file after compiling in the load instruction list of the executable file, Obtain new executable file, comprising:
According to position of the test file after compiling in the new dynamic library file set, in the Mach-O file Load instruction list in, add the load path of the test file, obtain new Mach-O file, as new executable File.
The embodiment of the invention provides a kind of software testing device, described devices, comprising:
Test file generation module, in default iOS dynamic base, load test for software under testing required Test case code generates test file;
Test file collector, the test file for compiling the test file, after being compiled;
IPA file determining module is obtained for importing the test file after compiling in the IPA file of the software under testing To new IPA file;
Software test module, for testing the software under testing by running the new IPA file.
Further, the test file collector is specifically used for being based on LLVM compiler, the test file is compiled It is translated into the dynamic library file of dylib type, as the test file after compiling.
Further, the IPA file includes dynamic library file set and executable file;
The IPA file determining module, comprising:
Dynamic library file set determines submodule, for the test file after compiling to be imported to the IPA of the software under testing In the dynamic library file set of file, new dynamic library file set is obtained;
Executable file determines submodule, for adding after compiling in the load instruction list of the executable file Test file load path, obtain new executable file;
IPA file generated submodule includes the new dynamic library file set and described new executable for generating The new IPA file of file.
Further, the executable file is Mach-O file;
The sub- determining module of executable file, specifically for according to the test file after compiling in the new dynamic base The load path of the test file is added in the load instruction list of the Mach-O file in position in file set, New Mach-O file is obtained, as new executable file.
The embodiment of the invention also provides a kind of electronic equipment, the electronic equipment includes processor, communication interface, storage Device and communication bus, wherein processor, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any of the above-described method for testing software step.
Present invention implementation additionally provides a kind of computer readable storage medium, storage in the computer readable storage medium There is the step of computer program, the computer program realizes any of the above-described method for testing software when being executed by processor.
A kind of method for testing software, device and electronic equipment provided in an embodiment of the present invention, can be in default iOS dynamic base In, load carries out testing required test case code for software under testing, generates test file;The test file is compiled, is obtained Test file after to compiling;Test file after compiling is imported in the IPA file of software under testing, obtains new IPA file; By running new IPA file, software under testing is tested.Using method provided in an embodiment of the present invention, can not depend on to be measured soft The source code of part completes software test procedure, reduces testing cost.
Certainly, implement any of the products of the present invention or method it is not absolutely required at the same reach all the above excellent Point.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described.
Fig. 1 is a kind of method flow diagram of software test provided in an embodiment of the present invention;
Fig. 2-a is one of the software interface schematic diagram provided in an embodiment of the present invention that iOS dynamic base is created using Xcode;
Fig. 2-b is the two of the software interface schematic diagram provided in an embodiment of the present invention that iOS dynamic base is created using Xcode;
Fig. 3 is the structural schematic diagram of Mach-O file provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of software testing device provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention is described.
A kind of method for testing software, device and electronic equipment provided in an embodiment of the present invention, in default iOS dynamic base, Load carries out testing required test case code for software under testing, generates test file;The test file is compiled, is compiled Test file after translating;Test file after compiling is imported in the IPA file of software under testing, obtains new IPA file;Pass through New IPA file is run, software under testing is tested.Using method provided in an embodiment of the present invention, software under testing can not depended on Source code completes software test procedure, reduces testing cost.
The embodiment of the invention provides a kind of method for testing software, as shown in Figure 1, may comprise steps of:
Step S101, in default iOS dynamic base, load carries out testing required test case generation for software under testing Code generates test file.
In this step, it in default iOS dynamic base, can will be carried out for software under testing by default load entrance Test case code needed for test is loaded into default iOS dynamic base, generates test file.
Specifically, be illustrated by taking developing instrument Xcode as an example, as shown in Fig. 2, providing in Xcode for user more Game application, instant chat application program in kind application object template, such as Fig. 2-a.In embodiments of the present invention, by In it is only necessary to create the dynamic base of an iOS frame, therefore, as long as selecting wound in the frame for the iOS being selected in Fig. 2-a and library A Cocoa Touch dynamic base is built, wherein Cocoa Touch is a set of frame set in iOS.And according to such as Fig. 2-b institute The interface shown selects dynamic base in Mach-O file type option, to complete the creation to default iOS dynamic base.Certainly exist During creation, it can also be related to the setting of dynamic library name etc., just not specifically illustrate herein.Based on default iOS dynamic base, It can will carry out testing required test case code being loaded into default iOS dynamic for software under testing from default load entrance In library, test file is generated.At this point, for the survey of test case code needed for software under testing test in default iOS dynamic base Examination file is the file of .m type or .h type.
In embodiments of the present invention, the generation of above-mentioned test file is loaded into default iOS dynamic except through load entrance In library, test file is generated, above-mentioned test case code can also be directly write in default iOS dynamic base, is generated corresponding .m the file of type or .h type, obtains test file.
Step S102, compiler test file, the test file after being compiled.
In this step, the test file of the obtained .m type of above-mentioned steps S101 or .h type is compiled, is obtained Test file after to compiling.
Further, it can be based on LLVM compiler, above-mentioned test file is compiled as to the dynamic library text of dylib type Part, as the test file after compiling.
Specifically, the test file of above-mentioned .m type or .h type can be compiled as dynamic base using LLVM compiler File, as the test file after compiling, test file after compiling will be for the dynamic library file of .dylib type.
In embodiments of the present invention, the file of .m type or .h type is mainly compiled as by above-mentioned compilation process .dylib type file.But during practice, it is also necessary to the test file after operation compiling, to the .dylib class of generation Type file is debugged.Therefore, in Xcode, the Compilation Method of test file can be equipment compiling, be also possible to simulator Compiling.So-called equipment compiled indicative is after the test file after being compiled, using true equipment to the test text after compiling Part is debugged, and so-called simulator establishment is then simulator needed for having debugging in Xcode, can choose simulator to compiling Test file afterwards is debugged.About the specific steps of compiling, the prior art can be referred to, is not just illustrated herein ?.
In embodiments of the present invention, used compiler, can be with other than above-mentioned LLVM compiler when compiling Using clang compiler, GCC (GNU Compiler Collection, GNU compiler external member) etc., to above-mentioned test file into Row compiling, the test file after being compiled.
Test file after compiling is imported in the IPA file of software under testing, obtains new IPA file by step S103.
In this step, the survey after compiling can be imported in the IPA file by the IPA file of decompression software under testing File is tried, and is compressed to obtain new IPA file.
Further, IPA file may include dynamic library file set and executable file.
For above-mentioned steps S103, the test file after compiling is imported in the IPA file of software under testing, obtained new IPA file, may comprise steps of:
Step S1031 imports the test file after compiling in the dynamic library file set of the IPA file of software under testing, Obtain new dynamic library file set.
In this step, for the IPA file after software under testing decompression, the test file after compiling can be imported should In the dynamic library file set of IPA file, new dynamic library file set is obtained.
Dynamic library file set for above-mentioned IPA file can be Framework (framework) file.
The test file after compiling can be imported, is obtained in the Framework file of the IPA file of software under testing New Framework file, as new dynamic library file set.
Specifically, importing the volume of above-mentioned .dylib type in the Framework file of the IPA file of software under testing Test file after translating obtains new Framework file, as new dynamic library file set.
Step S1032, in the load instruction list of executable file, the load road of the test file after addition compiling Diameter obtains new executable file.
It in this step, can be in the load instruction list of above-mentioned executable file, according to the test file after compiling Position in new dynamic library file set, the load path of the test file after addition compiling, obtains new executable text Part.
Further, above-mentioned executable file can be Mach-O file.
According to position of the test file after compiling in new dynamic library file set, refer in the load of Mach-O file It enables in list, adds the load path of test file, new Mach-O file is obtained, as new executable file.For example, false If the entitled Test.dylib of above-mentioned test file, specific location is indicated are as follows:/System/Library/Framework/ Test.dylib can use "/System/Library/Framework/ in the LoadCommands of Mach-O file Test.dylib " indicates the load path of above-mentioned test file.
In embodiments of the present invention, as described above, executable file can be the file of Mach-O type.About The specific structure of Mach-O file, may refer to Fig. 3.In Mach-O file, mainly may include Header (head), LoadCommands and Data (data), wherein Header is the header file part in Fig. 3, and LoadCommands is in Fig. 3 Instruction list part is loaded, Data is the data portion in Fig. 3.It include Mach-O document base information, e.g., library in Header Type, the quantity of loading command, the size of memory shared by loading command, the information such as corresponding label;LoadCommands is then Specific restriction to the load in Mach-O file, e.g., load address, loading method etc., Data is the original of Mach-O file Compile data, and be associated with the load instruction in LoadCommands, e.g., section in Fig. 3 instruct 1 and first in segment data the All there is association in one area data, second area data and third area data.Therefore, for above-mentioned new executable file Generation, in Mach-O file, not only need to have increased newly in LoadCommands compiling after test file load road Diameter, it is also necessary to which adaptability is adjusted Header and Data.
Step S1033 generates the new IPA file comprising new dynamic library file set and new executable file.
In this step, the dynamic library file collection in software under testing IPA file is updated using new dynamic library file set It closes, and updates the executable file of software under testing IPA file using new executable file, obtain updated IPA file, And updated IPA file is compressed, obtain new IPA file.
In embodiments of the present invention, above-mentioned IPA file is the corresponding program bag of software under testing, may include static library, dynamic State library, resources bank and executable file etc..In general, the file type in static library be .a type or .framework, the file type in dynamic base is .dylib type or .framework type, and executable file is Mach- O type file, and above-mentioned Framework file indicates the dynamic library file set of above-mentioned IPA file, in the dynamic library file It include the file of .dylib type or .framework type in set.Therefore, the test file after compiling can be led Enter in the dynamic library file set, and the IPA file of software under testing is updated, obtains new IPA file.
Step S104 tests software under testing by running new IPA file.
In this step, above-mentioned new IPA file is run, new executable file will be loaded in the new IPA file, According to the LoadCommands list of new executable file, by the corresponding load path of test file after above-mentioned compiling, Load test file, tests software under testing.
The method for testing software provided for the embodiments of the present invention is illustrated.Assuming that existing one is to be tested soft Part is tested, it is possible, firstly, to according to the method in above-mentioned steps S101, based on the dynamic base of iOS framework type, building One iOS dynamic base, and load carries out testing required test case code for software under testing in the iOS dynamic base, it is raw At test file, which is named as Test.m.It is then possible to be compiled to Test.m file .dylib is obtained Test file after compiling is named as Test.dylib by the file of type.Then, the test file after compiling can be imported In the IPA file of software under testing, new IPA file is obtained.For example, the dynamic library file collection of the IPA file of software under testing is combined into Framework file, the address of the dynamic library file are /System/Library/Framework, can be incited somebody to action Test.dylib is imported in Framework file, generates new Framework file;The then Test.dylib file Address can be/System/Library/Framework/Test.dylib, and arrange in the LoadCommands of executable file In table, the load of the Test.dylib file can be added according to Test.dylib file in the address of Framework file Address generates new executable file, with the update software under testing of new Framework file and new executable file IPA file, and updated IPA file is compressed to obtain new IPA file.New IPA file is run, is tested to be measured soft Part.
In embodiments of the present invention, the "Green" software that above-mentioned IPA file is similar in Windows is the same, does not need to install, As long as decompression uses.It therefore, will after compiling include to carry out testing required test case code for software under testing Test file import in above-mentioned IPA file, when operation or when decompressing IPA file in a device, it will execute new hold Style of writing part, so that test case code is called by the load path of the test file after compiling in new executable file, it is right Software under testing carries out automatic test.Since the source code of software under testing is stored in static library file set, then to be measured Software carries out that the source code of software under testing will not be called in automatic test course.
In addition, including the privately owned API of iOS system in the PrivateFrameworks (privately owned framework) of IPA file (Application Programming Interface, application programming interface), in testing to software under testing When, can be tested by calling above-mentioned privately owned API treat software, can more convenient completion software under testing is surveyed Examination.For example, testing the view in the interface of software under testing, can be called from PrivateFrameworks file Above-mentioned privately owned API positions the interface view of the software under testing, and tests interface view.
In conclusion a kind of method for testing software provided using inventive embodiments, can not depend on the source of software under testing Code completes the test to software under testing, and entire test process is relatively easy, reduces the cost of test.
Based on same inventive concept, based on a kind of method for testing software that the embodiments of the present invention provide, the present invention Embodiment additionally provides a kind of software testing device, as shown in figure 4, may include with lower module:
Test file generation module 401, in default iOS dynamic base, load to carry out test institute for software under testing The test case code needed generates test file.
Test file collector 402 is used for compiler test file, the test file after being compiled.
IPA file determining module 403 is imported in the IPA file of software under testing for the test file after compiling, is obtained New IPA file.
Software test module 404, for testing software under testing by running new IPA file.
Further, test file collector 402 is specifically used for being based on LLVM compiler, test file is compiled as The dynamic library file of dylib type, as the test file after compiling.
Further, IPA file includes dynamic library file set and executable file;
IPA file determining module 403, comprising:
Dynamic library file set determines submodule, and the IPA file of software under testing is imported for the test file after compiling Dynamic library file set in, obtain new dynamic library file set;
Executable file determines submodule, for the survey in the load instruction list of executable file, after addition compiling The load path for trying file, obtains new executable file;
IPA file generated submodule includes the new of new dynamic library file set and new executable file for generating IPA file.
Further, executable file is Mach-O file.
Executable file determines submodule, specifically for according to the test file after compiling in new dynamic library file set In position add the load path of test file in the load instruction list of Mach-O file, obtain new Mach-O text Part, as new executable file.
The embodiment of the invention also provides a kind of electronic equipment, as shown in figure 5, include processor 501, communication interface 502, Memory 503 and communication bus 504, wherein processor 501, communication interface 502, memory 503 are complete by communication bus 504 At mutual communication,
Memory 503, for storing computer program;
Processor 501 when for executing the program stored on memory 503, realizes following steps:
In default iOS dynamic base, load carries out testing required test case code for software under testing, generates test File;
Compiler test file, the test file after being compiled;
Test file after compiling is imported in the IPA file of software under testing, obtains new IPA file;
By running new IPA file, software under testing is tested.
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
In another embodiment provided by the invention, a kind of computer readable storage medium is additionally provided, which can It reads to be stored with computer program in storage medium, the computer program realizes any of the above-described software test when being executed by processor The step of method.
In another embodiment provided by the invention, a kind of computer program product comprising instruction is additionally provided, when it When running on computers, so that computer executes any software test method in above-described embodiment.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or It partly generates according to process or function described in the embodiment of the present invention.The computer can be general purpose computer, dedicated meter Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk Solid State Disk (SSD)) etc..
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device, For the embodiments such as electronic equipment, since it is substantially similar to the method embodiment, so being described relatively simple, related place ginseng See the part explanation of embodiment of the method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (10)

1. a kind of method for testing software characterized by comprising
In default Apple Macintosh operating system iOS dynamic base, load carries out testing required test case code for software under testing, Generate test file;
Compile the test file, the test file after being compiled;
Test file after compiling is imported in the apple application program IPA file of the software under testing, new IPA text is obtained Part;
By running the new IPA file, the software under testing is tested.
2. the method according to claim 1, wherein the compiling test file, the survey after being compiled Try file, comprising:
Based on underlying virtual machine LLVM compiler, the test file is compiled as to the dynamic base of dynamic link library dylib type File, as the test file after compiling.
3. the method according to claim 1, wherein the IPA file includes dynamic library file set and can hold Style of writing part;
The test file by after compiling imports in the apple application program IPA file of the software under testing, obtains new IPA File, comprising:
Test file after compiling is imported in the dynamic library file set of the IPA file of the software under testing, obtains new move State library file set;
In the load instruction list of the executable file, the load path of the test file after addition compiling is obtained new Executable file;
Generate the new IPA file comprising the new dynamic library file set and the new executable file.
4. according to the method described in claim 3, it is characterized in that, the executable file is Mach-O file;
It is described in the load instruction list of the executable file, addition compiling after test file load path, obtain New executable file, comprising:
According to position of the test file after compiling in the new dynamic library file set, in adding for the Mach-O file It carries in instruction list, adds the load path of the test file, obtain new Mach-O file, as new executable text Part.
5. a kind of software testing device characterized by comprising
Test file generation module, in default iOS dynamic base, load to carry out testing required test for software under testing Use-case code generates test file;
Test file collector, the test file for compiling the test file, after being compiled;
IPA file determining module obtains new for importing the test file after compiling in the IPA file of the software under testing IPA file;
Software test module, for testing the software under testing by running the new IPA file.
6. device according to claim 5, which is characterized in that the test file collector, specifically for being based on The test file is compiled as the dynamic library file of dylib type by LLVM compiler, as the test file after compiling.
7. device according to claim 5, which is characterized in that the IPA file includes dynamic library file set and can hold Style of writing part;
The IPA file determining module, comprising:
Dynamic library file set determines submodule, for the test file after compiling to be imported to the IPA file of the software under testing Dynamic library file set in, obtain new dynamic library file set;
Executable file determines submodule, for the survey in the load instruction list of the executable file, after addition compiling The load path for trying file, obtains new executable file;
IPA file generated submodule includes the new dynamic library file set and the new executable file for generating New IPA file.
8. device according to claim 7, which is characterized in that the executable file is Mach-O file;
The executable file determines submodule, specifically for according to the test file after compiling in the new dynamic library file The load path of the test file is added, is obtained in the load instruction list of the Mach-O file in position in set New Mach-O file, as new executable file.
9. a kind of electronic equipment, which is characterized in that including processor, communication interface, memory and communication bus, wherein processing Device, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any method and step of claim 1-5.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium Program realizes claim 1-5 any method and step when the computer program is executed by processor.
CN201811228629.6A 2018-10-22 2018-10-22 A kind of method for testing software, device and electronic equipment Pending CN109376087A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811228629.6A CN109376087A (en) 2018-10-22 2018-10-22 A kind of method for testing software, device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811228629.6A CN109376087A (en) 2018-10-22 2018-10-22 A kind of method for testing software, device and electronic equipment

Publications (1)

Publication Number Publication Date
CN109376087A true CN109376087A (en) 2019-02-22

Family

ID=65401338

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811228629.6A Pending CN109376087A (en) 2018-10-22 2018-10-22 A kind of method for testing software, device and electronic equipment

Country Status (1)

Country Link
CN (1) CN109376087A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109934016A (en) * 2019-03-07 2019-06-25 江苏通付盾信息安全技术有限公司 The signature check method, apparatus and electronic equipment of application
CN109933350A (en) * 2019-03-07 2019-06-25 江苏通付盾信息安全技术有限公司 The method, apparatus and electronic equipment of embedded code in the application
CN110135154A (en) * 2019-03-28 2019-08-16 江苏通付盾信息安全技术有限公司 The injection attack detection system and method for application program
CN110673576A (en) * 2019-09-23 2020-01-10 广州小鹏汽车科技有限公司 Automatic test method and device, vehicle and storage medium
CN110750545A (en) * 2019-09-03 2020-02-04 北京字节跳动网络技术有限公司 Dynamic library hot update method, device, medium and equipment
CN112052146A (en) * 2020-07-24 2020-12-08 北京奇艺世纪科技有限公司 Page frame rate testing method, application installation file generating method and device
CN114237742A (en) * 2021-12-10 2022-03-25 北京奇艺世纪科技有限公司 Loading and compiling method and device of dynamic library, terminal and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744055A (en) * 2004-09-04 2006-03-08 华为技术有限公司 Software test method
EP1683025A2 (en) * 2003-11-12 2006-07-26 UGS Corp. System, method, and computer program product for identifying code development errors
US20070234328A1 (en) * 2006-03-01 2007-10-04 Microsoft Corporation File handling for test environments
CN102402483A (en) * 2011-12-27 2012-04-04 苏州佰思迈信息咨询有限公司 Software testing method
CN104866419A (en) * 2014-10-17 2015-08-26 北汽福田汽车股份有限公司 Virtual platform as well as application layer software testing method and system
CN107608873A (en) * 2016-07-11 2018-01-19 珠海优特电力科技股份有限公司 Method for testing software and system and test platform

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1683025A2 (en) * 2003-11-12 2006-07-26 UGS Corp. System, method, and computer program product for identifying code development errors
CN1744055A (en) * 2004-09-04 2006-03-08 华为技术有限公司 Software test method
US20070234328A1 (en) * 2006-03-01 2007-10-04 Microsoft Corporation File handling for test environments
CN102402483A (en) * 2011-12-27 2012-04-04 苏州佰思迈信息咨询有限公司 Software testing method
CN104866419A (en) * 2014-10-17 2015-08-26 北汽福田汽车股份有限公司 Virtual platform as well as application layer software testing method and system
CN107608873A (en) * 2016-07-11 2018-01-19 珠海优特电力科技股份有限公司 Method for testing software and system and test platform

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ADMIN: "【技术分享】如何在.ipa文件上进行iOS代码注入", 《HTTP://WWW.52BUG.CN/HKJS/2450》 *
齐滇大圣: "iOS里的动态库和静态库", 《HTTPS://WWW.JIANSHU.COM/P/42891FB90304》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109934016A (en) * 2019-03-07 2019-06-25 江苏通付盾信息安全技术有限公司 The signature check method, apparatus and electronic equipment of application
CN109933350A (en) * 2019-03-07 2019-06-25 江苏通付盾信息安全技术有限公司 The method, apparatus and electronic equipment of embedded code in the application
CN109934016B (en) * 2019-03-07 2021-11-26 江苏通付盾信息安全技术有限公司 Application signature verification method and device and electronic equipment
CN110135154A (en) * 2019-03-28 2019-08-16 江苏通付盾信息安全技术有限公司 The injection attack detection system and method for application program
CN110135154B (en) * 2019-03-28 2021-09-03 江苏通付盾信息安全技术有限公司 Injection attack detection system and method for application program
CN110750545A (en) * 2019-09-03 2020-02-04 北京字节跳动网络技术有限公司 Dynamic library hot update method, device, medium and equipment
CN110750545B (en) * 2019-09-03 2023-07-25 抖音视界有限公司 Dynamic library heat updating method, device, medium and equipment
CN110673576A (en) * 2019-09-23 2020-01-10 广州小鹏汽车科技有限公司 Automatic test method and device, vehicle and storage medium
CN110673576B (en) * 2019-09-23 2021-04-13 广州小鹏汽车科技有限公司 Automatic test method and device, vehicle and storage medium
CN112052146A (en) * 2020-07-24 2020-12-08 北京奇艺世纪科技有限公司 Page frame rate testing method, application installation file generating method and device
CN114237742A (en) * 2021-12-10 2022-03-25 北京奇艺世纪科技有限公司 Loading and compiling method and device of dynamic library, terminal and storage medium
CN114237742B (en) * 2021-12-10 2023-09-01 北京奇艺世纪科技有限公司 Method, device, terminal and storage medium for loading and compiling dynamic library

Similar Documents

Publication Publication Date Title
CN109376087A (en) A kind of method for testing software, device and electronic equipment
CN106547678B (en) Method and apparatus for white-box testing
CN104461898A (en) Application testing method, center control server, test terminal and system
CN109992498B (en) Test case generation method and system and computer system
US9990458B2 (en) Generic design rule checking (DRC) test case extraction
CN105468797B (en) A kind of information processing method and device
CN109101269A (en) A kind of Software Delivery method and device, electronic equipment
CN104932973A (en) Version compatibility test method and apparatus
CN112256321A (en) Static library packaging method and device, computer equipment and storage medium
US10423408B2 (en) Identifying and isolating library code in software applications
CN103970659A (en) Android application software automation testing method based on pile pitching technology
CN109062794A (en) A kind of the determination method, apparatus and electronic equipment of software evaluating result
US10216495B2 (en) Program variable convergence analysis
CN107832059A (en) A kind of code Static Analysis Method and device based on Makefile
CN109902005A (en) A kind of method and system of automatic test
CN103995774A (en) Method and device for detecting software installation package
JP7119096B2 (en) license verification device
CN110134604A (en) A kind of unit or interface test method, device and computer equipment without code
CN109189688A (en) A kind of generation method, generating means and the electronic equipment of test case script
CN112434478B (en) Method for simulating virtual interface of logic system design and related equipment
CN109284222B (en) Software unit, project testing method, device and equipment in data processing system
US10192013B1 (en) Test logic at register transfer level in an integrated circuit design
KR102141749B1 (en) APP program execution method and device
CN111385661B (en) Method, device, terminal and storage medium for voice control of full screen playing
CN107908552A (en) A kind of test method based on link, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190222

RJ01 Rejection of invention patent application after publication