Skip to main content

v0.8.0: CLI Tool & API Tokens for CI/CD Integration

· 3 min read
TestPlanIt Team
Contributor

We're excited to announce TestPlanIt v0.8.0, bringing a standalone CLI tool and API token authentication for seamless integration with your CI/CD pipelines and automated workflows.

New CLI Tool​

The TestPlanIt CLI makes it easy to import test results directly from your terminal or CI/CD pipelines. Available as standalone binaries for Linux, macOS, and Windows - no Node.js or npm installation required.

Key Features​

  • Multi-format support - Import JUnit, TestNG, NUnit, xUnit, MSTest, Mocha, and Cucumber results
  • Auto-detection - Automatically detects the test result format
  • Name or ID lookup - Reference projects, milestones, configurations, and more by name or ID
  • Environment variable support - Perfect for CI/CD with TESTPLANIT_URL and TESTPLANIT_TOKEN

Quick Start​

# Download the CLI (Linux example)
curl -L -o testplanit https://github.com/testplanit/testplanit/releases/latest/download/testplanit-linux-x64
chmod +x testplanit

# Configure
./testplanit config set --url https://your-instance.com --token tpi_xxx

# Import test results
./testplanit import ./test-results/*.xml -p "My Project" -n "Build #123"

CI/CD Integration​

The CLI integrates seamlessly with any CI/CD platform:

GitHub Actions:

- name: Import Test Results
env:
TESTPLANIT_URL: ${{ secrets.TESTPLANIT_URL }}
TESTPLANIT_TOKEN: ${{ secrets.TESTPLANIT_TOKEN }}
run: |
curl -L -o testplanit https://github.com/testplanit/testplanit/releases/latest/download/testplanit-linux-x64
chmod +x testplanit
./testplanit import ./test-results/*.xml -p 1 -n "Build ${{ github.run_number }}"

See the CLI documentation for complete usage instructions and examples for Jenkins, GitLab CI, Azure DevOps, and CircleCI.

API Token Authentication​

Securely authenticate programmatic access to TestPlanIt with API tokens. Tokens are ideal for CI/CD pipelines, scripts, and integrations.

Creating Tokens​

  1. Go to your User Profile
  2. Navigate to API Tokens
  3. Click Create API Token
  4. Copy the token (shown only once)

Using Tokens​

Include your token in the Authorization header:

curl -X POST "https://your-domain.com/api/model/project/findMany" \
-H "Authorization: Bearer tpi_your_token_here" \
-H "Content-Type: application/json"

Token Management​

  • User tokens - Managed in your user profile
  • Admin oversight - Administrators can view and revoke all tokens from Admin > API Tokens
  • Expiration dates - Optionally set tokens to expire
  • Usage tracking - See when tokens were last used

See the API Tokens documentation for complete details.

Additional Improvements​

  • Fixed workflow scope - Test runs created via import now correctly use the RUNS workflow scope instead of CASES
  • Flexible import options - The --name option is now optional when appending to an existing test run with --test-run

Upgrade Today​

To upgrade to v0.8.0:

git pull origin main
pnpm install
pnpm generate
pnpm build

For Docker deployments, pull the latest image:

docker pull ghcr.io/testplanit/testplanit:latest

Get Involved​

Thank you for using TestPlanIt!