CN111984535B - Method and system for automatically obtaining single-point performance test result in software test - Google Patents
Method and system for automatically obtaining single-point performance test result in software test Download PDFInfo
- Publication number
- CN111984535B CN111984535B CN202010810636.8A CN202010810636A CN111984535B CN 111984535 B CN111984535 B CN 111984535B CN 202010810636 A CN202010810636 A CN 202010810636A CN 111984535 B CN111984535 B CN 111984535B
- Authority
- CN
- China
- Prior art keywords
- tool
- selenium
- test kit
- api
- request
- 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
- 238000011056 performance test Methods 0.000 title claims abstract description 46
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000013480 data collection Methods 0.000 claims abstract description 31
- 238000012360 testing method Methods 0.000 claims description 87
- BUGBHKTXTAQXES-UHFFFAOYSA-N Selenium Chemical compound [Se] BUGBHKTXTAQXES-UHFFFAOYSA-N 0.000 claims description 61
- 229910052711 selenium Inorganic materials 0.000 claims description 61
- 239000011669 selenium Substances 0.000 claims description 61
- 230000009471 action Effects 0.000 claims description 31
- 230000001960 triggered effect Effects 0.000 claims description 18
- 230000008569 process Effects 0.000 claims description 17
- 238000013522 software testing Methods 0.000 claims description 8
- 238000000605 extraction Methods 0.000 claims description 4
- 230000004044 response Effects 0.000 abstract description 4
- 230000000977 initiatory effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3696—Methods or tools to render software testable
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a method and a system for automatically acquiring a single-point performance test result in a software test, which relate to the technical field of performance test, and are implemented based on a Pycharm tool, a Fiddler tool and a user sound data collection system. The invention can refine and acquire the response time of each section and assist the developer to more effectively position the elements of the web interface.
Description
Technical Field
The invention relates to the technical field of performance test, in particular to a method and a system for automatically acquiring a single-point performance test result in software test.
Background
With the current popularity of B/S architecture products, the performance of web products directly affects the end user experience.
Thus, the performance test of the product will be constant throughout the test process, where a single point performance test is a performance test for a single functional point.
Based on the method and the system, research and development personnel design an automatic test result acquisition method and an automatic test result acquisition system aiming at the single-point performance test result in the software test, so that an application server side, a client side, network time, database execution time, page loading time and the like are acquired through an automatic means, and the single-point performance test is released from the manual test, and a large amount of labor cost is saved.
Disclosure of Invention
Aiming at the needs and the shortcomings of the prior art development, the invention provides a method and a system for automatically acquiring single-point performance test results in software testing, so as to refine the response time of each acquired section and assist developers to more effectively position elements of a web interface.
Firstly, the invention provides a method for automatically obtaining a single-point performance test result in a software test, which solves the technical problems and adopts the following technical scheme:
a method for automatically obtaining single-point performance test results in software test is realized based on a Pycharm tool, a Fiddler tool and a user sound data collection system, a Selenium test kit is integrated in the Pycharm tool, element positioning of a web interface is realized by calling an API mode of the Selenium test kit, request interception is made through the Fiddler tool, a name identifier capable of uniquely identifying a current test step is added on a request head, then, the request added with the specific identifier is sent to the user sound data collection system, and the user sound data collection system collects all API requests and SQL statement information generated in the operation process of web products to serve as analysis basis for counting the single-point performance test results.
Specifically, the method for automatically obtaining the single-point performance test result in the software test comprises the following implementation processes:
1) Opening a Pycharm tool, integrating a Selenium test kit in the Pycharm tool,
2) Starting Fiddler tool, intercepting request, adding request mark on API and SQL statement triggered by the action,
3) Finding test points in the web product to be subjected to single-point performance testing, locating elements of the web interface using a Selenium test kit, and triggering a click action,
4) Starting the script of the Selenium test kit, starting timing, using the API of the Selenium test kit to circularly find whether the ending identification element triggered by the action appears or not, stopping the Fiddler tool request interception until the script of the Selenium test kit ends timing,
5) During the execution of steps 1) -4), the user voice data collection system is always collecting all API requests and SQL statement information generated during the running process of the web product for the extraction and analysis of the test data of the performance.
More specifically, when step 3) is performed, any one of the manners of ID, name, class, xpath, css of the element can be used to find the element on the interface, and the API of the Selenium test kit is used to trigger the clicking action on the element.
More specifically, during the execution of step 4), the API loop of the Selenium test kit is used to find whether the end identification element triggered by this action appears,
4a) If the end identification element appears, the script end time of the Selenium test toolkit is obtained, the Fiddler tool request interception is stopped,
4b) If the ending identification element does not appear, continuing waiting in the time with the upper limit until the ending identification element appears, ending the script timing of the Selenium test kit, and stopping the Fiddler tool request interception.
Preferably, the user voice data collection system employs a LabVIEW-based voice data collection system.
Secondly, the invention also provides a system for automatically acquiring the single-point performance test result in the software test, which solves the technical problems and adopts the following technical scheme:
a system for automatically acquiring single-point performance test results in software testing comprises a Pycharm tool, a Fiddler tool and a user voice data collection system,
the integrated Selenium test toolkit in the Pycharm tool is used for positioning the elements of the web interface by calling the API mode and triggering the clicking action,
the Fiddler tool is used for intercepting the request, adding a name identifier capable of uniquely identifying the current testing step to the request head, sending the request added with the specific identifier to a user voice data collecting system,
and the user sound data collection system collects all API requests and SQL statement information generated in the running process of the web product and takes the API requests and SQL statement information as analysis basis for counting single-point performance test results.
Specifically, in the system for automatically obtaining the single-point performance test result in the software test, the working flow is as follows:
1) Opening a Pycharm tool, integrating a Selenium test kit in the Pycharm tool,
2) Starting Fiddler tool, intercepting request, adding request mark on API and SQL statement triggered by the action,
3) Finding test points in the web product to be subjected to single-point performance testing, locating elements of the web interface using a Selenium test kit, and triggering a click action,
4) Starting the script of the Selenium test kit, starting timing, using the API of the Selenium test kit to circularly find whether the ending identification element triggered by the action appears or not, stopping the Fiddler tool request interception until the script of the Selenium test kit ends timing,
5) During the execution of steps 1) -4), the user voice data collection system is always collecting all API requests and SQL statement information generated during the running process of the web product for the extraction and analysis of the test data of the performance.
More specifically, when step 3) is performed, any one of the manners of ID, name, class, xpath, css of the element can be used to find the element on the interface, and the API of the Selenium test kit is used to trigger the clicking action on the element.
More specifically, during the execution of step 4), the API loop of the Selenium test kit is used to find whether the end identification element triggered by this action appears,
4a) If the end identification element appears, the script end time of the Selenium test toolkit is obtained, the Fiddler tool request interception is stopped,
4b) If the ending identification element does not appear, continuing waiting in the time with the upper limit until the ending identification element appears, ending the script timing of the Selenium test kit, and stopping the Fiddler tool request interception.
Preferably, the user voice data collection system employs a LabVIEW-based voice data collection system.
The method and the system for automatically acquiring the single-point performance test result in the software test have the beneficial effects that compared with the prior art:
according to the invention, the response time of each section can be obtained in a refined way through automatically obtaining the result of the single-point performance test, so that developers can be assisted in more effectively positioning elements of the web interface, the single-point performance test can be released from the manual test, and a large amount of labor cost is saved.
Drawings
FIG. 1 is a flow chart of the present invention for automatically obtaining single point performance test results.
Detailed Description
In order to make the technical scheme, the technical problems to be solved and the technical effects of the invention more clear, the technical scheme of the invention is clearly and completely described below by combining specific embodiments.
Embodiment one:
the embodiment provides a method for automatically acquiring a single-point performance test result in a software test, wherein the method is realized based on a Pycharm tool, a Fiddler tool and a user sound data collecting system.
Integrating a Selenium test kit in a Pycharm tool, realizing element positioning of a web interface by calling an API mode of the Selenium test kit, intercepting a request by the Fiddler tool, adding a name identifier capable of uniquely identifying a current test step on a request head, and then sending the request added with the specific identifier to a user voice data collection system, wherein the user voice data collection system collects all API requests and SQL statement information generated in the running process of a web product and is used as an analysis basis for counting single-point performance test results.
Referring to fig. 1, a method for automatically obtaining a single-point performance test result in a software test according to this embodiment includes:
1) The Pycharm tool was opened and a Selenium test kit was integrated into the Pycharm tool.
2) Starting a Fiddler tool, intercepting a request, and adding a request identifier on an API and an SQL statement triggered by the action.
3) Finding a test point to be subjected to single-point performance test in the web product, positioning elements of the web interface by using a Selenium test kit, and triggering a clicking action. When this step is performed, any one of the manners of ID, name, class, xpath, css of the element can be used to find the element on the interface, and the API of the Selenium test kit is used to trigger the clicking action on the element.
4) Script initiation of the Selenium test toolkit, starting timing, and using API loops of the Selenium test toolkit to find whether an end identification element triggered by this action appears:
4a) If the end identification element appears, the script end time of the Selenium test toolkit is obtained, the Fiddler tool request interception is stopped,
4b) If the ending identification element does not appear, continuing waiting in the time with the upper limit until the ending identification element appears, ending the script timing of the Selenium test kit, and stopping the Fiddler tool request interception.
5) In the execution process of the steps 1) -4), a LabVIEW-based user voice data collection system is adopted, and the user voice data collection system is used for collecting all API requests and SQL sentence information generated in the web product operation process all the time and is used for extracting and analyzing performance test data.
Embodiment two:
the embodiment provides a system for automatically acquiring single-point performance test results in software testing, which comprises a Pycharm tool, a Fiddler tool and a user voice data collecting system.
The Pycharm tool is integrated with a Selenium test kit, and the Selenium test kit is used for positioning elements of a web interface by calling an API (application program interface) mode and triggering clicking actions.
The Fiddler tool is used for intercepting the request and adding a name identifier capable of uniquely identifying the current testing step to the request head and sending the request added with the specific identifier to the user voice data collection system.
And the user sound data collection system collects all API requests and SQL statement information generated in the running process of the web product and takes the API requests and SQL statement information as analysis basis for counting single-point performance test results.
Referring to fig. 1, the system for automatically obtaining a single-point performance test result in a software test according to this embodiment includes the following working procedures:
1) The Pycharm tool was opened and a Selenium test kit was integrated into the Pycharm tool.
2) Starting a Fiddler tool, intercepting a request, and adding a request identifier on an API and an SQL statement triggered by the action.
3) Finding a test point to be subjected to single-point performance test in the web product, positioning elements of the web interface by using a Selenium test kit, and triggering a clicking action. When this step is performed, any one of the manners of ID, name, class, xpath, css of the element can be used to find the element on the interface, and the API of the Selenium test kit is used to trigger the clicking action on the element.
4) Script initiation of the Selenium test toolkit, starting timing, and using API loops of the Selenium test toolkit to find whether an end identification element triggered by this action appears:
4a) If the end identification element appears, the script end time of the Selenium test toolkit is obtained, the Fiddler tool request interception is stopped,
4b) If the ending identification element does not appear, continuing waiting in the time with the upper limit until the ending identification element appears, ending the script timing of the Selenium test kit, and stopping the Fiddler tool request interception.
5) In the execution process of the steps 1) -4), a LabVIEW-based user voice data collection system is adopted, and the user voice data collection system is used for collecting all API requests and SQL sentence information generated in the web product operation process all the time and is used for extracting and analyzing performance test data.
In summary, by adopting the method and the system for automatically acquiring the single-point performance test result in the software test, the response time of each section can be acquired in a refined way, the element of the web interface can be positioned more effectively by a developer, the single-point performance test can be released from the manual test, and a large amount of labor cost is saved.
The foregoing has outlined rather broadly the principles and embodiments of the present invention in order that the detailed description of the invention may be better understood. Based on the above-mentioned embodiments of the present invention, any improvements and modifications made by those skilled in the art without departing from the principles of the present invention should fall within the scope of the present invention.
Claims (8)
1. A method for automatically obtaining a single-point performance test result in a software test is characterized in that the method is realized based on a Pycharm tool, a Fiddler tool and a user sound data collection system, a Selenium test kit is integrated in the Pycharm tool, element positioning of a web interface is realized by calling an API (application program interface) mode of the Selenium test kit, request interception is made through the Fiddler tool, a name identifier capable of uniquely identifying a current test step is added on a request head, then, a request added with a specific identifier is sent to the user sound data collection system, and all API requests and SQL statement information generated in the operation process of a web product are collected by the user sound data collection system and used as an analysis basis for counting the single-point performance test result;
the implementation process of the method comprises the following steps:
1) Opening a Pycharm tool, integrating a Selenium test kit in the Pycharm tool,
2) Starting Fiddler tool, intercepting request, adding request mark on API and SQL statement triggered by the action,
3) Finding test points in the web product to be subjected to single-point performance testing, locating elements of the web interface using a Selenium test kit, and triggering a click action,
4) Starting the script of the Selenium test kit, starting timing, using the API of the Selenium test kit to circularly find whether the ending identification element triggered by the action appears or not, stopping the Fiddler tool request interception until the script of the Selenium test kit ends timing,
5) During the execution of steps 1) -4), the user voice data collection system is always collecting all API requests and SQL statement information generated during the running process of the web product for the extraction and analysis of the test data of the performance.
2. The method for automatically obtaining single point performance test results in software testing according to claim 1, wherein when step 3) is performed, the element on the interface can be found by using any one of ID, name, class, xpath, css of the elements, and the clicking action on the element is triggered by using the API of the Selenium test kit.
3. The method for automatically obtaining single point performance test results in software testing according to claim 1, wherein step 4) is performed using the API loop of the Selenium test kit to find whether an end-of-line element triggered by such action is present,
4a) If the end identification element appears, the script end time of the Selenium test toolkit is obtained, the Fiddler tool request interception is stopped,
4b) If the ending identification element does not appear, continuing waiting in the time with the upper limit until the ending identification element appears, ending the script timing of the Selenium test kit, and stopping the Fiddler tool request interception.
4. The method for automatically obtaining single point performance test results in a software test according to claim 1, wherein the user voice data collection system employs a LabVIEW based voice data collection system.
5. A system for automatically acquiring single-point performance test results in software testing is characterized by comprising a Pycharm tool, a Fiddler tool and a user voice data collection system,
the Pycharm tool is integrated with a Selenium test kit, the Selenium test kit is used for positioning elements of a web interface by calling an API mode and triggering clicking actions,
the Fiddler tool is used for intercepting the request, adding a name identifier capable of uniquely identifying the current testing step to the request head, sending the request added with the specific identifier to a user voice data collecting system,
the user sound data collection system collects all API requests and SQL sentence information generated in the running process of the web product and serves as an analysis basis for counting single-point performance test results;
the workflow of the system is as follows:
1) Opening a Pycharm tool, integrating a Selenium test kit in the Pycharm tool,
2) Starting Fiddler tool, intercepting request, adding request mark on API and SQL statement triggered by the action,
3) Finding test points in the web product to be subjected to single-point performance testing, locating elements of the web interface using a Selenium test kit, and triggering a click action,
4) Starting the script of the Selenium test kit, starting timing, using the API of the Selenium test kit to circularly find whether the ending identification element triggered by the action appears or not, stopping the Fiddler tool request interception until the script of the Selenium test kit ends timing,
5) During the execution of steps 1) -4), the user voice data collection system is always collecting all API requests and SQL statement information generated during the running process of the web product for the extraction and analysis of the test data of the performance.
6. The system for automatically obtaining single point performance test results in software testing according to claim 5, wherein when step 3) is performed, the element on the interface can be found by using any one of ID, name, class, xpath, css of the elements, and the clicking action on the element is triggered by using the API of the Selenium test kit.
7. The system for automatically obtaining single point performance test results in software testing according to claim 5, wherein step 4) is performed using the API loop of the Selenium test kit to find whether an end-of-line element triggered by such action is present,
4a) If the end identification element appears, the script end time of the Selenium test toolkit is obtained, the Fiddler tool request interception is stopped,
4b) If the ending identification element does not appear, continuing waiting in the time with the upper limit until the ending identification element appears, ending the script timing of the Selenium test kit, and stopping the Fiddler tool request interception.
8. The system for automatically obtaining single point performance test results in a software test according to claim 5, wherein the user voice data collection system employs a LabVIEW based voice data collection system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010810636.8A CN111984535B (en) | 2020-08-12 | 2020-08-12 | Method and system for automatically obtaining single-point performance test result in software test |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010810636.8A CN111984535B (en) | 2020-08-12 | 2020-08-12 | Method and system for automatically obtaining single-point performance test result in software test |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111984535A CN111984535A (en) | 2020-11-24 |
CN111984535B true CN111984535B (en) | 2024-01-26 |
Family
ID=73435412
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010810636.8A Active CN111984535B (en) | 2020-08-12 | 2020-08-12 | Method and system for automatically obtaining single-point performance test result in software test |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111984535B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6907546B1 (en) * | 2000-03-27 | 2005-06-14 | Accenture Llp | Language-driven interface for an automated testing framework |
US7415635B1 (en) * | 2004-12-15 | 2008-08-19 | Microsoft Corporation | Integrated software test framework for performance testing of a software application |
CN101526917A (en) * | 2009-04-22 | 2009-09-09 | 南京大学 | Method for reproducing test scripts based on data drive |
CN101763306A (en) * | 2009-12-24 | 2010-06-30 | 深圳市金蝶移动互联技术有限公司 | Method for automatically testing performance of front end as well as device and system therefor |
CN107102937A (en) * | 2016-02-19 | 2017-08-29 | 腾讯科技(深圳)有限公司 | A kind of ui testing method and apparatus |
CN109344071A (en) * | 2018-10-11 | 2019-02-15 | 四川长虹电器股份有限公司 | The method for automatically generating LoadRunner performance test script |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9354998B2 (en) * | 2012-05-04 | 2016-05-31 | Aegis.Net, Inc. | Automated conformance and interoperability test lab |
US10108535B2 (en) * | 2016-07-08 | 2018-10-23 | Accenture Global Solutions Limited | Web application test script generation to test software functionality |
-
2020
- 2020-08-12 CN CN202010810636.8A patent/CN111984535B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6907546B1 (en) * | 2000-03-27 | 2005-06-14 | Accenture Llp | Language-driven interface for an automated testing framework |
US7415635B1 (en) * | 2004-12-15 | 2008-08-19 | Microsoft Corporation | Integrated software test framework for performance testing of a software application |
CN101526917A (en) * | 2009-04-22 | 2009-09-09 | 南京大学 | Method for reproducing test scripts based on data drive |
CN101763306A (en) * | 2009-12-24 | 2010-06-30 | 深圳市金蝶移动互联技术有限公司 | Method for automatically testing performance of front end as well as device and system therefor |
CN107102937A (en) * | 2016-02-19 | 2017-08-29 | 腾讯科技(深圳)有限公司 | A kind of ui testing method and apparatus |
CN109344071A (en) * | 2018-10-11 | 2019-02-15 | 四川长虹电器股份有限公司 | The method for automatically generating LoadRunner performance test script |
Non-Patent Citations (1)
Title |
---|
基于OpenResty平台的API网关系统的设计与实现;温馨;樊婧雯;王富强;;信息化研究(03);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111984535A (en) | 2020-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105760286B (en) | Application database dynamic property detection method and detection device | |
CN110569214B (en) | Index construction method and device for log file and electronic equipment | |
US8028200B2 (en) | Tracing operations in multiple computer systems | |
US8756244B2 (en) | Metadata as comments for search problem determination and analysis | |
CN110781143B (en) | Method and device for querying and extracting server logs | |
CN102737020B (en) | Method for initializing multi-tenant database, and apparatus thereof | |
US11860717B1 (en) | Graphical user interface for presenting crash data | |
CN109885496B (en) | Test log management method and system | |
CN107360155A (en) | A kind of automatic source tracing method of network attack and system based on threat information and sandbox technology | |
CN108521392B (en) | Bidirectional flow SQL injection attack detection method | |
CN114547208B (en) | Method and native distributed database for full link trace transactions | |
CN112650688B (en) | Automated regression testing method, associated device and computer program product | |
CN109189687A (en) | A kind of method and apparatus obtaining Android log | |
CN103248511B (en) | A kind of analysis methods, devices and systems of single-point service feature | |
CN110519263A (en) | Anti- brush amount method, apparatus, equipment and computer readable storage medium | |
CN112257032A (en) | Method and system for determining APP responsibility subject | |
CN111324510B (en) | Log processing method and device and electronic equipment | |
CN105721519B (en) | A kind of webpage data acquiring method, apparatus and system | |
CN111984535B (en) | Method and system for automatically obtaining single-point performance test result in software test | |
CN114546756A (en) | Method and system for monitoring link data in micro-service architecture system | |
US7970776B1 (en) | Apparatus, method and computer readable medium for identifying and quantifying database disk-sort operations | |
CN108848396A (en) | A kind of area of computer aided accumulating method based on mobile platform | |
CN112230897B (en) | Monitoring method and device for bank branch interface transformation | |
US20060256726A1 (en) | Systems and methods for viewing data in a trace buffer | |
CN110866211B (en) | Method and device for processing abnormal page of client |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |