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

How to make Manual Run use CI configuration #51

Closed
openmindculture opened this issue Aug 31, 2022 · 4 comments
Closed

How to make Manual Run use CI configuration #51

openmindculture opened this issue Aug 31, 2022 · 4 comments
Assignees
Milestone

Comments

@openmindculture
Copy link

I tried to run a CodeceptJS scenario as a Manual Run on Testomat.io but it failed, as it tried to use the default configuration in ./codecept.conf.js which defines localhost.

Expected behavior:

The test should use codecept.ci.conf.js which defines a publicly available live URL of my production server.

@poliarush poliarush added this to the 0.5.4 milestone Aug 31, 2022
@openmindculture
Copy link
Author

Automated tests also seem to try to run on localhost:

Screenshot of dashboard

@openmindculture
Copy link
Author

So my question should rather be: "How to make Testomat.io" use CI configuration?
In my use case, I thought I should use

  • a localhost configuration for a manual run on my own machine
  • another configuration (probably to be used by Testomat.io) using a public URL (www)

In my case, this is the only difference, so I should probably import a common configuration as well, like

codecept.config.js

const { setHeadlessWhen, setWindowSize } = require('@codeceptjs/configure');
exports.config = require ('./codecept.common.conf.js');
exports.config.helpers.Puppeteer.url = 'http://localhost:1974'; // or 'https://www.ingo-steinke.de';

@DavertMik
Copy link
Contributor

codecept.ci.conf.js

There is no convention to use that file.

But you can use different configs by specifying the correct one via -c option

for instance:

npx codeceptjs run -c codecept.conf.ci.js

@openmindculture
Copy link
Author

openmindculture commented Sep 9, 2022

codecept.ci.conf.js

There is no convention to use that file.

I am quite sure that I read that somewhere, as I would not make up this very filename.
Maybe I got some outdated documentation or code example. I will check if I find the source.
Also I will have to check my blog post again, where I probably quoted that filename also.

The issue can stay closed, but maybe I should make a feature request, as I would like to test localhost on my machine, but make remote systems like Testomat.io test a public URL instead.

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

No branches or pull requests

3 participants