Generating Tests for Testing Software Applications
US-2017097882-A1 · Apr 6, 2017 · US
US11099889B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-11099889-B2 |
| Application number | US-201816981267-A |
| Country | US |
| Kind code | B2 |
| Filing date | Aug 22, 2018 |
| Priority date | Jul 30, 2018 |
| Publication date | Aug 24, 2021 |
| Grant date | Aug 24, 2021 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
The present disclosure provides a method for tracking a method-call-chain. The method includes: setting a configuration item for whether to perform a method-call-chain tracking on a current application; intercepting before a method is called, and determining whether call chain information of the method needs to be outputted based on the configuration item; and when it is determined that the call chain information needs to be outputted, recording the call chain information of the method before executing a call request for the method, and outputting the recorded call chain information after the call request for the method is completed. The present disclosure further provides an electronic device and a computer readable storage medium. The method-call-chain tracking method, the electronic device, and the computer readable storage medium provided in the present disclosure allow the tracking of the method-call-chain without rewriting the codes by setting the configuration item and introducing a Spring-AOP.
Opening claim text (preview).
What is claimed is: 1. A method-call-chain tracking method, comprising: setting a configuration item for whether to perform a method-call-chain tracking on a current application for call chain information on a method being called under a call sequence; intercepting each time before the method is called, and determining whether the call chain information of the method needs to be outputted based on the configuration item; and when it is determined that the call chain information needs to be outputted, recording the call chain information of the method before executing a call request for the method, and outputting the recorded call chain information after the call request, for the method is completed, wherein, recording the call chain information of the method comprising caching a name of the method in a queue corresponding to a request ID of the call request for the method; and outputting the recorded call chain information comprising printing data in the queue corresponding to the request ID sequentially; wherein a printMethodCallChain parameter in the configuration item is used to control whether the call chain information needs to be outputted, when a parameter value is true, the call chain information needs to be outputted, and wherein the parameter value is false, the call chain information does not need to be outputted. 2. The method-call-chain tracking method according to claim 1 , wherein intercepting before the method is called, and determining whether the call chain information of the method needs to be outputted based on the configuration item include: when receiving the call request of the method, determining whether the call chain information needs to be outputted based on the configuration item; when it is determined that the call chain information needs to be outputted, caching the request ID of the call request for the method; and intercepting before executing the call request of the method to determine whether the request ID is cached to determine whether the call chain information needs to be outputted. 3. The method-call-chain tracking method according to claim 2 , wherein, when it is determined that the call chain information needs to be outputted, recording the call chain information of the method before executing the call request for the method, and outputting the recorded call chain information after the call request for the method is completed include: after determining the request ID is cached, recording the call chain information of the method and executing the call request of the method; after processing the call request of the method, determining whether the request ID is cached; and after determining the request ID is cached, outputting the recorded call chain information. 4. The method-call-chain tracking method according to claim 3 , further comprising: removing the request ID from cache after outputting the recorded call chain information. 5. The method-call-chain tracking method according to claim 1 , wherein the method is intercepted by an aspect interception of a Spring-AOP framework. 6. The method-call-chain tracking method according to claim 5 , wherein, by using the aspect interception of the Spring-AOP framework, a method code block that needs to be intercepted is intercepted, and method code blocks that are already developed do not need to be modified and the method-call-chain is tracked without rewriting method codes. 7. An electronic device, including a memory, a processor, and a method-call-chain tracking application that is stored in the memory and executable by the processor, wherein when the method-call-chain tracking application being executed, the processor is configured to perform: setting a configuration item for whether to perform a method-call-chain tracking on a current application for call chain information on a method being called under a call sequence; intercepting each time before the method is called, and determining whether the call chain information of the method needs to be outputted based on the configuration item; and when it is determined that the call chain information needs to be outputted, recording the call chain information of the method before executing a call request for the method, and outputting the recorded call chain information after the call request for the method is completed, wherein, recording the call chain information of the method comprising caching a name of the method in a queue corresponding to a request ID of the call request for the method; and outputting the recorded call chain information comprising printing data in the queue corresponding to the request ID sequentially; wherein a printMethodCallChain parameter in the configuration item is used to control whether the call chain information needs to be outputted, when a parameter value is true, the call chain information needs to be outputted, and when the parameter value is false, the call chain information does not need to be outputted. 8. The electronic device according to claim 7 , wherein intercepting before the method is called, and determining whether the call chain information of the method needs to be outputted based on the configuration item include: when receiving the call request of the method, determining whether the call chain information needs to be outputted based on the configuration item; when it is determined that the call chain information needs to be outputted, caching the request ID of the call request for the method; and intercepting before executing the call request of the method to determine whether the request ID is cached to determine whether the call chain information needs to be outputted. 9. The electronic device according to claim 8 , wherein, when it is determined that the call chain information needs to be outputted, recording the call chain information of the method before executing the call request for the method, and outputting the recorded call chain information after the call request for the method is completed include: after determining the request ID is cached, recording the call chain information of the method and executing the call request of the method; after processing the call request for the method, determining whether the request ID is cached; and after determining the request ID is cached, outputting the recorded call chain information. 10. The electronic device according to claim 9 , wherein when the method-call-chain tracking application being executed, the processor is further configured for: removing the request ID from cache after outputting the recorded call chain information. 11. The electronic device according to claim 7 , wherein the method is intercepted by an aspect interception of a Spring-AOP framework. 12. A non-transitory computer readable storage medium, wherein the computer readable storage medium stores a method-call-chain tracking application that is executable by one or more processors such that the one or more processors are configured to perform a method-call-chain tracking, method, the method-call-chain tracking method comprising: setting a configuration item for whether to perform a method-call-chain tracking on a current application for call chain information on a method being called under a call sequence; intercepting each time before the method is called, and determining whether the call chain information of the method needs to be outputted based on the configuration item; and when it is determined that the call chain information needs to be outputted, recording the call chain information of the method before executing a call request for the method, and outputting the recorded call chain information after the call request for the method is completed, wherein, recording the call chain informatio
by tracing the execution of the program · CPC title
Remote procedure calls [RPC]; Web services · CPC title
where the computing system component is a software system · CPC title
by program, e.g. task dispatcher, supervisor, operating system · CPC title
Executing subprograms · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.