CN109766278A - The backstage gateway WEB automatic test approach based on OSGI frame - Google Patents
The backstage gateway WEB automatic test approach based on OSGI frame Download PDFInfo
- Publication number
- CN109766278A CN109766278A CN201910024109.1A CN201910024109A CN109766278A CN 109766278 A CN109766278 A CN 109766278A CN 201910024109 A CN201910024109 A CN 201910024109A CN 109766278 A CN109766278 A CN 109766278A
- Authority
- CN
- China
- Prior art keywords
- plug
- unit
- gateway
- osgi
- frame
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Stored Programmes (AREA)
Abstract
The invention discloses a kind of backstage the gateway WEB automatic test approach based on OSGI frame comprising the steps of: test platform is built based on OSGI frame;Probe card is tested line by line according to operator's specification in platform, converts JSON parameter format for the POST parameter format that webpage is submitted;It sends the JSON format converted in the API of gateway system, modifies the relevant configuration of gateway, and operating result is returned into plug-in unit;If return the result is that OK, whether effectively plug-in unit will continue to issue inspection issues configuration request, otherwise direct Fail;Tester inquires dependence test as a result, modifying to plug-in unit test content by cloud platform, configures.The present invention uses the Java mobilism modular system based on OSGI frame, and test item can be freely combined and do not need exploitation environment, do not need to restart gateway, substantially increase the working efficiency and test accuracy of tester.
Description
Technical field
The present invention relates to a kind of automatic test approach, especially a kind of backstage gateway WEB based on OSGI frame is certainly
Dynamic test method.
Background technique
With the development that gateway product makes rapid progress, the software size and complexity of gateway are also constantly to rise,
In in the WEB function of test gateway the cost of labor that is spent will be gradually increased, using the means manually tested
Test request is not adapted to, the efficiency of test can be improved using automatic test means, also can guarantee the correct of test
Property and reliability.The JS test automation on the foreground WEB is popularized at present, but the interaction on the foreground WEB and gateway backstage
Test still rarely have more effective automated testing method.
It is mostly as follows that solution examination scheme is surveyed in existing automation:
1, the integration environment or tool environment are installed;
2, new construction develops automatized script or application program in engineering;
3, result is checked after operation program debugging after the completion.
Such scheme has some disadvantages:
1, it needs to occupy installation environment when testing, occupies business tool and run resource.
2, code calls, which improve, to be safeguarded for tester.
3, exploitation environment can not automatically save test data and be used to consult later.
Therefore need to develop a kind of backstage gateway WEB automatic test approach based on OSGI frame, before Lai Tigao WEB
The efficiency of the test of the interaction on platform and gateway backstage.
Summary of the invention
The automatic survey in the backstage gateway WEB based on OSGI frame that technical problem to be solved by the invention is to provide a kind of
Method for testing substantially increases the working efficiency and test accuracy of tester.
In order to solve the above technical problems, the technical scheme adopted by the invention is that:
A kind of backstage gateway WEB automatic test approach based on OSGI frame, it is characterised in that comprise the steps of:
Step 1: test platform is built based on OSGI frame;
Step 2: probe card is tested line by line according to operator's specification in platform, the POST parameter format that webpage is submitted
It is converted into JSON parameter format;
Step 3: it sends the JSON format converted in the API of gateway system, the correlation for modifying gateway is matched
It sets, and operating result is returned into plug-in unit;
Step 4: if return the result is that OK, whether effectively plug-in unit will continue to issue inspection issues configuration request, otherwise directly
Meet Fail;
Step 5: tester inquires dependence test as a result, modifying to plug-in unit test content by cloud platform, configures.
Further, in the step 1, OSGI framework services platform provides service to Java, and Java is provided multiple flat
The portability of platform support product.
Further, the OSGI frame uses the embedded OSGI frame of typical Felix, using Eclipse conduct
The developing instrument of Java, and the embedded OSGI frame of Felix is built in Eclipse.
Further, the embedded OSGI frame build process of the Felix is
In Eclipse developing instrument, Felix.jar is added in the compiling path of engineering;
It develops in environment using Felix as frame, when the plug-in component operation for compiling out, Felix.jar is put into Java Virtual Machine
Middle operation;
Java Virtual Machine shields information relevant to platform specific, guarantees that Java can be compiled once, runs everywhere, uses
Java Virtual Machine runs identical plug-in unit on the upper layer of gateway, it is only necessary to open for the specified specification of client or operator
Send out the api interface function called for plug-in unit.
Further, the plug-in unit includes system plugin, base insert, device plug-in unit and user's plug-in unit,
System plugin and base insert are provided by major operator;
Device plug-in unit realizes that library file of the whole system from the language call C language of java, device plug-in unit state out C language
All called functions in the library lib, in the library file of initial stage load lib;
User's plug-in unit is mainly probe card, by operator's offer or self-developing.
Further, the step 3 is specially and sends the JSON format converted in the API of gateway system,
The API of gateway exists in the form of LIB dynamic base, and plug-in unit calls the API in the library LIB, and the correlation for modifying gateway is matched
It sets, after gateway has executed operation, the result OK or Fail of operation is returned into plug-in unit.
Further, the step 4 is specially that relevant configured parameter is returned to plug-in unit with JSON format by gateway,
Plug-in unit be compared whether and the parameter that configures before coincide, be otherwise Fail if result of coincideing is OK, if the knot returned
Fruit is OK, and whether effectively plug-in unit will continue to issue inspection issues configuration request, otherwise direct Fail.
Further, during the initiation parameter configuration and inspection of the step 3 and step 4 issue configuration effectively,
Gateway can be by interactive process synchronized upload into specified Cloud Server;Returning to implementing result and back-checking result
In the process, plug-in unit feeds back interactive process information on the http-server of plug-in unit, is intuitively looked into for tester using browser
Ask webpage comparing result.
Compared with prior art, the present invention having the following advantages that and effect: the gateway of the invention based on OSGI frame is set
The standby backstage WEB automatic test approach uses the Java mobilism modular system based on OSGI frame, and test can be freely combined
?.All test results can intuitively compare and upload server, probe card can also be modified inside server, then more
Newly into gateway, whole process does not need exploitation environment, does not need to restart gateway, substantially increases tester's
Working efficiency and test accuracy.
Detailed description of the invention
Fig. 1 is the process frame diagram of the backstage the gateway WEB automatic test approach of the invention based on OSGI frame.
Fig. 2 is that the POST parameter format of the embodiment of the present invention is converted into JSON parameter format schematic diagram.
Specific embodiment
Below by embodiment, the present invention is described in further detail, following embodiment be explanation of the invention and
The invention is not limited to following embodiments.
The present invention be directed to there are the phenomenon that and disadvantage, propose use OSGI (Open Service Gateway
Initiative it) under frame, according to the specification of Java mobilism modular system, is serviced using its deployment management provided etc.,
It is mainly bundle using deployment format.It can quilt because bundles and respective resources can be connected by such deployment file
The single delivery installed and uninstalled forms a kind of application level function form that can be assembled, be combined at any time, secondly, OSGI
Bundle can have under frame " hot plug " characteristic, can dynamically install, start, stop, updating and unload, it is entire to be
System is without restarting.This is just to realize that each WEB page backstage is independent or batch testing provides the foundation.
As shown in Figure 1, a kind of backstage gateway WEB automatic test approach based on OSGI frame of the invention, includes
Following steps:
Step 1: test platform is built based on OSGI frame;
OSGI (Open Service Gateway Initiative) technology is a series of rule of Java mobilism modular system
Model.OSGI on the one hand refer to maintenance OSGI specification alliance, OSGI official, on the other hand refer to the organizational protection based on Java
The service (business) of language standardizes.In simple terms, OSGI may be considered the module layer of Java platform.
OSGI service platform provides service to Java, these services make first choice of the Java as Integrated Simulation and software development
Environment.Java, which is provided, supports the portability of product in multiple platforms.The embedded OSGI frame of typical Felix is used in the present invention
Frame, the developing instrument using Eclipse as Java, but Eclipse default does not support the frame, needs voluntarily to build, and grasps
Making step is exactly that Felix.jar is added in the compiling path of engineering in Eclipse developing instrument.Because developing environment
In using Felix as frame, then compile out plug-in component operation when, it is also desirable to Felix.jar is put into Java Virtual Machine
Operation.
JVM:Java virtual machine shields information relevant to platform specific, guarantees that Java " can once be compiled, everywhere
Operation ".Difference relevant to platform once big advantage is a cancellation using the frame of OSGI.What gateway product of today used
Platform comes in every shape, if developed in the SDK of each manufacturer, will cause very big workload.Using JVM in net
The upper layer for closing equipment runs identical plug-in unit, then only needing the specification specified for client or operator, develops for inserting
The api interface function that part calls.
Plug-in unit part includes system plugin, base insert, official's plug-in unit, user's plug-in unit etc..Each user's plug-in unit
One or a series of WEB test item are represented, the plug-in unit used in the present system is jar APMB package.
System plugin and base insert official plug-in unit etc. are provided by major operator, such as are used in the present system
Management plug-in unit, the plug-in unit mainly have following functions: message management (MsgConfig), installation (Install), upgrading
(Upgrade), it unloads (Ininstall), restore (Loaddefault), run (Run), stop functions such as (Stop), mainly
The state for carrying out the plug-in component operation of maintenance and management user belongs to system basic plug.
In order to realize library file of the whole system from the language call C language of java, also needed in this system using
Device plug-in unit, plug-in unit needs state out called function all in the library C language lib, initial stage load lib's
Library file, if the not load of the plug-in unit, can directly result in probe card and exit report when user's plug-in unit uses test function
It is wrong.
User's plug-in unit is mainly probe card, can be operator's offer, is also possible to self-developing, introduces as follows
Wlan plug-in unit belongs to operator and downloads installation in official website, and inside contains to be tested all wireless needed for operator
Parameter testing use-case can adjust the library file shown a C language by the service framework of bundle, to realize in plug-in unit indirectly
The function of test function automatic test gateway product.
Step 2: probe card is tested line by line according to operator's specification in platform, the POST parameter that webpage is submitted
Format conversion is JSON parameter format;As illustrated in fig. 2, it is assumed that being tested with wireless parameter therein configuration, plug-in unit will originally
JSON parameter format is converted by the POST parameter format that webpage is submitted, each key parameter contains corresponding numerical value.
Step 3: it sends the JSON format converted in the API of gateway system, the API of gateway is with LIB
The form of dynamic base exists, and plug-in unit calls the API in the library LIB, modifies the relevant configuration of gateway.Such as get
" wlWpaPsk " corresponding value is " 12345678 ", gateway calls the physical layer interface of oneself by the close of wireless corresponding configuration
Code is modified.After gateway has executed operation, the result OK or Fail of operation are returned into plug-in unit.
Step 4: it sends the JSON format converted in the API of gateway system, the API of gateway is with LIB
The form of dynamic base exists, and plug-in unit calls the API in the library LIB, modifies the relevant configuration of gateway, gateway has executed behaviour
After work, the result OK or Fail of operation are returned into plug-in unit.
Step 5: tester inquires dependence test as a result, modifying to plug-in unit test content by cloud platform, matches
It sets.It by downloading on platform, unloads, installs, operation activates step, and the plug-in unit for updating test is tested into gateway.
During the initiation parameter configuration and inspection of step 3 and step 4 issue configuration effectively, gateway can will be handed over
Mutual process synchronized upload is into specified Cloud Server;During returning to implementing result and back-checking result, plug-in unit will
Interactive process information is fed back on the http-server of plug-in unit, uses the intuitive query webpage comparison knot of browser for tester
Fruit.
Gateway WEB backstage automatic test approach based on OSGI frame of the invention is used based on OSGI frame
Java mobilism modular system, can be freely combined test item.All test results can intuitively compare and upload service
Device can also modify probe card inside server, then update in gateway, and whole process does not need exploitation environment,
It does not need to restart gateway, substantially increases the working efficiency and test accuracy of tester.
Alternative can be used in the method for not being related to the modification configuration of OSGI frame part in the present invention, for example calls
Tr069 configuration.
Above content is only illustrations made for the present invention described in this specification.Technology belonging to the present invention
The technical staff in field can do various modifications or supplement or is substituted in a similar manner to described specific embodiment, only
It should belong to guarantor of the invention without departing from the content or beyond the scope defined by this claim of description of the invention
Protect range.
Claims (8)
1. a kind of backstage gateway WEB automatic test approach based on OSGI frame, it is characterised in that comprise the steps of:
Step 1: test platform is built based on OSGI frame;
Step 2: probe card is tested line by line according to operator's specification in platform, the POST parameter format that webpage is submitted
It is converted into JSON parameter format;
Step 3: it sends the JSON format converted in the API of gateway system, the correlation for modifying gateway is matched
It sets, and operating result is returned into plug-in unit;
Step 4: if return the result is that OK, whether effectively plug-in unit will continue to issue inspection issues configuration request, otherwise directly
Meet Fail;
Step 5: tester inquires dependence test as a result, modifying to plug-in unit test content by cloud platform, configures.
2. the backstage the gateway WEB automatic test approach described in accordance with the claim 1 based on OSGI frame, feature exist
In: in the step 1, OSGI framework services platform provides service to Java, and Java offer can multiple platforms support product
Transplantability.
3. the backstage the gateway WEB automatic test approach based on OSGI frame, feature exist according to claim 2
In: the OSGI frame uses the embedded OSGI frame of typical Felix, the developing instrument using Eclipse as Java, and
The embedded OSGI frame of Felix is built in Eclipse.
4. the backstage the gateway WEB automatic test approach described in accordance with the claim 3 based on OSGI frame, feature exist
In: the embedded OSGI frame build process of Felix is
In Eclipse developing instrument, Felix.jar is added in the compiling path of engineering;
It develops in environment using Felix as frame, when the plug-in component operation for compiling out, Felix.jar is put into Java Virtual Machine
Middle operation;
Java Virtual Machine shields information relevant to platform specific, guarantees that Java can be compiled once, runs everywhere, uses
Java Virtual Machine runs identical plug-in unit on the upper layer of gateway, it is only necessary to open for the specified specification of client or operator
Send out the api interface function called for plug-in unit.
5. the backstage the gateway WEB automatic test approach based on OSGI frame, feature exist according to claim 4
In: the plug-in unit includes system plugin, base insert, device plug-in unit and user's plug-in unit,
System plugin and base insert are provided by major operator;
Device plug-in unit realizes that library file of the whole system from the language call C language of java, device plug-in unit state out C language
All called functions in the library lib, in the library file of initial stage load lib;
User's plug-in unit is mainly probe card, by operator's offer or self-developing.
6. the backstage the gateway WEB automatic test approach described in accordance with the claim 1 based on OSGI frame, feature exist
In: the step 3 is specially to send the JSON format converted in the API of gateway system, the API of gateway
Exist in the form of LIB dynamic base, plug-in unit calls the API in the library LIB, modifies the relevant configuration of gateway, gateway is held
It has gone after operation, the result OK or Fail of operation is returned into plug-in unit.
7. the backstage the gateway WEB automatic test approach described in accordance with the claim 1 based on OSGI frame, feature exist
It is specially that relevant configured parameter is returned to plug-in unit with JSON format by gateway in: the step 4, plug-in unit, which is compared, is
The no and parameter that configures before is coincide, and is otherwise Fail if result of coincideing is OK, if return the result is that OK, plug-in unit will
Continue to issue inspection and issue configuration whether effectively request, otherwise direct Fail.
8. the backstage the gateway WEB automatic test approach described in accordance with the claim 1 based on OSGI frame, feature exist
In: during the initiation parameter configuration and inspection of the step 3 and step 4 issue configuration effectively, gateway can will be handed over
Mutual process synchronized upload is into specified Cloud Server;During returning to implementing result and back-checking result, plug-in unit will
Interactive process information is fed back on the http-server of plug-in unit, uses the intuitive query webpage comparison knot of browser for tester
Fruit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910024109.1A CN109766278A (en) | 2019-01-10 | 2019-01-10 | The backstage gateway WEB automatic test approach based on OSGI frame |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910024109.1A CN109766278A (en) | 2019-01-10 | 2019-01-10 | The backstage gateway WEB automatic test approach based on OSGI frame |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109766278A true CN109766278A (en) | 2019-05-17 |
Family
ID=66453742
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910024109.1A Pending CN109766278A (en) | 2019-01-10 | 2019-01-10 | The backstage gateway WEB automatic test approach based on OSGI frame |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109766278A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111404778A (en) * | 2020-03-12 | 2020-07-10 | 深圳市吉祥腾达科技有限公司 | Gateway testing method and device and computer readable storage medium |
CN112187580A (en) * | 2020-09-29 | 2021-01-05 | 苏州迈科网络安全技术股份有限公司 | Automatic testing framework and testing method for gateway plug-in |
CN112231010A (en) * | 2020-09-28 | 2021-01-15 | 四川新网银行股份有限公司 | Application configuration information management and dynamic updating method based on OSGI (open service gateway initiative) specification |
CN113315681A (en) * | 2021-05-28 | 2021-08-27 | 深圳市吉祥腾达科技有限公司 | Automatic testing method and system based on intelligent home gateway plug-in |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1842772A (en) * | 2004-02-25 | 2006-10-04 | 三星电子株式会社 | Method of testing open services gateway initiative service platform and test tool using the method |
WO2009014367A2 (en) * | 2007-07-23 | 2009-01-29 | Samsung Electronics Co., Ltd. | Method and apparatus for managing access privilege in cldc osgi environment |
CN102323879A (en) * | 2011-06-07 | 2012-01-18 | 北京大学 | Complete network middleware operation support platform and integration method of heterogeneous middleware |
-
2019
- 2019-01-10 CN CN201910024109.1A patent/CN109766278A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1842772A (en) * | 2004-02-25 | 2006-10-04 | 三星电子株式会社 | Method of testing open services gateway initiative service platform and test tool using the method |
WO2009014367A2 (en) * | 2007-07-23 | 2009-01-29 | Samsung Electronics Co., Ltd. | Method and apparatus for managing access privilege in cldc osgi environment |
CN102323879A (en) * | 2011-06-07 | 2012-01-18 | 北京大学 | Complete network middleware operation support platform and integration method of heterogeneous middleware |
Non-Patent Citations (1)
Title |
---|
李炎: "基于OSGI的家庭网关的研究和应用", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111404778A (en) * | 2020-03-12 | 2020-07-10 | 深圳市吉祥腾达科技有限公司 | Gateway testing method and device and computer readable storage medium |
CN112231010A (en) * | 2020-09-28 | 2021-01-15 | 四川新网银行股份有限公司 | Application configuration information management and dynamic updating method based on OSGI (open service gateway initiative) specification |
CN112231010B (en) * | 2020-09-28 | 2023-06-06 | 四川新网银行股份有限公司 | Method for managing and dynamically updating application configuration information based on OSGI (open service gateway initiative) specification |
CN112187580A (en) * | 2020-09-29 | 2021-01-05 | 苏州迈科网络安全技术股份有限公司 | Automatic testing framework and testing method for gateway plug-in |
CN113315681A (en) * | 2021-05-28 | 2021-08-27 | 深圳市吉祥腾达科技有限公司 | Automatic testing method and system based on intelligent home gateway plug-in |
CN113315681B (en) * | 2021-05-28 | 2022-11-08 | 深圳市吉祥腾达科技有限公司 | Automatic testing method and system based on intelligent home gateway plug-in |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109766278A (en) | The backstage gateway WEB automatic test approach based on OSGI frame | |
CN102662705B (en) | System and method for upgrading system environment of computer cluster | |
US8549490B2 (en) | Static code analysis for packaged application customization | |
CN107832207A (en) | Interface performance test method, apparatus, storage medium and computer equipment | |
CN109002295A (en) | A kind of static code scan method, system, server and storage medium | |
CN106648755B (en) | Method and device for dynamically loading dex in android art environment | |
CN101145982A (en) | A general gateway design method based on object model and protocol dynamic component configuration | |
CN106502713A (en) | A kind of method for upgrading software and system | |
CN105302722A (en) | CTS automatic test method and apparatus | |
CN103186463B (en) | Determine the method and system of the test specification of software | |
CN110134612A (en) | UI test data generating method, device, equipment and readable storage medium storing program for executing | |
CN106535221A (en) | Resource management method and device, and multimode soft base station unified webmaster | |
CN111026638A (en) | Webpage automatic testing method and device, electronic equipment and storage medium | |
CN105760300A (en) | Automatic STK/UTK service testing method and system | |
CN112114896A (en) | Plug-in framework and method for service function expansion | |
CN110109684B (en) | Block chain link point management proxy service installation method, electronic device and storage medium | |
CN107977243A (en) | A kind of third party's interface call method and device | |
CN112231206A (en) | Script editing method for application program test, computer readable storage medium and test platform | |
CN103812905A (en) | Internet of things terminal application integrated generation system and method | |
CN118170431B (en) | Cross-operating system service migration method and device and electronic equipment | |
CN115357258B (en) | Application deployment method and device, storage medium and electronic device | |
CN111427770B (en) | Resource testing method and related equipment | |
US12039473B2 (en) | Software development project infrastructure builder tool | |
CN114996039A (en) | Cloud native system joint debugging method, system and medium based on third-party system docking | |
CN115509545A (en) | IOS application packaging construction method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20191107 Address after: 226000 Zhongtian Industrial Park, Hekou Town, Rudong, Nantong, Jiangsu Applicant after: ZHONGTIAN BROADBAND TECHNOLOGY Co.,Ltd. Applicant after: Zhongtian Communication Technology Co.,Ltd. Address before: 226000 Zhongtian Industrial Park, Hekou Town, Rudong, Nantong, Jiangsu Applicant before: ZHONGTIAN BROADBAND TECHNOLOGY Co.,Ltd. |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190517 |