Skip to content

run-multiple command picks 0 feature files when -c CLI option is specified #5358

@yevgeniya-a

Description

@yevgeniya-a

Let's assume we have codecept.conf.js config file in the project root with the following config:

exports.config = {
    // other options go here
    multiple: {
        basic: {
            browsers: ['chromium', 'firefox'],
        },
    },
    gherkin: {
        features: './features/*.feature',
        steps: ['./step_definitions/steps.js'],
    }
};

When running tests with:

codeceptjs run-multiple --all

all specified feature files are executed as expected.

However, when the -c CLI option is explicitly provided:

codeceptjs run-multiple --all -c codecept.conf.js

the command fails to identify and run the specified glob for the feature files, resulting in 0 features being picked.

Image

Root cause:

The issue occurs due to the usage of path.resolve on paths when a custom configuration file is specified here. This results in invalid input for the globSync command, causing it to fail to resolve the glob patterns correctly here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions