cypressparallel-executionlambdatest

Can we control the order of Cypress spec files in different folders during Parallel execution on Lambdatest?


cypress/e2e/orderCreation/*.cy.ts
cypress/e2e/commonActions/*.cy.ts

I have two different folders containing multiple spec files, In orderCreation folder I have spec files creating different type of orders and after creation I' storing orderId's in Json File. Now In commonActions folder spec files, One of the spec file is dependent on orderCreation folder as this spec files using json data created by orderCreation spec files.

Here I'm using specs setting in Lambdatest.config.json file

"run_settings": {
    ...
    "parallels": 3,
    "specs": "cypress/e2e/orderCreation/*.cy.ts,cypress/e2e/commonActions/*.cy.ts",
    ...
  }

But it start executing spec files from both folder at same time, some files from orderCreation folder are pending and it's executing commonActions spec files.

Desired behaviour: It should execute multiple spec files in parallel , but first execute all spec files of 'orderCreation' folder then move to commonActions folder spec files.


Solution

  • Not Sure about other parallel execution platforms like cypress dashboard/browserStack but in case of parallel execution, lambdatest doesn't support to execute any other spec file or folder of spec files in order/sequence. It can initiate any spec file in queue.

    So for my scenario there are only two option.

    1. Either Create order and modify order tests in one spec file
    2. Second is to first create order and manually create a json file which will contain order_ids and then use this data file for modify orders spec file. In this case Modify spec file will not depend on create orders spec tests, and will have their own data to perform operation.