Git Product home page Git Product logo

Comments (1)

ArturT avatar ArturT commented on May 24, 2024

@knapsack-pro/cypress uses Knapsack Pro Queue Mode to distribute tests in parallel.
Please see this article to see how Queue Mode works:
https://docs.knapsackpro.com/2020/how-to-speed-up-ruby-and-javascript-tests-with-ci-parallelisation

I'm not familiar with Bitbucket but I know some of our users use BitBucket Pipeline to run parallel jobs. You may want to check BitBucket docs to see how to configure parallel jobs for a CI build.

Then each parallel job should run Knapsack Pro command with a different value for KNAPSACK_PRO_CI_NODE_INDEX
https://github.com/KnapsackPro/knapsack-pro-cypress#other-ci-provider

# Step for first CI node - your first docker container should run this command
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=0 $(npm bin)/knapsack-pro-cypress

# Step for second CI node - your second docker container should run this command
KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=1 $(npm bin)/knapsack-pro-cypress

This way you would split tests between 2 docker containers.

Please follow each step here to properly set up required environment variables in your CI
https://github.com/KnapsackPro/knapsack-pro-cypress#configuration-steps

I guess you can find info for BitBucket Pipeline and how to run parallel jobs here:
https://support.atlassian.com/bitbucket-cloud/docs/set-up-or-run-parallel-steps/
https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/

Here you can see examples for Jenkins and Cypress
https://docs.knapsackpro.com/2019/cypress-parallel-testing-with-jenkins-pipeline-stages

Here is another article from one of our users who uses Cypress and Gitlab CI
https://docs.knapsackpro.com/2021/faster-pipelines-with-knapsack-pro-by-parallelizing-cypress-tests-on-gitlab-ci

This should get you the idea.

Cheers


EDITED:

Here is an article with BitBucket Pipeline example for Cypress: https://docs.knapsackpro.com/2021/how-bitbucket-pipeline-with-parallel-cypress-tests-can-speed-up-ci-build

from knapsack-pro-cypress.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.