CN111984535A - 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 PDF

Info

Publication number
CN111984535A
CN111984535A CN202010810636.8A CN202010810636A CN111984535A CN 111984535 A CN111984535 A CN 111984535A CN 202010810636 A CN202010810636 A CN 202010810636A CN 111984535 A CN111984535 A CN 111984535A
Authority
CN
China
Prior art keywords
test
tool
selenium
toolkit
api
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.)
Granted
Application number
CN202010810636.8A
Other languages
Chinese (zh)
Other versions
CN111984535B (en
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.)
Inspur Software Group Co Ltd
Original Assignee
Inspur Software Group 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 Inspur Software Group Co Ltd filed Critical Inspur Software Group Co Ltd
Priority to CN202010810636.8A priority Critical patent/CN111984535B/en
Publication of CN111984535A publication Critical patent/CN111984535A/en
Application granted granted Critical
Publication of CN111984535B publication Critical patent/CN111984535B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods 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 realize the analysis basis based on a Pycharm tool, a Fiddler tool and a user sound data collection system. The method and the device can refine the response time for obtaining each section and assist developers to more effectively position elements of the web interface.

Description

Method and system for automatically obtaining single-point performance test result in software test
Technical Field
The invention relates to the technical field of performance testing, in particular to a method and a system for automatically acquiring a single-point performance test result in software testing.
Background
At present, with the increasing prevalence of B/S architecture products, the performance of web products directly affects the end user experience.
Thus, the performance test of the product can be performed throughout the test process, and the single-point performance test is a performance test for a single functional point.
Based on the method, research and development personnel design a method and a system for automatically acquiring the test result aiming at the result of the single-point performance test in the software test so as to acquire an application server, a client, network time, database execution time, page loading time and the like by an automatic means, thereby releasing the single-point performance test from manual test and saving a large amount of labor cost.
Disclosure of Invention
Aiming at the requirements and the defects of the prior art development, the invention provides a method and a system for automatically obtaining the single-point performance test result in the software test, so as to refine the response time for obtaining each section and assist developers to more effectively position the elements of the web interface.
Firstly, the invention provides a method for automatically obtaining a single-point performance test result in a software test, and the technical scheme adopted for solving the technical problems is as follows:
a method for automatically obtaining single-point performance test results in software tests is based on a Pycharm tool, a Fiddler tool and a user voice 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, meanwhile, a name identification capable of uniquely identifying a current test step is added to a request header, then, the request added with a specific identification is sent to the user voice data collection system, and the user voice data collection system collects all API requests and SQL statement information generated in the operation process of a web product and serves as an 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 the Pycharm tool, integrating a Selenium test kit in the Pycharm tool,
2) opening Fiddler tool, intercepting request, adding request mark on API and SQL statement triggered by the action,
3) finding a test point to be subjected to a single-point performance test in a web product, positioning an element of a web interface by using a Selenium test toolkit, triggering a click action,
4) starting the script of the Selenium test toolkit, starting timing, using API of the Selenium test toolkit to circularly search whether an ending identification element triggered by the action appears or not, stopping the Fiddler tool from requesting interception until the script of the Selenium test toolkit is ended and timed,
5) and 1) in the execution process of the steps 1) -4), the user voice data collection system always collects all API requests and SQL statement information generated in the operation process of the web product for extracting and analyzing the test data of the performance.
More specifically, when step 3) is executed, the element on the interface can be found by using any one of ID, Name, Class, Xpath and Css of the element, and the API of the Selenium test toolkit is used to trigger the click action on the element.
More specifically, during the execution of step 4), the API loop of the Selenium test toolkit is used to find whether the ending identifier element triggered by this action appears,
4a) if the ending identification element appears, acquiring the script ending time of the Selenium test toolkit, stopping the Fiddler tool from requesting interception,
4b) and if the ending identification element does not appear, continuing to wait within the time for setting the upper limit until the ending identification element appears, ending the script timing of the Selenium test toolkit, and stopping the Fiddler tool from requesting interception.
Preferably, the user sound data collection system adopts a LabVIEW-based sound data collection system.
Secondly, the invention also provides a system for automatically obtaining the single-point performance test result in the software test, and the technical scheme adopted for solving the technical problems is as follows:
a system for automatically acquiring single-point performance test results in software tests comprises a Pycharm tool, a Findler tool and a user voice data collection system,
a Selenium test toolkit is integrated in the Pycharm tool, the Selenium test toolkit is used for positioning elements of a web interface by calling an API mode and triggering a click action,
the Fiddler tool is used to intercept the request, and also to append a name identifier to the request header that uniquely identifies the current test step, and to send the request with the particular identifier to the user voice data collection system,
the user sound data collection system collects all API requests and SQL statement information generated in the operation process of the web product and uses the collected information as an analysis basis for counting single-point performance test results.
Specifically, the system for automatically obtaining the single-point performance test result in the software test comprises the following working procedures:
1) opening the Pycharm tool, integrating a Selenium test kit in the Pycharm tool,
2) opening Fiddler tool, intercepting request, adding request mark on API and SQL statement triggered by the action,
3) finding a test point to be subjected to a single-point performance test in a web product, positioning an element of a web interface by using a Selenium test toolkit, triggering a click action,
4) starting the script of the Selenium test toolkit, starting timing, using API of the Selenium test toolkit to circularly search whether an ending identification element triggered by the action appears or not, stopping the Fiddler tool from requesting interception until the script of the Selenium test toolkit is ended and timed,
5) and 1) in the execution process of the steps 1) -4), the user voice data collection system always collects all API requests and SQL statement information generated in the operation process of the web product for extracting and analyzing the test data of the performance.
More specifically, when step 3) is executed, the element on the interface can be found by using any one of ID, Name, Class, Xpath and Css of the element, and the API of the Selenium test toolkit is used to trigger the click action on the element.
More specifically, during the execution of step 4), the API loop of the Selenium test toolkit is used to find whether the ending identifier element triggered by this action appears,
4a) if the ending identification element appears, acquiring the script ending time of the Selenium test toolkit, stopping the Fiddler tool from requesting interception,
4b) and if the ending identification element does not appear, continuing to wait within the time for setting the upper limit until the ending identification element appears, ending the script timing of the Selenium test toolkit, and stopping the Fiddler tool from requesting interception.
Preferably, the user sound data collection system adopts a LabVIEW-based sound data collection system.
Compared with the prior art, the method and the system for automatically obtaining the single-point performance test result in the software test have the beneficial effects that:
according to the invention, by automatically acquiring the result of the single-point performance test, the response time of each section can be obtained in a detailed manner, developers are assisted to more effectively position elements of a web interface, the single-point performance test can be released from manual test, and a large amount of labor cost is saved.
Drawings
FIG. 1 is a flow chart for automatically obtaining single point performance test results in accordance with the present invention.
Detailed Description
In order to make the technical scheme, the technical problems to be solved and the technical effects of the present invention more clearly apparent, the following technical scheme of the present invention is clearly and completely described with reference to the specific embodiments.
The first embodiment is as follows:
the embodiment provides a method for automatically acquiring a single-point performance test result in a software test, and the method is realized based on a Pycharm tool, a Fiddler tool and a user voice data collection system.
The method comprises the steps of integrating a Selenium test kit in a Pycharm tool, realizing element positioning of a web interface by calling an API (application programming interface) mode of the Selenium test kit, intercepting a request by a Fiddler tool, adding a name identifier capable of uniquely identifying a current test step on a request header, sending the request added with a specific identifier to a user sound data collection system, and collecting all API requests and SQL (structured query language) statement information generated in the running process of a web product by the user sound data collection system to serve 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) and opening the Pycharm tool, and integrating a Selenium test toolkit in the Pycharm tool.
2) And opening a Fiddler tool, intercepting the request, and adding a request identifier on the API and SQL statements triggered by the action.
3) Finding a test point to be subjected to a single-point performance test in a web product, positioning an element of a web interface by using a Selenium test toolkit, and triggering a click action. When the step is executed, the element on the interface can be found by using any one of the ID, Name, Class, XPath and Css of the element, and the API of the Selenium test toolkit is used for triggering the clicking action on the element.
4) The script of the Selenium test toolkit starts, starts timing, and uses the API loop of the Selenium test toolkit to find whether the ending identifier element triggered by this action appears:
4a) if the ending identification element appears, acquiring the script ending time of the Selenium test toolkit, stopping the Fiddler tool from requesting interception,
4b) and if the ending identification element does not appear, continuing to wait within the time for setting the upper limit until the ending identification element appears, ending the script timing of the Selenium test toolkit, and stopping the Fiddler tool from requesting interception.
5) And (3) in the execution process of the steps 1) to 4), adopting a LabVIEW-based user voice data collection system, wherein the user voice data collection system always collects all API requests and SQL statement information generated in the operation process of the web product and is used for extracting and analyzing performance test data.
Example two:
the embodiment provides a system for automatically acquiring a single-point performance test result in a software test, which comprises a Pycharm tool, a Fiddler tool and a user voice data collection system.
A Selenium test toolkit is integrated in the Pycharm tool, and is used for positioning elements of a web interface in an API calling mode and triggering a clicking action.
The Fiddler tool is used to intercept the request and also to append a name identifier to the request header that uniquely identifies the current test procedure and to send the request with the unique identifier to the user voice data collection system.
The user sound data collection system collects all API requests and SQL statement information generated in the operation process of the web product and uses the collected information as an 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:
1) and opening the Pycharm tool, and integrating a Selenium test toolkit in the Pycharm tool.
2) And opening a Fiddler tool, intercepting the request, and adding a request identifier on the API and SQL statements triggered by the action.
3) Finding a test point to be subjected to a single-point performance test in a web product, positioning an element of a web interface by using a Selenium test toolkit, and triggering a click action. When the step is executed, the element on the interface can be found by using any one of the ID, Name, Class, XPath and Css of the element, and the API of the Selenium test toolkit is used for triggering the clicking action on the element.
4) The script of the Selenium test toolkit starts, starts timing, and uses the API loop of the Selenium test toolkit to find whether the ending identifier element triggered by this action appears:
4a) if the ending identification element appears, acquiring the script ending time of the Selenium test toolkit, stopping the Fiddler tool from requesting interception,
4b) and if the ending identification element does not appear, continuing to wait within the time for setting the upper limit until the ending identification element appears, ending the script timing of the Selenium test toolkit, and stopping the Fiddler tool from requesting interception.
5) And (3) in the execution process of the steps 1) to 4), adopting a LabVIEW-based user voice data collection system, wherein the user voice data collection system always collects all API requests and SQL statement information generated in the operation process of the web product and is used for extracting and analyzing performance test data.
In summary, the method and the system for automatically obtaining the single-point performance test result in the software test can refine the response time of each section, assist developers to more effectively position elements of a web interface, and release the single-point performance test from manual test, thereby saving a large amount of labor cost.
The principles and embodiments of the present invention have been described in detail using specific examples, which are provided only to aid in understanding the core technical content of the present invention. Based on the above embodiments of the present invention, those skilled in the art should make any improvements and modifications to the present invention without departing from the principle of the present invention, and therefore, the present invention should fall into the protection scope of the present invention.

Claims (10)

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 mode of the Selenium test kit, request interception is made through the Fiddler tool, meanwhile, a name identification capable of uniquely identifying a current test step is added to a request header, then, a request added with a specific identification 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 a web product and serves as an analysis basis for counting the single-point performance test result.
2. The method for automatically obtaining the result of single point performance test in software test according to claim 1, wherein the method is implemented by the following steps:
1) opening the Pycharm tool, integrating a Selenium test kit in the Pycharm tool,
2) opening Fiddler tool, intercepting request, adding request mark on API and SQL statement triggered by the action,
3) finding a test point to be subjected to a single-point performance test in a web product, positioning an element of a web interface by using a Selenium test toolkit, triggering a click action,
4) starting the script of the Selenium test toolkit, starting timing, using API of the Selenium test toolkit to circularly search whether an ending identification element triggered by the action appears or not, stopping the Fiddler tool from requesting interception until the script of the Selenium test toolkit is ended and timed,
5) and 1) in the execution process of the steps 1) -4), the user voice data collection system always collects all API requests and SQL statement information generated in the operation process of the web product for extracting and analyzing the test data of the performance.
3. The method of claim 2, wherein in the step 3), the element on the interface can be found by using any one of ID, Name, Class, Xpath, and Css of the element, and the API of the Selenium test toolkit is used to trigger a click action on the element.
4. The method for automatically obtaining the result of single point performance test in software test according to claim 2, wherein during the step 4), the API loop of the Selenium test toolkit is used to find whether the ending identifier element triggered by the action appears,
4a) if the ending identification element appears, acquiring the script ending time of the Selenium test toolkit, stopping the Fiddler tool from requesting interception,
4b) and if the ending identification element does not appear, continuing to wait within the time for setting the upper limit until the ending identification element appears, ending the script timing of the Selenium test toolkit, and stopping the Fiddler tool from requesting interception.
5. The method for automatically obtaining the result of the single point performance test in the software test as claimed in claim 1, wherein the user sound data collection system adopts a LabVIEW-based sound data collection system.
6. A system for automatically acquiring single-point performance test results in software tests is characterized by comprising a Pycharm tool, a Fiddler tool and a user voice data collection system,
a Selenium test toolkit is integrated in the Pycharm tool, the Selenium test toolkit is used for positioning elements of a web interface by calling an API mode and triggering a click action,
the Fiddler tool is used to intercept the request, and also to append a name identifier to the request header that uniquely identifies the current test procedure, and to send the request with the unique identifier to the user voice data collection system,
the user sound data collection system collects all API requests and SQL statement information generated in the operation process of the web product and uses the API requests and the SQL statement information as analysis basis for counting single-point performance test results.
7. The system for automatically obtaining the result of a single point performance test in software testing according to claim 6, wherein the system has the following workflow:
1) opening the Pycharm tool, integrating a Selenium test kit in the Pycharm tool,
2) opening Fiddler tool, intercepting request, adding request mark on API and SQL statement triggered by the action,
3) finding a test point to be subjected to a single-point performance test in a web product, positioning an element of a web interface by using a Selenium test toolkit, triggering a click action,
4) starting the script of the Selenium test toolkit, starting timing, using API of the Selenium test toolkit to circularly search whether an ending identification element triggered by the action appears or not, stopping the Fiddler tool from requesting interception until the script of the Selenium test toolkit is ended and timed,
5) and 1) in the execution process of the steps 1) -4), the user voice data collection system always collects all API requests and SQL statement information generated in the operation process of the web product for extracting and analyzing the test data of the performance.
8. The system of claim 7, wherein when step 3) is executed, the element on the interface can be found by using any one of ID, Name, Class, Xpath, and Css of the element, and the API of the Selenium test toolkit is used to trigger a click action on the element.
9. The system for automatically obtaining the result of single point performance test in software test according to claim 7, wherein during the step 4), the API loop of the Selenium test toolkit is used to find whether the ending identifier element triggered by the action appears,
4a) if the ending identification element appears, acquiring the script ending time of the Selenium test toolkit, stopping the Fiddler tool from requesting interception,
4b) and if the ending identification element does not appear, continuing to wait within the time for setting the upper limit until the ending identification element appears, ending the script timing of the Selenium test toolkit, and stopping the Fiddler tool from requesting interception.
10. The system for automatically obtaining the result of a single point performance test in a software test as claimed in claim 6, wherein said user sound data collection system is LabVIEW-based sound data collection system.
CN202010810636.8A 2020-08-12 2020-08-12 Method and system for automatically obtaining single-point performance test result in software test Active CN111984535B (en)

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 true CN111984535A (en) 2020-11-24
CN111984535B 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 (8)

* Cited by examiner, † Cited by third party
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
US20130297973A1 (en) * 2012-05-04 2013-11-07 Aegis.Net, Inc. Automated Conformance and Interoperability Test Lab
CN107102937A (en) * 2016-02-19 2017-08-29 腾讯科技(深圳)有限公司 A kind of ui testing method and apparatus
US20180011780A1 (en) * 2016-07-08 2018-01-11 Accenture Global Solutions Limited Web application test script generation to test software functionality
CN109344071A (en) * 2018-10-11 2019-02-15 四川长虹电器股份有限公司 The method for automatically generating LoadRunner performance test script

Patent Citations (8)

* Cited by examiner, † Cited by third party
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
US20130297973A1 (en) * 2012-05-04 2013-11-07 Aegis.Net, Inc. Automated Conformance and Interoperability Test Lab
CN107102937A (en) * 2016-02-19 2017-08-29 腾讯科技(深圳)有限公司 A kind of ui testing method and apparatus
US20180011780A1 (en) * 2016-07-08 2018-01-11 Accenture Global Solutions Limited Web application test script generation to test software functionality
CN109344071A (en) * 2018-10-11 2019-02-15 四川长虹电器股份有限公司 The method for automatically generating LoadRunner performance test script

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
温馨;樊婧雯;王富强;: "基于OpenResty平台的API网关系统的设计与实现", 信息化研究, no. 03 *

Also Published As

Publication number Publication date
CN111984535B (en) 2024-01-26

Similar Documents

Publication Publication Date Title
US8756244B2 (en) Metadata as comments for search problem determination and analysis
CN111221743B (en) Automatic test method and system
WO2020233015A1 (en) Link tracking method and apparatus
CN110569214B (en) Index construction method and device for log file and electronic equipment
US8028200B2 (en) Tracing operations in multiple computer systems
CN103793432B (en) A kind of data base read-write separation method and device
US7913233B2 (en) Performance analyzer
US20080098359A1 (en) Manipulation of trace sessions based on address parameters
US20060271510A1 (en) Database Caching and Invalidation using Database Provided Facilities for Query Dependency Analysis
US20080155349A1 (en) Performing computer application trace with other operations
CN109885496B (en) Test log management method and system
US10452730B2 (en) Methods for analyzing web sites using web services and devices thereof
CN111478806B (en) Link tracking sampling method and system
CN114547208B (en) Method and native distributed database for full link trace transactions
US8489631B2 (en) Distributing a query
CN109189687A (en) A kind of method and apparatus obtaining Android log
CN111125213A (en) Data acquisition method, device and system
WO2016086784A1 (en) Method, apparatus and system for collecting webpage data
CN103248511B (en) A kind of analysis methods, devices and systems of single-point service feature
CN111324510A (en) Log processing method and device and electronic equipment
CN111984535A (en) Method and system for automatically obtaining single-point performance test result in software test
Lee et al. Unified debugging of distributed systems with recon
CN106547531B (en) PHP-based application performance management method and module thereof
CN114443086A (en) System software package base maintenance method and system
CN109344064B (en) Application remote debugging method

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