CN102880544A - Method and system for automatically testing dynamic graph - Google Patents

Method and system for automatically testing dynamic graph Download PDF

Info

Publication number
CN102880544A
CN102880544A CN2012102913301A CN201210291330A CN102880544A CN 102880544 A CN102880544 A CN 102880544A CN 2012102913301 A CN2012102913301 A CN 2012102913301A CN 201210291330 A CN201210291330 A CN 201210291330A CN 102880544 A CN102880544 A CN 102880544A
Authority
CN
China
Prior art keywords
measured
pixel
ordinate
color
chart
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2012102913301A
Other languages
Chinese (zh)
Inventor
张孛雷
陈珊珊
余莉莉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SUZHOU MAIKE NETWORK SAFETY TECHNOLOGY Co Ltd
Original Assignee
SUZHOU MAIKE NETWORK SAFETY TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SUZHOU MAIKE NETWORK SAFETY TECHNOLOGY Co Ltd filed Critical SUZHOU MAIKE NETWORK SAFETY TECHNOLOGY Co Ltd
Priority to CN2012102913301A priority Critical patent/CN102880544A/en
Publication of CN102880544A publication Critical patent/CN102880544A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a method and a system for automatically testing a dynamic graph. The method comprises the following steps of: 1, acquiring original data through a simple network management protocol (SNMP); 2, generating a test pattern according to the obtained original data; 3, calculating data of the test pattern and a report pattern to be tested; and 4, dynamically determining graph accuracy according to the vertical coordinate heights of various colors, which are calculated by comparing the test pattern and the report pattern to be tested, or according to the occupation rate of pixels of different colors, which is calculated by comparing the test pattern and the report pattern to be tested. Compared with the prior art, the invention has the advantages that the problem of purely manual test of pattern reports is solved, and by automatic test, a test period can be shortened, test efficiency is improved, resources are fully utilized, labor resources and test cost are saved, and test stability and reliability are improved.

Description

The automated testing method of dynamic chart and system
[technical field]
The present invention relates to the automatization testing technique field, especially relate to a kind of automated testing method and system of dynamic chart.
[background technology]
In the Software Development process, generally, software test is that one workload is large, coverage is wide, it is accurately careful and be a requisite important link in the whole product development process to require.
Wherein, the test of dynamic chart needs comparing manually, analysis and data to check always, the problem such as often have repeatability, uninteresting property, coverage rate is inadequate, testing efficiency is low, human cost is large.
[summary of the invention]
In order to address the above problem, the purpose of this invention is to provide a kind of automated testing method of dynamic chart.The method utilizes snmp protocol to obtain raw data, then draws resolution chart, and by obtaining the parameters such as pixel, color, coordinate points testing journal sheet's figure, report pattern to be measured is compared.
Another object of the present invention provides a kind of automatization test system of dynamic chart.
Wherein, the automated testing method of the dynamic chart of an embodiment of the present invention may further comprise the steps:
S1, obtain raw data by SNMP;
The Raw Data Generation resolution chart that S2, basis obtain;
S3, calculating resolution chart and report pattern data to be measured;
S4, the versicolor ordinate height that calculates according to contrast test figure and report pattern to be measured, or the shared ratio of pixel of the different colours that calculates according to contrast test figure and report pattern to be measured is dynamically confirmed the chart accuracy.
As a further improvement on the present invention, described S2 step specifically comprises:
The Raw Data Generation resolution chart consistent with graphics resolution, ordinate maximal value, the figure ground look of figure to be measured that obtains according to snmp protocol.
As a further improvement on the present invention, described S3 step comprises:
S31, when figure to be measured is post figure or the stacking figure of column, set up initial point at the coordinate of figure separately, and obtain the color on the figure of minimum value on the ordinate, circulation increases pixel on ordinate, when the color that gets access to and current color not simultaneously, calculate the ordinate height of this moment; When figure to be measured is pie chart, exclude the color outside all non-report patterns to be measured are chosen on the figure, and obtain the pixel summation that report pattern to be measured uses, obtain respectively the pixel of different colours, with pixel summation calculating ratio.
As a further improvement on the present invention, after the described S31 step, also comprise:
If S32 figure to be measured is post figure or the stacking figure of column, the then current color that gets access to of contrast and the background colour of graphical definition, judge whether identical, if, showing then that this report data obtains finishes, if not, then repeat " when the color that gets access to and current color not simultaneously, calculate ordinate height at this moment " step; If figure to be measured is pie chart, then directly obtain the pixel summation that report pattern to be measured uses, obtain respectively the pixel of different colours, with pixel summation calculating ratio.
As a further improvement on the present invention, after described S32 step, also comprise:
If figure to be measured is post figure or the stacking figure of column, then horizontal ordinate is offset predefined value, repeat " when figure to be measured is post figure or the stacking figure of column; set up initial point at the coordinate of figure separately; and obtain color on the figure of minimum value on the ordinate; circulation increases pixel on ordinate " step, until the color of obtaining is identical with background colour; If figure to be measured is pie chart, then according to the frequency value that refreshes of figure, repeat " exclude the color outside all non-report patterns to be measured are chosen on the figure, and obtain the pixel summation that report pattern to be measured uses; obtain respectively the pixel of different colours, with pixel summation calculating ratio " step.
Correspondingly, the automatization test system of the dynamic chart of an embodiment of the present invention comprises:
Acquiring unit is used for obtaining raw data by SNMP;
The test patterns generation unit is used for according to the Raw Data Generation resolution chart that obtains;
Report pattern generation unit to be measured is used for calculating resolution chart and report pattern data to be measured;
Comparing unit is used for the versicolor ordinate height that calculates according to contrast test figure and report pattern to be measured, or the shared ratio of pixel of the different colours that calculates according to contrast test figure and report pattern to be measured is dynamically confirmed the chart accuracy.
As a further improvement on the present invention, described test patterns generation unit specifically is used for:
The Raw Data Generation resolution chart consistent with graphics resolution, ordinate maximal value, the figure ground look of figure to be measured that obtains according to snmp protocol.
As a further improvement on the present invention, described report pattern generation unit to be measured also is used for:
When figure to be measured is post figure or the stacking figure of column, set up initial point at the coordinate of figure separately, and obtain the color on the figure of minimum value on the ordinate, circulation increases pixel on ordinate, when the color that gets access to and current color not simultaneously, calculate the ordinate height of this moment; When figure to be measured is pie chart, exclude the color outside all non-report patterns to be measured are chosen on the figure, and obtain the pixel summation that report pattern to be measured uses, obtain respectively the pixel of different colours, with pixel summation calculating ratio.
As a further improvement on the present invention, described report pattern generation unit to be measured also is used for:
If figure to be measured is post figure or the stacking figure of column, the then current color that gets access to of contrast and the background colour of graphical definition, judge whether identical, if, showing then that this report data obtains finishes, if not, then repeat " when the color that gets access to and current color not simultaneously, calculate ordinate height at this moment " step; If figure to be measured is pie chart, then directly obtain the pixel summation that report pattern to be measured uses, obtain respectively the pixel of different colours, with pixel summation calculating ratio.
As a further improvement on the present invention, described report pattern generation unit to be measured also is used for:
If figure to be measured is post figure or the stacking figure of column, then horizontal ordinate is offset predefined value, repeat " when figure to be measured is post figure or the stacking figure of column; set up initial point at the coordinate of figure separately; and obtain color on the figure of minimum value on the ordinate; circulation increases pixel on ordinate " step, until the color of obtaining is identical with background colour; If figure to be measured is pie chart, then according to the frequency value that refreshes of figure, repeat " exclude the color outside all non-report patterns to be measured are chosen on the figure, and obtain the pixel summation that report pattern to be measured uses; obtain respectively the pixel of different colours, with pixel summation calculating ratio ".
Than prior art, the invention solves the pure manually problem aspect the pictorial statement test, after carrying out automatic test, can shorten test period, improve testing efficiency and take full advantage of resource, save stability and the reliability of human resources and testing cost, enhancing test.
[description of drawings]
Fig. 1 is the process flow diagram of automated testing method of the dynamic chart of one embodiment of the invention;
Fig. 2 is the module map of automatization test system of the dynamic chart of one embodiment of the invention.
[embodiment]
In order to make the purpose, technical solutions and advantages of the present invention clearer, describe the present invention below in conjunction with the drawings and specific embodiments.
As shown in Figure 1, in an embodiment of the present invention, the automated testing method of described dynamic chart may further comprise the steps:
S1, obtain raw data by SNMP;
The Raw Data Generation resolution chart that S2, basis obtain; Preferably, according to the described Raw Data Generation resolution chart consistent with graphics resolution, ordinate maximal value, the figure ground look of figure to be measured.
S3, calculating resolution chart and report pattern data to be measured; Wherein, described S3 step specifically comprises:
S31, when figure to be measured is post figure or the stacking figure of column, set up initial point at the coordinate of figure separately, and obtain the color on the figure of minimum value on the ordinate, circulation increases pixel on ordinate, when the color that gets access to and current color not simultaneously, calculate the ordinate height of this moment; When figure to be measured is pie chart, exclude the color outside all non-report patterns to be measured are chosen on the figure, and obtain the pixel summation that report pattern to be measured uses, obtain respectively the pixel of different colours, with pixel summation calculating ratio.
If S32 figure to be measured is post figure or the stacking figure of column, the then current color that gets access to of contrast and the background colour of graphical definition, judge whether identical, if, showing then that this report data obtains finishes, if not, then repeat " when the color that gets access to and current color not simultaneously, calculate ordinate height at this moment " step; If figure to be measured is pie chart, then directly obtain the pixel summation that report pattern to be measured uses, obtain respectively the pixel of different colours, with pixel summation calculating ratio.
And, after described S32 step, also comprise: if figure to be measured is post figure or the stacking figure of column, then horizontal ordinate is offset predefined value, repeat " when figure to be measured is post figure or the stacking figure of column, set up initial point at the coordinate of figure separately, and obtain the color on the figure of minimum value on the ordinate; circulation increases pixel on ordinate " step, until the color of obtaining is identical with background colour; If figure to be measured is pie chart, then according to the frequency value that refreshes of figure, repeat " exclude the color outside all non-report patterns to be measured are chosen on the figure, and obtain the pixel summation that report pattern to be measured uses; obtain respectively the pixel of different colours, with pixel summation calculating ratio " step.
S4, the versicolor ordinate height that calculates according to contrast test figure and report pattern to be measured, or the shared ratio of pixel of the different colours that calculates according to contrast test figure and report pattern to be measured is dynamically confirmed the chart accuracy.
As shown in Figure 2, in an embodiment of the present invention, the automatization test system of described dynamic chart comprises:
Acquiring unit is used for obtaining raw data by SNMP;
The test patterns generation unit is used for according to the Raw Data Generation resolution chart that obtains; Preferably, according to the described Raw Data Generation resolution chart consistent with graphics resolution, ordinate maximal value, the figure ground look of figure to be measured.
Report pattern generation unit to be measured is used for calculating resolution chart and report pattern data to be measured; Wherein, described S3 step specifically is used for:
When figure to be measured is post figure or the stacking figure of column, set up initial point at the coordinate of figure separately, and obtain the color on the figure of minimum value on the ordinate, circulation increases pixel on ordinate, when the color that gets access to and current color not simultaneously, calculate the ordinate height of this moment; When figure to be measured is pie chart, exclude the color outside all non-report patterns to be measured are chosen on the figure, and obtain the pixel summation that report pattern to be measured uses, obtain respectively the pixel of different colours, with pixel summation calculating ratio.
And, if figure to be measured is post figure or the stacking figure of column, the then current color that gets access to of contrast and the background colour of graphical definition, judge whether identical, if show then that this report data obtains to finish, if not, then repeat " when the color that gets access to and current color not simultaneously, calculate ordinate height at this moment " step; If figure to be measured is pie chart, then directly obtain the pixel summation that report pattern to be measured uses, obtain respectively the pixel of different colours, with pixel summation calculating ratio.
And, if figure to be measured is post figure or the stacking figure of column, then horizontal ordinate is offset predefined value, repeat " when figure to be measured is post figure or the stacking figure of column; set up initial point at the coordinate of figure separately; and obtain color on the figure of minimum value on the ordinate, circulation increases pixel on ordinate " step, until the color of obtaining is identical with background colour; If figure to be measured is pie chart, then according to the frequency value that refreshes of figure, repeat " exclude the color outside all non-report patterns to be measured are chosen on the figure, and obtain the pixel summation that report pattern to be measured uses; obtain respectively the pixel of different colours, with pixel summation calculating ratio ".
Comparing unit is used for the versicolor ordinate height that calculates according to contrast test figure and report pattern to be measured, or the shared ratio of pixel of the different colours that calculates according to contrast test figure and report pattern to be measured is dynamically confirmed the chart accuracy.
In sum, the invention solves the pure manually problem aspect the pictorial statement test, after carrying out automatic test, can shorten test period, improve testing efficiency and take full advantage of resource, save stability and the reliability of human resources and testing cost, enhancing test.And in test, can carry out the iteration tests of a plurality of versions.
Be to be understood that, although this instructions is described according to embodiment, but be not that each embodiment only comprises an independently technical scheme, this narrating mode of instructions only is for clarity sake, those skilled in the art should make instructions as a whole, technical scheme in each embodiment also can through appropriate combination, form other embodiments that it will be appreciated by those skilled in the art that.
Above listed a series of detailed description only is specifying for feasibility embodiment of the present invention; they are not to limit protection scope of the present invention, allly do not break away from equivalent embodiment or the change that skill spirit of the present invention does and all should be included within protection scope of the present invention.

