Skyramp Test

Parallelism

Parallelism

Introduction

As your test suite grows, you can execute tests faster by executing multiple tests or test components in parallel. You can increase your testing speed by running tests concurrently within a single worker or deploy multiple workers for parallel execution.

Parallelism with tester_start_v1

When you call the tester_start_v1 function twice in Python, it implicitly triggers the execution of two tests in parallel without requiring any additional user configuration. This inherent capability of Skyramp facilitates seamless parallel testing, allowing users to harness the power of concurrency effortlessly. By executing tests concurrently, Skyramp optimizes test execution time and resource utilization, leading to faster feedback and improved testing efficiency.

Deploying Multiple Workers for Parallel Execution

To scale up testing further and enable parallel execution across multiple workers, you can deploy additional worker instances using Docker Compose. The following Docker Compose configuration demonstrates how to launch two workers within the same network, enabling them to execute separate tests and share the same dashboard:

version: '3'
services:
  skyramp1:
    image: public.ecr.aws/j1n2c2p2/rampup/worker:latest
    volumes:
      - skyramp1:/etc/skyramp
      - /var/run/docker.sock:/var/run/docker.sock  # Necessary for updating Docker network
    ports:
      - "35143:35142"  # Expose ports for communication
    restart: always
  skyramp2:
    image: public.ecr.aws/j1n2c2p2/rampup/worker:latest
    volumes:
      - skyramp2:/etc/skyramp
      - /var/run/docker.sock:/var/run/docker.sock  # Necessary for updating Docker network
    ports:
      - "35142:35142"  # Expose ports for communication
    restart: always
  # for Skyramp dashboard components, 
  # please refer to https://www.skyramp.dev/docs/python/install
volumes:
  skyramp1:
  skyramp2

  • Scalability: You can easily scale the number of workers by adding more service definitions for skyramp.

  • Shared Dashboard: Both workers share the same dashboard setup (dashboard-server and dashboard-client), providing unified monitoring and reporting capabilities across the testing infrastructure.

  • Resource Management: Docker Compose handles resource allocation and network configuration, ensuring seamless communication between workers and the dashboard components.

By deploying multiple workers within the same environment, you can achieve efficient parallel testing while maintaining centralized management through a shared dashboard. You can choose which worker to execute tests by setting address param in tester_start_v1. In above docker-compose.yaml, it would be one of localhost:35142 and localhost:35143.

© 2024 Skyramp, Inc. All rights reserved.

© 2024 Skyramp, Inc. All rights reserved.

© 2024 Skyramp, Inc. All rights reserved.