2

everyone!

I have been trying to configure Codeception 2.3.6 with Laravel 5.3.30 running on PHP 7.0.23 powered by WAMP 3.1.0. My functional test cases are running fine, but when I try to run my acceptance test cases, a new chrome window opens and then closes without doing anything.

The output in the HTML Report is Codeception Results OK(0s), while the output on the command line is:

WelcomeCept: Perform actions and see result (0.00s)

Time: 3.24 seconds, Memory: 22.75MB
OK (1 test, 0 assertions)
HTML report generated in file://D:\wamp\www\myApp\tests/_output\report.html

First I start ChromeDriver with the command

chromedriver --url-base=/wd/hub

Then I start Selenium Standalone Server 3.13.0 with the command:

java -Dwebdriver.chrome.driver="chromedriver" -jar selenium-server-standalone-3.13.0.jar -port 4445

Then I run my acceptance test suite which contains a single test file, with the command:

call vendor/bin/codecept run acceptance --html

My acceptance.suite.yml is:

class_name: AcceptanceTester
modules:
enabled:
    - WebDriver:
        url: http://lcms.com/
        window_size: false # disabled in ChromeDriver
        port: 9515
        browser: 'chrome'
        restart: true
        wait: 200
        capabilities:
          unexpectedAlertBehaviour: 'accept'
          webStorageEnabled: true
          javascriptEnabled: true

    - Laravel5:
        part: ORM
        cleanup: false # can't wrap into transaction
        environment_file: .env
    - \Helper\Acceptance

My WelcomeCept.php file, just for testing the configuration, is:

<?php

class WelcomeCept
{
    public function welcomeTest(AcceptanceTester $I)
    {
        $I->wantTo('perform actions and see result');
    }
}

Please review my workflow and let me know if I'm doing things incorrectly or am missing something.

Thanks!

Update: Same thing is happening using GeckoDriver or PhantomJS in WebDriver mode. The tests are passing with OK but not performing any actions.

5
  • Could you try to run tests with --steps option? Commented Jul 9, 2018 at 8:08
  • By using --steps option, the test is passing, Scenario is empty. Commented Jul 9, 2018 at 8:26
  • What happens when you run a test which actually does something? Because in your example doing nothing is an expected result. Commented Jul 9, 2018 at 20:27
  • @Naktibalda same thing happens. I get nothing in scenario. I have tests that are meant to test creating a resource in my app. But even those tests do not perform anything, giving test result OK and taking 0 seconds for execution. Commented Jul 10, 2018 at 7:20
  • Using --coverage option, it gives Classes (0/0), Methods (0/0), Lines (0/0). Which actually is showing that the tests are not being executed, but somehow they are still passing. Strange! Commented Jul 10, 2018 at 12:11

1 Answer 1

2

Solved! I tried WelcomeCest instead of WelcomeCept and things have fallen into place.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.