Skip to content

Manual Sync beta ​

Sync manual test cases from Gherkin feature files to the TestBeats Portal for centralized test case management.

Synopsis ​

bash
npx testbeats manual sync [options]
npx testbeats manual sync --path <directory>

Description ​

The manual sync command reads Gherkin feature files (.feature) from a specified directory and syncs them to the TestBeats Portal as manual test cases. This enables teams to manage their manual test scenarios alongside automated tests in a centralized location.

TestBeats parses the Gherkin syntax and creates structured test cases in the portal, making it easier to organize, track, and execute manual testing workflows.

Options ​

General Options ​

OptionDescriptionDefault
-p, --path <path>Path to directory containing feature filesCurrent directory
-c, --config <path>Path to configuration file.testbeats.json
-h, --helpDisplay help information-

Portal Options (Required) ​

OptionDescriptionRequired
--api-key <key>TestBeats API key for portal authenticationYes
--project <name>Project name to organize test casesYes

Examples ​

Basic Usage ​

Sync feature files from the current directory:

bash
npx testbeats manual sync --api-key "your-api-key" --project "my-project"

Specify Custom Path ​

Sync feature files from a specific directory:

bash
npx testbeats manual sync \
  --path ./tests/features \
  --api-key "your-api-key" \
  --project "my-project"

Using Configuration File ​

Create a configuration file and use it:

bash
npx testbeats manual sync -c testbeats.config.json

Example configuration file:

json
{
  "api_key": "your-api-key",
  "project": "my-project"
}

With Environment Variables ​

Use environment variables for sensitive data:

bash
export TEST_BEATS_API_KEY="your-api-key"
export TEST_BEATS_PROJECT="my-project"

npx testbeats manual sync --path ./tests/features

File Requirements ​

Supported Format ​

  • File Extension: .feature files (standard Gherkin format)
  • Syntax: Standard Gherkin syntax with Feature, Scenario, Given, When, Then keywords

Example Feature File ​

gherkin
Feature: User Login
  As a user
  I want to log in to the application
  So that I can access my account

  Scenario: Successful login with valid credentials
    Given I am on the login page
    When I enter valid username and password
    And I click the login button
    Then I should be redirected to the dashboard
    And I should see a welcome message

  Scenario: Failed login with invalid credentials
    Given I am on the login page
    When I enter invalid username or password
    And I click the login button
    Then I should see an error message
    And I should remain on the login page

Current Limitations ​

BETA LIMITATIONS

This feature is currently in beta. The following Gherkin features are not yet supported:

  • Data Tables: Tables within steps are not parsed
  • Scenario Outlines: Examples sections are not processed

These features will be added in future releases.

Command Output ​

Upon successful sync, the command displays:

  • Total number of feature files processed
  • Number of scenarios synced
  • Confirmation message

Environment Variables ​

These environment variables are automatically used:

VariableDescriptionCLI Equivalent
TEST_BEATS_API_KEYTestBeats API key--api-key
TEST_BEATS_PROJECTProject name--project

Best Practices ​

  1. Organize Features: Structure your feature files in logical directories by feature area or module
  2. Use Descriptive Names: Write clear feature and scenario names for better portal organization
  3. Environment Variables: Always use environment variables for API keys in CI/CD pipelines
  4. Version Control: Keep your feature files in version control alongside your code

Troubleshooting ​

No Files Found ​

If no feature files are detected:

  • Verify the path is correct
  • Ensure files have .feature extension
  • Check file permissions

Authentication Errors ​

If authentication fails:

  • Verify your API key is valid
  • Check that the project name exists in your portal
  • Ensure API key has appropriate permissions

See Also ​

Released under the MIT License.