Patent information
IP India · live recordAbstract
Disclosed herein are a system (110) and method (900) for generating an executable performance test plan for testing application programming interfaces (APIs). The method (900) comprises receiving, through an interface (108), an API definition comprising at least one endpoint specification and a hierarchical request payload; recursively traversing object and array elements of the payload to identify data fields; generating hierarchical path identifiers for the identified data fields; and generating a field registry associating the data fields, hierarchical path identifiers, and parameter variables. The method (900) further comprises establishing a parameterisation configuration by resolving duplicate data field names using the hierarchical path identifiers, receiving an extraction configuration comprising an extraction rule and a variable identifier associated with a first API request, generating the executable performance test plan, and producing, through client-side processing, a test-plan file and a data file.
Applicants
1Inventors
1Specification
Show full textCollapse
Description: FIELD OF INVENTION
[0001] The present disclosure relates to automated performance testing, and more particularly to a system and method for automated application programming interface performance test generation and local execution.
BACKGROUND
[0002] Application programming interface (API) performance testing is a process of evaluating the responsiveness, throughput, and stability of software interfaces under various load conditions. Performance testing tools enable testers to simulate multiple concurrent users sending requests to API endpoints and to measure metrics including response time, error rate, and throughput. Accurate performance testing assists developers and quality assurance teams in identifying bottlenecks, validating scalability, and verifying that APIs meet performance requirements before deployment. Creating performance test scripts for APIs presents several challenges. Traditional approaches require manual creation of test plan files, which involves understanding the structure and syntax of the testing tool's configuration format. When API request bodies contain nested data structures such as JavaScript Object Notation (JSON) objects with multiple levels of hierarchy, identifying and parameterizing individual fields becomes time-consuming and error-prone. Duplicate field names appearing at different locations within a nested structure further complicate parameterization, as conventional tools may fail to distinguish between fields sharing the same name but residing at different hierarchical positions.
[0003] Existing API performance testing solutions exhibit several limitations. Some existing solutions require installation of desktop applications or server-side infrastructure, creating deployment complexity and limiting accessibility for users without administrative privileges. Other existing solutions operate through cloud-based platforms, which may raise concerns regarding data privacy when sensitive API payloads or authentication credentials are transmitted to external servers. Conventional test generation tools typically support only flat key-value parameterization and do not recursively parse nested request structures to identify all fields at arbitrary depths. Furthermore, existing tools often lack integrated mechanisms for defining sequential API chains in which response values extracted from one request are automatically propagated to subsequent requests, forcing users to manually configure extraction rules and variable references within the testing tool's native interface.
[0004] Accordingly, there exists a need for a system and method that enables automated generation of API performance test scripts.
SUMMARY
[0005] This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
[0006] The present disclosure relates to automated generation and local execution of performance test plans for application programming interfaces. In an embodiment, a method for generating an executable performance test plan for testing application programming interfaces (APIs) is disclosed. The method comprises receiving, through an interface, an API definition comprising at least one endpoint specification and a hierarchical request payload. The method further comprises recursively traversing object elements and array elements of the hierarchical request payload to identify a plurality of data fields. The method comprises generating, for each identified data field, a hierarchical path identifier indicative of a location of the data field within the hierarchical request payload. The method comprises generating a field registry comprising associations between the identified data fields, corresponding hierarchical path identifiers, and associated parameter variables. The method further comprises establishing a parameterisation configuration based on the field registry by resolving duplicate data field names using the corresponding hierarchical path identifiers and associating selected data fields with corresponding parameter variables. The method further comprises receiving, through the interface, an extraction configuration based on the API definition and the parameterisation configuration. The extraction configuration comprises at least one extraction rule and a corresponding variable identifier associated with a first API request. Additionally, the method comprises generating the executable performance test plan based on the parameterisation configuration and the extraction configuration. The executable performance test plan comprises at least one extraction rule configured to capture a response value from the first API request, and at least one subsequent API request configured to reference the variable identifier. The method comprises producing, through client-side processing, a test-plan file and a data file representative of the executable performance test plan.
[0007] In an embodiment, a system for generating an executable performance test plan for testing application programming interfaces (APIs) is disclosed. The system comprises a memory and a processor communicatively coupled with the memory. The processor is configured to receive, through an interface, an API definition comprising at least one endpoint specification and a hierarchical request payload. The processor is configured to recursively traverse object elements and array elements of the hierarchical request payload to identify a plurality of data fields. The processor is configured to generate, for each identified data field, a hierarchical path identifier indicative of a location of the data field within the hierarchical request payload. The processor is configured to generate a field registry comprising associations between the identified data fields, corresponding hierarchical path identifiers, and associated parameter variables. The processor is further configured to establish a parameterisation configuration based on the field registry by resolving duplicate data field names using the corresponding hierarchical path identifiers and associating selected data fields with corresponding parameter variables. The processor is further configured to receive, through the interface, an extraction configuration based on the API definition and the parameterisation configuration. The extraction configuration comprises at least one extraction rule and a corresponding variable identifier associated with a first API request. Additionally, the processor is configured to generate the executable performance test plan based on the parameterisation configuration and the extraction configuration. The executable performance test plan comprises at least one extraction rule configured to capture a response value from the first API request, and at least one subsequent API request configured to reference the variable identifier. The processor is configured to produce, through client-side processing, a test-plan file and a data file representative of the executable performance test plan.
[0008] To further clarify the advantages and features of the present invention, a more particular description of the invention will be rendered by reference to specific embodiments thereof, which are illustrated in the appended drawings. It is appreciated that these drawings depict only typical embodiments of the invention and are therefore not to be considered limiting of its scope. The invention will be described and explained with additional specificity and detail in the accompanying drawings.
BRIEF DESCRIPTION OF FIGURES
[0009] These and other features, aspects, and advantages of the present invention will become better understood when the following detailed description is read with reference to the accompanying drawings in which like characters represent like parts throughout the drawings, wherein:
[0010] Figure 1 illustrates an environment for implementing a system for generating an executable performance test plan for testing application programming interfaces (APIs), in accordance with an embodiment of the present disclosure;
[0011] Figure 2 illustrates a block diagram of the system for generating the executable performance test plan for testing the APIs, in accordance with an embodiment of the present disclosure;
[0012] Figure 3 illustrates a block diagram of an example architecture for a browser-based performance testing system, in accordance with an embodiment of the present disclosure;
[0013] Figure 4 illustrates an example flowchart for a method depicting a recursive traversal workflow, in accordance with an embodiment of the present disclosure;
[0014] Figure 5 illustrates an example input processing workflow depicting data flow through a script generation engine, in accordance with an embodiment of the present disclosure;
[0015] Figure 6 illustrates an example workflow for sequential API chaining, in accordance with an embodiment of the present disclosure;
[0016] Figure 7 illustrates an example bridge server architecture, in accordance with an embodiment of the present disclosure;
[0017] Figure 8 illustrates an example browser user interface selection to performance testing engine extensible markup language element mapping workflow, in accordance with an embodiment of the present disclosure; and
[0018] Figure 9 illustrates a flowchart for a method for generating the executable performance test plan for testing the APIs, in accordance with an embodiment of the present disclosure.
[0019] Further, skilled artisans will appreciate that elements in the drawings are illustrated for simplicity and may not have necessarily been drawn to scale. For example, the flow charts illustrate the method in terms of the most prominent steps involved to help to improve understanding of aspects of the present invention. Furthermore, in terms of the construction of a device, one or more components of the device may have been represented in the drawings by conventional symbols, the drawings may show only those specific details that are pertinent to understanding the embodiments of the present invention so as not to obscure the drawings with details that will be readily apparent to those of ordinary skill in the art having benefit of the description herein.
DETAILED DESCRIPTION
[0020] For the purpose of promoting an understanding of the principles of the present disclosure, reference will now be made to the various embodiments, and specific language will be used to describe the same. It will nevertheless be understood that no limitation of the scope of the present disclosure is thereby intended, such alterations and further modifications in the illustrated system, and such further applications of the principles of the present disclosure as illustrated therein, are contemplated as would normally occur to one skilled in the art to which the present disclosure relates. It will be understood by those skilled in the art that the foregoing general description and the following detailed description are explanatory of the present disclosure and are not intended to be restrictive thereof.
[0021] Whether or not a certain feature or element was limited to being used only once, it may still be referred to as “one or more features,” or “one or more elements,” or “at least one feature,” or “at least one element.” Furthermore, the use of the terms “one or more” or “at least one” feature or element does not preclude there being none of that feature or element, unless otherwise specified by limiting language, including, but not limited to, “there needs to be one or more…” or “one or more elements are required.”
[0022] Reference is made herein to some “embodiments.” It should be understood that an embodiment is an example of a possible implementation of any features and/or elements of the present disclosure. Some embodiments have been described for the purpose of explaining one or more of the potential ways in which the specific features and/or elements of the proposed disclosure fulfil the requirements of uniqueness, utility, and non-obviousness.
[0023] Use of the phrases and/or terms including, but not limited to, “a first embodiment,” “a further embodiment,” “an alternate embodiment,” “one embodiment,” “an embodiment,” “multiple embodiments,” “some embodiments,” “other embodiments,” “further embodiment”, “furthermore embodiment”, “additional embodiment” or other variants thereof do not necessarily refer to the same embodiments. Unless otherwise specified, one or more particular features and/or elements described in connection with one or more embodiments may be found in one embodiment, or may be found in more than one embodiment, or may be found in all embodiments, or may be found in no embodiments. Although one or more features and/or elements may be described herein in the context of only a single embodiment, or in the context of more than one embodiment, or in the context of all embodiments, the features and/or elements may instead be provided separately or in any appropriate combination or not at all. Conversely, any features and/or elements described in the context of separate embodiments may alternatively be realized as existing together in the context of a single embodiment.
[0024] Any particular and all details set forth herein are used in the context of some embodiments and therefore should not necessarily be taken as limiting factors to the proposed disclosure.
[0025] The terms “includes”, “including”, or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process or method that includes a list of steps does not include only those steps but may include other steps not expressly listed or inherent to such process or method. Similarly, one or more devices or sub-systems or elements or structures or components preceded by “includes... a” does not, without more constraints, preclude the existence of other devices or other sub-systems or other elements or other structures or other components or additional devices or additional sub-systems or additional elements or additional structures or additional components.
[0026] It is an object of the present disclosure to provide a system and method for automated application programming interface (API) performance test generation and local execution.
[0027] It is another object of the present disclosure to provide path-aware parameterisation with hierarchical path identifiers that enable resolution of duplicate data field names.
[0028] It is another object of the present disclosure to enable sequential API chaining with response extraction and local execution.
[0029] Figure 1 illustrates an environment 100 for implementing a system 110 for generating an executable performance test plan for testing application programming interfaces (APIs), in accordance with an embodiment of the present disclosure. The environment 100 corresponds to an operational environment illustrating interactions between a user 102 and the various components during generation and execution of the performance test plans. The environment 100 includes a postman importer 104, an input device 106, a browser interface 108, the system 110 for generating an executable performance test plan for testing application programming interfaces (APIs), a local computing device 112, a bridge server 114, and an output device 116. In an embodiment, the system 110 is implemented as a browser-based application executing on the local computing device 112, wherein the browser interface 108, script generation functions, and client-side processing may be performed within a web browser.
[0030] In an embodiment, a user 102 interacts with the input device 106 to provide user inputs to the system 110. The input device 106 includes a browser user interface (UI) timer configuration panel corresponding to the browser interface 108 for the user 102 to receive the user inputs. The user inputs may include test parameters, API endpoints, hypertext transfer protocol (HTTP) method types, HTTP request headers, and structured request bodies. The test parameters correspond to configuration parameters including a thread count, a ramp-up period, a loop count, and a timer distribution type. The API endpoints indicate specific uniform resource locator (URL) addresses through which the API resources or services are accessed and tested. The HTTP method types may include request operation types, such as GET, POST, PUT, PATCH, and DELETE, that specify the action to be performed on the API resource. The HTTP request headers may include data fields included in an HTTP request that convey information such as authorization credentials, content type, and other communication parameters. The structural request bodies may include formatted payload data, typically in JSON, containing request information organized in objects and arrays that is transmitted with the API request body. The browser interface 108 may serve as an interface through which the system 110 receives an API definition including at least one endpoint specification and a hierarchical request payload. The endpoint specification may include information defining the API endpoint, including the corresponding URL, supported HTTP method type and associated request configuration. The hierarchical request payload may indicate structured request data organized in nested elements and array elements within the API request. The browser interface 108 may be implemented as a self-contained markup document configured to receive the user inputs and produce the test-plan file and the data file through the client-side processing without communication with a remote server. The generated test-plan file, data file, and session state may be maintained in browser memory during an active session.
[0031] In an embodiment, the postman importer 104 may be connected to the input device 106, enabling the user 102 to import postman collection files. In a non-limiting example, the postman importer 104 parses postman collection files, for example, v2.1 JSON files and converts requests to a format compatible with the system 110. The postman importer 104 may translate postman variable syntax (e.g., {{variable}}) to a variable format compatible with the system 110 (e.g., ${variable}) and may map environment variables accordingly. For example, a postman collection containing an authentication request with the environment variables for username and password may be imported. Further, the postman importer 104 may convert the variable references to the corresponding format for use in the generated performance test plan.
[0032] In an embodiment, the local computing device 112 may be configured to host the bridge server 114, which communicates with the system 110. In a non-limiting example, the local computing device 112 may include a desktop computer, laptop, workstation, or virtual machine configured to host the bridge server 114. The bridge server 114 may operate as a locally executing intermediary server process that interfaces with a performance testing engine installed on the local computing device 112. The bridge server 114 enables the browser-based front-end to trigger performance test executions on the local computing device 112, stream live results back to the browser interface 108, and stop running tests without requiring cloud infrastructure or remote services.
[0033] In an embodiment, the system 110 may transmit generated executable performance test plans to the bridge server 114 for execution. The output device 116 may receive output from both the system 110 and the local computing device 112. The output device 116 may display execution metrics comprising throughput, response time, and error rate in real time on the browser interface 108. The system 110 operates such that processing may occur within the local computing device 112 without transmitting user data, request payloads, or test results to external servers.
[0034] In an implementation, the system 110 may support HTTP methods including POST, PUT, PATCH, GET, and DELETE with JSON request bodies. The system 110 automatically parses an entered endpoint URL into host, port, protocol, and path components and populates corresponding fields in the generated performance test plan. For example, when the user 102 enters an endpoint URL such as “https://api.example.com:8443/v1/users”, the system 110 may decompose the URL to identify the protocol as “https”, the host as “api.example.com”, the port as “8443”, and the path as “/v1/users”, and may populate the values into corresponding configuration elements of the executable performance test plan. Some additional details of the system 110 are explained with reference to Figure 2 in the forthcoming paragraphs.
[0035] Figure 2 illustrates a block diagram of the system 110 for generating the executable performance test plan for testing the APIs, in accordance with an embodiment of the present disclosure. The system 110 includes a processor 202 communicatively coupled with a memory 204, modules 206, and a communication interface 218. The communication interface 218 may facilitate communication between the system 110 and the external components. In an embodiment, the communication interface 218 may transmit the generated test-plan file to the bridge server 114 for execution by the performance testing engine installed on the local computing device 112.
[0036] In an embodiment, the processor 202 is configured to execute instructions stored in the memory 204 to perform operations associated with generating the executable performance test plan. As an example, the processor 202 may be a single processing unit or a number of units, all of which could include multiple computing units. The processor 202 may be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, state machines, logic circuitries, and/or any devices that manipulate signals based on operational instructions. Among other capabilities, the processor 202 is configured to fetch and execute computer-readable instructions and data stored in the memory. The processor 202 may include one or a plurality of processors. At this time, one or a plurality of processors 202 may be a general-purpose processor, such as a central processing unit (CPU), an application processor (AP), or the like, a graphics-only processing unit such as a graphics processing unit (GPU), a visual processing unit (VPU), and/or an AI-dedicated processor such as a neural processing unit (NPU). The one or a plurality of processors 202 may control the processing of the input data in accordance with predefined operating rules or artificial intelligence (AI) models stored in the non-volatile memory and the volatile memory, i.e., memory 204. The predefined operating rules or artificial intelligence models are provided through training or learning.
[0037] In an embodiment, the memory 204 may include any non-transitory computer-readable medium known in the art, including, for example, volatile memory, such as static random access memory (SRAM) and dynamic random-access memory (DRAM), and/or non-volatile memory, such as read-only memory (ROM), erasable programmable ROM, flash memories, hard disks, optical disks, and magnetic tapes.
[0038] In an embodiment, the modules 206 may include one or more distinct functional units or functional components implemented in hardware, software, firmware, or any combination thereof, configured to perform one or more specific operations within the system. The modules 206 may include executable instructions stored in the memory 204, logic circuitry within the processor 202, dedicated hardware blocks, or a combination thereof. The modules 206 may be implemented as a standalone component or as part of an integrated subsystem. The term “module” is not limited to any particular physical form and may include distributed components that collectively perform the stated function. The expression “plurality of modules” refers to two or more modules, each of which may perform distinct functions or may collectively cooperate to achieve a composite system-level function. The modules 206 may reside within a single device, for example, within the memory or processing subsystem, or distributed across multiple devices connected through the communication interface 218. Each module 206 may interact with the processor(s) 202, the memory 204, and the communication interface 218. The modules 206, among other things, include routines, programs, objects, components, data structures, etc., which perform particular tasks or implement data types. The modules 206 may also be implemented as signal processor(s), state machine(s), logic circuitries, and/or any other device or component for processing the received signals and detecting the symbol boundaries. The modules 206 may include a plurality of modules executed through the processor 202. The modules 206 include a receiving module 208, a traversing module 210, a generating module 212, an establishing module 214, and an association module 216.
[0039] In an embodiment, the receiving module 208 is configured to receive the API definition comprising at least one endpoint specification and the hierarchical request payload through the interface, for example, the browser interface 108. In some embodiments, the receiving module 208 may receive the user inputs including the API endpoint, the HTTP method types, HTTP request headers, and a structured request body through the browser interface 108. The receiving module 208 may also receive an extraction configuration including at least one extraction rule and a corresponding variable identifier associated with a first API request. The at least one extraction rule may correspond to at least one of a path-based extraction expression, for example, a JSONPath expression, or a regular-expression extraction expression. The variable identifier may indicate a unique reference name assigned to a captured or parameterized data value, enabling the value to be stored and reused in one or more subsequent API requests.
[0040] In an embodiment, the traversing module 210 is configured to recursively traverse object elements and array elements of the hierarchical request payload to identify a plurality of data fields. In a non-limiting example, the plurality of data fields may include userId, token, name, productId, orderId, and status identified from one or more nested object elements and array elements of the hierarchical request payload. In some embodiments, the traversing module 210 may traverse nested object elements and array elements to any depth of nesting. The traversing module 210 may resolve duplicate key names appearing at the same hierarchical level by distinguishing the duplicate key names via hierarchical path identifiers.
[0041] In an embodiment, the generating module 212 is configured to generate the hierarchical path identifier indicative of a location of the data field within the hierarchical request payload for each identified data field. The generating module 212 is further configured to generate a field registry including associations between the identified data fields, the corresponding hierarchical path identifiers, and the associated parameter variables. The field registry may store mappings between data field names, corresponding hierarchical positions within the request payload, and corresponding variable names for use in the generated performance test plan. In some embodiments, the generating module 212 may generate a test-plan file indicative of a performance testing script, including one or more request definitions incorporating parameterized inputs and variable references mapped to a tabular data source file.
[0042] In an embodiment, the establishing module 214 is configured to establish a parameterisation configuration based on the field registry by resolving duplicate data field names using the corresponding hierarchical path identifiers and associating selected data fields with corresponding parameter variables. In some embodiments, the establishing module 214 may define a sequence of multiple API requests wherein a subsequent request consumes a variable extracted from a preceding request by a response extractor, thereby forming a dependency chain across the sequence.
[0043] In an embodiment, the association module 216 is configured to associate the parameter variables with the data fields. In some embodiments, the association module 216 may associate the generated executable performance test plan with the configuration parameters.
[0044] In an embodiment, the system 110 may include a data manager. The data manager accepts an uploaded data file (e.g., a CSV file), previews column headers, and maps columns to the performance testing engine variables. The data manager may enable data-driven tests with existing test datasets by associating uploaded data columns with corresponding parameter variables in the generated performance test plan.
[0045] Figure 3 illustrates a block diagram of an example architecture for a system 300 for browser-based performance testing, in accordance with an embodiment of the present disclosure.
[0046] The system 300 for browser-based performance testing (hereinafter referred to as “the system 300”) includes the browser interface 108 that encompasses several interconnected components for generating and executing executable performance test plans. The system 300 may be implemented as a standalone HyperText Markup Language (HTML) file executable directly within a web browser, without code modification. Within the browser interface 108, the system 300 includes an API input UI 302, a path-aware JSON parser 304, a response extractor builder 306, a sequential API chainer 308, and a script generation engine 310.
[0047] In an embodiment, the API input UI 302 receives the user inputs. The API input UI 302 is connected to the path-aware JSON parser 304, which recursively parses the structured request body to traverse the nested object elements and array elements, identify fields, and assign each field the hierarchical path identifier.
[0048] In an embodiment, the path-aware JSON parser 304 uses a dot-separated path notation format for objects, for example, object.child.leaf, and array index notation for arrays, for example, array.0.field. Variable naming in the path-aware JSON parser 304 converts hierarchical paths to an underscored format, for example, object_child_leaf, for compatibility with performance testing engine variable syntax. The path-aware JSON parser 304 is connected to the response extractor builder 306.
[0049] In an embodiment, the response extractor builder 306 configures response extractors to extract data from API responses. In some embodiments, the response extractor builder 306 receives the extraction configuration based on the API definition and the parameterisation configuration, through the browser interface 108. The extraction configuration includes the at least one extraction rule and the corresponding variable identifier associated with the first API request. The response extractor builder 306 enables configuration of extraction rules that capture a response value and associate the captured response value with corresponding variable identifiers for use in subsequent API requests. The response extractor builder 306 is connected to the sequential API chainer 308.
[0050] In an embodiment, the sequential API chainer 308 defines sequences of multiple API requests wherein the subsequent API request consumes a variable extracted from a preceding request, thereby forming a dependency chain across the sequence. In some embodiments, the sequential API chainer 308 generates a controller element of a selected controller type that groups a plurality of request elements within the executable performance test plan, such as an interleaved-execution controller or a random-execution controller. For example, in a JMeter implementation, the sequential API chainer 308 may generate InterleaveController or RandomController XML elements grouping multiple HTTPSamplerProxy elements based on a controller type selection. The sequential API chainer 308 is connected to the script generation engine 310.
[0051] In an embodiment, the script generation engine 310 is configured to build the test-plan XML structure incorporating the parameterised requests and extraction configurations. The script generation engine 310 outputs .jmx and .csv downloads, which may be transmitted to the bridge server 312 (corresponding to bridge server 114 of Figure 1). For example, the bridge server 312 operates as a proxy on localhost:3456 that interfaces with a performance testing engine 314, for example, JMeter Headless.
[0052] In an embodiment, the performance testing engine 314 may operate in a non-graphical execution mode on the local machine and execute the generated executable performance test plans within the local environment. In an exemplary embodiment, when the performance testing engine 314 is implemented as JMeter Headless, the generated .jmx XML follows a standard JMeter 3.x+ schema and is compatible with JMeter versions 3.0 through 5.x. For example, the performance testing engine path and classpath are configurable in the bridge server 312. The performance testing engine 314 provides metrics to a live dashboard 316.
[0053] In an embodiment, the live dashboard 316 may display execution metrics. In some embodiments, the live dashboard 316 displays an aggregate statistics table with P90, P95, and P99 percentile metrics in addition to the throughput, average response time, and error rate of the execution metrics. In one embodiment, the live dashboard 316 may receive metrics from the performance testing engine 314 and present the metrics through the browser interface 108, enabling the users 102 to monitor test execution progress without requiring external tools or terminal access. In an embodiment, the system 300 uses a Chart.js library loaded with a defer attribute for non-blocking live dashboard 316 visualization. The defer attribute enables the Chart.js library to load asynchronously without blocking the rendering of the browser interface 108. The live dashboard 316 may use the Chart.js library to display the execution metrics in real time during test execution.
[0054] In an embodiment, the system 110 may include an auto-correlation engine that accepts the API response through the browser interface 108, scans the API response for the path-based extraction expressions and presents the path-based extraction expressions as candidate response extractors. The auto-correlation engine eliminates manual identification of extraction paths from raw JSON by automatically generating candidate extraction rules based on the structure of the API response. The candidate response extractors may be selected through the interface to configure the extraction configuration comprising the at least one extraction rule and the corresponding variable identifier associated with the first API request.
[0055] In an embodiment, the system 110 may include a script manager component that may provide in-session storage of generated test-plan files with search, view, download, and delete operations. The script manager component may enable downloading of the test-plan file and the data file, for example, the test-plan file in a .jmx format and the data file in a .csv format. The script manager component may persist generated test-plan files for a browser session duration, enabling the users to manage multiple generated executable performance test plans within a single session without requiring external file system access.
[0056] Figure 4 illustrates an example flowchart for a method 400 depicting a recursive traversal workflow, in accordance with an embodiment of the present disclosure. The method 400 may be implemented by the path-aware JSON parser 304.
[0057] In an embodiment, at operation 402, the method 400 may include receiving JSON input by pasting raw JSON data representative of the hierarchical request payload. The JSON input may include the hierarchical request payload containing the nested object elements and array elements at arbitrary nesting depths.
[0058] In an embodiment, at operation 404, the method 400 may include parsing using JSON.parse() validation. The parsing may validate the structure of the received JSON input and prepare the hierarchical request payload for the recursive traversal.
[0059] In an embodiment, at operation 406, the method 400 may include performing the recursive traversal using a depth-first scan approach. The recursive traversal may include recursively traversing the nested object elements and the array elements to any nesting depth within the hierarchical request payload. The depth-first scan identifies the plurality of data fields by visiting each node in the hierarchical structure and extracting leaf-level values along with their positions within the structure.
[0060] In an embodiment, at operation 408, the method 400 may include assigning, using path ID assignment, the hierarchical path identifiers to the each identified data field. The hierarchical path identifier is generated by concatenating hierarchical levels encountered during traversal. In a non-limiting example, the data field located within the nested object elements may be assigned the hierarchical path identifier such as user.address.city, where each level of the hierarchy is concatenated using dot notation. For the array elements, the path notation includes array index notation, for example, array.0.field, indicating the position of the data field within the array.
[0061] In an embodiment, at operation 410, the method 400 may include distinguishing fields with identical key names appearing at different paths within the hierarchical request payload using duplicate resolution. When establishing the parameterisation configuration, the method 400 may include resolving duplicate data field names using the corresponding hierarchical path identifiers. For example, when a key name such as “id” appears at multiple locations within the hierarchical request payload, such as items.0.id and items.1.id, the method 400 assigns distinct parameter variables to respective occurrences of the identical data field names occurring at different hierarchical locations based on the corresponding hierarchical path identifiers. The duplicate resolution preserves both occurrences as independent variables with distinct fully-qualified path identifiers.
[0062] In an embodiment, at operation 412, the method 400 may include converting path identifiers to variable names during variable name generation. The variable naming converts hierarchical paths to an underscored format, such as the user_address_city, for compatibility with performance testing engine variable syntax. The method 400 generates the field registry including associations between the identified data fields, the corresponding hierarchical path identifiers, and the associated parameter variables.
[0063] In an embodiment, at operation 414, the method 400 may include presenting interactive elements in the user interface for field selection using pill rendering and selection. The interactive elements enable the user 102 to select the data fields for parameterisation from among the plurality of identified data fields. The method 400 establishes the parameterisation configuration based on the field registry by associating the selected data fields with the corresponding parameter variables.
[0064] In an embodiment, at operation 416, the method 400 may include parameterization, replacing the field values with the variable references. For example, a field value such as “city” may be replaced with a variable reference such as ${city}. The parameterised hierarchical request payload incorporates the variable references mapped to a tabular data source file, enabling data-driven performance testing with variable substitutions during test execution.
[0065] Figure 5 illustrates an input processing workflow 500 depicting data flow through the script generation engine 310, in accordance with an embodiment of the present disclosure.
[0066] In an embodiment, at operation 502, the inputs include several categories of user-provided data, including the API endpoint, the method specification, the request headers, the parameterised hierarchical request payload and the load configuration parameters. The parameterised hierarchical request payload contains variable references in a format such as ${variableName}. The load configuration parameters include the thread count and ramp-up settings, the timer configuration options supporting constant, uniform, and Gaussian distribution types, extractors and chain steps definitions, and an authentication token. The inputs correspond to the API definition, the parameterisation configuration and the extraction configuration.
[0067] In an embodiment, at operation 504, the script generation engine 310 operates as client-side JavaScript executing within a browser environment. In an exemplary embodiment, the script generation engine 504 performs a sequence of processing steps within the JMeter implementation. Firstly, the script generation engine 310 builds a test plan structure and thread group structure. Further, the script generation engine 310 inserts a data source configuration element referencing the data file; for example, a CSVDataSet element. Further, the script generation engine 310 builds a header manager element for HTTP headers. Further, the script generation engine 310 builds a primary request element, for example, an HTTPSamplerProxy element. Further, the script generation engine 310 injects a timer element based on a selected timer configuration. Further, the script generation engine 310 inserts response extractors for capturing values from the API responses. For example, the response extractors may write extracted values to the CSV file. The CSV file containing extracted values may be used as the data source for a downstream script, thereby creating a declarative cross-script variable chain. The cross-script variable chain enables the response values captured from one performance test execution to be consumed as input data for a subsequent performance test execution. Furthermore, the script generation engine 310 appends chain step samplers for sequential API requests. Further, the script generation engine 310 adds result collector listeners for gathering test metrics; for example, the listeners may be ResultCollector elements. Further, the script generation engine 310 serializes the constructed structure to the test-plan file format; for example, the structure may be serialized to a JMX string format. Finally, the script generation engine 310 generates a data file containing sample values for parameterized variables.
[0068] In an embodiment, at operation 506, the data file generated by the script generation engine 310 includes two generated artifacts. A test-plan file, for example, a file in a .jmx format, represents a test plan incorporating an HTTPSampler, timer elements, extractors, and listeners, and a data file, for example, a file in a .csv format, contains one column per variable with sample values for each parameterized field identified during the parsing process. The script generation engine 310 generates the executable performance test plan based on the parameterisation configuration and the extraction configuration, and produces, through the client-side processing, the test-plan file and the data file representative of the executable performance test plan.
[0069] Figure 6 illustrates an example workflow 600 for sequential API chaining, in accordance with an embodiment of the present disclosure. The workflow 600 represents response variable propagation between HTTP samplers within a single thread group configured for sequential execution per thread. The workflow 600 may be implemented by the sequential API chainer 308, where the variables extracted from a preceding API request by the response extractor builder 306 are propagated and referenced in one or more subsequent API requests to establish a dependency chain.
[0070] In an embodiment, at operation 602, the primary request includes performing an authentication operation with a POST request to an endpoint, for example, /api/auth/login. The primary request includes a request body containing username and password credentials. A response from the primary request contains a userId field and a token field. Further, the executable performance test plan includes at least one extraction rule configured to capture the response value from the primary request. In some cases, the at least one extraction rule includes path-based extraction expressions, for example, JSONPath expressions, $.userId and $.token that extract the userId and token values from the response. The extracted values are stored in corresponding variable identifiers such as ${userId} and ${token} for use in the subsequent API requests.
[0071] In an embodiment, at operation 604, chain step 1 follows the primary request and performs a GET request to an endpoint such as /api/users/${userId}. The chain step 1 references the variable identifier ${userId} extracted from the primary request within a request path indicative of a resource path associated with at least one subsequent API request, for example, the chain step 1. The chain step 1 includes the request header indicative of metadata containing an authorization value such as Auth ${token}, thereby referencing the variable identifier within the request header. A response from the chain step 1 contains a name field and a productId field. The path-based extraction expression, for example, a JSONPath expression $.productId, extracts the productId value and stores the extracted value in a variable identifier ${productId} for downstream use.
[0072] In an embodiment, at operation 606, chain step 2 performs a POST request to an endpoint such as /api/orders. The chain step 2 references the variable identifier ${userId} within the request payload indicative of body content associated with the chain step 2. A response from the chain step 2 contains an orderId field and a status field.
[0073] Figure 7 illustrates an example bridge server architecture 700, in accordance with an embodiment of the present disclosure. The bridge server architecture 700 depicts browser-to-performance-testing-engine communication and process management. The bridge server architecture 700 shows interaction between the browser interface 108, the bridge server 312, and the performance testing engine 314.
[0074] In an embodiment, the browser interface 108 communicates with the bridge server 312 executing on a local computing device 112. The bridge server 312 operates on localhost:3456 using Node.js and serves as the locally executing intermediary server process. The bridge server 312 binds to localhost:3456 and is not exposed to an external network, thereby maintaining data locality within the local computing environment. The bridge server 312 exposes the plurality of endpoints for communication with the browser interface 108. For example, a GET /ping endpoint provides a health check that returns a 200 OK response. A POST /run endpoint receives a generated test-plan file and a data file from the browser interface 108, writes the test-plan file and the data file to a temporary directory, and spawns the performance testing engine process. A GET /status endpoint parses a JTL file for metrics and returns execution-status information comprising a running or stopped status along with performance metrics. A POST /stop endpoint sends a SIGTERM signal to a performance testing engine 314 process to terminate a test execution. A /report endpoint enables HTML report generation in addition to the /ping, /run, /stop, and /status endpoints. In an exemplary embodiment, the browser interface 108 may receive an instruction to execute the generated test-plan file. The browser interface 108 may transmit the generated test-plan file to the bridge server 312 executing on the local computing device 112 via the POST /run endpoint. The bridge server 312 writes the test-plan file and the data file to the temporary directory before spawning the performance testing engine process.
[0075] In an embodiment, the bridge server 312 invokes the performance testing engine 314 in a non-graphical execution mode based on the generated test-plan file. For example, when the performance testing engine 314 operates in non-graphical execution mode using a command, for example, jmeter -n -t script.jmx -l results.jtl, the performance testing engine 314 writes results to a JTL file format, which is parsed incrementally for streaming metrics. In an exemplary embodiment, the browser interface 108 polls the GET /status endpoint at a two-second polling interval to receive one or more of the execution-status information and performance metrics from the bridge server 312. The bridge server 312 parses the JTL file incrementally on each /status poll and returns the execution metrics. The browser interface 108 presents one or more of the execution-status information and the performance metrics in real-time via the live dashboard 316. Further, when the user 102 initiates a stop command through the browser interface 108, the POST /stop endpoint sends a SIGTERM signal to the performance testing engine 314 child process to terminate the test execution. The bridge server 312 monitors process exit events through a child process event listener.
[0076] In an embodiment, the bridge server 312 may be implemented in alternative programming languages including Python using Flask or FastAPI frameworks, or Go, as long as the bridge server 312 exposes the same HTTP API contract comprising the /ping, /run, /stop, /status, and /report endpoints at a configurable base URL. The HTTP API contract enables the execution layer to be replaceable without changing the browser UI timer configuration panel 108.
[0077] Figure 8 illustrates an example of the browser interface selection to performance testing engine XML element mapping workflow 800, in accordance with an embodiment of the present disclosure. The browser interface selection to performance testing engine XML element mapping workflow 800 depicts configurable timer distributions. The workflow 800 includes the browser interface 108, a none timer option panel 802, a constant timer option panel 804, and a uniform random timer option panel 806.
[0078] In an embodiment, the browser interface 108 displays timer configuration options for configuring inter-request pacing behaviour of the generated executable performance test plan. The browser interface 108 receives a load profile configuration indicating the thread count, the ramp-up period, the loop count or the test duration, and a selected timer distribution type. The selected timer distribution type corresponds to at least one of no timer distribution, a constant timer distribution, a uniform random timer distribution, or a Gaussian random timer distribution. The system 110 encodes the load profile configuration into the executable performance test plan based on the selected timer distribution type.
[0079] For example, the none timer option panel 802 indicates no delay between requests for the maximum throughput. When the no timer distribution is selected, no timer element is generated in the test-plan file. The none timer option panel 802 is suited for stress tests and capacity ceiling measurements where the performance testing engine executes HTTP samplers back-to-back with no artificial delay between requests. The constant timer option panel 804 indicates a fixed delay with a ConstantTimer element. When the constant timer distribution is selected, a fixed delay of a user-specified duration in milliseconds is inserted between every request. The system 300 injects a ConstantTimer element with a configured thread delay value into the generated test-plan file. The constant timer option panel 804 is suited for steady-paced load tests where a predictable, metered request rate is desired. Further, the uniform random timer option panel 806 indicates a random delay within a minimum and maximum range with a UniformRandomTimer element. When the uniform random timer distribution is selected, the random delay drawn from a uniform distribution within the user-specified minimum and maximum range in milliseconds is applied between each request. The system 110 injects the UniformRandomTimer element with a configured range into the generated test-plan file. The uniform random timer option panel 806 is suited for realistic load tests that model variable user think-time. Further, when the Gaussian random timer distribution is selected, the system 110 injects the GaussianRandomTimer element into the generated test-plan file. The Gaussian random timer distribution applies to a random delay drawn from a Gaussian distribution with the user-specified mean and standard deviation.
[0080] In an implementation, the system 110 may operate in a batch parameterisation mode, where the system 110 may accept a field list programmatically and generate the test plan without the user interaction. The batch parameterisation mode may enable automated generation of performance test plans based on predefined field configurations. Further, the system 110 may be deployed in a containerised deployment that packages the bridge server 114,312 as a Docker image. The containerised deployment may be suitable for shared team infrastructure where multiple engineers invoke the performance testing engine remotely. Furthermore, the system 110 may be deployed behind an internal reverse proxy with authentication for enterprise environments. The reverse proxy deployment enables access control while maintaining the bridge server architecture 700 for performance test execution. Additionally, the system 110 may include a visual load curve designer that provides a clickable HTML5 canvas for drawing custom ramp-up, spike, or soak load profiles. The visual load curve designer translates the drawn load profiles into a thread schedule applied to the generated test plan, enabling the users to define non-linear load patterns through graphical interaction rather than numerical parameter entry.
[0081] Figure 9 illustrates a flowchart for a method 900 for generating the executable performance test plan for testing the APIs, in accordance with an embodiment of the present disclosure. The method 900 may be implemented by the system 110.
[0082] At step 902, the method 900 may include receiving, through the interface, the API definition including the at least one endpoint specification and the hierarchical request payload.
[0083] At step 904, the method 900 may include recursively traversing the object elements and the array elements of the hierarchical request payload to identify the plurality of data fields. The method may further include traversing the nested object elements and the array elements to any nesting depth, and generating the hierarchical path identifier by concatenating the hierarchical levels encountered during the traversal.
[0084] At step 906, the method 900 may include generating, for the each identified data field, the hierarchical path identifier indicative of the location of the data field within the hierarchical request payload.
[0085] At step 908, the method 900 may include generating the field registry including the associations between the identified data fields, corresponding hierarchical path identifiers, and associated parameter variables.
[0086] At step 910, the method 900 may include establishing the parameterisation configuration based on the field registry by resolving the duplicate data field names using the corresponding hierarchical path identifiers and the associating selected data fields with the corresponding parameter variables. The method may further include assigning the distinct parameter variables to the respective occurrences of the identical data field names occurring at the different hierarchical locations within the hierarchical request payload based on the corresponding hierarchical path identifiers.
[0087] At step 912, the method 900 may include receiving, through the interface, the extraction configuration based on the API definition and the parameterisation configuration. The extraction configuration includes at least the one extraction rule and the corresponding variable identifier associated with the first API request. The at least one extraction rule corresponds to at least one of the path-based extraction expression or the regular-expression extraction expression.
[0088] At step 914, the method 900 may include generating the executable performance test plan based on the parameterisation configuration and the extraction configuration. The executable performance test plan includes at least the one extraction rule configured to capture the response value from the first API request, and at least the one subsequent API request configured to reference the variable identifier.
[0089] At step 916, the method 900 may include producing, through the client-side processing, the test-plan file and the data file representative of the executable performance test plan. The method 900 may further include implementing the interface as the self-contained markup document configured to produce the test-plan file and the data file through the client-side processing without communication with the remote server, wherein the generated test-plan file, data file, and session state are maintained in the browser memory during the active session.
[0090] The method 900 may further include referencing the variable identifier within at least one of the request payload indicative of body content, the request header indicative of metadata, a request parameter indicative of a query parameter, or the request path indicative of a resource path associated with the at least one subsequent API request. The method 900 may further include propagating the response value associated with the first API request to the at least one subsequent API request.
[0091] The method 900 may further include receiving the load profile configuration indicating the thread count, the ramp-up period, the loop count or the test duration, and the selected timer distribution type. The method 900 may further include encoding the load profile configuration into the executable performance test plan based on the selected timer distribution type. The selected timer distribution type corresponds to at least one of the no timer distribution, the constant timer distribution, the uniform random timer distribution, or the Gaussian random timer distribution.
[0092] The method 900 may further include receiving the instruction to execute the generated test-plan file through the interface and transmitting the generated test-plan file to the bridge server (114) executing on the local computing device (112). Further, the method 900 may include invoking, by the bridge server (114), the performance testing engine in the non-graphical execution mode based on the generated test-plan file. The method 900 may further include receiving one or more of the execution-status information and the performance metrics from the bridge server (114), and presenting one or more of the execution-status information and the performance metrics in real-time through the interface.
[0093] In an advantageous embodiment, the present disclosure provides several significant advantages as described below.
[0094] The present disclosure reduces test creation time through guided auto-parameterisation, recursive parsing of hierarchical request payloads, automatic generation of hierarchical path identifiers, and path-aware resolution of duplicate data field names. The present disclosure also provides a zero-installation, browser-executable interface for generating performance test plans without desktop software, server-side infrastructure, or administrative privileges. Local data privacy is maintained because test-plan generation, data-file production, execution, API payloads, credentials, and results remain within the local computing environment. The present disclosure improves correctness of test-plan files by generating structurally valid performance testing engine XML files with the request definitions, timers, extractors, and result collectors in an executable sequence. The present disclosure further enables Postman-to-performance-testing-engine migration by converting Postman Collection files, translating variables, and mapping environment variables for generated performance test plans. Live execution visibility is provided by incrementally parsing results and displaying the throughput, response time, and error rate metrics through the browser interface without external tools or terminal access.
[0095] While specific language has been used to describe the present subject matter, any limitations arising on account thereof are not intended. As would be apparent to a person in the art, various working modifications may be made to the method in order to implement the inventive concept as taught herein. The drawings and the foregoing description give examples of embodiments. Those skilled in the art will appreciate that one or more of the described elements may well be combined into a single functional element. Alternatively, certain elements may be split into multiple functional elements. Elements from one embodiment may be added to another embodiment. , Claims:1. A method (900) for generating an executable performance test plan for testing application programming interfaces (APIs), the method comprising: receiving (902), through an interface, an API definition comprising at least one endpoint specification and a hierarchical request payload; recursively traversing (904) object elements and array elements of the hierarchical request payload to identify a plurality of data fields; generating (906), for each identified data field, a hierarchical path identifier indicative of a location of the data field within the hierarchical request payload; generating (908) a field registry comprising associations between the identified data fields, corresponding hierarchical path identifiers, and associated parameter variables; establishing (910) a parameterisation configuration based on the field registry by resolving duplicate data field names using the corresponding hierarchical path identifiers and associating selected data fields with corresponding parameter variables; receiving (912), through the interface, an extraction configuration based on the API definition and the parameterisation configuration, the extraction configuration comprising at least one extraction rule and a corresponding variable identifier associated with a first API request; generating (914) the executable performance test plan based on the parameterisation configuration and the extraction configuration, wherein the executable performance test plan comprises at least one extraction rule configured to capture a response value from the first API request, and at least one subsequent API request configured to reference the variable identifier; and producing (916), through client-side processing, a test-plan file and a data file representative of the executable performance test plan.
2. The method (900) as claimed in claim 1, wherein recursively traversing the hierarchical request payload comprises: traversing nested object elements and array elements to any nesting depth; and generating the hierarchical path identifier by concatenating hierarchical levels encountered during traversal.
3. The method (900) as claimed in claim 1, wherein establishing the parameterisation configuration comprises: assigning distinct parameter variables to respective occurrences of identical data field names occurring at different hierarchical locations within the hierarchical request payload based on the corresponding hierarchical path identifiers.
4. The method (900) as claimed in claim 1, wherein the at least one extraction rule corresponds to at least one of a path-based extraction expression or a regular-expression extraction expression.
5. The method (900) as claimed in claim 1, further comprising: referencing the variable identifier within at least one of a request payload indicative of body content, a request header indicative of metadata, a request parameter indicative of a query parameter, or a request path indicative of a resource path associated with the at least one subsequent API request; and propagating the response value associated with the first API request to the at least one subsequent API request.
6. The method (900) as claimed in claim 1, further comprising: receiving a load profile configuration indicating a thread count, a ramp-up period, a loop count or a test duration, and a selected timer distribution type; and encoding the load profile configuration into the executable performance test plan based on the selected timer distribution type.
7. The method (900) as claimed in claim 6, wherein the selected timer distribution type corresponds to at least one of no timer distribution, a constant timer distribution, a uniform random timer distribution, or a Gaussian random timer distribution.
8. The method (900) as claimed in claim 1, wherein producing the test-plan file and the data file further comprises: implementing the interface as a self-contained markup document configured to produce the test-plan file and the data file through the client-side processing without communication with a remote server, wherein the generated test-plan file, data file, and session state are maintained in browser memory during an active session.
9. The method (900) as claimed in claim 1, further comprising: receiving, through the interface, an instruction to execute the generated test-plan file; transmitting the generated test-plan file to a bridge server (114) executing on a local computing device (112); invoking, by the bridge server (114), a performance testing engine in a non-graphical execution mode based on the generated test-plan file; receiving one or more of execution-status information and performance metrics from the bridge server (114); and presenting, through the interface, one or more of the execution-status information and the performance metrics in real-time.
10. A system (110) for generating an executable performance test plan for testing application programming interfaces (APIs), the system comprising: a memory (204); and a processor (202) communicatively coupled with the memory, wherein the processor (202) is configured to: receive, through an interface, an API definition comprising at least one endpoint specification and a hierarchical request payload; recursively traverse object elements and array elements of the hierarchical request payload to identify a plurality of data fields; generate, for each identified data field, a hierarchical path identifier indicative of a location of the data field within the hierarchical request payload; generate a field registry comprising associations between the identified data fields, corresponding hierarchical path identifiers, and associated parameter variables; establish a parameterisation configuration based on the field registry by resolving duplicate data field names using the corresponding hierarchical path identifiers and associating selected data fields with corresponding parameter variables; receive, through the interface, an extraction configuration based on the API definition and the parameterisation configuration, the extraction configuration comprising at least one extraction rule and a corresponding variable identifier associated with a first API request; generate the executable performance test plan based on the parameterisation configuration and the extraction configuration, wherein the executable performance test plan comprises at least one extraction rule configured to capture a response value from the first API request, and at least one subsequent API request configured to reference the variable identifier; and produce, through client-side processing, a test-plan file and a data file representative of the executable performance test plan.