Products
Test Agent Synthesis Engine Self-Healing Tests Smart Regression Post-Deploy Guard Case Importer CI/CD Integrations
Resources
Docs Quickstart Changelog Blog
Solutions
Regression on Every Deploy Flake Reduction Production Monitoring Case Study: Monosend Case Study: EmiratesEscape
Pricing

Jenkins Integration for Autotest.ing

Integrate autotest.ing into your Jenkins Declarative Pipelines or Freestyle Projects. Leverage the Credentials Plugin for secure API key management.

Prerequisites

Install the Credentials Browser Plugin (or equivalent) and store your API key:

  1. Navigate to Manage Jenkins → Credentials → (global) → Add Credentials.
  2. Kind: Secret text.
  3. Secret: Your API key.
  4. ID: autotest-api-key.

Configuration Patterns

Pattern 1: Declarative Pipeline (Jenkinsfile)

📄 Jenkinsfile groovy
pipeline {
    agent any
    tools {
        nodejs 'Node 20'
    }
    environment {
        AUTOTEST_API_KEY = credentials('autotest-api-key')
    }
    stages {
        stage('Build') {
            steps {
                sh 'npm install'
                sh 'npm run build'
            }
        }
        stage('AI Test') {
            steps {
                sh 'npm install -g @autotest/cli'
                sh '''
                    autotest run \
                      --project-id "proj_12345" \
                      --output junit \
                      --file results.xml
                '''
            }
            post {
                always {
                    junit 'results.xml'
                }
            }
        }
    }
}
💡 Insight

The junit post step integrates with Jenkins' "Test Results Trend" chart. Over time, this provides a visual history of AI-detected regressions, allowing teams to correlate deployments with quality trends.

Pattern 2: Freestyle Project

For teams using Jenkins Freestyle projects, configure a build step:

  1. Create a new Freestyle project.
  2. Under Build Environment, check "Use secret text(s)" and bind AUTOTEST_API_KEY.
  3. Add an Execute Shell build step:
📄 Execute Shell bash
#!/bin/bash
npm install -g @autotest/cli
autotest run --project-id "proj_12345" --wait

Troubleshooting

⚠ Node.js not found

Ensure the "NodeJS" plugin is installed in Jenkins and a Node.js installation is configured under Manage Jenkins → Tools. The tools { nodejs 'Node 20' } directive in the Jenkinsfile references this installation by name.

⚠ Permission Denied

If using the global npm install (npm install -g), the Jenkins agent may need elevated permissions. Use npx @autotest/cli instead to avoid global installs.

Ready to integrate?

Connect your Jenkins pipeline and run your first AI regression test in minutes.

← All Integrations