Questions tagged [codeception]

Codeception is a modern full-stack testing framework for PHP. Inspired by BDD, it provides a way of writing acceptance, functional and even unit tests. Powered by PHPUnit.

Codeception is a PHP full-stack testing framework. Inspired by BDD, it provides a new way of writing acceptance, functional and even unit tests. Powered by PHPUnit.

Feature Overview:

  • Multiple backends, easily changed , PhpBrowser
  • Elements matched by name, CSS, XPath
  • Data Cleanup after each run
  • Integrate with Symfony, Zend Framework, Laravel, Yii and other frameworks
  • Continuous Integration systems like Jenkins or Bamboo
  • Natively executes PHPUnit tests
  • BDD-style scenario-driven tests
  • WebServices testing via REST,SOAP
  • Generates HTML, XML, TAP, JSON reports
  • Simple Fixtures
  • Database and Doctrine ORM helpers
  • CodeCoverage and Remote CodeCoverage

Documentation & Links

Available modules for frameworks

1468 questions
-1
votes
1 answer

How do you handle dependency in api testing?

I have large api that I want to wirte api tests for each endpoint. How should I handle testing endpoints that depend on id from other endpoints? In our application we have to create client first then branch then products then order for that…
-1
votes
1 answer

php laravel api test always returns 404 in the second call after a first successful call

I am making an API test function that includes sending a post request twice in the same test. the first request is successful and has no problem, and i can assert the response without any issue. however, in the second request, the route is not found…
Alladin
  • 1,010
  • 3
  • 27
  • 45
-1
votes
1 answer

Can I use a %variable% in module section of codeception environment file?

I tried to have the server address injected to the test with environment variable ABSOLUTE_URL so PhpBrowser would test against it. The config I wanted to do is something like this: class_name: AcceptanceTester modules: enabled: -…
Koala Yeung
  • 7,475
  • 3
  • 30
  • 50
-1
votes
1 answer

Selecting a radio button in Codeception

Any suggestions on how I would select one of these?
Wayne Hazle
  • 35
  • 2
  • 4
-1
votes
1 answer

ChromeDriver 79 under Selenium needs HTTPS certificate manually accepted every time

I've just updated my ChromeDriver from version 78 to version 79. Now Chrome gives me a warning on all my tests and fails if I don't add the certificate as an exception in time (a have a few seconds before the test fails). I didn't have to do…
-1
votes
1 answer

Facebook\WebDriver\Exception\UnexpectedJavascriptException javascript error: Cannot read property 'click' of undefined

Problem is that my codeception test is actually passing and button is clicked, but for some reason it stops going further with error in title. $I->click('onsomefield'); $I->fillField(['name' => 'password'], 'password'); $I->waitForJS("let…
Artur O
  • 174
  • 1
  • 12
-1
votes
1 answer

Calling a variable by passing variable name as a string

I've got a list of variables. Let's call it a=1,b=2,c=3. I would like to pass the variable name to a function as a string and then retrieve its' value. Is there a way to achieve this in PHP? I', hoping to use this in page object pattern with Gherkin…
Pubudu
  • 478
  • 1
  • 6
  • 22
-1
votes
1 answer

Yii2 Codeception Functional tests - Click on OK button of confirm dialog

I'm a newer in Yii2 and programming tests. I'm using Codeception for testing. Summary: In one of my tests I have to click on OK button of a confirm dialog. In order to do this, I have tried: $I->click('OK'); $I->acceptPopup(); Neither of them…
jose luis
  • 1
  • 3
-1
votes
1 answer

Chromedriver Centos 7 Headless

I have a problem to run codeception on centos7 server in headless mode with chromedriver.On mac evrything is fine. I log in via ssh, run chromedriver --verbose --url-base=/wd/hub, then I run php bin/codecept run acceptance -vvv. But then I'm getting…
-1
votes
1 answer

Codeception don't clear cookies for specific scenarios

I'm using BDD in codeception and I know that cookies can be configured in the codeception.yml by - clear_cookies: true #or false I only want to clear cookies for specific set of scenarios or 1 feature file. Would this be possible
edmamerto
  • 7,605
  • 11
  • 42
  • 66
-1
votes
1 answer

allure/codeception 1.1.1 is not compatible with codeception 2.3.x (latest version)

allure-framework/allure-codeception 1.1.1 requires codeception/codeception ~2.0.0 latest codeception version is ~2.3.x is there a work around, besides downgrading codeception ?
-1
votes
1 answer

Error "Call to a member function get() on null" on Running acceptance with Codeception 2.2.10 on Windows

I'm using Codeception for acceptance testing. Selenium driver version 3.3.1 (selenium-server-standalone-3.3.1.jar) along with latest version of firefox 52 to test. I've already added geckodriver version 0.15 to the environment variable Path of…
Aref
  • 39
  • 1
  • 2
  • 11
-1
votes
1 answer

TDD What should be the order of unit testing, integration testing and acceptance testing?

I am doing TDD for a project using PHP. Until now, I write unit tests, make them fail and then write the least amount of code to fulfill the test. After the project has been completed, I write acceptance testing using CasperJS. Of late I have been…
Chris Roy
  • 945
  • 1
  • 7
  • 19
-1
votes
1 answer

Codeception: How to use amLoggedAs in a Helper class

I am trying to make a helper class for my codeception functional tests that makes it quicker to specify logging in as a super user. Here is my helper: class Laravel5Helper extends Laravel5 { public function amSuperAdmin() { …
ralbatross
  • 2,448
  • 4
  • 25
  • 45
-1
votes
1 answer

Codeception geolocation

I am getting geolocation with javascript with navigator.geolocation.getCurrentPosition(.. Is there any chance in Codeception a test value can be given for this? I cannot find anything on this, except for settings in Selenium which would make the…
1 2 3
97
98