Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run component test in parallel #28737

Open
1 of 4 tasks
jasedwards opened this issue Oct 31, 2024 · 1 comment
Open
1 of 4 tasks

Unable to run component test in parallel #28737

jasedwards opened this issue Oct 31, 2024 · 1 comment

Comments

@jasedwards
Copy link

Current Behavior

When running the cypress executor in my CI (azure devops) the parallel flag is not passed into cypress. I have followed the instructions for passing args and it still does not work. The following is everything I have tried along with the error message which is the same for each try.

in the yaml:

	 - script: |
          npx nx component-test test-app --args=\"--parallel\" --record --tag ${{parameters.tagName}} --env.grepTags=${{parameters.grep}} --env.grepFilterSpecs=${{parameters.grepFilterSpecs}} --env.grepOmitFiltered=${{parameters.grepFilterSpecs}} --ci-build-id $(Build.BuildId)_$(System.JobAttempt)

and

	 - script: |
          npx nx component-test test-app --args="--parallel" --record --tag ${{parameters.tagName}} --env.grepTags=${{parameters.grep}} --env.grepFilterSpecs=${{parameters.grepFilterSpecs}} --env.grepOmitFiltered=${{parameters.grepFilterSpecs}} --ci-build-id $(Build.BuildId)_$(System.JobAttempt)

and in project.json

    "component-test": {
      "executor": "@nx/cypress:cypress",
      "options": {
        "args": ["--parallel"],
        "cypressConfig": "apps/test-app/cypress.config.ts",
        "testingType": "component",
        "skipServe": true,
        "devServerTarget": "test-app:build"
      }
    }

Expected Behavior

I should be able to run component tests in parallel

GitHub Repo

No response

Steps to Reproduce

  1. Run the above commands in azure devops?

Nx Report

Node : 20.18.0
OS : win32-x64
npm : 10.8.3

nx (global) : 17.3.0
nx : 18.2.4
@nx/js : 18.2.4
@nx/jest : 18.2.4
@nx/linter : 18.2.4
@nx/eslint : 18.2.4
@nx/workspace : 18.2.4
@nx/angular : 18.2.4
@nx/cypress : 18.2.4
@nx/devkit : 18.2.4
@nx/eslint-plugin : 18.2.4
@nx/plugin : 18.2.4
@nrwl/tao : 18.2.4
@nx/web : 18.2.4
@nx/webpack : 18.2.4
typescript : 5.2.2

Community plugins:
@ng-bootstrap/ng-bootstrap : 16.0.0
@ngrx/component-store : 17.1.1
@ngrx/effects : 17.1.1
@ngrx/entity : 17.1.1
@ngrx/router-store : 17.1.1
@ngrx/schematics : 17.1.1
@ngrx/store : 17.1.1
@ngrx/store-devtools : 17.1.1
eslint-plugin-ngrx : 2.1.4
ngx-toastr : 17.0.2

Local workspace plugins:
@clearsight-apps/schematics

Failure Logs

Generating script.
Script contents:
npx nx component-test test-app --args="--parallel" --record --tag GatedCommit --env.grepTags=@test --env.grepFilterSpecs=true --env.grepOmitFiltered=true --ci-build-id 266855_1 | tee cypress-output.txt
========================== Starting Command Output ===========================
/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/c9092e55-407f-4c03-8ff3-22674b7017d8.sh

nx run test-app:component-test --args="--parallel" --record --tag GatedCommit --env.grepTags=@test --env.grepFilterSpecs=true --env.grepOmitFiltered=true --ci-build-id 266855_1

[2078:1031/192225.947951:ERROR:node_bindings.cc(305)] Most NODE_OPTIONs are not supported in packaged apps. See documentation for more details.
DevTools listening on ws://127.0.0.1:39883/devtools/browser/1d97b34f-c100-4049-b8ad-ff995da90e38
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme

  • Generating browser application bundles (phase: setup)...
    Couldn't determine Mocha version
    You passed the --ci-build-id flag but did not provide either a --group or --parallel flag.

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

I am using an ubuntu vm image.

@jasedwards
Copy link
Author

Would also like to point out that I have stepped through the executor and I can't see anywhere that it even cares or checks for args.something. args.parallel is listed as overrides in the run.js file but there is a property for parallel set to false already. I tried to debug further but get lost and can't actually find the starting point to debug. I feel like I followed your documentation as much as I possibly could so any acknowledgment that this has been seen or a suggestion on what I did wrong would be appreciated. I am currently blocked on this and there does not seem to be any more info anywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant