CN103164324B - Microblog test method and device - Google Patents
Microblog test method and device Download PDFInfo
- Publication number
- CN103164324B CN103164324B CN201110409309.2A CN201110409309A CN103164324B CN 103164324 B CN103164324 B CN 103164324B CN 201110409309 A CN201110409309 A CN 201110409309A CN 103164324 B CN103164324 B CN 103164324B
- Authority
- CN
- China
- Prior art keywords
- test
- microblogging
- data
- fit
- test case
- 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.)
- Active
Links
Landscapes
- Storage Device Security (AREA)
Abstract
The invention discloses a microblog test method and a device and belongs to the technical field of microblog. The method includes the steps of obtaining a microblog test case selected by a user by a framework for integrated test (FIT), sending a test entrance parameter carried by the microblog test case to a test module by the FIT, receiving the test entrance parameter by the test module, obtaining a microblog operating request through encapsulation of the test entrance parameter, sending the microblog operating request to a microblog server, receiving a microblog operation response returned by the microblog server by the test module, sending data to the FIT after the data are extracted from the microblog operation response, receiving the data by the FIT, comparing anticipatory data corresponding to the microblog test case with the data, and obtaining a test result of the microblog test case. The device comprises the FIT and the test module. The microblog test method and the device has the advantages of being capable of achieving automatically testing of the microblog, greatly reducing test cost and improving test efficiency compared with a mode of manual test.
Description
Technical field
The present invention relates to technical field of microblog, particularly to a kind of microblog test method and device.
Background technology
Microblogging (microblog) is the abbreviation of micro-blog, it be an Information Sharing based on customer relationship, propagation and
Obtain platform, user can (Wireless Application Protocol, wireless application be assisted by WEB (World Wide Web), WAP
View) and the personal community of various client establishment, with the word fresh information about 140 words, and realize immediately sharing.
At present, microblogging is carried out testing mainly testing by the way of manual, but, with logic function complexity
Be gradually increased, the cost more and more higher of manual test, efficiency has also declined accordingly.
Content of the invention
Embodiments provide a kind of microblog test method and device, to realize the automatic test of microblogging.Described
Technical scheme is as follows:
On the one hand, a kind of microblog test method, including:
FIT integration testing framework obtains the microblogging test case that user selects;
The test access parameter that described microblogging test case carries is sent to test module by described FIT;
Described test module receives described test access parameter, described test access parameter is packaged process obtain micro-
Rich operation requests, described microblogging operation requests are sent to micro blog server;
Described test module receives the microblogging operation response that described micro blog server returns, from the operation response of described microblogging
It is sent to described FIT after extracting data;
Described FIT receives described data, and corresponding with described microblogging test case for described data anticipatory data is made comparisons,
Obtain the test result of described microblogging test case.
On the other hand, a kind of microblogging test device, described device includes:FIT integration testing framework and test module;
Described FIT, for obtaining the microblogging test case of user's selection, the test that described microblogging test case is carried enters
Mouth parameter is sent to described test module, receives the data that described test module returns, by described data and described microblogging test
The corresponding anticipatory data of use-case is made comparisons, and obtains the test result of described microblogging test case;
Described test module, for receiving the test access parameter that described FIT sends, is carried out to described test access parameter
Encapsulation process obtains microblogging operation requests, and described microblogging operation requests are sent to micro blog server, receives described microblogging service
The microblogging operation response that device returns, is sent to described FIT after extracting described data from the operation response of described microblogging.
The beneficial effect that technical scheme provided in an embodiment of the present invention is brought is:User operation is responded by FIT, by microblogging
The test access parameter that test case carries is sent to test module, is handed over micro blog server after being processed by test module
Mutually, obtain the data of micro blog server return, this data is returned to FIT, carried out it with anticipatory data by FIT by test module
Obtain microblogging test result more afterwards it is achieved that the automatic test of microblogging, compared with the mode of manual test, greatly reduce
The cost of test, and improve testing efficiency, testing while complexity rises it is also possible to ensure higher test effect
Rate.
Brief description
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, will make to required in embodiment description below
Accompanying drawing be briefly described it should be apparent that, drawings in the following description are only some embodiments of the present invention, for
For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings
Accompanying drawing.
Fig. 1 is the flow chart of the microblog test method that one embodiment of the invention provides;
Fig. 2 is the flow chart of the microblog test method that another embodiment of the present invention provides;
Fig. 3 is the schematic diagram that page presentation microblogging provided in an embodiment of the present invention logs in test use cases;
Fig. 4 is the structure chart of the microblogging test device that further embodiment of this invention provides;
Fig. 5 is the structure chart of the microblogging test device that yet another embodiment of the invention provides.
Specific embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention
Formula is described in further detail.
The present embodiments relate to FIT (Framework for Integrated Test, integration testing framework).Use
FIT can write test case, and whether the software in order to confirm exploitation meets the function needed for user.FIT be one soft
Part functional entity, it can read the table in HTML (HyperText Markup Language, HTML) file
Lattice, for each form, the fixture (device) that can be write by a programmer is explaining.This fixture can drive tested
The system of examination the test case being given in form is tested.Fixture serves as between Fit form and tested test system
Medium, plays coordinative role, completes the test providing in form.
Referring to Fig. 1, one embodiment of the invention provides a kind of microblog test method, including:
101:FIT obtains the microblogging test case that user selects.
102:The test access parameter that this microblogging test case carries is sent to test module by FIT.
103:Test module receives this test access parameter, this test access parameter is packaged with process and obtains microblogging behaviour
Ask, this microblogging operation requests is sent to micro blog server.
104:Test module receives the microblogging operation response that micro blog server returns, and extracts from the operation response of this microblogging
It is sent to FIT after data.
105:FIT receives this data, corresponding with above-mentioned microblogging test case for this data anticipatory data is made comparisons, obtains
The test result of microblogging test case.
Wherein, microblogging test case is the use-case for microblogging test write using FIT in advance.Described microblogging test is used
Example can be one or more test case.Specifically, in test, user can be in the multiple microblogging tests finished in advance
Select one in use-case to be tested.
In the present embodiment, each test case has test access parameter and anticipatory data.Described test access parameter
For input information, when user selects certain microblogging test case, need to input corresponding parameter and carry out as test access parameter
Test.For example, when logging in test case using microblogging, user needs to input login name and password.Described anticipatory data refers to
The correct response data of current test case, if the data that test result obtains is consistent with this anticipatory data, shows to test
Success, otherwise, shows test crash.
Described test module be develop in advance for test software module, in embodiments of the present invention, including for
The various logic of microblogging test, is related to the various operations of microblogging, such as logs in, reads and writes, relaying, talking with, pulling etc., the present invention couple
This does not limit.
User in the embodiment of the present invention refers to carry out the tester of microblogging test, the fitnesse being provided by FIT
The page carries out test operation, and can check corresponding test result on this page.
In the present embodiment, described FIT and test module may be located in a server, such as in microblogging testing service device.
The said method that the present embodiment provides, responds user operation by FIT, and the test that microblogging test case is carried enters
Mouth parameter is sent to test module, interacts with micro blog server after being processed by test module, obtains micro blog server and returns
Data, this data returns to FIT by test module, obtains microblogging test knot after being compared itself and anticipatory data by FIT
Fruit, it is achieved that the automatic test of microblogging, compared with the mode of manual test, significantly reduces the cost of test, and carries
High testing efficiency, is testing while complexity rises it is also possible to ensure higher testing efficiency.
Referring to Fig. 2, another embodiment of the present invention provides a kind of microblog test method, including:
201:FIT obtains the microblogging test case that user selects.
In the present embodiment, FIT provides the Fitnesse page to user, shows that the microblogging writing in advance is surveyed in this page
Example on probation, can be one or more of.
For example, with reference to Fig. 3, the Fitnesse page providing for FIT is shown microblogging logs in the schematic diagram of test use cases.
Wherein, microblogging login test use cases include 4 microblogging test cases, respectively:Code error, needs input validation code, not
Open microblogging, normal login.Certainly, in actual applications, other microblogging test cases can also be write, the present invention does not limit to this
Fixed.
Generally, user selects a test case to be tested in a plurality of test case that FIT provides.If user
Need multiple test cases to be tested simultaneously, then can write script in advance and the plurality of test case is integrated, and lead to
Cross and execute this script to realize selecting the plurality of test case to be tested.
202:FIT determines corresponding function according to the microblogging test case obtaining, by calling this function by microblogging
The test access parameter that test case carries is sent to test module.
In the present embodiment, test module provides multiple functions to call for FIT, and generally, each function has correspondence
Test case, when certain test cases many are tested, just call corresponding function to execute.Specifically when calling, FIT
The parameter that user is inputted on the Fitnesse page, as test access parameter, to call corresponding function, thus this is surveyed
Examination suction parameter is sent to test module.
For example, in Fig. 3, whether microblogging is normally logged in when testing, user inputs user name on the Fitnesse page
1273416652 and password test00 two parameters, FIT is with this username and password for the corresponding letter of test access parameter call
Number testApp.LoginInputCollection, wherein, suction parameter user of this function is 1273416652, password
For test00, carry out the test of microblogging login by executing this function.
203:Test module receives this test access parameter, and the type of this test access parameter is verified, and verification is logical
The test access parameter crossed, as valid data, the respective attributes of specified class object is entered as described valid data, then
Class object after assignment is used preassigned key to be encrypted as inclusion.
Wherein it is intended that class object be test module preassigned, the present invention does not limit to this.Described key is also pre-
First specify, the present invention does not also limit to this.
204:Test module is packaged processing to the inclusion after encryption.
Specifically, can be according to WUP (Wireless Uni-Protocol, Multi-Radio Unification Protocol) to the data after encryption
It is packaged processing, wherein, WUP is command word (Command) the layer protocol encapsulation based on jce coding.
205:Test module is data setting packet header and the inclusion after encapsulation, obtains microblogging operation requests, by HTTP
This microblogging operation requests is sent to micro blog server by (HyperText Transfer Protocol, HTML (Hypertext Markup Language))
ClientServer.
206:After micro blog server receives this microblogging operation requests, this microblogging operation requests is responded and returned to survey
Die trial block;Test module receives the microblogging operation response that micro blog server returns.Wherein, this microblogging operation response in include micro-
The data that rich server returns, this data is to carry out responding the data obtaining according to this request, during as logging request, response data
For logining successfully or failure and account ID (Account id) etc., when pulling list operation, response data is this list etc.
Deng.
207:Test module parses to the operation response of this microblogging according to WUP, extracts inclusion.
208:Test module is decrypted to this inclusion using the key using during described encryption, from the inclusion after deciphering
Extract data.
209:Test module is by the data is activation extracting to FIT.
210:FIT receives this data that test module is sent, by corresponding with described microblogging test case for this data expection
Data is made comparisons, if result of the comparison is unanimously it is determined that the test result of this microblogging test case is successfully;If compared
Result is inconsistent it is determined that the test result of this microblogging test case is unsuccessfully.
Further, user is checked and is analyzed for convenience, can also be shown on the Fitnesse page, its
In, test return value and the expected value of microblogging test case can be included, thus intuitively obtaining test result.
For example, with reference to table 1, it is that the test result of microblogging login test case shows.
Table 1
Wherein, test access parameter be user name user and password password, return parameterss be packgeRet and
ReqRet, in this reqRet parameter place table entries, the numerical value of top is expected value, and lower section is actual return value, and the two is consistent
Be successfully tested, the two inconsistent test crash.
Further, test result can also be generated journal file log by FIT, checked for user, analyzed and managed
Reason.Especially, when the test case of execution failure occurs, outputting log file, in order to customer analysis execute unsuccessfully former
Cause, orientation problem.
The said method that the present embodiment provides, responds user operation by FIT, and the test that microblogging test case is carried enters
Mouth parameter is sent to test module, interacts with micro blog server after being processed by test module, obtains micro blog server and returns
Data, this data returns to FIT by test module, obtains microblogging test knot after being compared itself and anticipatory data by FIT
Fruit, it is achieved that the automatic test of microblogging, compared with the mode of manual test, significantly reduces the cost of test, and carries
High testing efficiency, is testing while complexity rises it is also possible to ensure higher testing efficiency.
In addition, can be by test case, document and test module integrated management using FIT, can be in the form of Fixture
Intuitively to represent test case and document, output test result the page automatically, conveniently to manage and safeguard, there is stronger practicality
Property.
Referring to Fig. 4, further embodiment of this invention provides a kind of microblogging test device, including:FIT integration testing framework
401 and test module 402;
FIT 401, for obtaining the microblogging test case of user's selection, the test access that this microblogging test case is carried
Parameter is sent to test module 402, receives the data that test module 402 returns, and this data is corresponding with microblogging test case
Anticipatory data is made comparisons, and obtains the test result of microblogging test case;
Test module 402, for receiving the test access parameter that FIT 401 sends, seals to this test access parameter
Dress processes and obtains microblogging operation requests, and this microblogging operation requests is sent to micro blog server, receives what micro blog server returned
Microblogging operation response, is sent to FIT 401 after extracting data from the operation response of this microblogging.
Referring to Fig. 5, in the present embodiment, FIT 401 can include:
Microblogging, for determining corresponding function according to microblogging test case, is surveyed by call unit 401a by call function
The test access parameter that example on probation carries is sent to test module 402.
In the present embodiment, test module 402 can include:
Ciphering unit 402a, for carrying out to this test access parameter after type approval success as valid data to specified
Class object respective attributes assignment, the class object after assignment is used the key specified be encrypted as inclusion;
Encapsulation unit 402b, obtains microblogging operation for after being packaged processing to the inclusion after ciphering unit 402a encryption
Request.
Further, test module 402 can also include:
Resolution unit 402c, for parsing to the microblogging operation response receiving, extracts inclusion;
Decryption unit 402d, the key for using during using encryption solves to the inclusion that resolution unit 402c obtains
Close;
Transmitting element 402e, for extracting data from the inclusion after the deciphering of decryption unit 402d, by this data is activation
To FIT401.
In the present embodiment, FIT 401 can include:
Comparing unit 401b, for corresponding with described microblogging test case for the data receiving anticipatory data is made comparisons,
If result of the comparison is unanimously it is determined that the test result of microblogging test case is successfully, if result of the comparison is inconsistent,
The test result determining microblogging test case is unsuccessfully.
The said apparatus that the present embodiment provides may be located in a server, such as in microblogging testing service device.
The said apparatus that the present embodiment provides, respond user operation by FIT, and the test that microblogging test case is carried enters
Mouth parameter is sent to test module, interacts with micro blog server after being processed by test module, obtains micro blog server and returns
Data, this data returns to FIT by test module, obtains microblogging test knot after being compared itself and anticipatory data by FIT
Fruit, it is achieved that the automatic test of microblogging, compared with the mode of manual test, significantly reduces the cost of test, and carries
High testing efficiency, is testing while complexity rises it is also possible to ensure higher testing efficiency.
In addition, can be by test case, document and test module integrated management using FIT, can be in the form of Fixture
Intuitively to represent test case and document, output test result the page automatically, conveniently to manage and safeguard, there is stronger practicality
Property.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can pass through hardware
To complete it is also possible to the hardware being instructed correlation by program is completed, described program can be stored in a kind of computer-readable
In storage medium, storage medium mentioned above can be read only memory, disk or CD etc..
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all spirit in the present invention and
Within principle, any modification, equivalent substitution and improvement made etc., should be included within the scope of the present invention.
Claims (8)
1. a kind of microblog test method is it is characterised in that methods described includes:
FIT integration testing framework obtains the microblogging test case that user selects;
The test access parameter that described microblogging test case carries is sent to test module by described FIT;
Described test module receives described test access parameter, described test access parameter is packaged with process and obtains microblogging behaviour
Ask, described microblogging operation requests are sent to micro blog server;
Process is packaged to described test access parameter and obtains microblogging operation requests, including:
Described test module is carried out to described test access parameter after type approval success as valid data to the class pair specified
The respective attributes assignment of elephant, the class object after assignment is used the key specified be encrypted as inclusion;
Microblogging operation requests are obtained after inclusion after encryption is packaged processing;
Described test module receives the microblogging operation response that described micro blog server returns, and extracts from the operation response of described microblogging
It is sent to described FIT after going out data;
Described FIT receives described data, corresponding with described microblogging test case for described data anticipatory data is made comparisons, obtains
The test result of described microblogging test case.
2. method according to claim 1 is it is characterised in that the described FIT test that carries described microblogging test case
Suction parameter is sent to test module, including:
Described FIT determines corresponding function according to described microblogging test case, is tested described microblogging by calling described function
The test access parameter that use-case carries is sent to described test module.
3. method according to claim 1 is it is characterised in that send after extracting data from the operation response of described microblogging
To described FIT, including:
The operation response of described microblogging is parsed, extracts inclusion;
Using the described key specified, described inclusion is decrypted;
Extract data from the inclusion after deciphering, send the data to described FIT.
4. method according to claim 1 is it is characterised in that will be corresponding pre- with described microblogging test case for described data
Issue, according to making comparisons, obtains the test result of described microblogging test case, including:
Corresponding with described microblogging test case for described data anticipatory data is made comparisons;
If result of the comparison is unanimously it is determined that the test result of described microblogging test case is successfully;
If result of the comparison is inconsistent it is determined that the test result of described microblogging test case is unsuccessfully.
5. a kind of microblogging test device is it is characterised in that described device includes:FIT integration testing framework and test module;
Described FIT, for obtaining the microblogging test case of user's selection, the test access that described microblogging test case is carried is joined
Number is sent to described test module, receives the data that described test module returns, by described data and described microblogging test case
Corresponding anticipatory data is made comparisons, and obtains the test result of described microblogging test case;
Described test module, for receiving the test access parameter that described FIT sends, is packaged to described test access parameter
Process obtains microblogging operation requests, and described microblogging operation requests are sent to micro blog server, receives described micro blog server and returns
The microblogging operation response returned, is sent to described FIT after extracting described data from the operation response of described microblogging;
Described test module includes:
Ciphering unit, for carrying out to described test access parameter after type approval success as valid data to the class pair specified
The respective attributes assignment of elephant, the class object after assignment is used the key specified be encrypted as inclusion;
Encapsulation unit, obtains microblogging operation requests for after being packaged processing to the inclusion after the encryption of described ciphering unit.
6. device according to claim 5 is it is characterised in that described FIT includes:
Call unit, for determining corresponding function according to described microblogging test case, by calling the described function will be described micro-
The test access parameter that rich test case carries is sent to described test module.
7. device according to claim 5 is it is characterised in that described test module includes:
Resolution unit, for parsing to the operation response of described microblogging, extracts inclusion;
Decryption unit, for being decrypted to the described inclusion that described resolution unit obtains using the described key specified;
Transmitting element, for extracting data from the inclusion after the deciphering of described decryption unit, sends the data to described
FIT.
8. device according to claim 5 is it is characterised in that described FIT includes:
Comparing unit, for corresponding with described microblogging test case for described data anticipatory data is made comparisons, if compare
Result consistent it is determined that the test result of described microblogging test case is successfully, if result of the comparison inconsistent it is determined that institute
The test result stating microblogging test case is unsuccessfully.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110409309.2A CN103164324B (en) | 2011-12-09 | 2011-12-09 | Microblog test method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110409309.2A CN103164324B (en) | 2011-12-09 | 2011-12-09 | Microblog test method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103164324A CN103164324A (en) | 2013-06-19 |
CN103164324B true CN103164324B (en) | 2017-02-08 |
Family
ID=48587429
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110409309.2A Active CN103164324B (en) | 2011-12-09 | 2011-12-09 | Microblog test method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103164324B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105279076B (en) * | 2014-06-17 | 2019-05-07 | 腾讯科技(深圳)有限公司 | A kind of webpage test method and terminal |
CN106470131A (en) * | 2015-08-19 | 2017-03-01 | 阿里巴巴集团控股有限公司 | A kind of method of testing and equipment |
CN106339319A (en) * | 2016-08-30 | 2017-01-18 | 福建天晴数码有限公司 | Method and system for testing interactive software |
CN106484613A (en) * | 2016-09-13 | 2017-03-08 | 郑州云海信息技术有限公司 | A kind of interface automated test frame based on fitnese |
CN109800168A (en) * | 2019-01-24 | 2019-05-24 | 北京奇艺世纪科技有限公司 | The test method and device of the action event data of software |
CN110704312B (en) * | 2019-09-25 | 2023-09-12 | 浙江大搜车软件技术有限公司 | Method, device, computer equipment and storage medium for pressure test |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101090295A (en) * | 2007-07-25 | 2007-12-19 | 中兴通讯股份有限公司 | Test system and method for ASON network |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7748033B2 (en) * | 2005-02-25 | 2010-06-29 | Microsoft Corporation | Windows remote debugger service |
-
2011
- 2011-12-09 CN CN201110409309.2A patent/CN103164324B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101090295A (en) * | 2007-07-25 | 2007-12-19 | 中兴通讯股份有限公司 | Test system and method for ASON network |
Non-Patent Citations (1)
Title |
---|
大型数据库应用系统测试的设计与实现;徐艳;《中国优秀硕士学位论文全文数据库》;20091015;第4-33页 * |
Also Published As
Publication number | Publication date |
---|---|
CN103164324A (en) | 2013-06-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103164324B (en) | Microblog test method and device | |
CN109828903B (en) | Automatic testing method and device, computer device and storage medium | |
US11385779B2 (en) | Autofill for a user device | |
CN108650149B (en) | Server testing method, device, equipment and computer readable storage medium | |
WO2021003818A1 (en) | Interface test case generating method and apparatus, computer device, and storage medium | |
US6125384A (en) | Computer apparatus and method for communicating between software applications and computers on the world-wide web | |
CN103634294B (en) | Information verifying method and device | |
US9807085B2 (en) | Systems and methods for automated detection of login sequence for web form-based authentication | |
US20120216251A1 (en) | Security restructuring for web media | |
US20150255089A1 (en) | Method for user communication with information dialogue system | |
US11792149B2 (en) | Systems and methods for automated message delivery feedback | |
CN104702624A (en) | Method and system for logging virtual machine based on Cloud Stack platform | |
US7275231B2 (en) | High level validation of designs and products | |
CN109639719A (en) | A kind of auth method and device based on temporary identifier | |
CN105701009B (en) | Security application test method in mobile terminal | |
CN104598348B (en) | A kind of method and system of the long-range external system interface performance of analysis in real time | |
CN107026773A (en) | Automatic correlation method for interface automatic test | |
US11755830B2 (en) | Utilizing natural language processing to automatically perform multi-factor authentication | |
US20130298047A1 (en) | Previewing and Editing Web Sites with a Different User Roles, Identifiers and Authorization Level | |
JP6877343B2 (en) | Handling unstructured messages | |
CN112286815A (en) | Interface test script generation method and related equipment thereof | |
CN113609427B (en) | System data resource extraction method and system under no-interface condition | |
CN105446867B (en) | A kind of generation method and device of test data | |
CN104601532B (en) | A kind of method and device of logon account | |
EP2813049B1 (en) | Dynamic sharing and updating of an electronic form |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |