testomatio/check-tests

How to make Manual Run use CI configuration

Closed this issue · 4 comments

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.

Automated tests also seem to try to run on localhost:

Screenshot of dashboard

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';

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

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.