Skip to content
Testing
Skill

/testdriver-secrets

Securely manage passwords and sensitive data in your tests

From plugin
testdriverai
35665 skills1 agent

Claude Code

$ npx -y skills add testdriverai/testdriverai --skill testdriver-secrets --agent claude-code

SKILL.md

testdriver-secrets.SKILL.md
name: testdriver:secrets
description: Securely manage passwords and sensitive data in your tests

<!-- Generated from secrets.mdx. DO NOT EDIT. -->

Protect sensitive information such as passwords, API keys, and tokens in your TestDriver tests.

Typing Secrets Securely

When you type sensitive information such as passwords, use the `secret: true` option. This stops TestDriver from a log or a store of the value:

import { test } from 'vitest';
import { chrome } from 'testdriverai/presets';

test('login with secure password', async (context) => {
  const { testdriver } = await chrome(context, { 
    url: 'https://myapp.com/login' 
  });

  await testdriver.find('email input').click();
  await testdriver.type(process.env.TD_USERNAME);
  
  await testdriver.find('password input').click();
  // Password is masked in logs and recordings
  await testdriver.type(process.env.TD_PASSWORD, { secret: true });
  
  await testdriver.find('login button').click();
  await testdriver.assert('dashboard is visible');
});

<Note> When you set `secret: true`, the typed text shows as `****` in all logs, recordings, and dashcam output. </Note>

Storing Secrets in GitHub

Store sensitive credentials as GitHub repository secrets. Then they are never in your code:

<Steps> <Step title="Navigate to Repository Settings"> Go to your GitHub repository → **Settings** → **Secrets and variables** → **Actions** </Step> <Step title="Add Repository Secrets"> Click **New repository secret** and add your secrets:

  • `TD_API_KEY` - Your TestDriver API key
  • `TD_USERNAME` - Test account username
  • `TD_PASSWORD` - Test account password

</Step> <Step title="Use in GitHub Actions"> Reference secrets in your workflow file:

    - name: Run TestDriver tests
      env:
        TD_API_KEY: ${{ secrets.TD_API_KEY }}
        TD_USERNAME: ${{ secrets.TD_USERNAME }}
        TD_PASSWORD: ${{ secrets.TD_PASSWORD }}
      run: vitest run

</Step> </Steps>

Local Development

For local development, store secrets in a `.env` file:

TD_API_KEY=your_api_key_here
TD_USERNAME=testuser@example.com
TD_PASSWORD=your_secure_password

<Warning> Never commit `.env` files to version control. Add `.env` to your `.gitignore` file. </Warning>

Complete Example

Here's a full login test with proper secrets handling:

import { test, expect } from 'vitest';
import { chrome } from 'testdriverai/presets';

test('secure login flow', async (context) => {
  const { testdriver } = await chrome(context, { 
    url: process.env.TD_WEBSITE || 'https://staging.myapp.com'
  });

  // Enter username (not sensitive)
  await testdriver.find('email input').click();
  await testdriver.type(process.env.TD_USERNAME);
  
  // Enter password securely
  await testdriver.find('password input').click();
  await testdriver.type(process.env.TD_PASSWORD, { secret: true });
  
  // Submit login
  await testdriver.find('login button').click();
  
  // Verify successful login
  const loggedIn = await testdriver.assert('user is logged in');
  expect(loggedIn).toBeTruthy();
});

<Card title="Secrets Best Practices" icon="shield-check">

  • **Always use `secret: true`** when typing passwords, tokens, or sensitive data
  • **Use environment variables** to keep secrets out of code
  • **Store secrets in your CI provider** (GitHub Actions, GitLab CI, etc.)
  • **Never commit secrets** to version control
  • **Rotate secrets regularly** to maintain security

</Card>

Read more
@testdriverai
Ships withtestdriverai

Computer-Use SDK for E2E QA Testing

35665 skills1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
356
Star history of testdriverai/testdriverai on GitHub, a chart by star-history.com

Other skills on testdriverai.

More skills from other plugins.

api-review

api-review

Produce the "Playwright 1.xx API Review" artifact for a range of commits - the public API additions and the breaking or behavior…

@microsoft@microsoftInstall Skill
add-e2e-selectors

add-e2e-selectors

Add reliable @grafana/e2e-selectors to interactive elements and key containers in the Grafana frontend. Use when adding e2e…

grafana3d78k
@grafana@grafanaInstall Skill
promptfoo-evals

promptfoo-evals

Write, refine, run, and QA promptfoo evaluation suites: promptfooconfig.yaml, prompts, providers, vars, tests, assertions,…

promptfoo11d27k
@promptfoo@promptfooInstall Skill
deepeval

deepeval

DeepEval evaluation workflow for AI agents and LLM applications. TRIGGER when the user wants to evaluate or improve an AI agent,…

@confident-ai@confident-aiInstall Skill

Questions about testdriver-secrets.

Which coding agents can use testdriver-secrets?
testdriver-secrets installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.