LogoLogo
  • Welcome to Redefine
    • About
    • Quick Start ⏱️
      • Verification Examples
    • How Does It Work? 🔬
  • Configuration
    • Install Command
    • Configuration Parameters
    • Parallel Test Execution
      • Redefine Parallel
      • Remote Workers
        • Delayed Workers and Reruns
    • Selection Modes
      • Discover
      • Optimize
      • Fail-Fast
      • Prioritize
    • CI Platforms
    • Redefine Flow
  • Troubleshooting
    • Verify Troubleshooting
      • Environment Troubleshooting
      • Git Troubleshooting
      • Testing Frameworks
        • Cypress Troubleshooting
        • Pytest Troubleshooting
  • Integrations
    • Supported Technologies
    • AI Slack Notifications
Powered by GitBook
On this page
  • Install
  • Configure
  • Configure a shared session ID
  • Verify
  • Run
  1. Configuration
  2. Parallel Test Execution

Redefine Parallel

Redefine Parallel is Redefine's method of optimizing test distribution across multiple machines. It allows you to run tests as though they are being executed on a single machine while Redefine manages the distribution.

This approach utilizes test duration and failure probability to ensure that the most relevant tests are always running in parallel.

Install

Follow the instructions in the Quick Start ⏱️guide to install Redefine.

Configure

Configure a shared session ID

To use Redefine Parallel, it is important to configure a shared session ID between all testing machines. This allows Redefine to connect the prediction and the execution of the tests.

Follow these steps to configure the shared Session ID:

  1. It is crucial to generate the session ID once and provide it to all testing machines, to avoid misalignment.

  2. You can use the CLI command redefine get session_id to generate the session ID, which represents the current session.

  3. Export the environment variable REDEFINE_SESSION_ID with the same value on all test-runners.

Verify

Make sure that the verify command ends with success on all testing machines -

redefine verify --<testing-framework>

Run

When executing the redefine install command, you need to pass the number of machines and the index of each machine to the Redefine command in the following format:

redefine install --pytest --<selection_mode> --splits <number of machines> --group <machine index>
pytest -n auto tests/
redefine install --cypress --<selection_mode> --splits <number of machines> --group <machine index>
npx run cypress
redefine install --mocha --<selection_mode> --splits <number of machines> --group <machine index>
npm run test
PreviousParallel Test ExecutionNextRemote Workers

Last updated 1 year ago

Follow the guide for instructions and troubleshooting.

Verify