Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

158
Visualizações
Cypress override baseUrl in Docker container not working

Hello Im looking for help.| I have a docker image that builds my Cypress tests in which I would like to override the baseURL. The problems is Cypress detects the baseUrl env variables but it doesn't apply them to the configuration and baseUrl still points to the localhost.

docker run \
      --name test \
      --env CI="true" \
      --env CYPRESS_BASE_URL="https://abrakada.com" \
      --env CYPRESS_baseUrl="https://abrakada.com" \
      --network="host" \
      --rm
FROM cypress/base:14.17.0

ARG TESTS_FOLDER=/opt/cypress-tests

ENV NODE_PATH=/opt:/usr/lib/node_modules:$TESTS_FOLDER/node_modules

WORKDIR $TESTS_FOLDER

COPY package.json ./package.json

RUN npm install && npm run cy:verify

COPY cypress.json ./cypress.json
COPY cypress ./cypress

ENTRYPOINT ["npm", "run", "cy:integration"]

{
  "baseUrl": "http://localhost:3000",
  "chromeWebSecurity": false,
  "screenshotOnRunFailure": false,
  "videoUploadOnPasses": false
}

> npm run cy:info && ./node_modules/.bin/cypress run


> app-tests@1.0.0 cy:info /opt/cypress-tests
> cypress info

Displaying Cypress info...

Detected no known browsers installed


Environment Variables:
CYPRESS_BASE_URL: https://abrakada.com
CYPRESS_baseUrl: https://abrakada.com

Application Data: /root/.config/cypress/cy/development
Browser Profiles: /root/.config/cypress/cy/development/browsers
Binary Caches: /root/.cache/Cypress

Cypress Version: 8.1.0
System Platform: linux (Debian - 10.9)
System Memory: 6.23 GB free 389 MB
Cypress could not verify that this server is running:

  > http://localhost:3000

We are verifying this server because it has been configured as your `baseUrl`.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

fsss I hate it. Like always after few hours of troubleshooting I post a question and then after 15 min of the post I find the problem... Gosh..

Anyway.

My problem was that I had plugins configuration for extending config file which caused rest of configuration not being merged.

https://github.com/bahmutov/cypress-extends

replaced return require('@bahmutov/cypress-extends')(config.configFile) with just config and baseUrl is being overwritten.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda