Codeception | Full-stack testing PHP framework | Unit Testing library

 by   Codeception PHP Version: 5.0.10 License: MIT

kandi X-RAY | Codeception Summary

kandi X-RAY | Codeception Summary

Codeception is a PHP library typically used in Testing, Unit Testing, Symfony applications. Codeception has no bugs, it has a Permissive License and it has medium support. However Codeception has 1 vulnerabilities. You can download it from GitHub.

Codeception is a modern full-stack testing framework for PHP. Inspired by BDD, it provides an absolutely new way of writing acceptance, functional and even unit tests. Powered by PHPUnit. At Codeception we are glad to receive contributions from the community. If you want to send additions or fixes to the code or the documentation please check the Contributing guide.

            kandi-support Support

              Codeception has a medium active ecosystem.
              It has 4681 star(s) with 1309 fork(s). There are 145 watchers for this library.
              There were 1 major release(s) in the last 12 months.
              There are 112 open issues and 3413 have been closed. On average issues are closed in 445 days. There are 9 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of Codeception is 5.0.10

            kandi-Quality Quality

              Codeception has 0 bugs and 0 code smells.

            kandi-Security Security

              Codeception has 1 vulnerability issues reported (1 critical, 0 high, 0 medium, 0 low).
              Codeception code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              Codeception is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              Codeception releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              Codeception saves you 6369 person hours of effort in developing the same functionality from scratch.
              It has 13404 lines of code, 1082 functions and 205 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed Codeception and discovered the below as its top functions. This is intended to give you an instant insight into Codeception implemented functionality, and help decide if they suit your requirements.
            • Returns the configuration file .
            • Pause the history
            • Configure the console command .
            • Persist the record .
            • Add modules to composer . json
            • Apply whitelist .
            • Start the coverage collection .
            • Routing files .
            • Merge the given URI into the given URI .
            • Setup tests .
            Get all kandi verified functions for this library.

            Codeception Key Features

            No Key Features are available at this moment for Codeception.

            Codeception Examples and Code Snippets

            No Code Snippets are available at this moment for Codeception.

            Community Discussions


            Hide certain methods from the codeception debug output
            Asked 2022-Jan-14 at 21:37

            When launching the tests with the --debug flag it shows every method which is executed, is it at all possible to exclude certain methods from appearing in this log?

            So you could hide super repetitive methods from appearing in it, like the ones in below in red

            On the codeception site I see the following options but it doesn't help in my case:



            Answered 2022-Jan-14 at 21:37

            It is impossible to hide certain methods, but you could reduce amount of output by extracting repetetive code to helper methods.

            In your example it looks like you executed 5 actions twice, so you could extract them to helper method and add it to tests/_suppor/Helper/Acceptance.php.



            Codeception do not truncate debug output
            Asked 2021-Dec-29 at 18:19

            Is there a way to force Codeception to display the full debug output of an acceptance test instead of truncating it?

            I have the --debug flag on and I'm seeing output in the console, but it truncates it like this

            I wait for element "//*[@id="whole_subpanel_leads_ods_inventory"]//*/ul[@class="clickMenu fancymenu SugarActionMenu"]/li[@class="sugar_action_button"]/span[@class="suitepicon su..."

            I want to see what's after su...

            It saves the screenshot and the markup to the _output folder, but unfortunately not the full debug output.

            Thank you



            Answered 2021-Dec-29 at 18:19

            Output in terminal is truncated to fit into one line.

            You can find full step output in HTML report, which is generated when --html parameter is used.

            Alternatively you could use codecept_debug function to log parameter that you are passing to waitForElement method.

            Evidence that steps aren't truncated in HTML report:



            Make a Stub for nesting function in Yii2
            Asked 2021-Dec-10 at 07:52

            I learn to use Unit test in Yii2 with Codeception, and try to check if a billing is a "daily" billing from a merchant's setting.



            Answered 2021-Dec-10 at 07:52

            Casting the nested array to (object) will do



            Laravel/codeception testing: how to stubbing time()
            Asked 2021-Oct-19 at 07:34

            Is it possible using Laravel mocking, stubling, (and/or Codeception\Test\Unit and/or Codeception\Stub) to make test for method z (public testZ(){...} ) for following class:



            Answered 2021-Oct-19 at 07:34

            If you convert it to Carbon datetime, there is possibilities.



            How to run tests from renamed or not default folder?
            Asked 2021-Oct-17 at 11:16

            Yii2 has tests folder structure:



            Answered 2021-Oct-17 at 11:16

            The Answer wrote Dmitriy Eliseev from

            It's so simple.

            The suites are picked up from *.suite.yml files.

            So,in addition to unit.suite.yml and functional.suite.yml inside tests folder you should add an integrational.suite.yml file with settings. In this case tests from integrational folder will be work as well.



            Boolean TRUE converted to string "1" when testing GraphQL request with Codeception
            Asked 2021-Sep-21 at 09:39

            I have a Wordpress website with the WPGraphQL plugin installed and running some tests with Codeception to test the GraphQL queries. For a bit more context, I am using Codeception's REST module and loading Wordpress in the tests with wp-browser.

            The following test to register a user is failing:



            Answered 2021-Sep-21 at 09:39

            As suggested by Arvin Jason Cabrera in the comments, the problem was I was not setting the Content-Type to application/json. In my case, I simply had to add the following line



            How to mock Stripe classes in PHP Codeception
            Asked 2021-Sep-07 at 06:29

            I am trying to mock a simple Stripe\Customer instance in a unit test. The method only uses this instance to retrieve the name property. In my test, the make statement looks like this:



            Answered 2021-Sep-07 at 06:29

            Don't mock it, simply create an instance and set a property.



            Codeception with Webdriver $I->fillField not working although the field is seen
            Asked 2021-Aug-27 at 19:03

            Being pretty new to Codeception I am having a problem with the following code:



            Answered 2021-Aug-27 at 19:03

            Finally found an answer - there was some unknown hidden element which matched the same selector and this element caused an Exception:

            [Facebook\WebDriver\Exception\ElementNotInteractableException] element not interactable.

            I found out using the grabMultiple function:

            print_r($I->grabMultiple(Locator::find('input', ['placeholder' => 'Vorname'])));

            The solution was to use a more specific selector:

            $I->fillField('.employees-list input[name="user_firstname"]',"Testerina");



            Codeception Simple Unit Test Not Work To Find My Namespaces
            Asked 2021-Jul-07 at 21:35

            I'm trying a basic UnitTest with Codeception. No frameworks are used.

            My working root is as:



            Answered 2021-Jul-07 at 21:33

            Codeception Simple Unit Test Not Work To Find My Namespaces

            This is less about Codeception but how PHP autoloading works in general and what the configuration of autoloading in Composer is in specific:



            Codeception See and Click functions Error out with Selenium running ChromeDriver
            Asked 2021-Jun-18 at 11:18

            I am writing codeception tests with selenium running chrome driver for my local env, which is MacOS, running valet+. I am having issue of getting an error when I try to call methods like see() or click(). However other functions like seeInSource(), executeJS() and grabPageSource() are working fine.

            For Example:

            $I->see('Go to au site'); //Errors out


            $I->seeInSource('Go to au site') // works fine

            My acceptance.suite.yml is as following.



            Answered 2021-Jun-18 at 11:18

            So after trying a few things what worked for me was to replace my facebook/webdriver to php-webdriver. So my composer json looks like.


            Community Discussions, Code Snippets contain sources that include Stack Exchange Network


            No vulnerabilities reported

            Install Codeception

            After you successfully installed Codeception, run this command:. This will create a default directory structure and default test suites.


            The documentation source files can be found at
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
          • HTTPS


          • CLI

            gh repo clone Codeception/Codeception

          • sshUrl


          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link