Skip to content

--override is not woking  #6818

@vincents75

Description

@vincents75

What are you trying to achieve?

I need to execute tests in parallel, ensuring that each group uses a distinct database. To achieve this, I am using the --override option to specify the database name at runtime. However, it still references the database defined in functional.suite.yml.
I am using the following command:

vendor\bin\codecept.bat run --group paracept_1 --override "modules.config.Db.dsn: mysql:host=localhost;dbname=base_admintest_1" --html result_1.html functional
Also i tried with
vendor\bin\codecept.bat run --group paracept_1 --override "modules: config: Db: dsn: mysql:host=localhost;dbname=base_admintest_1" --html result_1.html functional

  • Codeception version: 4.2.2
  • PHP Version: 8.1.19
  • Operating System: Windows
  • Installation type: Composer
  • List of installed packages (composer show)
  • Suite configuration:
Functional Suite Configuration 
---------------------------------
actor: FunctionalTester
paths:
    tests: tests
    output: tests/_output
    data: tests/_data
    support: tests/_support
    envs: tests/_envs
extensions:
    enabled:
        - Codeception\Extension\RunFailed
modules:
    enabled:
        - Asserts
        - \Helper\Functional
        - Db
        - DbHelper
        - REST:
            depends: PhpBrowser
    config:
        Db:
           dsn: 'mysql:host=localhost;port=3306;dbname=admintest'
           user: 'expuser'
           password: 'expuser'
           databases:
            db2:
               dsn: 'mysql:host=localhost;dbname=universal_profile_test'
               user: 'expuser'
               password: 'expuser'
        PhpBrowser:
            url: https://irisdev.exphosted.com
            curl:
               CURLOPT_RETURNTRANSFER: true
    step_decorators: ~ 
groups:
    paracept_*: D:\Apache24\htdocs\local\ExpertusONELMS\tests\_data\paracept_*


Codeception configuration (codeception.yml)
---------------------------------------------------
paths:
    tests: tests
    output: tests/_output
    data: tests/_data
    support: tests/_support
    envs: tests/_envs
bootstrap: _bootstrap.php    
actor_suffix: Tester
extensions:
    enabled:
        - Codeception\Extension\RunFailed

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