--- title: "Jenkins integration guide" slug: "jenkins-integration-guide" updated: 2026-02-04T05:37:48Z published: 2026-02-04T05:37:48Z canonical: "helpcenter.autify.com/jenkins-integration-guide" --- > ## Documentation Index > Fetch the complete documentation index at: https://helpcenter.autify.com/llms.txt > Use this file to discover all available pages before exploring further. # Jenkins integration guide > [!NOTE] > **CI/CD integration requires a cloud test execution environment.** This article explains how to integrate Autify Nexus with Jenkins. Specifically, it helps you understand how to run a test plan via the Autify Nexus API from a Jenkins node. ## Prerequisites You will need the following information from Autify Nexus: - Nexus server URL - API Client Secret - Test plan name You will also need to install the [jq](https://jqlang.org/) command on your Jenkins node to run the code example on this page. More information about the prerequisite information can be found in the table below. | **Nexus server URL** | The URL you use to login to Autify Nexus, for example, `https://1234.cloud.autify.com` | | --- | --- | | **API Client secret** | The client secret for the API client you created in Autify Nexus. [See API Documentation for more information.](https://helpcenter.autify.com/apidocs/getting-started-with-the-autify-nexus-api) | | **Test plan name** | The case-sensitive name of the test plan you run in Jenkins. It must exactly match what is shown in Autify Nexus. | ## Save the client secret as a credential The client secret should be stored as a credential in Jenkins. 1. Click **Manage Jenkins** on the dashboard page ![Screenshot_2025-04-15_at_10_29_05_2.png](https://cdn.document360.io/c040854c-2c75-49d0-98e1-43f462e8657e/Images/Documentation/Screenshot_2025-04-15_at_10_29_05_2.png?sv=2026-02-06&spr=https&st=2026-11-23T19%3A14%3A35Z&se=2026-11-23T20%3A14%3A35Z&sr=b&sp=r&sig=CbsCyefyIhEU7Z25m9YV34CayLTDWjdRVC%2BTzV%2BaaHI%3D) 1. Click **Credentials** ![Screenshot_2025-04-15_at_10_29_33.png](https://cdn.document360.io/c040854c-2c75-49d0-98e1-43f462e8657e/Images/Documentation/Screenshot_2025-04-15_at_10_29_33.png?sv=2026-02-06&spr=https&st=2026-11-23T19%3A14%3A35Z&se=2026-11-23T20%3A14%3A35Z&sr=b&sp=r&sig=T0q9Rih1zC1v8JXyBLz15D%2F7Nzkbw1jdD%2BPJHXDhySs%3D) 1. Set the domain in which you want to add the secret ![Screenshot_2025-04-15_at_10_29_54.png](https://cdn.document360.io/c040854c-2c75-49d0-98e1-43f462e8657e/Images/Documentation/Screenshot_2025-04-15_at_10_29_54.png?sv=2026-02-06&spr=https&st=2026-11-23T19%3A14%3A35Z&se=2026-11-23T20%3A14%3A35Z&sr=b&sp=r&sig=jLP9e5%2BDbJmCqSC2OxKkTIwF1AOX%2BTPmbXdc8V6228I%3D) 1. Click **+ Add Credentials** ![Screenshot_2025-04-15_at_10_30_24.png](https://cdn.document360.io/c040854c-2c75-49d0-98e1-43f462e8657e/Images/Documentation/Screenshot_2025-04-15_at_10_30_24.png?sv=2026-02-06&spr=https&st=2026-11-23T19%3A14%3A35Z&se=2026-11-23T20%3A14%3A35Z&sr=b&sp=r&sig=aiMiaEKT5uQczGvK2pc12zChlILaIzYsXws8y70t%2FRo%3D) 1. Under the Kind section, select the Secret text option 2. In the Secret field, enter the API client secret 3. Enter the credential name as ID (example: AUTIFY_CLIENT_SECRET) 4. Click **Create** ![Screenshot_2025-04-15_at_15_18_25.png](https://cdn.document360.io/c040854c-2c75-49d0-98e1-43f462e8657e/Images/Documentation/Screenshot_2025-04-15_at_15_18_25.png?sv=2026-02-06&spr=https&st=2026-11-23T19%3A14%3A35Z&se=2026-11-23T20%3A14%3A35Z&sr=b&sp=r&sig=VJI8Ik%2FPWu6fbOvR1L1xz44q93Hg33ktk1xIeJIbAdY%3D) The credential that you have added can be seen on the credentials list. ![Screenshot_2025-04-15_at_16_08_37.png](https://cdn.document360.io/c040854c-2c75-49d0-98e1-43f462e8657e/Images/Documentation/Screenshot_2025-04-15_at_16_08_37.png?sv=2026-02-06&spr=https&st=2026-11-23T19%3A14%3A35Z&se=2026-11-23T20%3A14%3A35Z&sr=b&sp=r&sig=IQb8q9UZwBEsPdejHq5hRvHkQ4FKcqWU13cQ7UW6Sn8%3D) ## Create a job 1. To define a new job, click **+ New Item** on the dashboard. ![Screenshot_2025-04-15_at_10_29_05.png](https://cdn.document360.io/c040854c-2c75-49d0-98e1-43f462e8657e/Images/Documentation/Screenshot_2025-04-15_at_10_29_05.png?sv=2026-02-06&spr=https&st=2026-11-23T19%3A14%3A35Z&se=2026-11-23T20%3A14%3A35Z&sr=b&sp=r&sig=vegs5ST9doLLAE6MCWLihqZUEDGxa%2FkI8jdjt6eHJQ4%3D) 1. Input the job name as the item name 2. Choose **Freestyle project** as the item type 3. Click **OK** ![Screenshot_2025-04-15_at_10_22_05.png](https://cdn.document360.io/c040854c-2c75-49d0-98e1-43f462e8657e/Images/Documentation/Screenshot_2025-04-15_at_10_22_05.png?sv=2026-02-06&spr=https&st=2026-11-23T19%3A14%3A35Z&se=2026-11-23T20%3A14%3A35Z&sr=b&sp=r&sig=8VDN42Zbi7KlHWDkvnuoKC5wjIk9EtIXLP18OhzyvMA%3D) 1. In the Build Environment section, select Use secret text(s) or file(s) 2. Enter the name of the client secret you added in the previous section as Variable 3. Select the credential for that client secret from the Credentials list ![Screenshot_2025-04-15_at_16_13_13.png](https://cdn.document360.io/c040854c-2c75-49d0-98e1-43f462e8657e/Images/Documentation/Screenshot_2025-04-15_at_16_13_13.png?sv=2026-02-06&spr=https&st=2026-11-23T19%3A14%3A35Z&se=2026-11-23T20%3A14%3A35Z&sr=b&sp=r&sig=TDiuT8bG6ss458OC3a2D9RqNoJhg0luwLnKelPa2uSM%3D) 1. In the Build Steps section, select Execute shell as the build step ![Screenshot_2025-04-15_at_10_22_56.png](https://cdn.document360.io/c040854c-2c75-49d0-98e1-43f462e8657e/Images/Documentation/Screenshot_2025-04-15_at_10_22_56.png?sv=2026-02-06&spr=https&st=2026-11-23T19%3A14%3A35Z&se=2026-11-23T20%3A14%3A35Z&sr=b&sp=r&sig=ojJO7q7TFaJOzajxVuvQNaNGaNmeD7XBwlmfYr1MOLM%3D) 1. Enter the code in the code input field For example, the following code runs the test plan found by name. The required information varies depending on your usage, so adjust it accordingly. ![image.png](https://cdn.document360.io/c040854c-2c75-49d0-98e1-43f462e8657e/Images/Documentation/image%2874%29.png?sv=2026-02-06&spr=https&st=2026-11-23T19%3A14%3A35Z&se=2026-11-23T20%3A14%3A35Z&sr=b&sp=r&sig=yNRNpbyylJEUb5O8Eple61Sd0SR7%2BgpMCMMmW%2BVLob4%3D) ```bash # ENV vars SERVER_URL='https://' TEST_PLAN_NAME='' # WORKSPACE_ID=''  # Optional: specify if you have multiple workspaces # Set authorization header using API client secret directly AUTH_HEADER="Authorization: Bearer ${AUTIFY_CLIENT_SECRET}" ACCEPT_HEADER='Accept: application/json' # Get workspace ID (use first workspace if not specified) res=$(  curl \    --silent \    --show-error \    --url "${SERVER_URL}/nexus/api/workspaces" \    --header "$AUTH_HEADER" \    --header "$ACCEPT_HEADER" ) if [ -z "${WORKSPACE_ID:-}" ]; then  WORKSPACE_ID=$(echo "$res" | jq -r '.[0].id') fi if [ -z "$WORKSPACE_ID" ] || [ "$WORKSPACE_ID" = "null" ]; then  echo "Workspace not found. Response: ${res}"  exit 1 fi echo "Workspace ID: ${WORKSPACE_ID}" # Get test plan ID res=$(  curl \    --silent \    --show-error \    --url "${SERVER_URL}/nexus/api/workspaces/${WORKSPACE_ID}/testPlans" \    --header "$AUTH_HEADER" \    --header "$ACCEPT_HEADER" ) TEST_PLAN_ID=$(echo "$res" | jq -r --arg NAME "$TEST_PLAN_NAME" '.[] | select(.name == $NAME) | .id') if [ -z "$TEST_PLAN_ID" ]; then  echo "Test plan '${TEST_PLAN_NAME}' not found. Response: ${res}"  exit 1 fi echo "Test plan ID for '${TEST_PLAN_NAME}': ${TEST_PLAN_ID}" # Run the test plan res=$(  curl \    --silent \    --show-error \    --request POST \    --url "${SERVER_URL}/nexus/api/workspaces/${WORKSPACE_ID}/testPlans/${TEST_PLAN_ID}/run" \    --header "$AUTH_HEADER" \    --header "$ACCEPT_HEADER" ) RESULT_ID=$(echo "$res" | jq -r '.resultId') if [ "$RESULT_ID" = "null" ]; then  echo "Failed to start test plan. Response: ${res}"  exit 1 fi echo "Test started. Result ID: ${RESULT_ID}" echo "Waiting for test to complete..." # Polling for result status STATUS="QUEUED" while [ "$STATUS" = "QUEUED" ] || [ "$STATUS" = "RUNNING" ]; do  sleep 5  res=$(    curl \      --silent \      --show-error \      --url "${SERVER_URL}/nexus/api/workspaces/${WORKSPACE_ID}/testResults/${RESULT_ID}/status" \      --header "$AUTH_HEADER" \      --header "$ACCEPT_HEADER"  )  STATUS=$(echo "$res" | jq -r '.status')  if [ "$STATUS" = "null" ]; then    echo "Failed to fetch result status. Response: ${res}"    exit 1  fi  echo "Current status: $STATUS" done echo "Final status: $STATUS" ``` 1. Click **Save** to register the job ## Run the job and verify it works After defining a job, make sure if it works as expected. 1. Click the job name on the dashboard ![image.png](https://cdn.document360.io/c040854c-2c75-49d0-98e1-43f462e8657e/Images/Documentation/image%2867%29.png?sv=2026-02-06&spr=https&st=2026-11-23T19%3A14%3A35Z&se=2026-11-23T20%3A14%3A35Z&sr=b&sp=r&sig=QiltoYOfNg6tRAeI1KdQwZHb6HV0zlNmydVzI0k3iZw%3D) 1. Click **Build Now** to start the job ![image.png](https://cdn.document360.io/c040854c-2c75-49d0-98e1-43f462e8657e/Images/Documentation/image%2868%29.png?sv=2026-02-06&spr=https&st=2026-11-23T19%3A14%3A35Z&se=2026-11-23T20%3A14%3A35Z&sr=b&sp=r&sig=HwY%2FlDOSFB%2FaIHkZ6FKcoSmV3h1oMB6kXwC4hShpzJI%3D) The build status can be seen in the left side of the page. 1. Click the top item in the **Builds** pane ![image.png](https://cdn.document360.io/c040854c-2c75-49d0-98e1-43f462e8657e/Images/Documentation/image%2869%29.png?sv=2026-02-06&spr=https&st=2026-11-23T19%3A14%3A35Z&se=2026-11-23T20%3A14%3A35Z&sr=b&sp=r&sig=I%2FBMjBUCdo0SvsZ3mneWKhgLHxJEFZdHBcmumBGrjDA%3D) The output can be seen by clicking the **Console Output**. ![image.png](https://cdn.document360.io/c040854c-2c75-49d0-98e1-43f462e8657e/Images/Documentation/image%2870%29.png?sv=2026-02-06&spr=https&st=2026-11-23T19%3A14%3A35Z&se=2026-11-23T20%3A14%3A35Z&sr=b&sp=r&sig=pSqMnNZUADjcjAO2aA3nwqjahDu7Wr2agQ1ZyFzifBM%3D) The sample log **"Final status: PASSED"** indicates the test result in Autify Nexus. **"PASSED"** means the test succeeded. If the test fails, it is displayed as **"FAILED"**. The log **"Finished: SUCCESS"** appears on the last line of the log. This indicates the job finished without errors when communicating with the Autify Nexus API. Note that this status does not indicate whether the test result in Autify Nexus succeeded. ![image.png](https://cdn.document360.io/c040854c-2c75-49d0-98e1-43f462e8657e/Images/Documentation/image%2872%29.png?sv=2026-02-06&spr=https&st=2026-11-23T19%3A14%3A35Z&se=2026-11-23T20%3A14%3A35Z&sr=b&sp=r&sig=eh2FFfqFKArp7G%2FS21Ss0uO652cBvgjgr2GRc3nk5JI%3D)