Benchmark Factory provides a REST API that allows you to access the functionality of Benchmark Factory, but without the need to interact with the Benchmark Factory graphic user interface. REST API is an application program interface (API) that uses HTTP requests to GET, POST, PUT, and DELETE data. Through the REST API, you can use a script, command-line tool, or custom application to automate your load testing tasks using Benchmark Factory.
You can use the Benchmark Factory REST API with the Benchmark Factory console application or BMFServer.exe. BMFServer.exe is a non-UI application included in the Benchmark Factory installation. See BMFServer.exe for more information.
Why Integrate Benchmark Factory
Integrating Benchmark Factory into your continuous testing / continuous improvement process allows you to test the scalability of changes before committing those changes to your production environment. Different Benchmark Factory tests can be used to validate scalability and performance.
To interface with Benchmark Factory using the REST API, use the following URI format:
https://{server}:{port}/api/{resource}
Where {server} is the Benchmark Factory host server, {port} is the port number, and {resource} is the name of the resource.
Example: https://localhost:30100/api/jobs
Use the applicable REST API port number for the Benchmark Factory application you are using.
GET - Retrieves a list of resources
POST - Creates a new resource based on the data provided in the request body
PUT - Updates the resource to the value/values provided in the data supplied in the HTTP data area
DELETE - Deletes the resource
Benchmark Factory must be running to use the REST API. Start the Benchmark Factory console or BMFServer.exe prior to sending requests via the REST API.
Note: You cannot run the Benchmark Factory console and BMFServer.exe on the same machine at the same time.
if you want to send request to the Benchmark Factory from external host,you need to add the API Key to the request header
Both XML and JSON are supported request and response formats. Specify the response format in the Accept header of the request. Indicate the request format in the Content-Type header of the request.
When you create a resource, such as a job or connection, the new resource is assigned a zero-based index. This number can be used to identify the resource. However, the index number attached to the resource will change as users remove and add resources. For best results, define a name for the resource and then use the resource name in your requests.
If a resource (such as a connection or a job) is created, the response header usually contains the URL for the newly-created resource.
These are the expected response codes returned. In addition, some other status codes may be returned if either an internal error occurs or there are other issues.
Code | Description |
---|---|
200 | Success |
201 | Success. Resource created. |
204 | Success. No content returned. |
400 | The request failed. |
401 | Unauthorized. |
404 | The specified resource was not found. |
405 | The method is not supported for the specified resource. |
Each job state or status has a code. These are the codes returned when you get the job status. Use these codes to change a job’s status (e.g., start a job, stop a job).
Code | Status | Action when included in a request |
---|---|---|
1 | Complete | Stops a running job. |
2 | Running | Runs a job, if possible. |
3 | Ready | Readies a job to run on schedule. Stops a running job. |
4 | Hold | Prevents a job from running. Stops a running job. |
5 | Stop | Stops a running job. |
The following represents the object structure for the resources in the Benchmark Factory REST API.
Connections
Connection
Jobs
Job
Connection
Agents
Agent
Tests
Test
Transactions
Transaction
Schedule
TestRuns
TestRun
Connection
Test
UserLoadResults
UserLoadResult
TransactionResults
TransactionResult
SubTransactionResults
SubTransactionResult
NodeResults
NodeResult
TestFiles
TestFile
Agents
Agent
DriverInfos
DriverInfo
Settings
Benchmark
AS3AP
ObjectDataRetention
Replication
TableStructure
Columns
Scalable Hardware
Column
TPC-B
TPC-C
TPC-D
TPC-E
TPC-H
ErrorHandling
Threshold
ExecuteFile
General
Directories
Directory
Retrieval
TCPIP
Agent
UserAgents
Latency
InterarrivalTime
KeyingTime
ThinkTime
Oracle
AWRADDM
Statspack
Repository
Statistics
Timing
UserStartup
Userload
Use the following links to find the Benchmark Factory REST API resource descriptions, as well as additional information to help you get started with the REST API.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Términos de uso Privacidad Cookie Preference Center