Claims (10)

1. the automated testing method of a dynamic chart is characterized in that, described method comprises:
S1, obtain raw data by SNMP;
The Raw Data Generation resolution chart that S2, basis obtain;
S3, calculating resolution chart and report pattern data to be measured;
S4, the versicolor ordinate height that calculates according to contrast test figure and report pattern to be measured, or the shared ratio of pixel of the different colours that calculates according to contrast test figure and report pattern to be measured is dynamically confirmed the chart accuracy.
2. the automated testing method of dynamic chart according to claim 1 is characterized in that, described S2 step specifically comprises:
The Raw Data Generation resolution chart consistent with graphics resolution, ordinate maximal value, the figure ground look of figure to be measured that obtains according to snmp protocol.
3. the automated testing method of dynamic chart according to claim 2 is characterized in that, described S3 step comprises:
S31, when figure to be measured is post figure or the stacking figure of column, set up initial point at the coordinate of figure separately, and obtain the color on the figure of minimum value on the ordinate, circulation increases pixel on ordinate, when the color that gets access to and current color not simultaneously, calculate the ordinate height of this moment; When figure to be measured is pie chart, exclude the color outside all non-report patterns to be measured are chosen on the figure, and obtain the pixel summation that report pattern to be measured uses, obtain respectively the pixel of different colours, with pixel summation calculating ratio.
4. the automated testing method of dynamic chart according to claim 3 is characterized in that, after the described S31 step, also comprises:
If S32 figure to be measured is post figure or the stacking figure of column, the then current color that gets access to of contrast and the background colour of graphical definition, judge whether identical, if, showing then that this report data obtains finishes, if not, then repeat " when the color that gets access to and current color not simultaneously, calculate ordinate height at this moment " step; If figure to be measured is pie chart, then directly obtain the pixel summation that report pattern to be measured uses, obtain respectively the pixel of different colours, with pixel summation calculating ratio.
5. the automated testing method of dynamic chart according to claim 4 is characterized in that, after described S32 step, also comprises:
If figure to be measured is post figure or the stacking figure of column, then horizontal ordinate is offset predefined value, repeat " when figure to be measured is post figure or the stacking figure of column; set up initial point at the coordinate of figure separately; and obtain color on the figure of minimum value on the ordinate; circulation increases pixel on ordinate " step, until the color of obtaining is identical with background colour; If figure to be measured is pie chart, then according to the frequency value that refreshes of figure, repeat " exclude the color outside all non-report patterns to be measured are chosen on the figure, and obtain the pixel summation that report pattern to be measured uses; obtain respectively the pixel of different colours, with pixel summation calculating ratio " step.
6. the automatization test system of a dynamic chart is characterized in that, described system comprises:
Acquiring unit is used for obtaining raw data by SNMP;
The test patterns generation unit is used for according to the Raw Data Generation resolution chart that obtains;
Report pattern generation unit to be measured is used for calculating resolution chart and report pattern data to be measured;
Comparing unit is used for the versicolor ordinate height that calculates according to contrast test figure and report pattern to be measured, or the shared ratio of pixel of the different colours that calculates according to contrast test figure and report pattern to be measured is dynamically confirmed the chart accuracy.
7. the automatization test system of dynamic chart according to claim 6 is characterized in that, described test patterns generation unit specifically is used for:
The Raw Data Generation resolution chart consistent with graphics resolution, ordinate maximal value, the figure ground look of figure to be measured that obtains according to snmp protocol.
8. the automatization test system of dynamic chart according to claim 7 is characterized in that, described report pattern generation unit to be measured also is used for:
When figure to be measured is post figure or the stacking figure of column, set up initial point at the coordinate of figure separately, and obtain the color on the figure of minimum value on the ordinate, circulation increases pixel on ordinate, when the color that gets access to and current color not simultaneously, calculate the ordinate height of this moment; When figure to be measured is pie chart, exclude the color outside all non-report patterns to be measured are chosen on the figure, and obtain the pixel summation that report pattern to be measured uses, obtain respectively the pixel of different colours, with pixel summation calculating ratio.
9. the automatization test system of dynamic chart according to claim 8 is characterized in that, described report pattern generation unit to be measured also is used for:
If figure to be measured is post figure or the stacking figure of column, the then current color that gets access to of contrast and the background colour of graphical definition, judge whether identical, if, showing then that this report data obtains finishes, if not, then repeat " when the color that gets access to and current color not simultaneously, calculate ordinate height at this moment " step; If figure to be measured is pie chart, then directly obtain the pixel summation that report pattern to be measured uses, obtain respectively the pixel of different colours, with pixel summation calculating ratio.
10. the automatization test system of dynamic chart according to claim 9 is characterized in that, described report pattern generation unit to be measured also is used for:
If figure to be measured is post figure or the stacking figure of column, then horizontal ordinate is offset predefined value, repeat " when figure to be measured is post figure or the stacking figure of column; set up initial point at the coordinate of figure separately; and obtain color on the figure of minimum value on the ordinate; circulation increases pixel on ordinate " step, until the color of obtaining is identical with background colour; If figure to be measured is pie chart, then according to the frequency value that refreshes of figure, repeat " to exclude the color outside all non-report patterns to be measured are chosen on the figure, and obtain the pixel summation that report pattern to be measured uses; obtain respectively the pixel of different colours, with pixel summation calculating ratio.
CN2012102913301A 2012-08-16 2012-08-16 Method and system for automatically testing dynamic graph Pending CN102880544A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012102913301A CN102880544A (en) 2012-08-16 2012-08-16 Method and system for automatically testing dynamic graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012102913301A CN102880544A (en) 2012-08-16 2012-08-16 Method and system for automatically testing dynamic graph

