Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Ben Ahmed
    Hello friends,
    i'm new to use codeception for participants test, so i have to share data between steps .... i don't know how to do this ?? any one can help me.....
    thank you
    Winston Nolan
    hello :wave:
    Hi, all. I have a problem to genarete report codeception + rest + allure. Can somebody help me?
    Mickaƫl PERRIN
    Hi all, I am currently using codeception with the wp-browser module to test a WordPress plugin I develop. I am currently facing a test scenario that I am not able to implement. My plugin use an external service through a rest api provided by a php library. I would like to simulate an exception as the answer of the API call. Would you mind giving me some hints on how I could mock 1 method of that external library to ensure it throws an Exception ? I have seen some PECL extensions like https://github.com/krakjoe/uopz but I would prefer to have a much cleaner solution. Any hints ?
    Mark Harrison
    I use drone.io as my CI platform. I've got it working with Codeception... Do you want some notes for https://codeception.com/docs/12-ContinuousIntegration ?
    [The readme on github talks about docs being in the repo, but the link from the readme just 404s.]
    Slava Abakumov
    @yourpropertyexpert I would love to read droneCI + Codeception integration
    Mark Harrison
    Mark Harrison
    Note that it just uses webdriver - I'm currently trying to get phantom-js running in a multi-docker container way :-)
    Tanvir Mohammad Ismail
    i use jira xray testing tool. so how to i generate codeception report result for the jira xray tool
    Konstantinos Togias
    I try to create a mock that overrides a protected method called by constructor and then call the constructor, but the overrifded method seems to always return false ingnoring the value I provide in construct args.
    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