Stay organized with collections
Save and categorize content based on your preferences.
Connectivity Tests supports periodically checking the status of
a running test operation, such as create, update, or delete. You can
still review the final test results when the test completes.
Console
The Google Cloud console uses a spinner icon to show a running test.
Behind the scenes, Connectivity Tests continuously polls for
the status of the test operation. When the test completes, you can check the
final results in the Result details panel.
To use the gcloud CLI to check a running test operation,
specify the --async option. If you don't specify this option, you see only
the final test results.
For example, creating the following test by using the --async option
immediately returns an operation resource ID to the command line. You
can then use this ID in a subsequent describe command to check test
status while the test is still running.
DESTINATION_PROJECT: the project ID of the
destination endpoint
SOURCE_IP_ADDRESS: the internal or external
source IP address that you are testing from; an IPv6 address is only
allowed when the test's destination is a global load balancer VIP
DESTINATION_IP_ADDRESS: the internal or
external source IP address that you are testing to; an IPv6 address is
only allowed when the test's destination is a global load balancer VIP
SOURCE_PROJECT: the project ID of the source
endpoint
The output is the following:
Create request issued for: [gcloud-example]
Check operation [projects/reachability-e2e-test/locations/global/operations/operation-1580411210002-59d6028c56f71-85ef2899-54d8bc13] for status
Use the operation resource ID with the describe
command to check on the test's status:
SOURCE_PROJECT: the project ID of the source endpoint
OPERATION_RESOURCE_ID: the resource ID for the in-progress
operation that you are checking (for example,
operation-1580411210002-59d6028c56f71-85ef2899-54d8bc13)
The following sample output for the previous command shows done: false.
When the test completes, this field changes to done: true.
Repeat the previous describe command until the output shows done: true.
API
The Network Management API is always in async mode. When you issue
a command to the API, you immediately receive an operation ID. You can
use this ID to periodically check test status.
Python
The Network Management API is always in async mode. When you use the
API Python client to issue a request, you immediately receive an operation ID.
You can use this ID to periodically check test status.
PROJECT_ID: the project ID for the project in which
you created the test
OPERATION_ID: the resource ID for the in-progress
operation that you are checking (for example,
operation-1580411210002-59d6028c56f71-85ef2899-54d8bc13)
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Check a running test operation\n\nConnectivity Tests supports periodically checking the status of\na running test operation, such as `create`, `update`, or `delete`. You can\nstill review the final test results when the test completes. \n\n### Console\n\nThe Google Cloud console uses a spinner icon to show a running test.\nBehind the scenes, Connectivity Tests continuously polls for\nthe status of the test operation. When the test completes, you can check the\nfinal results in the **Result details** panel.\n\nFor more information about Google Cloud console pages, see\n[Create and run Connectivity Tests](/network-intelligence-center/docs/connectivity-tests/how-to/running-connectivity-tests).\n\n### gcloud\n\nTo use the gcloud CLI to check a running test operation,\nspecify the `--async` option. If you don't specify this option, you see only\nthe final test results.\n\n1. For example, creating the following test by using the `--async` option\n immediately returns an *operation resource ID* to the command line. You\n can then use this ID in a subsequent `describe` command to check test\n status while the test is still running.\n\n ```\n gcloud network-management connectivity-tests create NAME \\\n --destination-project=DESTINATION_PROJECT \\\n --source-ip-address=SOURCE_IP_ADDRESS \\\n --destination-ip-address=DESTINATION_IP_ADDRESS \\\n --protocol=PROTOCOL \\\n --source-project=SOURCE_PROJECT \\\n --async\n ```\n\n Replace the following values:\n - \u003cvar translate=\"no\"\u003eNAME\u003c/var\u003e: the name of the Connectivity Tests\n - \u003cvar translate=\"no\"\u003eDESTINATION_PROJECT\u003c/var\u003e: the project ID of the destination endpoint\n - \u003cvar translate=\"no\"\u003eSOURCE_IP_ADDRESS\u003c/var\u003e: the internal or external source IP address that you are testing from; an IPv6 address is only allowed when the test's destination is a global load balancer VIP\n - \u003cvar translate=\"no\"\u003eDESTINATION_IP_ADDRESS\u003c/var\u003e: the internal or external source IP address that you are testing to; an IPv6 address is only allowed when the test's destination is a global load balancer VIP\n - \u003cvar translate=\"no\"\u003ePROTOCOL\u003c/var\u003e: a [supported\n protocol](/network-intelligence-center/docs/connectivity-tests/concepts/overview#endpoints) for Connectivity Tests\n - \u003cvar translate=\"no\"\u003eSOURCE_PROJECT\u003c/var\u003e: the project ID of the source endpoint\n\n The output is the following: \n\n ```\n Create request issued for: [gcloud-example]\n Check operation [projects/reachability-e2e-test/locations/global/operations/operation-1580411210002-59d6028c56f71-85ef2899-54d8bc13] for status\n ```\n2. Use the operation resource ID with the `describe`\n command to check on the test's status:\n\n ```\n gcloud network-management operations describe \\\n projects/SOURCE_PROJECT/locations/global/operations/OPERATION_RESOURCE_ID\n ```\n\n Replace the following values:\n - \u003cvar translate=\"no\"\u003eSOURCE_PROJECT\u003c/var\u003e: the project ID of the source endpoint\n - \u003cvar translate=\"no\"\u003eOPERATION_RESOURCE_ID\u003c/var\u003e: the resource ID for the in-progress operation that you are checking (for example, `operation-1580411210002-59d6028c56f71-85ef2899-54d8bc13`)\n\n The following sample output for the previous command shows `done: false`.\n When the test completes, this field changes to `done: true`. \n\n ```\n done: false\n metadata:\n '@type': type.googleapis.com/google.cloud.networkmanagement.v1.OperationMetadata\n apiVersion: v1\n cancelRequested: false\n createTime: '2020-01-30T19:06:50.055838110Z'\n endTime: '2020-01-30T19:06:57.637200039Z'\n target: projects/reachability-e2e-test/locations/global/connectivityTests/gcloud-example\n verb: create\n name:\n projects/reachability-e2e-test/locations/global/operations/operation-1580411210002-59d6028c56f71-85ef2899-54d8bc13\n response:\n '@type': type.googleapis.com/google.cloud.networkmanagement.v1beta1.ConnectivityTest\n createTime: '2020-01-30T19:06:50.050012906Z'\n ... // Full resource metadata displayed here.\n ```\n3. Repeat the previous `describe` command until the output shows `done: true`.\n\n### API\n\nThe Network Management API is always in `async` mode. When you issue\na command to the API, you immediately receive an operation ID. You can\nuse this ID to periodically check test status.\n\n### Python\n\nThe Network Management API is always in `async` mode. When you use the\nAPI Python client to issue a request, you immediately receive an operation ID.\nYou can use this ID to periodically check test status.\n\nSee the following example: \n\n```\nproject_id = 'PROJECT_ID'\noperation_id = 'OPERATION_ID'\n\nrequest = api.projects().locations().global_().operations().get(\n name='projects/%s/locations/global/operations/%s' % (project_id, operation_id))\n\nprint(json.dumps(request.execute(), indent=4))\n```\n\nReplace the following values:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID for the project in which you created the test\n- \u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e: the resource ID for the in-progress operation that you are checking (for example, `operation-1580411210002-59d6028c56f71-85ef2899-54d8bc13`)\n\nWhat's next\n-----------\n\n- [Learn about Connectivity Tests](/network-intelligence-center/docs/connectivity-tests/concepts/overview)\n- [Troubleshoot Connectivity Tests](/network-intelligence-center/docs/connectivity-tests/support/troubleshooting)"]]