Publications (1)

Publication Number Publication Date
CN102880544A true CN102880544A (en) 2013-01-16

Family

ID=47481878

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012102913301A Pending CN102880544A (en) 2012-08-16 2012-08-16 Method and system for automatically testing dynamic graph

Country Status (1)

Country Link
CN (1) CN102880544A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109885814A (en) * 2019-03-04 2019-06-14 上海携程商务有限公司 Tables of data Grafmaster, method, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW548605B (en) * 2001-08-08 2003-08-21 Inventec Corp Graph identification and storage method for graphic test
CN101521834A (en) * 2009-04-02 2009-09-02 深圳市茁壮网络技术有限公司 Automatic testing method, device and system
CN101534227A (en) * 2009-04-16 2009-09-16 北京星网锐捷网络技术有限公司 Network management software test method and system
GB2481454A (en) * 2010-06-21 2011-12-28 Martin Piper Graph driven data analysis of updates within a replicated object system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW548605B (en) * 2001-08-08 2003-08-21 Inventec Corp Graph identification and storage method for graphic test
CN101521834A (en) * 2009-04-02 2009-09-02 深圳市茁壮网络技术有限公司 Automatic testing method, device and system
CN101534227A (en) * 2009-04-16 2009-09-16 北京星网锐捷网络技术有限公司 Network management software test method and system
GB2481454A (en) * 2010-06-21 2011-12-28 Martin Piper Graph driven data analysis of updates within a replicated object system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109885814A (en) * 2019-03-04 2019-06-14 上海携程商务有限公司 Tables of data Grafmaster, method, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108260075B (en) Addressing method and device for deployment position of base station
CN106643765B (en) Method for calculating acquisition abnormal maintenance time length
CN102831381B (en) image difference comparison system and method
CN102981951A (en) Platform and method of cloud test development
US9064314B2 (en) Robust automatic determination and location of MacBeth color checker charts
CN104462526B (en) More people towards high-resolution remote sensing image cooperate with rapid vector method online
CN104317722A (en) Unit testing method and device based on Junit
CN109548074A (en) Uplink interference source waveform localization method, device, equipment and medium based on MR
CN109115383A (en) The Prediction method for fatigue life of cold extrusion Strengthening Hole
CN104216832A (en) POS (Point of Sale) application testing method and system
CN109842896A (en) Grid value evaluation method and device
WO2020238965A1 (en) Production environment performance evaluation method and apparatus, and storage medium
CN111145138A (en) Detection method, device and equipment of LED lamp panel and storage medium
CN105159806A (en) Terminal compatibility test system and operating method therefor
CN102880544A (en) Method and system for automatically testing dynamic graph
CN106301993A (en) A kind of method and apparatus of test router
CN105207216B (en) A kind of method and system of the business enlarging scheme based on power supply network
CN105138451B (en) A kind of methods, devices and systems of function for probe card
CN109150647B (en) Network traffic monitoring method and device
CN103546342B (en) A kind of terminal consistency test method and the api interface universal adapter for the method
CN107396392A (en) Radio-frequency indicator testing method, device, equipment and the storage medium of WAP
CN107315170B (en) Pulse sequence signal correlation analysis and display system and method
US10048131B2 (en) Chromaticity test method and chromaticity test apparatus
CN109982368A (en) The azimuthal check method of cell, device, equipment and medium
CN111160712B (en) User electricity consumption parameter adjusting method and device

Legal Events

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

Application publication date: 20130116