seeResponseContainsJson doesn't crash when json response is not an array by @NaktibaldagrabEntityFromRepository, grabEntitiesFromRepository methods by @maximelebastard_restart method to restart browser with a new configuration._findClickable to public API so can be used from helpers. By @tiger-seoseeLink compares relative links correctly #4182--override options. By @kusnir. See #4143url config. #4172 by @SG5.InitDbFixture feature #4201_before of a module #4197 by @NaktibaldagrabPageSource method by @Kolyunya$scenario->current('name') #4154 by @NaktibaldadeclareQueue, declareExchange by @NaktibaldabuildAssociationQuery by @jfxninja. See #4195friend->leave method. Clearing base element on closing session. Fixes #4098gherkin:snippets to generate stub function name for non-english features. By @kuntashovOci::cleanup() should be able to drop objects with case sensitive name. By @pavelkovarassertEquals() assertNotEquals() methods by @spideyfusiontest by @samdarkcleanup configuration equals true. #4207 by @Faryshtasession_write_close() from ZF2 module by @tasselchof. Fixes #4112haveBinding, haveSingleton, haveContextualBinding, haveInstance, haveApplicationHandler, clearApplicationHandlers. By @kt81haveFakeRepository updated to work with Doctrine >= 2.5.7 by @laszlo-karpati #4212bootstrap adds support/_generated to gitignore. By @Naktibaldafacebook/webdriver 1.4.0 by @Naktibalda. See #4076 Fixes #4073Run a suite by its path #4079
codecept run tests/unit
Improves recent PHPStorm integration. Codeception tests can be started by running a suite directory.
performOn with ActionSequence; supporting multiple actions of same kind. #4066 by @davertmik. Fixes #4044haveApplicationHandler and clearApplicationHandlers methods. See #4068. By @janhenkgerritsendatabase_migrations_path to by null by default by @timbroder. Fixes #3990cleanup option to skip auto cleanup. By @alexpts. See #3996yii2-codeception by @leandrogehlen. See #4016g:suite allows generate suites with uppercase names. Fixes #4072Enabled incomplete/skipped/risky/warning settings for logger. See #3890. By @mario-naether
settings:
report_useless_tests: false
disallow_test_output: false
be_strict_about_changes_to_global_state: false
log_incomplete_skipped: false
[WebDriver] Fixed double coverage cookie check by @boboldehampsink. See #2923 #4020
[WebDriver] Fixed switchToIframe regression from 2.2.9 by @lcobucci. PR #4000
Speed improvement for group lookup by @pitpit. See #4025
Added parse error to TestParseException in PHP7 by @Naktibalda. See #4007
Auto injection for Codeception\Test\Unit format #4070. Allows to customize injection of support objects into a testcase:
<?php
public function _inject(UnitTester $unit)
{
$this->i = $unit;
}
performOn to wait for element, and run actions inside it. See complete reference. #3986wait* methods by @disc. See #3983seeBinaryResponseEquals assert that binary response matches a hashseeBinaryResponseEquals assert that binary response doesn't match a hash--coverage-crap4j option and codeception/c3 2.0.10/ or -json and xml to deleteHeader by @freezy-skopenNewTab opens a new tab and switches to itcloseTab closes a tab and switches to previousswitchToNextTab switches to next tabswitchToPreviousTab switches to previous tabclickWithLeftButton clicks element with offsetclickWithRightButton right clicks on element with offsetjs_error_logging option to print JS logs in console and in HTML report by @ngraf. See #3821seeInField by @gimler. See #3905
pageload_timeout config option added. The amount of time to wait for a page load to complete before throwing an error. This patch allows to reduce issues from phantomjs random freezing. See #3874. Thanks to @oprudkyicheckOption can check option by name #3852. By @gimler<a href='/'>222</a> (DOM Exception 12 errors). See #3865. By @gimlerselect by @JorisVanEijdenseeNumRecords and grabNumRecords methods. See #3816. By @dmoreno@depends to work with @dataprovider. Fixes #3862. Thanks @edno--override option to support deep configs. See #3820$_SERVER with Phalcon Connector by @sergeyklaydontSeeFileFound searches in path by @Naktibalda. Fixes #3877grabValueFrom to work after fillField by @wumouse. Fix #3866part: init with other modules like WebDriver. See #3876. By @margoridontSeeResponseJsonMatchesXpath method by @Naktibalda. Closes #3843exec function to be enabled before using it. By @Naktibalda. See #3886Config validation with codecept config:validate command. Use it:
codecept config:validate
codecept config:validate acceptance
This should help you next time you get messed with YAML formatting.
$,€,£ and other signs can be used before or after a number inside Gherkin scenario. This char will be ignored inside a PHP variable, so you receive only number.
When I have 100$ => $num === 100
And I have $100 => $num === 100
escaped strings can now be passed into placeholders. Fixes #3676.
Codeception is tested with latest verision of HHVM
Extensions loader refactored:
Extensions configs can be done inside enabled section (as it is for modules):
extensions:
enabled:
Codeception\Extension\Recorder:
delete_successful: false
Added dataprovider to Cest format by @endo. See updated documentation.
Params loader refactored. Using vlucas/phpdotenv to parse .env files. Please install it if you don't have it yet.
Improved generate:suite command to generate actor file for suite.
HTML reporter: snapshot and screenshots paths made relative to make them accessible on CI. Fixes #3702
[WebDriver] added protocol and path config options by @sven-carstens-udg. See #3717
[PhpBrowser][Frameworks] Honour <base href=""> meta tag by @Naktibalda. See #3764
[Yii2] Removed mockAssetManager by @githubjeka
[Yii2] Added procesing for native url formats of Yii2 #3725 by @githubjeka
[Yii2] Fixed unintentional DB connection drop during exception logging, #3696 by @ivokund
[Yii2] Fixed calling _fixtures() method of Cest class. See #3655, fixes #3612 by @primipilus
[Db] Fixed removeInserted for Sqlite by @Naktibalda. Fixes #3680
Allows to get groups from scenario by $scenario->getGroups(). By @frantzen. See #3675
Fixed #3225: incorrect steps shown for multiple canXXX conditional assertion failures. By @Mitrichius
[SOAP] Force string for debugSection output by @Noles. Fixes #3690
Fixed #3562 group files with exact test not working with @example on Windows by @Naktibalda.
[Laravel5] Added vendor_dir option. See #3775. By @AdrianSkierniewski
[Laravel5] Fixed error where custom service container bindings were not available on the first request. See #3728. By @janhenkgerritsen
[Lumen] Fixed error where a non-existing exception class was thrown. See #3729. By @janhenkgerritsen
[Phalcon] Added services part which can be used to grabServiceFromContainer and addServiceToContainer when conflicting module is used. By @sergeyklay
[Phalcon] Refactored. Moved in-memory session adapter to the separated namespace. By @sergeyklay
[Phalcon] Fixed overwriting server parameters on requests. By @sergeyklay
[Asserts] assertCount method added by @disc
Documentation improvements by @CJDennis
--override (-o) option. Usage Examples:
codecept run -o "settings: shuffle: true": enable shufflecodecept run -o "settings: lint: false": disable lintingrun_database_seeder configuration option. See #3625 and #3630. By @Bouhnosauredatabase_migrations_path configuration option. See #3628. By @janhenkgerritsenhave and haveMultiple methods not being available when using the ORM part of the modules. See #3587. By @janhenkgerritsensee/dontSee output and friends output-- separates options from arguments in codecept run by @Naktibalda. Fixes #3614. See #3615cleanup set to true by default (as it was documented but not enabled).haveFixtures by @Ni-san. Fixes #3456. See #3586_fixtures method in testcase by @iRipVanWinkle. See #3565[PHPUnit_Framework_Exception] implode() while printing debug for security roles by @Prazmok.submitForm can be located by name or strict locator by @imjoehaines. See #3560registerDeprecationErrorHandler method and register_shutdown_function on first SuiteEvent only. By @positronium. See #3572Auth::logout(), Session::flush() and Cache::flush() from after hook. See #3493. By @janhenkgerritsenMemcache::seeInMemcached to check if the key exists alone or with the desired value. By @sergeyklayMemcache::haveInMemcached. By @sergeyklayMemcache::dontSeeInMemcached. By @sergeyklayinit_autoloader optional, because ZF3 uses composer for autoloading #3525. By @Naktibalda_fixtures method of a testcase. See reference. Fixes usage of nested transactions #3520. By @kalyabin and @davertmikseeResponseCodeIs is deprecated in favor of seeSoapResponseCodeIs by @eXorus. See #3512. Fixes #3512Doctrine\ORM\EntityManagerInterface as valid em instance #3467. Fixes #3459. By @akbwmmongorestore command syntax and adds --quiet option to configfacebook/php-sdk-v4 library with facebook/graph-sdk.codeception.yml is not in project root. See #3434. By @loren-osbornerror_level setting #3460. Fixes #3424. By @Naktibalda..). See #3339@webroot directory on running functional tests. See #3387seeResponseIsJson fails when response is empty. See #3401, closes #3400purgeQueue and purgeAllQueues actions. By @niclopezhaveMultiple fixed; corrected the order of arguments in FactoryMuffin->seed. See #3413 by @buffcodeSOAPAction config param to unset SOAPAction header in SOAP >= 1.2. See #3396REQUEST_TIME server variable to be set on request. By @gimler. Fixes #3374init part to initialize Yii app for unit and acceptance testing.entryScript and entryUrl config values for acceptance testing.haveFixtures, grabFixtures methods.amOnRoute method.amloggedInAs method.grabComponent method.seeEmailIsSent, grabLastSentEmail, etc and email part.@example to @group defined in group files. By @eXorus. Fixes #3278ReqiuiresPackage interface to set external dependencies for modules.run_database_migrations configuration option. By @janhenkgerritsen.callArtisan method. By @janhenkgerritsen.disableModelEvents() method and disable_model_events configuration option. Fixes #2897.codeception.yml config. See #3255 Thanks to @LeRondPoint.env.* files. See #3224. By @smoteskoucfirst, strtoupper => mb_strtoupper) by @Naktibalda. See #3211selectOption with similar options by @eXorus. Fixes #3246Codecepion\Util\HttpCode util class with HTTP code constants. See class referencedeleteHeader method by @Naktibalda. Fixes #3161init part added to avoid conflicts with WebDrivergenerate:snippets can accept second parameter to generate snippets from a specific file or folder.grabNumRecords method by @tocsick. See #3175grabServiceFromContainer when conflicting module is used by @Naktibalda.haveBinding, haveSingleton, haveContextualBinding and haveInstance methods. By @janhenkgerritsen. See #2904.Codeception\TestCase replaced with Codeception\TestInterface in code and in module signatures.PHPUnit_Framework_TestCase, so they don't have expectException, getMock, etc.PHPUnit_Framework_Test instead of extending heavy PHPUnit_Framework_TestCase class.@depends annotation. Announcementcodecept dry-run command added to show scenario steps without executing them.createModel method, use have method instead. See #2866makeModel method. See #2866haveModel method to have. See #2866container removedassertLessThen and assertGreaterThenCodeception\Util\Stub are not verified in Cests. See #3005grabAttributeFrom renamed to grabAttributeFromXmlElement to avoid conflictshaveMultiple method to create more than one model per call. See #2866haveRecord, seeRecord, dontSeeRecord and grabRecord methods now also accept Eloquent model class names instead of only database table names. See #2866Phalcon1 and Phalcon2 modules into one Phalcon due the fact that Phalcon Framework v1.3.x no longer supported at allassert* methods from PHPUnit addedexpectException methodselectOption can receive option as strict locator to exactly match option by text or by value. Use ['value' => 'myvalue'] or ['text' => 'optiontext'] to select a proper option. By @gdscei and @davertmik See #3003modules: disabled:.sq('user1') => 'user1_876asd8as87a'. Addedprefix` config option.