Loading ...

What's your function in life?

Ours is writing random blog articles about web development, TYPO3 and more.

Run TYPO3 Core Acceptance Tests locally with Codeception, Selenium & Docker

Prerequisites

  • Running docker / docker compose
  • local, working TYPO3 installation

docker file to run TYPO3 acceptance tests:

docker-compose.yaml:

 

version: '2.3'
services:
  chrome:
    image: selenium/standalone-chrome:3.12
    networks:
    - test
  web:
    image: typo3gmbh/php72:latest
    stop_grace_period: 1s
    networks:
    - test
    volumes:
    # configure local installed TYPO3 path on the left
    - "../../TYPO3.CMS/:/srv/acceptance-tests/:delegated"
    entrypoint: php
    # adjust path if your public folder is not == root folder
    command: -n -c /etc/php/cli-no-xdebug/php.ini -S web:8000 -t /srv/acceptance-tests/
  mariadb10:
    image: mariadb:10
    environment:
      MYSQL_ROOT_PASSWORD: funcp
    networks:
    - test
  codeception:
    image: typo3gmbh/php72:latest
    environment:
        - typo3DatabaseName=func_test
        - typo3DatabaseUsername=root
        - typo3DatabasePassword=funcp
        - typo3DatabaseHost=mariadb10
    depends_on:
      - web
      - mariadb10
      - chrome
    networks:
    - test
    volumes:
    - "../../TYPO3.CMS/:/srv/acceptance-tests/:delegated"
    working_dir: /srv/acceptance-tests/
    entrypoint: /srv/acceptance-tests/bin/codecept

networks:
  test:

volumes:
  test-data:
    name: "test-data"

 

Run TYPO3 acceptance tests

 

# Backend Tests
docker-compose run --rm codeception run Backend -d -c typo3/sysext/core/Tests/codeception.yml

# Install Tests
 docker-compose run --rm codeception run Install -d -c typo3/sysext/core/Tests/codeception.yml

# Specific Folder
 docker-compose run --rm codeception run Backend -d -c typo3/sysext/core/Tests/codeception.yml typo3/sysext/core/Tests/Acceptance/Backend/Site

 

 

Comments

No comments

Write comment

* These fields are required