Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Konstantinos Togias
    Here is the class i try to test: https://pastebin.com/sa8wzS1B
    and here the test: https://pastebin.com/JEw6WkeZ
    Running the test I get error: [Status\Exception\UnknownStatusCodeException] Unknown code: acode
    While I expected codeIsKnown() to return true as I have configured my mock and the exception to not be thrown by constructor
    Am I missing something?

    Exception trace:
    () at phar:///var/www/codeception/codecept.phar/src/Codeception/Configuration.php:323
    Codeception\Configuration::createModule() at phar:///var/www/codeception/codecept.phar/src/Codeception/Configuration.php:287
    Codeception\Configuration::modules() at phar:///var/www/codeception/codecept.phar/src/Codeception/SuiteManager.php:68
    Codeception\SuiteManager->initializeModules() at phar:///var/www/codeception/codecept.phar/src/Codeception/SuiteManager.php:60
    Codeception\SuiteManager->initialize() at phar:///var/www/codeception/codecept.phar/src/Codeception/Codecept.php:149
    Codeception\Codecept->runSuite() at phar:///var/www/codeception/codecept.phar/src/Codeception/Codecept.php:134
    Codeception\Codecept->run() at phar:///var/www/codeception/codecept.phar/src/Codeception/Command/Run.php:261
    Codeception\Command\Run->runSuites() at phar:///var/www/codeception/codecept.phar/src/Codeception/Command/Run.php:190
    Codeception\Command\Run->execute() at phar:///var/www/codeception/codecept.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:252
    Symfony\Component\Console\Command\Command->run() at phar:///var/www/codeception/codecept.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:874
    Symfony\Component\Console\Application->doRunCommand() at phar:///var/www/codeception/codecept.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:195
    Symfony\Component\Console\Application->doRun() at phar:///var/www/codeception/codecept.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:126
    Symfony\Component\Console\Application->run() at phar:///var/www/codeception/codecept.phar/codecept:34
    require_once() at /var/www/codeception/codecept.phar:7

    I got the same problem when trying to call the Appium PHP client into my Module, any help?

    Douglas Melo Oliveira
    Hi !
    when i use attachfile.. return:
    Facebook\WebDriver\Exception\UnrecognizedExceptionException: invalid argument: 'text' is empty
    Rostislav Rudometov
    Hey mates!
    Used to run tests inside the same docker container with the project itself using composer to install Codeception, having configs for 4.1.1 tag at the moment, but I want to use your image from Docker hub to run tests in a separate container.
    Now I'm against the choice: to wait for Codeception 4 image on Docker hub or to make my own image using composer.
    So the question is: when should I expect Codeception 4 image on Docker hub?
    Seems like the latest Docker hub image is 3.0.3
    Mark Harrison
    @rostislaw9 - as it happens, I'm building a dockerhub image for codeception4 this afternoon.
    Sadly, it's a world of pain.
    I raised this on the official issues list 5 weeks ago, and still no reply.
    If I succeed, I'll let you know.
    Mark Harrison
    This includes:
    "codeception/codeception": "^4.0",
    "codeception/module-phpbrowser": "^1.0.0",
    "codeception/module-asserts": "^1.0.0",
    "codeception/module-webdriver": "^1.0.0"
    Mark Harrison
    I've added the full details to the existing github issues....
    ... hopefully it will save the CodeCeption team time in getting the dockerhub image updated :-)
    Jimmy B.
    Mark, you're awesome.
    Wait so the Codeception image here (https://hub.docker.com/r/codeception/codeception) uses 3.x ?
    Jimmy B.
    Because of this I think in their composer.json - "codeception/stub": "^2.0 | ^3.0" ?
    Rostislav Rudometov

    Wait so the Codeception image here (https://hub.docker.com/r/codeception/codeception) uses 3.x ?

    yup, that's the exact problem i was talking 'bout

    ... OK, there's a new image on dockerhub, at https://hub.docker.com/repository/docker/yourpropertyexpert/codeception4

    can't wait to ckeckout your image, Mark
    i'll let you know once i try it

    Mark Harrison
    @jimmybrancaccio - it was a lot fiddlier to do than a Codeception 3 image because of the way that Codeception 4 is built of separate modules.
    When you installed C3, it installed pretty much everything you needed.
    With C4, when you install it, it just installs a "core."
    When you run (a script it includes) it analyses your code, works out what other modules you need to run, and then updates your composer.json to include them JUST FOR THAT PROJECT.... and then relies on composer.
    This has many advantages:
    • Easier for them to maintain the codebase, since modules can be released independently
    • Easier to customise what you have per project
    ... but the downside is stuff like "docker when used in a CI system", where you want an image that contains everything you'll need...
    It may be that there needs to be a "full image", as part of the official project, that includes ALL the possible modules, and is updated weekly anyway..
    ... but that's an extra workload for the project team.
    Mark Harrison
    UPDATE: As of about 10 minutes ago, the yourpropertyexpert/codeception4:latest build now includes the REST module
    Jimmy B.
    Nice nice, very cool. I still only have my one repo with Drone CI that puts it through Codeception and Sonarqube. I guess I haven't realized the Docker container for Codeception FROM Codeception was running v3. 😩
    Rostislav Rudometov

    @yourpropertyexpert need some help, Mark
    trying to run your image with this:

    docker run -v ${PWD}:/project --user $(id -u):$(id -g) yourpropertyexpert/codeception4:latest run

    but it says
    /usr/local/bin/docker-php-entrypoint: 9: exec: run: not found

    Mark Harrison
    Run is an argument to the codeception executable...
    you need to give a command to the SHELL
    So try something like "php /var/www/vendor/bin/codecept run" ... or possibly just "codecept run" instead of the "run".
    My docker image is an image that allows codeception to be run... not one that auto-executes it.
    Rostislav Rudometov
    does anybody know how to define a delay before EVERY test command execution?
    i've got a testing environment which sometimes acts strangely under stress
    dlike to know if i can add say 1-5 ms between commands and see if there r any changes
    Where else can i ask questions related to this framework? Seems like this community is dead.
    3 replies
    in codeception5 the --json was removed. is there any way to add this back via "--ext ..."?
    In v5, option --format is available in the doc, but returns error: The "--format" option does not exist