Detailed Description
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments of the present invention shall fall within the scope of the protection of the embodiments of the present invention.
The following further describes specific implementation of the embodiments of the present invention with reference to the drawings.
FIG. 1 is a schematic block diagram of a test method according to one embodiment of the present invention; as shown in fig. 1, the interface test program 105 may be downloaded from the test service. In one example, different test environments correspond to different device underlay operating environments. It should be appreciated that in other examples, different device underlay operating environments may be in the same test environment. As shown, the test environments 101/102/103 each correspond to a device floor runtime environment 1/2/3. In one aspect, the interface test program 105 is directed to a set of interfaces. It should be understood that the slave test service may test different versions of the program for the interface. Different versions may be different versions of the interface set described above, or different versions may have different interfaces therebetween, but the interface set described above may be included between different versions.
It should also be understood that the test service described above may employ different or the same network connections with different test environments. For example, one or more portions of the networks described above may include an ad hoc network, an intranet, an extranet, a Virtual Private Network (VPN), a Local Area Network (LAN), a wireless LAN (wlan), a Wide Area Network (WAN), a wireless WAN (wwan), a Metropolitan Area Network (MAN), a portion of the internet, a portion of the Public Switched Telephone Network (PSTN), a cellular telephone network, or a combination of two or more of these.
It should also be understood that the device infrastructure operating environments may or may not be the same. Different device underlay operating environments can include combinations of different hardware operating environments and different software operating environments. It should be understood that different device infrastructure operating environments may also be a combination of the same hardware operating environment and a different software operating environment, or a combination of a different hardware operating environment and the same software operating environment. The embodiment of the present invention is not limited thereto.
It should also be understood. The test device of embodiments of the present invention may be implemented as a test stand for developing, testing and/or supporting the use of a software product or program. The test station may also have other functions that may include, but are not limited to, managing IT processes and/or monitoring equipment in a network. In one particular embodiment, the testing process may include a number of elements and processes, and in one embodiment, all software-implemented processes are performed by a single computer system. Alternatively, different software-implemented processes may be performed by different computer systems, and data may be transferred between the different processes over a network or some other conduit.
It should also be appreciated that memory or storage devices are not specifically shown in the figures, but that embodiments of the invention may employ any manner of storage. For example, the storage devices for storing the interface test programs may be separately or separately configured. For example, a storage device is configured in the test stand described above. In addition, the test bench can also be one or more computers. For example, a test station may include its own hardware, software, network, and storage entities. It should be understood that the architecture diagram of fig. 1 is merely exemplary, and the testing method of the embodiment of the present invention is not limited to the above-described architecture, but may be implemented in any manner.
FIG. 2A is a schematic flow chart of a testing method according to another embodiment of the present invention. The testing method of fig. 2B may be applied to any suitable electronic device with data processing capabilities, including but not limited to servers, embedded devices, desktop computers, and the like. For example, the embedded device includes, but is not limited to, a mobile terminal (e.g., a mobile phone, a PAD, etc.), an internet of things device, an internet device, or a stand-alone device. The internet of things devices include, but are not limited to, smart devices, detection devices, and the like, such as smart cameras, smart doors and windows, smart doorbells, smart speakers, smart security devices, smart media devices, smart display screens, and the like. The method comprises the following steps:
210: and acquiring an interface test program which is formulated for various equipment bottom layer operating environments and aims at a uniform interface set called by an equipment application layer component.
It should be understood that the device infrastructure operating environment 106 may include a hardware environment and a software environment. Such as an operating system, memory, processors, input devices, output devices, etc. For example, the interface test program 105 may target various interfaces of the underlying runtime environment 106. The interface set may include, but is not limited to, at least one of a POSIX (portable operating system interface) API (application program interface), a library function interface, a third party library function interface. For example, the interface set may include portions of a portable operating system interface. The library function interface may include at least one of input-output functions, character strings, memory and character functions, mathematical functions, time, date and system related functions, dynamic memory allocation functions, inventory management functions, process control functions, character screens, graphical functions, and the like. For example, the library functions include C language library functions, C + + language library functions such as C + + virtual functions, C + + language library functions that implement class encapsulation, and the like. The third party library functions include, but are not limited to, at least one of json-c library functions, rws library functions, mbedtls library functions, httpparent library functions, lwip library functions, and the like.
It should also be understood that for obtaining interface test programs 105 formulated for a variety of device underlying operating environments 106, the interface test programs 105 may be downloaded from the server 104. For example, the interface test program 105 is downloaded from the test service 104. It should be appreciated that, in one example, the compatibility test suite may be downloaded from the server 104. For example, the compatibility test suite includes the interface test program 105 and test cases. For example, the test case may be a test description document of the interface test program 105. The test description document includes, but is not limited to, the type of interface to be tested, the number of interfaces to be tested, the test order of the interfaces to be tested, the test target, the test environment, the input data, the test steps, the expected results, the test script, and the like.
220: and aiming at the bottom layer operating environment of the target equipment in the bottom layer operating environments of various equipment, performing compatibility test on interface configuration of an interface set in the bottom layer operating environment of the target equipment by using an interface test program.
It should be understood that the unified interface set includes, but is not limited to, at least one of a real-time operating system interface, a library function interface, a hardware interface. For example, the interface set includes a portable operating system interface. For example, the entire unified interface set is a portable operating system interface. For example, the various device infrastructure runtime environments 106 include a smart device software runtime environment and a smart device hardware runtime environment.
It should also be understood that a software execution environment includes, but is not limited to, an operating system, hardware devices, a hardware abstraction layer, and the like. Operating systems include, but are not limited to, any form of desktop operating system, embedded operating system, server operating system, real-time operating system, and the like. For example, an operating system includes, but is not limited to, a test version or a release version of any of the operating systems described above. For example, an operating system includes, but is not limited to, an operating system built based on the kernel of any of the operating systems described above. In other words, the device bottom layer runtime environment 106 of the present invention includes at least one of an operating system kernel space, an operating system user space, an operating system abstraction layer, a hardware device, a hardware abstraction layer, or a combination of at least two. For example, the same operating system installation configures different hardware environments that form different device underlay runtime environments 106. For example, the same operating system kernel configured with different user spaces constitutes different software environments, thereby forming different device underlying runtime environments 106. For example, the same operating system configured with different library functions may form different device underlying runtime environments 106. In other words, the combination between different elements of the device bottom layer runtime environment 106 may form different device bottom layer runtime environments 106.
It should also be understood that any of the plurality of device underlay runtime environments 106 may be configured with a different number or variety of interfaces. Alternatively, any device underlying operating environment may not be configured with any interfaces. For example, a unified interface set may be configured for the target device underlying runtime environment. Alternatively, the target device underlying runtime environment includes at least one interface, e.g., other interfaces are configured for the target device underlying runtime environment, such that the target device underlying runtime environment has a unified interface set. In other words, portions of the unified interface set are configured for the target device underlying runtime environment. For example, the unified interface set may be the union of all interfaces in the multiple device underlay runtime environments. In other words, any interface in the unified interface set may exist in at least one device underlay runtime environment of the plurality of device underlay runtime environments 106. For example, the unified interface set may be a subset of a union of respective interfaces in the plurality of device underlay runtime environments 106, i.e., any interface in the unified interface set may exist in at least one device underlay runtime environment in the plurality of device underlay runtime environments 106. For example, the union of the respective interfaces in the multiple device underlay runtime environments 106 is a subset of the unified interface set. In other words, each interface may exist in a unified interface set for a respective interface in the multiple device underlay runtime environments 106. Alternatively, each interface in the unified interface set may not exist in any of the device underlay runtime environments. In other words, the unified interface set may have any relationship of overlapping, non-overlapping, containing, and containing with the set of interfaces of the multiple device underlying runtime environments 106 themselves. It should be understood that when the target device underlying operating environment is configured without the condition of the interface set, the target device underlying operating environment can be configured with the lacking interface, so that the target device underlying operating environment is configured with the interface. For example, the test case is used to perform interface configuration on the target device bottom layer operating environment.
Because the interface compatibility test is formulated for various equipment bottom layer operating environments, and the compatibility test is carried out on the target equipment bottom layer operating environment by using the uniform interface set called by the equipment application layer assembly, the fragmentation of the equipment bottom layer operating environment is effectively reduced.
As shown in FIG. 2B, the interface tester may test the operating system abstraction layer. For example, the interface test program may test C + + library functions, and may test third party library functions. It should be appreciated that the interface test program may test the portable operating system interface. The interface test program can test the kernel interface of the operating system. For example, different real-time operating systems are tested, or different versions of the same real-time operating system are tested. In addition, the interface test program can also test the hardware abstraction layer. The hardware abstraction layer may call methods of the hardware interface. In addition, the interface test program can also test the hardware interface.
In another implementation of the present invention, the interface test programs 105 formulated by the various device underlying runtime environments 106 may be obtained from the service 104 (e.g., a test service). For example, a compatibility test suite is obtained from the server 104. For example, the get compatibility test suite may include test cases. For example, the compatibility test suite may not include test cases. For example, the interface test program 105 is acquired from another device. For example, the other device obtains the interface test program from the server. For example, different device underlay runtime environments may have the same test devices for a particular test environment. The test equipment obtains the test interface program from other equipment or the server 104, thereby improving the test efficiency. For example, different device underlay runtime environments 106 with the same test device have similar configurations, e.g., have the same hardware components, have the same operating system kernel space, have the same operating system user space, have the same library functions, and so on. Therefore, the testing efficiency and the compatibility between the equipment bottom layer operating environment and the testing equipment are ensured. For example, different device underlay runtime environments 106 have respective test devices. Different test devices obtain the interface test program 105 from the same other device or server 104. For example, the respective test devices of different device underlay runtime environments 106 may have portions in common. For example, the different device underlay runtime environments 106 described above may share the same compiler. For example, when different device underlying runtime environments 106 have similar operating system kernels or similar hardware environments, the multiplexing of compilers improves testing efficiency, and a small number of efficient compilers can be configured to replace the compiler in each testing device, thereby saving cost or improving testing efficiency at the same cost.
As an example, obtaining an interface test program formulated for the various device underlying runtime environments 106 for a unified interface set invoked by the device application layer components includes: and acquiring a compatibility test suite, wherein the compatibility test suite comprises an interface test program which is formulated for various equipment bottom layer operating environments and aims at a uniform interface set called by the equipment application layer assembly.
In another implementation manner of the present invention, the test description document may include information such as the kind and parameters of the interface set. For example, the test description document may also include a mapping relationship between the interface set and different software environments or hardware environments. For example, the test description document may also include interface configuration methods. For example, the mapping relationship may include a correspondence relationship between an interface and an operating system and a configuration method thereof. The mapping relationship may include a correspondence relationship between the interface and the hardware abstraction layer and a configuration method thereof. For example, the test description document may include an encapsulation relationship or a calling relationship between the interface and the system call. For example, the test description document may include a calling relationship between the interface and the kernel function. The test description may also include a list of kernel functions or a list of system calls for the operating system. For example, the relationship between the interface and the kernel function or system call is presented by a mapping relationship.
As an example, the compatibility test suite further includes an interface test description document corresponding to the interface test program, where the interface test description document is used to configure a unified interface set for the target device underlying operating environment.
In another implementation of the invention, the interface compatibility test may comprise a compilation test, such as a white-box test. The compiled tests on the interface sets may be in any order. For example, testing may be performed in any order between portable operating system interfaces, library function interfaces, hardware interfaces. For example, the configuration may be modified for the interface set after the interface set is compiled. For example, the unified interface set includes a third interface and a fourth interface. For example, after the compilation test for the third interface is completed, the third interface is reconfigured and then the fourth interface is tested. For example, at least part of the third interface is called by at least part of the fourth interface. Therefore, the third interface called by the fourth interface is compiled, the configuration can be changed in advance, and the computing resources of compiling are reduced. In other words, the efficiency of compilation is improved.
It should also be understood that the compilation test may be after the running test. Alternatively, the compilation test can also be performed in parallel with the running test. In other words, the program is run while it is being compiled. For example, the interface test program 105 may be configured to run the program while it is being compiled. For example, the interface test program 105 is configured based on a call relationship between interfaces. For example, the called interface is compiled first, and then the compilation of the calling interface is performed in parallel with the execution of the called interface. For example, the calling interface is compiled first, and then the compilation of the called interface is performed in parallel with the execution of the calling interface. The embodiment of the invention does not limit the sequence of the interface compatibility test. It should also be understood that the interface sets may also be grouped. For example, the grouping may be done in the manner of classification described above, i.e., library function interface, operating system interface, hardware interface, and the like. For example, it is also possible to use a different approach than the one described above, for example, to group the interfaces belonging to the same class as described above into different groups. For example, calling relationships may be employed for grouping. For example, the unified interface set may be grouped into calling interfaces, called interfaces. For example, the unified interface set may be grouped into software interfaces, hardware interfaces, and the like. For example, the interface test program 105 is configured based on the interface grouping method described above.
As an example, for a target device bottom layer operating environment in multiple device bottom layer operating environments, performing a compatibility test on an interface configuration of a unified interface set in the target device bottom layer operating environment by using an interface test program, including: performing current compiling test on the current interface configuration of the unified interface set in the bottom operating environment of the target equipment; and if the current compiling test is passed, performing operation test on the current interface configuration of the unified interface set by using the interface test program.
As an example, for a target device bottom layer operating environment in multiple device bottom layer operating environments, performing a compatibility test on an interface configuration of a unified interface set in the target device bottom layer operating environment by using an interface test program, further includes: if the current compiling test is not passed, determining the debugged interface configuration of the unified interface set in the bottom layer operating environment of the target equipment; and carrying out next compiling test on the debugged interface configuration of the unified interface set in the bottom-layer operating environment of the target equipment.
In another implementation of the present invention, the language of the interface test program 105 may be the same as the target language of the target device's underlying runtime environment. The language of the interface test program 105 may be different from the target language of the underlying operating environment of the target device. For example, the interface test program 105 is a high level language. It should be appreciated that the language of the interface test program 105 may be compiled into a target language of the target device underlying runtime environment to further perform runtime testing of the target device underlying runtime environment.
As an example, the running test of the current interface configuration of the unified interface set by using an interface test program includes: performing current operation test on the current interface configuration of the unified interface set by using an interface test program; if the current run test is not passed, then a next run test is performed on the debugged interface configuration of the unified interface set.
In another implementation manner of the present invention, acquiring an interface test program of a unified interface set called by an application layer component of a device, which is formulated for a plurality of device underlying operating environments, includes: the interface test program of the unified interface set called for the device application layer component is obtained from the test service end and formulated for the running environment of the bottom layer of various devices, wherein the interface test program is utilized to carry out running test on the current interface configuration of the unified interface set, and the method further comprises the following steps: and if the current running test is passed, the code configured to the current interface of the traditional interface set on the test service terminal.
In another implementation manner of the present invention, before the interface test program is used to test the target device underlying operating environment, the interface test program may be compiled. For example, the interface tester compiler may share a compiler with the interface compiler described above. For example, the interface tester compiler may be a different compiler than the interface compiler. For example, the obtained interface test program is input into a compiler, and the output of the compiler is obtained. The outputs described above may be input to different test equipment. The test equipment may include its own compiler. Alternatively, different test devices may share the same compiler as an interface compiler, and after the interface compilation test, the compiler is continuously used as a test program compiler to obtain a test program of a target language that can be used for running the test.
As an example, for a target device bottom layer operating environment in multiple device bottom layer operating environments, performing a compatibility test on an interface configuration of a unified interface set in the target device bottom layer operating environment by using an interface test program, including: compiling the interface test program into a target language suitable for the bottom-layer operating environment of the target equipment;
and calling the interface configuration of the unified interface set by using the compiled interface test program through a test interface of the bottom operating environment of the target equipment so as to carry out compatibility test.
In another implementation manner of the present invention, the target device bottom layer operating environment includes a hardware environment and an operating system environment, and the unified interface set includes a first interface formulated for the hardware environment and a second interface formulated for the software environment, wherein, for a target device bottom layer operating environment in multiple device bottom layer operating environments, a compatibility test is performed on interface configuration of the unified interface set in the target device bottom layer operating environment by using an interface test program, including: performing current test on the interface configuration of the second interface by using an interface test program; and if the current test is passed, testing the interface configuration of the first interface by using an interface test program.
In another implementation manner of the present invention, for a target device bottom layer operating environment in multiple device bottom layer operating environments, performing a compatibility test on an interface configuration of a unified interface set in the target device bottom layer operating environment by using an interface test program, further includes:
and if the current test is not passed, carrying out the next test on the interface configuration of the second interface by using the interface test program.
In addition, fig. 3A is a schematic diagram of a testing method according to another embodiment of the invention. As shown, a compatibility test suite is downloaded from a server, and the compatibility test suite may include an interface test program and test cases, such as a test program description document. And the user/tester configures the interface for the equipment bottom layer operating environment based on the test program description document, for example, configures the interface based on the interface set in the test program description document. The user/tester debugs the device based on the interface test program. It should be appreciated that a tester may debug multiple underlying operating environments simultaneously. In addition, a tester can adopt one testing device to test a plurality of bottom operating environments.
FIG. 3B is an interaction diagram of a testing method according to another embodiment of the present invention; fig. 3B may be an interaction diagram corresponding to fig. 3A. As shown, in step 301, the testing device downloads a compatibility test suite from the testing server. In step 302, a user obtains a test program description file from a compatibility test suite. In step 303, the user programs (configures) by programming on the test device. In step 304, the testing apparatus configures an interface (i.e., the current configuration of the interface set) for the underlying operating environment of the smart device through user input. In step 305, the user performs a compiling test on the smart device bottom layer through the test device debugging. After the compilation is passed, in step 306, the user performs an operation test on the bottom layer of the smart device through the debugging of the testing apparatus. When the running test passes, in step 307, a test report, or the current configuration (e.g., source code) of the interface, is uploaded to the test service. In addition, an interface for downloading the compatibility test suite from the test server may be the same as or different from the uploaded interface, which is not limited in the embodiments of the present invention.
It should be understood that the figure is only schematic, and the number of testers/users, the number of testing devices/testing equipment, the number of smart device bottom layers/bottom layer operating environments, and the number of testing service terminals may be one or more. The scheme of the embodiment of the invention is not limited to this.
Fig. 4A is a schematic diagram of a testing method according to another embodiment of the invention. In addition, fig. 4B may be a schematic flow chart of a testing method of another embodiment of the present invention corresponding to fig. 4A. Fig. 4A will be described below with reference to fig. 4B. As shown, in step 401, the test equipment determines the current configuration of the interface set. For example, a user configures the unified interface set by outputting code on the test equipment. In step 402, a device under test (the underlying operating environment) is compiled for testing. If the test passes, go to step 403; if the compilation test did not pass, step 404 is performed. In step 403, the test equipment performs a running test on the current configuration of the interface set. In step 404, the user debugs the program through the testing device, and the debugged interface set has a configuration ready for the next compilation test. In step 405, the test device determines whether the running test passed. If the test passes, go to step 406; if the test does not pass, step 407 is performed. It should be appreciated that in step 407, the user may change the current configuration via the testing device to test the configuration code for the next run. It should be appreciated that in step 406, the user may configure the code by operating the test report/interface described above with respect to the test apparatus.
FIG. 5A is a schematic diagram of a testing method according to another embodiment of the invention. In addition, fig. 5B may be an interaction diagram of a testing method corresponding to another embodiment of the present invention of fig. 5A. Fig. 5A will be explained in conjunction with fig. 5B. As shown, the test device 1 and the test device 2 perform run debugging (e.g., testing) on the runtime environment interface 1 and the runtime environment interface 2, respectively. In addition, the test apparatus 1 and the test apparatus 2 share an interface configuration compiler to perform a compiling test. For example, in step 501, the interface configuration compiler performs a compilation test on the runtime environment interface 1 (interface set of the runtime environment 1) through the test device 1. In step 503, the interface configuration compiler may perform a compilation test on the runtime environment interface 2 (interface set of the runtime environment 2) through the test device 2. For example, after the compilation test on runtime environment interface 1 is completed, in step 502 and in step 504, test device 1 and test device 2 may run tests on runtime environment interface 1 and runtime environment interface 2, respectively. It should be understood that the number of devices and the number of underlying operating environments shown in the figures are merely illustrative, and that any combination of the number of test devices and the number of underlying operating environments may be used. For example, the test device (apparatus) includes a first test device and a second test device. The first test apparatus shares a compiler therebetween, and the second test apparatus uses respective compilers. The number of the shared compilers is not limited in the embodiment of the present invention.
FIG. 6A is a schematic diagram of a testing method according to another embodiment of the invention. In addition, fig. 6B may be an interaction diagram of a testing method corresponding to another embodiment of the present invention of fig. 6A. As shown in the figure, before performing a compilation test (or a compilation test and a running hybrid test) using the test apparatus 1 and the test apparatus 2, when the interface test program is not a target language, the compilation of the interface test program needs to be performed. It should be understood that different test devices may use different target languages, or the same target language, and the source code of the interface test program may use the same source code as the test devices. The test equipment may employ its own compiler. The test devices may also share a compiler. For example, in this example, test device 1 and test device 2 employ the same interface test program compiler. It will be appreciated that the test devices may also each have a connector, sharing one interface test program compiler. As shown, in step 601 and in step 603, the interface test compiler compiles the interface test program into object code that meets the requirements of the test apparatus 1 and the test apparatus 2, respectively. In steps 602 and 604, the test device 1 and the test device 2 respectively test the interface set of the underlying operating environment 1 and the interface set of the underlying operating environment 2. It should also be understood that the test equipment (device) comprises a first test equipment and a second test equipment. The first test equipment shares the interface test program compiler with the second test equipment using the respective interface test program compiler. The number of the shared compilers is not limited in the embodiment of the present invention.
It should be understood that the solution of the embodiment of the present invention also provides an interface abstraction layer. The interface set in the interface abstraction layer is tested via the interface test program described above.
For example, the interface abstraction layer includes a hardware interface, at least one operating system kernel can be installed on the interface abstraction layer, and at least one hardware environment can be adapted below the interface abstraction layer.
For example, the interface abstraction layer includes an interface set of an operating system kernel space, on which is installed at least one application or at least one interface of an operating system user space. At least one device underlying runtime environment may be adapted below the interface abstraction layer.
For example, the interface abstraction layer may include a set of interfaces for the operating system user space. At least one application may be installed on the interface abstraction layer. Different operating system kernel spaces may be adapted below the interface abstraction layer.
For example, the interface abstraction layer may include a plurality of library function interfaces. At least one application program calling the plurality of library function interfaces may be installed on the interface abstraction layer. Different operating system kernels can be adapted under the interface abstraction layer.
For example, the different interfaces described above are combined. For example, the interface abstraction layer may include a combination of a hardware interface and an operating system kernel interface. For example, the interface abstraction layer may include a combination of an interface of an operating system kernel and an interface of an operating system user space. For example, the interface abstraction layer may include a combination of an operating system user space interface and a library function interface. For example, the interface abstraction layer may be a combination of hardware interfaces, operating system kernel interfaces, interfaces for operating system user space. Correspondingly, at least one application program can be installed on the interface abstraction layer, and different hardware devices can be adapted under the interface abstraction layer. Therefore, the interface abstraction layer of the embodiment of the invention realizes the decoupling of the bottom layer and the upper layer. In other words, the upper layers of the interface abstraction layer may run any component that calls the set of interfaces, such as an application program or the like. Due to the compatibility test by adopting the interface test program, the lower layer of the interface abstract layer can uniformly call any called interface. Therefore, the integration of resources is realized, and the problems of operating system fragmentation, application program fragmentation and hardware fragmentation are solved fundamentally.
It should be understood that the library functions described above include third party library functions and/or library functions in a language in which the target underlying runtime environment is written, such as a C library or C + + library.
Fig. 7A is a schematic diagram of an interface abstraction layer of an example of a test method according to another embodiment of the present invention. As shown, the interface abstraction layer corresponds to the operating system kernel. The lower layer can be adapted to different hardware operating environments. Different operating system user control interfaces can be installed on the upper layer of the interface abstraction layer. As one example, different operating system user space interfaces may install different or the same application programs. It should be appreciated that in this example, the application program may be coupled or decoupled from the operating system user space interface. The operating system user space interface may be coupled or decoupled from the interface abstraction layer. Therefore, the problem of fragmentation of the bottom-layer running environment is solved, and flexible installation or uninstallation of components or application programs of the upper-layer user space is realized.
Fig. 7B is a schematic diagram of an interface abstraction layer of another example of a test method according to another embodiment of the present invention. As shown, operating system 1, operating system 2, and operating system 3 are adapted below the interface abstraction layer. Above the interface abstraction layer are installed application 1 and application 2. The application 1 and the application 2 may be coupled by an interface abstraction layer, and correspond to the device application layer component of the embodiment of the present invention. It should be understood that the application 1 and the application 2 may be independent applications installed by users respectively, in other words, the interface abstraction layer is decoupled from the application, so as to realize the unification of the interface for the upper application or application module and the underlying environment. In other words, the problem of fragmentation of the bottom layer is solved, and meanwhile the flexibility of installation of the upper layer application program and the consistency of the interface are guaranteed.
Fig. 7C is a schematic diagram of an interface abstraction layer of another example of a test method according to another embodiment of the present invention. As shown, interface abstraction layer 1 and interface abstraction layer 2 may abstract different underlying components. For example, interface abstraction layer 1 abstracts the kernel space of the operating system. At least one application can be installed on its upper layer. Also, upper level applications may be coupled or decoupled from the interface abstraction layer. In addition, the interface abstraction layer 2 essentially abstracts the hardware runtime environment. In other words, the lower layers thereof may be adapted to different hardware configurations or hardware execution environments. Similarly, the above-ground layer may be in accordance with at least one application. The upper layer application may be installed or uninstalled. It may also be coupled with the operating system abstraction layer 2, i.e. formed as one module or component.
It should be understood that fig. 7A-7C illustrate just a few examples. The interface abstraction layer of the embodiment of the invention can be provided to a third party as a platform. For example, the interface abstraction layer is provided as a platform to third party applications or user space components on top of it, or to third party operating system providers or underlying runtime environment providers or hardware providers on top of it.
FIG. 8 is a schematic flow chart of a testing method according to another embodiment of the present invention. The method of fig. 8 may be applied to any suitable electronic device having data processing capabilities, including but not limited to servers, embedded devices, desktop computers, and the like. For example, the embedded device includes, but is not limited to, a mobile terminal (e.g., a mobile phone, a PAD, etc.), an internet of things device, an internet device, or a stand-alone device. The internet of things devices include, but are not limited to, smart devices, detection devices, and the like, such as smart cameras, smart doors and windows, smart doorbells, smart speakers, smart security devices, smart media devices, smart display screens, and the like. The method comprises the following steps:
810: the method comprises the steps of obtaining a first interface test program, which is formulated for a device bottom layer operating environment and is specific to a first interface set called by a first device application layer component, and a second interface test program, which is specific to a second interface set called by a second device application layer component.
It should be understood that the device infrastructure operating environment may include a hardware environment and a software environment. Such as an operating system, memory, processors, input devices, output devices, etc. For example, the interface test program may be directed to various interfaces of the underlying runtime environment. The interface set may include, but is not limited to, at least one of an application program interface, such as a portable operating system interface, a library function interface, a third party library function interface. For example, the interface set may include portions of a portable operating system interface. The library function interface may include at least one of input-output functions, character strings, memory and character functions, mathematical functions, time, date and system related functions, dynamic memory allocation functions, inventory management functions, process control functions, character screens, graphical functions, and the like. For example, the library functions include C language library functions, C + + language library functions such as C + + virtual functions, C + + language library functions that implement class encapsulation, and the like. The third party library functions include, but are not limited to, at least one of json-c library functions, rws library functions, mbedtls library functions, httpparent library functions, lwip library functions, and the like.
It should also be understood that for obtaining interface test programs formulated for various device underlying operating environments, the interface test programs can be downloaded from a server. For example, an interface test program is downloaded from a test service. It should be appreciated that, in one example, the compatibility test suite may be downloaded from a server. For example, the compatibility test suite includes an interface test program and a test case. For example, the test case may be a test description document of the interface test program. The test description document includes, but is not limited to, the type of interface to be tested, the number of interfaces to be tested, the test order of the interfaces to be tested, the test target, the test environment, the input data, the test steps, the expected results, the test script, and the like.
820: and respectively utilizing the first interface test program and the second interface test program to carry out compatibility test on the interface configuration of the first interface set in the equipment bottom layer operating environment and the interface configuration of the second interface set in the equipment bottom layer operating environment.
It should be understood that the unified interface set includes, but is not limited to, at least one of a real-time operating system interface, a library function interface, a hardware interface. For example, the interface set includes a portable operating system interface. For example, the entire unified interface set is a portable operating system interface. For example, the various device infrastructure operating environments include a smart device software operating environment and a smart device hardware operating environment.
It should also be understood that a software execution environment includes, but is not limited to, an operating system, hardware devices, a hardware abstraction layer, and the like. Operating systems include, but are not limited to, any form of desktop operating system, embedded operating system, server operating system, real-time operating system, and the like. For example, an operating system includes, but is not limited to, a test version or a release version of any of the operating systems described above. For example, an operating system includes, but is not limited to, an operating system built based on the kernel of any of the operating systems described above. In other words, the device underlying runtime environment of the embodiments of the present invention includes at least one of an operating system kernel space, an operating system user space, an operating system abstraction layer, a hardware device, a hardware abstraction layer, or a combination of at least two of the same. For example, the same operating system installation configures different hardware environments to form different device bottom-layer operating environments. For example, the same operating system kernel configured with different user spaces constitutes different software environments, thereby forming different device bottom layer operating environments. For example, different operating systems configured with different library functions may form different device underlying runtime environments. In other words, the combination between different elements of the device floor runtime environment may form different device floor runtime environments.
It should also be understood that any of the multiple device underlay operating environments may be configured with a different number or variety of interfaces. Alternatively, any device underlying operating environment may not be configured with any interfaces. For example, a unified interface set may be configured for the target device underlying runtime environment. Alternatively, the target device underlying runtime environment includes at least one interface, e.g., other interfaces are configured for the target device underlying runtime environment, such that the target device underlying runtime environment has a unified interface set. In other words, portions of the unified interface set are configured for the target device underlying runtime environment. For example, the unified interface set may be the union of all interfaces in the multiple device underlay runtime environments. In other words, any interface in the unified interface set may exist in at least one device underlay runtime environment of the plurality of device underlay runtime environments. For example, the unified interface set may be a subset of a union of respective interfaces in the plurality of device underlay runtime environments, i.e., any interface in the unified interface set may exist in at least one device underlay runtime environment in the plurality of device underlay runtime environments. For example, the union of the respective interfaces in the multiple device underlying runtime environments is a subset of the unified interface set. In other words, each interface may exist in a unified interface set for a respective interface in a plurality of device underlay runtime environments. Alternatively, each interface in the unified interface set may not exist in any of the device underlay runtime environments. In other words, the unified interface set and the set formed by the interfaces of the multiple device bottom layer operating environments can be any relationship of overlapping, non-overlapping, containing and containing. It should be understood that when the target device underlying operating environment is configured without the condition of the interface set, the target device underlying operating environment can be configured with the lacking interface, so that the target device underlying operating environment is configured with the interface. For example, the test case is used to perform interface configuration on the target device bottom layer operating environment.
Because the interface compatibility test is formulated for various equipment bottom layer operating environments, and the compatibility test is carried out on the target equipment bottom layer operating environment by using the uniform interface set called by the equipment application layer assembly, the fragmentation of the equipment bottom layer operating environment is effectively reduced.
In another implementation of the present invention, the unified interface set includes at least one of a real-time operating system interface, a library function interface, a hardware interface, and a portable operating system interface.
In another implementation manner of the present invention, the multiple device bottom layer operating environments include a smart device software operating environment and a smart device hardware operating environment.
Fig. 9 is a schematic flow chart of a configuration method according to another embodiment of the invention. The configuration method of fig. 9 may be applied to any suitable electronic device having data processing capabilities, including but not limited to servers, embedded devices, desktop computers, and the like. For example, the embedded device includes, but is not limited to, a mobile terminal (e.g., a mobile phone, a PAD, etc.), an internet of things device, an internet device, a stand-alone device, a car machine, a set-top box, etc. The internet of things devices include, but are not limited to, smart devices such as smart cameras, smart doors and windows, smart doorbells, smart watches, smart speakers, smart security devices, smart media devices, smart display screens, and the like, and detection devices. The method comprises the following steps:
910: and determining a uniform interface set called by the device application layer components established for the various device bottom-layer operating environments.
920: and utilizing the uniform interface set to configure interfaces for the target equipment bottom layer operating environment in the multiple equipment bottom layer operating environments.
It should be understood that the device infrastructure operating environment may include a hardware environment and a software environment. Such as an operating system, memory, processors, input devices, output devices, etc. For example, the interface test program may be directed to various interfaces of the underlying runtime environment. The interface set may include, but is not limited to, at least one of an application program interface, such as a portable operating system interface, a library function interface, a third party library function interface. For example, the interface set may include portions of a portable operating system interface. The library function interface may include at least one of input-output functions, character strings, memory and character functions, mathematical functions, time, date and system related functions, dynamic memory allocation functions, inventory management functions, process control functions, character screens, graphical functions, and the like. For example, the library functions include C language library functions, C + + language library functions such as C + + virtual functions, C + + language library functions that implement class encapsulation, and the like. The third party library functions include, but are not limited to, at least one of json-c library functions, rws library functions, mbedtls library functions, httpparent library functions, lwip library functions, and the like. It should be understood that the unified interface set includes, but is not limited to, at least one of a real-time operating system interface, a library function interface, a hardware interface. For example, the interface set includes a portable operating system interface. For example, the entire unified interface set is a portable operating system interface. For example, the various device infrastructure operating environments include a smart device software operating environment and a smart device hardware operating environment.
It should also be understood that a software execution environment includes, but is not limited to, an operating system, hardware devices, a hardware abstraction layer, and the like. Operating systems include, but are not limited to, any form of desktop operating system, embedded operating system, server operating system, real-time operating system, and the like. For example, an operating system includes, but is not limited to, a test version or a release version of any of the operating systems described above. For example, an operating system includes, but is not limited to, an operating system built based on the kernel of any of the operating systems described above. In other words, the device underlying runtime environment of the embodiments of the present invention includes at least one of an operating system kernel space, an operating system user space, an operating system abstraction layer, a hardware device, a hardware abstraction layer, or a combination of at least two of the same. For example, the same operating system installation configures different hardware environments to form different device bottom-layer operating environments. For example, the same operating system kernel configured with different user spaces constitutes different software environments, thereby forming different device bottom layer operating environments. For example, different operating systems configured with different library functions may form different device underlying runtime environments. In other words, the combination between different elements of the device floor runtime environment may form different device floor runtime environments.
It should also be understood that any of the multiple device underlay operating environments may be configured with a different number or variety of interfaces. Alternatively, any device underlying operating environment may not be configured with any interfaces. For example, a unified interface set may be configured for the target device underlying runtime environment. Alternatively, the target device underlying runtime environment includes at least one interface, e.g., other interfaces are configured for the target device underlying runtime environment, such that the target device underlying runtime environment has a unified interface set. In other words, portions of the unified interface set are configured for the target device underlying runtime environment. For example, the unified interface set may be the union of all interfaces in the multiple device underlay runtime environments. In other words, any interface in the unified interface set may exist in at least one device underlay runtime environment of the plurality of device underlay runtime environments. For example, the unified interface set may be a subset of a union of respective interfaces in the plurality of device underlay runtime environments, i.e., any interface in the unified interface set may exist in at least one device underlay runtime environment in the plurality of device underlay runtime environments. For example, the union of the respective interfaces in the multiple device underlying runtime environments is a subset of the unified interface set. In other words, each interface may exist in a unified interface set for a respective interface in a plurality of device underlay runtime environments. Alternatively, each interface in the unified interface set may not exist in any of the device underlay runtime environments. In other words, the unified interface set and the set formed by the interfaces of the multiple device bottom layer operating environments can be any relationship of overlapping, non-overlapping, containing and containing. It should be understood that when the target device underlying operating environment is configured without the condition of the interface set, the target device underlying operating environment can be configured with the lacking interface, so that the target device underlying operating environment is configured with the interface. For example, the test case is used to perform interface configuration on the target device bottom layer operating environment.
Because the uniform interface set called by the device application layer component is formulated for various device bottom layer operating environments, fragmentation of the device bottom layer operating environments is effectively reduced for the application layer component.
In another implementation of the present invention, the unified interface set includes at least one of a real-time operating system interface, a library function interface, a hardware interface, and a portable operating system interface.
In another implementation manner of the present invention, the multiple device bottom layer operating environments include a smart device software operating environment and a smart device hardware operating environment.
Fig. 10 is a schematic flow chart of a mounting method of another embodiment of the present invention. The installation method of fig. 10 may be applied to any suitable electronic device having data processing capabilities, including but not limited to servers, embedded devices, desktop computers, and the like. For example, the embedded device includes, but is not limited to, a mobile terminal (e.g., a mobile phone, a PAD, etc.), an internet of things device, an internet device, a stand-alone device, a car machine, a set-top box, etc. The internet of things devices include, but are not limited to, smart devices such as smart cameras, smart doors and windows, smart doorbells, smart watches, smart speakers, smart security devices, smart media devices, smart display screens, and the like, and detection devices. The method comprises the following steps:
1010: determining a uniform interface set called by equipment application layer components formulated for various equipment bottom layer operating environments;
1020: and installing the device application layer component to a target device bottom layer operating environment in various device bottom layer operating environments.
Because the uniform interface set called by the device application layer component is formulated for various device bottom layer operating environments, fragmentation of the device bottom layer operating environments is effectively reduced for the application layer component.
It should be understood that the device infrastructure operating environment may include a hardware environment and a software environment. Such as an operating system, memory, processors, input devices, output devices, etc. For example, the interface test program may be directed to various interfaces of the underlying runtime environment. The interface set may include, but is not limited to, at least one of an application program interface, such as a portable operating system interface, a library function interface, a third party library function interface. For example, the interface set may include portions of a portable operating system interface. The library function interface may include at least one of input-output functions, character strings, memory and character functions, mathematical functions, time, date and system related functions, dynamic memory allocation functions, inventory management functions, process control functions, character screens, graphical functions, and the like. For example, the library functions include C language library functions, C + + language library functions such as C + + virtual functions, C + + language library functions that implement class encapsulation, and the like. The third party library functions include, but are not limited to, at least one of json-c library functions, rws library functions, mbedtls library functions, httpparent library functions, lwip library functions, and the like. It should be understood that the unified interface set includes, but is not limited to, at least one of a real-time operating system interface, a library function interface, a hardware interface. For example, the interface set includes a portable operating system interface. For example, the entire unified interface set is a portable operating system interface. For example, the various device infrastructure operating environments include a smart device software operating environment and a smart device hardware operating environment.
It should also be understood that a software execution environment includes, but is not limited to, an operating system, hardware devices, a hardware abstraction layer, and the like. Operating systems include, but are not limited to, any form of desktop operating system, embedded operating system, server operating system, real-time operating system, and the like. For example, an operating system includes, but is not limited to, a test version or a release version of any of the operating systems described above. For example, an operating system includes, but is not limited to, an operating system built based on the kernel of any of the operating systems described above. In other words, the device underlying runtime environment of the embodiments of the present invention includes at least one of an operating system kernel space, an operating system user space, an operating system abstraction layer, a hardware device, a hardware abstraction layer, or a combination of at least two of the same. For example, the same operating system installation configures different hardware environments to form different device bottom-layer operating environments. For example, the same operating system kernel configured with different user spaces constitutes different software environments, thereby forming different device bottom layer operating environments. For example, different operating systems configured with different library functions may form different device underlying runtime environments. In other words, the combination between different elements of the device floor runtime environment may form different device floor runtime environments.
It should also be understood that any of the multiple device underlay operating environments may be configured with a different number or variety of interfaces. Alternatively, any device underlying operating environment may not be configured with any interfaces. For example, a unified interface set may be configured for the target device underlying runtime environment. Alternatively, the target device underlying runtime environment includes at least one interface, e.g., other interfaces are configured for the target device underlying runtime environment, such that the target device underlying runtime environment has a unified interface set. In other words, portions of the unified interface set are configured for the target device underlying runtime environment. For example, the unified interface set may be the union of all interfaces in the multiple device underlay runtime environments. In other words, any interface in the unified interface set may exist in at least one device underlay runtime environment of the plurality of device underlay runtime environments. For example, the unified interface set may be a subset of a union of respective interfaces in the plurality of device underlay runtime environments, i.e., any interface in the unified interface set may exist in at least one device underlay runtime environment in the plurality of device underlay runtime environments. For example, the union of the respective interfaces in the multiple device underlying runtime environments is a subset of the unified interface set. In other words, each interface may exist in a unified interface set for a respective interface in a plurality of device underlay runtime environments. Alternatively, each interface in the unified interface set may not exist in any of the device underlay runtime environments. In other words, the unified interface set and the set formed by the interfaces of the multiple device bottom layer operating environments can be any relationship of overlapping, non-overlapping, containing and containing. It should be understood that when the target device underlying operating environment is configured without the condition of the interface set, the target device underlying operating environment can be configured with the lacking interface, so that the target device underlying operating environment is configured with the interface. For example, the test case is used to perform interface configuration on the target device bottom layer operating environment.
In another implementation of the present invention, the unified interface set includes at least one of a real-time operating system interface, a library function interface, a hardware interface, and a portable operating system interface.
In another implementation manner of the present invention, the multiple device bottom layer operating environments include a smart device software operating environment and a smart device hardware operating environment.
FIG. 11 is a schematic flow chart of a method of operation of another embodiment of the present invention. The method of operation of fig. 11 may be applied to any suitable electronic device having data processing capabilities, including but not limited to servers, embedded devices, desktop computers, and the like. For example, the embedded device includes, but is not limited to, a mobile terminal (e.g., a mobile phone, a PAD, etc.), an internet of things device, an internet device, a stand-alone device, a car machine, a set-top box, etc. The internet of things devices include, but are not limited to, smart devices such as smart cameras, smart doors and windows, smart doorbells, smart watches, smart speakers, smart security devices, smart media devices, smart display screens, and the like, and detection devices. The method comprises the following steps:
1110: the device application layer component determines at least one interface in a unified interface set of the device application layer component, and the unified interface set is formulated for various device bottom layer operating environments.
1120: and the device application layer component calls at least one interface to run in a target device bottom layer running environment in the multiple device bottom layer running environments so as to realize the functions of the device application layer component.
It should be understood that the device infrastructure operating environment may include a hardware environment and a software environment. Such as an operating system, memory, processors, input devices, output devices, etc. For example, the interface test program may be directed to various interfaces of the underlying runtime environment. The interface set may include, but is not limited to, at least one of an application program interface, such as a portable operating system interface, a library function interface, a third party library function interface. For example, the interface set may include portions of a portable operating system interface. The library function interface may include at least one of input-output functions, character strings, memory and character functions, mathematical functions, time, date and system related functions, dynamic memory allocation functions, inventory management functions, process control functions, character screens, graphical functions, and the like. For example, the library functions include C language library functions, C + + language library functions such as C + + virtual functions, C + + language library functions that implement class encapsulation, and the like. The third party library functions include, but are not limited to, at least one of json-c library functions, rws library functions, mbedtls library functions, httpparent library functions, lwip library functions, and the like. It should be understood that the unified interface set includes, but is not limited to, at least one of a real-time operating system interface, a library function interface, a hardware interface. For example, the interface set includes a portable operating system interface. For example, the entire unified interface set is a portable operating system interface. For example, the various device infrastructure operating environments include a smart device software operating environment and a smart device hardware operating environment.
It should also be understood that a software execution environment includes, but is not limited to, an operating system, hardware devices, a hardware abstraction layer, and the like. Operating systems include, but are not limited to, any form of desktop operating system, embedded operating system, server operating system, real-time operating system, and the like. For example, an operating system includes, but is not limited to, a test version or a release version of any of the operating systems described above. For example, an operating system includes, but is not limited to, an operating system built based on the kernel of any of the operating systems described above. In other words, the device underlying runtime environment of the embodiments of the present invention includes at least one of an operating system kernel space, an operating system user space, an operating system abstraction layer, a hardware device, a hardware abstraction layer, or a combination of at least two of the same. For example, the same operating system installation configures different hardware environments to form different device bottom-layer operating environments. For example, the same operating system kernel configured with different user spaces constitutes different software environments, thereby forming different device bottom layer operating environments. For example, different operating systems configured with different library functions may form different device underlying runtime environments. In other words, the combination between different elements of the device floor runtime environment may form different device floor runtime environments.
It should also be understood that any of the multiple device underlay operating environments may be configured with a different number or variety of interfaces. Alternatively, any device underlying operating environment may not be configured with any interfaces. For example, a unified interface set may be configured for the target device underlying runtime environment. Alternatively, the target device underlying runtime environment includes at least one interface, e.g., other interfaces are configured for the target device underlying runtime environment, such that the target device underlying runtime environment has a unified interface set. In other words, portions of the unified interface set are configured for the target device underlying runtime environment. For example, the unified interface set may be the union of all interfaces in the multiple device underlay runtime environments. In other words, any interface in the unified interface set may exist in at least one device underlay runtime environment of the plurality of device underlay runtime environments. For example, the unified interface set may be a subset of a union of respective interfaces in the plurality of device underlay runtime environments, i.e., any interface in the unified interface set may exist in at least one device underlay runtime environment in the plurality of device underlay runtime environments. For example, the union of the respective interfaces in the multiple device underlying runtime environments is a subset of the unified interface set. In other words, each interface may exist in a unified interface set for a respective interface in a plurality of device underlay runtime environments. Alternatively, each interface in the unified interface set may not exist in any of the device underlay runtime environments. In other words, the unified interface set and the set formed by the interfaces of the multiple device bottom layer operating environments can be any relationship of overlapping, non-overlapping, containing and containing. It should be understood that when the target device underlying operating environment is configured without the condition of the interface set, the target device underlying operating environment can be configured with the lacking interface, so that the target device underlying operating environment is configured with the interface. For example, the test case is used to perform interface configuration on the target device bottom layer operating environment.
Because the uniform interface set called by the device application layer component is formulated for various device bottom layer operating environments, fragmentation of the device bottom layer operating environments is effectively reduced for the application layer component.
In another implementation of the present invention, the unified interface set includes at least one of a real-time operating system interface, a library function interface, a hardware interface, and a portable operating system interface.
In another implementation manner of the present invention, the multiple device bottom layer operating environments include a smart device software operating environment and a smart device hardware operating environment.
FIG. 12 is a schematic block diagram of a test apparatus according to another embodiment of the present invention. The test apparatus of fig. 12 may be used to test any suitable electronic device having data processing capabilities, including but not limited to servers, embedded devices, desktop computers, and the like. For example, the embedded device includes, but is not limited to, a mobile terminal (e.g., a mobile phone, a PAD, etc.), an internet of things device, an internet device, a stand-alone device, a car machine, a set-top box, etc. The internet of things devices include, but are not limited to, smart devices such as smart cameras, smart doors and windows, smart doorbells, smart watches, smart speakers, smart security devices, smart media devices, smart display screens, and the like, and detection devices. The device includes:
an obtaining module 1210 for obtaining an interface test program of a unified interface set called by an equipment application layer component, the interface test program being formulated for a plurality of equipment bottom layer operating environments;
the testing module 1220 performs compatibility testing on the interface configuration of the unified interface set in the target device bottom layer operating environment by using an interface testing program for the target device bottom layer operating environment in the multiple device bottom layer operating environments.
Because the interface compatibility test is formulated for various equipment bottom layer operating environments, and the compatibility test is carried out on the target equipment bottom layer operating environment by using the uniform interface set called by the equipment application layer assembly, the fragmentation of the equipment bottom layer operating environment is effectively reduced.
In another implementation manner of the present invention, the obtaining module is specifically configured to: and acquiring a compatibility test suite, wherein the compatibility test suite comprises an interface test program which is formulated for various equipment bottom layer operating environments and aims at a uniform interface set called by the equipment application layer assembly.
In another implementation manner of the present invention, the compatibility test suite further includes an interface test description document corresponding to the interface test program, where the interface test description document is used to configure a unified interface set for the target device underlying operating environment.
In another implementation manner of the present invention, the test module is specifically configured to: performing current compiling test on the current interface configuration of the unified interface set in the bottom operating environment of the target equipment; and if the current compiling test is passed, performing operation test on the current interface configuration of the unified interface set by using the interface test program.
In another implementation of the present invention, the test module is further configured to: if the current compiling test is not passed, determining the debugged interface configuration of the unified interface set in the bottom layer operating environment of the target equipment; and carrying out next compiling test on the debugged interface configuration of the unified interface set in the bottom-layer operating environment of the target equipment.
In another implementation manner of the present invention, the test module is specifically configured to: performing current operation test on the current interface configuration of the unified interface set by using an interface test program; if the current run test is not passed, then a next run test is performed on the debugged interface configuration of the unified interface set.
In another implementation manner of the present invention, the obtaining module is specifically configured to: the interface test program of the unified interface set called for the device application layer component is obtained from the test service end and formulated for the running environment of the bottom layer of various devices, wherein the interface test program is utilized to carry out running test on the current interface configuration of the unified interface set, and the method further comprises the following steps: and if the current running test is passed, the code configured to the current interface of the traditional interface set on the test service terminal.
In another implementation manner of the present invention, the test module is specifically configured to: compiling the interface test program into a target language suitable for the bottom-layer operating environment of the target equipment; and calling the interface configuration of the unified interface set by using the compiled interface test program through a test interface of the bottom operating environment of the target equipment so as to carry out compatibility test.
In another implementation manner of the present invention, the target device bottom layer operating environment includes a hardware environment and an operating system environment, the unified interface set includes a first interface formulated for the hardware environment and a second interface formulated for the software environment, and the test module is specifically configured to: performing current test on the interface configuration of the second interface by using an interface test program; and if the current test is passed, testing the interface configuration of the first interface by using an interface test program.
In another implementation of the present invention, the test module is further configured to: and if the current test is not passed, carrying out the next test on the interface configuration of the second interface by using the interface test program.
In another implementation of the present invention, the unified interface set includes at least one of a real-time operating system interface, a library function interface, and a hardware interface.
In another implementation of the invention, the unified interface set includes a portable operating system interface.
In another implementation manner of the invention, the multiple device bottom layer operating environments comprise an intelligent device software operating environment and an intelligent device hardware operating environment.
The apparatus of this embodiment is used to implement the corresponding method in the foregoing method embodiments, and has the beneficial effects of the corresponding method embodiments, which are not described herein again. In addition, the functional implementation of each module in the apparatus of this embodiment can refer to the description of the corresponding part in the foregoing method embodiment, and is not described herein again.
FIG. 13 is a schematic flow chart of a testing apparatus according to another embodiment of the present invention. The test apparatus of fig. 13 may be adapted to test any suitable electronic device having data processing capabilities, including but not limited to servers, embedded devices, desktop computers, and the like. For example, the embedded device includes, but is not limited to, a mobile terminal (e.g., a mobile phone, a PAD, etc.), an internet of things device, an internet device, a stand-alone device, a car machine, a set-top box, etc. The internet of things devices include, but are not limited to, smart devices such as smart cameras, smart doors and windows, smart doorbells, smart watches, smart speakers, smart security devices, smart media devices, smart display screens, and the like, and detection devices. The device includes:
an obtaining module 1310 for obtaining a first interface test program of a first interface set called by a first device application layer component and a second interface test program of a second interface set called by a second device application layer component, wherein the first interface test program is formulated for a device bottom layer operating environment;
the testing module 1320 performs compatibility testing on the interface configuration of the first interface set in the device bottom layer operating environment and the interface configuration of the second interface set in the device bottom layer operating environment by using the first interface testing program and the second interface testing program, respectively.
Because the interface compatibility test is formulated for various equipment bottom layer operating environments, and the compatibility test is carried out on the target equipment bottom layer operating environment by using the interface set called by the equipment application layer component, the fragmentation of the equipment bottom layer operating environment is effectively reduced.
The apparatus of this embodiment is used to implement the corresponding method in the foregoing method embodiments, and has the beneficial effects of the corresponding method embodiments, which are not described herein again. In addition, the functional implementation of each module in the apparatus of this embodiment can refer to the description of the corresponding part in the foregoing method embodiment, and is not described herein again.
Fig. 14 is a schematic flow chart of a configuration device according to another embodiment of the present invention. The configuration apparatus of fig. 14 may be adapted to configure any suitable electronic device with data processing capabilities, including but not limited to servers, embedded devices, desktop computers, and the like. For example, the embedded device includes, but is not limited to, a mobile terminal (e.g., a mobile phone, a PAD, etc.), an internet of things device, an internet device, a stand-alone device, a car machine, a set-top box, etc. The internet of things devices include, but are not limited to, smart devices such as smart cameras, smart doors and windows, smart doorbells, smart watches, smart speakers, smart security devices, smart media devices, smart display screens, and the like, and detection devices. The device includes:
the determining module 1410 is used for determining a uniform interface set called by the device application layer components formulated for the multiple device bottom layer operating environments;
the configuration module 1420 configures interfaces for a target device bottom layer operating environment in the multiple device bottom layer operating environments by using the unified interface set.
Because the uniform interface set called by the device application layer component is formulated for various device bottom layer operating environments, fragmentation of the device bottom layer operating environments is effectively reduced for the application layer component.
The apparatus of this embodiment is used to implement the corresponding method in the foregoing method embodiments, and has the beneficial effects of the corresponding method embodiments, which are not described herein again. In addition, the functional implementation of each module in the apparatus of this embodiment can refer to the description of the corresponding part in the foregoing method embodiment, and is not described herein again.
Fig. 15 is a schematic flow diagram of a mounting device according to another embodiment of the present invention. The installation apparatus of fig. 15 may be adapted to install any suitable electronic device having data processing capabilities, including but not limited to servers, embedded devices, desktop computers, and the like. For example, the embedded device includes, but is not limited to, a mobile terminal (e.g., a mobile phone, a PAD, etc.), an internet of things device, an internet device, a stand-alone device, a car machine, a set-top box, etc. The internet of things devices include, but are not limited to, smart devices such as smart cameras, smart doors and windows, smart doorbells, smart watches, smart speakers, smart security devices, smart media devices, smart display screens, and the like, and detection devices. The device includes:
the determining module 1510 determines a set of uniform interfaces invoked by the device application layer components formulated for the various device underlying operating environments.
An installation module 1520 installs the device application layer component to a target device underlay operating environment of the plurality of device underlay operating environments.
Because the uniform interface set called by the device application layer component is formulated for various device bottom layer operating environments, fragmentation of the device bottom layer operating environments is effectively reduced for the application layer component.
The apparatus of this embodiment is used to implement the corresponding method in the foregoing method embodiments, and has the beneficial effects of the corresponding method embodiments, which are not described herein again. In addition, the functional implementation of each module in the apparatus of this embodiment can refer to the description of the corresponding part in the foregoing method embodiment, and is not described herein again.
Fig. 16 is a schematic flow chart of an electronic device according to another embodiment of the invention. The electronic device of fig. 16 may be any suitable electronic device with data processing capabilities including, but not limited to, servers, embedded devices, desktop computers, and the like. For example, the embedded device includes, but is not limited to, a mobile terminal (e.g., a mobile phone, a PAD, etc.), an internet of things device, an internet device, a stand-alone device, a car machine, a set-top box, etc. The internet of things devices include, but are not limited to, smart devices such as smart cameras, smart doors and windows, smart doorbells, smart watches, smart speakers, smart security devices, smart media devices, smart display screens, and the like, and detection devices. The electronic device includes:
a device application layer component 1610 having a unified interface set formulated for a variety of device bottom layer operating environments;
the target device bottom layer operating environment 1620 provides at least one calling interface in the unified interface set for the device application layer component to implement the function of the device application layer component.
Because the uniform interface set called by the device application layer component is formulated for various device bottom layer operating environments, fragmentation of the device bottom layer operating environments is effectively reduced for the application layer component.
In other words, the unified interface set performs interface compatibility tests through interface test programs formulated for various device bottom-layer operating environments, so that the same configuration of application program modules is realized. Therefore, independent development or parallel development of the application program module and the bottom layer operating environment of the intelligent device is realized, in other words, independent upgrade of the application program module and the bottom layer operating environment can be realized.
The apparatus of this embodiment is configured to implement a corresponding method in the foregoing method embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described herein again. In addition, the functional implementation of each module in the apparatus of this embodiment can refer to the description of the corresponding part in the foregoing method embodiment, and is not described herein again.
Fig. 17 is a schematic structural diagram of an electronic device according to another embodiment of the invention; the electronic device may include:
one or more processors 1701;
a computer-readable medium 1702, which may be configured to store one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the methods as in the embodiments described above.
Fig. 18 is a hardware configuration of an electronic apparatus of another embodiment of the present invention; as shown in fig. 18, the hardware structure of the electronic device may include: a processor 1801, a communications interface 1802, computer-readable media 1803, and a communications bus 1804;
wherein the processor 1801, the communication interface 1802, and the computer-readable medium 1803 are in communication with each other via a communication bus 1804;
alternatively, communication interface 1802 may be an interface of a communication module;
the processor 1801 may be specifically configured to: acquiring an interface test program of a uniform interface set called by an equipment application layer component, which is formulated for a plurality of equipment bottom layer operating environments; aiming at the target equipment bottom layer operation environment in the multiple equipment bottom layer operation environments, performing compatibility test on the interface configuration of the unified interface set in the target equipment bottom layer operation environment by using the interface test program, or,
acquiring a first interface test program which is formulated for a device bottom layer operating environment and is specific to a first interface set called by a first device application layer component and a second interface test program which is specific to a second interface set called by a second device application layer component; respectively utilizing the first interface test program and the second interface test program to perform compatibility test on the interface configuration of the first interface set in the equipment bottom layer operating environment and the interface configuration of the second interface set in the equipment bottom layer operating environment, or,
determining a uniform interface set called by equipment application layer components formulated for various equipment bottom layer operating environments; interface configuration is carried out on the bottom layer operation environment of the target equipment in the bottom layer operation environments of the various equipment by utilizing the unified interface set, or,
determining a uniform interface set called by equipment application layer components formulated for various equipment bottom layer operating environments; installing the device application layer component to a target device underlay operating environment of the plurality of device underlay operating environments, or,
the method comprises the steps that an equipment application layer assembly determines at least one interface in a unified interface set of the equipment application layer assembly, wherein the unified interface set is formulated aiming at a plurality of equipment bottom layer operating environments; and the device application layer component calls at least one interface to run in a target device bottom layer running environment in the multiple device bottom layer running environments so as to realize the functions of the device application layer component.
The Processor 1801 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The computer-readable medium 1803 may be, but is not limited to, a Random Access Memory (RAM), a Read-Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code configured to perform the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section, and/or installed from a removable medium. The computer program performs the above-described functions defined in the method of the present invention when executed by a Central Processing Unit (CPU). It should be noted that the computer readable medium of the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access storage media (RAM), a read-only storage media (ROM), an erasable programmable read-only storage media (EPROM or flash memory), an optical fiber, a portable compact disc read-only storage media (CD-ROM), an optical storage media piece, a magnetic storage media piece, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code configured to carry out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may operate over any of a variety of networks: including a Local Area Network (LAN) or a Wide Area Network (WAN) -to the user's computer, or alternatively, to an external computer (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions configured to implement the specified logical function(s). In the above embodiments, specific precedence relationships are provided, but these precedence relationships are only exemplary, and in particular implementations, the steps may be fewer, more, or the execution order may be modified. That is, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The names of these modules do not in some cases constitute a limitation of the module itself.
As another aspect, the present invention also provides a computer-readable medium on which a computer program is stored, which when executed by a processor implements the method as described in the above embodiments.
As another aspect, the present invention also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: acquiring an interface test program of a uniform interface set called by an equipment application layer component, which is formulated for a plurality of equipment bottom layer operating environments; aiming at the target equipment bottom layer operation environment in the multiple equipment bottom layer operation environments, performing compatibility test on the interface configuration of the unified interface set in the target equipment bottom layer operation environment by using the interface test program, or,
acquiring a first interface test program which is formulated for a device bottom layer operating environment and is specific to a first interface set called by a first device application layer component and a second interface test program which is specific to a second interface set called by a second device application layer component; and respectively utilizing the first interface test program and the second interface test program to carry out compatibility test on the interface configuration of the first interface set in the equipment bottom layer operating environment and the interface configuration of the second interface set in the equipment bottom layer operating environment.
The expressions "first", "second", "said first" or "said second" used in various embodiments of the present disclosure may modify various components regardless of order and/or importance, but these expressions do not limit the respective components. The above description is only configured for the purpose of distinguishing elements from other elements. For example, the first user equipment and the second user equipment represent different user equipment, although both are user equipment. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of the present disclosure.
When an element (e.g., a first element) is referred to as being "operably or communicatively coupled" or "connected" (operably or communicatively) to "another element (e.g., a second element) or" connected "to another element (e.g., a second element), it is understood that the element is directly connected to the other element or the element is indirectly connected to the other element via yet another element (e.g., a third element). In contrast, it is understood that when an element (e.g., a first element) is referred to as being "directly connected" or "directly coupled" to another element (a second element), no element (e.g., a third element) is interposed therebetween.
The foregoing description is only exemplary of the preferred embodiments of the invention and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention according to the present invention is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the scope of the invention as defined by the appended claims. For example, the above features and (but not limited to) features having similar functions disclosed in the present invention are mutually replaced to form the technical solution.