wp-browser icon indicating copy to clipboard operation
wp-browser copied to clipboard

[SETUP ISSUE]

Open Spleeding1 opened this issue 2 years ago • 0 comments

Environment OS: macOS 12.4 PHP version: 7.4.1 Installed Codeception version: 4.1.31 Installed wp-browser version: 3.1.6 WordPress version: 6.0 Local development environment: Local by Flywheel WordPress structure and management: default

Did you use the codecept init wpbrowser command? Yes

Did you take a look at Codeception and wp-browser documentation? Yes

Codeception configuration file

paths:
    tests: tests
    output: tests/_output
    data: tests/_data
    support: tests/_support
    envs: tests/_envs
actor_suffix: Tester
extensions:
    enabled:
        - Codeception\Extension\RunFailed
    commands:
        - Codeception\Command\GenerateWPUnit
        - Codeception\Command\GenerateWPRestApi
        - Codeception\Command\GenerateWPRestController
        - Codeception\Command\GenerateWPRestPostTypeController
        - Codeception\Command\GenerateWPAjax
        - Codeception\Command\GenerateWPCanonical
        - Codeception\Command\GenerateWPXMLRPC
params:
    - .env.testing

Suite configuration file

# Codeception Test Suite Configuration
#
# Suite for acceptance tests.
# Perform tests in browser using the WPWebDriver or WPBrowser.
# Use WPDb to set up your initial database fixture.
# If you need both WPWebDriver and WPBrowser tests - create a separate suite.

actor: AcceptanceTester
modules:
  enabled:
    - WPDb
    - WPBrowser
    - \Helper\Acceptance
  config:
    WPDb:
      dsn: "%TEST_SITE_DB_DSN%"
      user: "%TEST_SITE_DB_USER%"
      password: "%TEST_SITE_DB_PASSWORD%"
      dump: "tests/_data/dump.sql"
      #import the dump before the tests; this means the test site database will be repopulated before the tests.
      populate: true
      # re-import the dump between tests; this means the test site database will be repopulated between the tests.
      cleanup: true
      waitlock: 10
      url: "%TEST_SITE_WP_URL%"
      urlReplacement: true #replace the hardcoded dump URL with the one above
      tablePrefix: "%TEST_SITE_TABLE_PREFIX%"
    WPBrowser:
      url: "%TEST_SITE_WP_URL%"
      adminUsername: "%TEST_SITE_ADMIN_USERNAME%"
      adminPassword: "%TEST_SITE_ADMIN_PASSWORD%"
      adminPath: "%TEST_SITE_WP_ADMIN_PATH%"
      headers:
        X_TEST_REQUEST: 1
        X_WPBROWSER_REQUEST: 1

Describe the issue you're encountering I just set this up to use, and the acceptance and functional tests take forever to run. Is there anyway to get this to run faster?

Output Codeception PHP Testing Framework v4.1.31 https://helpukrainewin.org Powered by PHPUnit 9.5.20 #StandWithUkraine

Acceptance Tests (1) -------------------------- ✔ TesterCest: Try to test (4.20s)

Time: 02:57.296, Memory: 155.87 MB

OK (1 test, 0 assertions)

To Reproduce

<?php

class TesterCest
{
    public function _before(AcceptanceTester $I)
    {
    }

    // tests
    public function tryToTest(AcceptanceTester $I)
    {
        $I->amOnPage('/login');
    }
}

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

Spleeding1 avatar Jun 03 '22 20:06 Spleeding1