List Tests

API Explorer: /tests

To return a list of created functional tests, a projectId or a workspaceId and a type attribute is required. The sample code returns a list for items with a workspaceId of 123456 and a type of functionalApi. Use the actual ID values for the project or workspace and one of the type values (can be functionalApi (API Functional tests) or functionalGui (GUI Functional tests)) to return the list of its tests. Use the actual ID values for the project or workspace and type value to return the list of its tests.

Additional tests for the specified criteria would be contained after the 2345678 listing.

You can return a list specifying either a projectId, a workspaceId, or both and a type. The returned list contains each test's testId (shows up as id in the response) and configuration.

The test configuration includes the file the test is assigned to start with. In the response, see "filename": "MyTest.jmx" for an example.

List Tests

curl 'https://a.blazemeter.com/api/v4/tests?workspaceId=123456&type=functionalApi' \
    --user 'api_key_id:api_key_secret'

List Tests Parameters

Parameters

  • projectId integer

    required

    The projectId you are wanting to get the list of tests from

  • workspaceId integer

    required

    The workspaceId you are wanting to get the list of tests from

  • name string

    The unique string for a test name to search for. For example, the string My Test will pull all results with this string in the name of the test

  • platform string

    The platform of tests to search for. This will always be functional for API and GUI functional tests

  • type string

    Searches by the test type. The following values are for functional:
    functionalApi - Returns a list of API Functional tests
    functionalGui - Returns a list of GUI Functional tests

Starting February 2022, the API Functional testing feature has been deprecated. Depending on your subscription plan, you may still be able to run existing tests but can no longer create new ones. Please use BlazeMeter API Monitoring to create and run your API Functional Tests going forward.
  • hasExecutions boolean

    Shows the list of tests that have (if set to true) or have no (if set to false) masters


Also see: Pagination and Sorting

All timestamps are in UNIX Epoch time.

List Tests Response Attributes

For all the supported attributes, see the The API Functional Test Object and The GUI Functional Test Object.

Response200 OK

{
    "limit": 10,
    "skip": 0,
    "total": 47,
    "hidden": 0,
    "api_version": 4,
    "error": null,
    "result": [
        {
            "id": 1234567,
            "name": "API Created API Functional Test",
            "isNewTest": true,
            "userId": 123456,
            "created": 1577382114,
            "updated": 1577389061,
            "creatorClientId": "api",
            "overrideExecutions": [
                {
                    "iterations": 1
                }
            ],
            "executions": [
                {
                    "iterations": 1,
                    "scenario": "default-scenario-1234567"
                }
            ],
            "shouldSendReportEmail": false,
            "projectId": 123456,
            "lastUpdatedById": 123456,
            "configuration": {
                "type": "functionalApi",
                "canControlRampup": false,
                "targetThreads": 0,
                "scriptType": "jmeter",
                "filename": "MyTest.jmx",
                "testMode": "script",
                "plugins": {
                    "jmeter": {
                        "version": "auto"
                    }
                }
            }
        },
        {
            "id": 2345678,
            "name": "December_26_11:36 AM - API Functional Test",
            "isNewTest": true,
            "userId": 123456,
            "created": 1577381775,
            "updated": 1577383294,
            "creatorClientId": "gui",
            "overrideExecutions": [
                {
                    "executor": "jmeter",
                    "holdFor": "19m",
                    "rampUp": "1m",
                    "concurrency": 20,
                    "locations": {
                        "us-east4-a": 20
                    },
                    "locationsPercents": {
                        "us-east4-a": 100
                    },
                    "steps": 0
                }
            ],
            "executions": [
                {
                    "concurrency": 20,
                    "holdFor": "19m",
                    "rampUp": "1m",
                    "steps": 0,
                    "locations": {
                        "us-east4-a": 20
                    },
                    "locationsPercents": {
                        "us-east4-a": 100
                    },
                    "executor": "jmeter",
                    "scenario": "default-scenario-2345678"
                }
            ],
            "shouldSendReportEmail": false,
            "projectId": 123456,
            "lastUpdatedById": 123456,
            "configuration": {
                "type": "functionalApi",
                "dedicatedIpsEnabled": false,
                "canControlRampup": false,
                "targetThreads": 500,
                "scriptType": "jmeter",
                "threads": 500,
                "filename": "DemoBlaze.jmx",
                "testMode": "script",
                "plugins": {
                    "jmeter": {
                        "version": "auto"
                    }
                }
            }
        }
        ...
    ]
}