Saltar al contenido principal

Configuración de cookies

Utilizamos cookies para asegurar las funcionalidades básicas del sitio web y para mejorar tu experiencia en línea. Puedes configurar y aceptar el uso de las cookies, y modificar tus opciones de consentimiento en cualquier momento.

Esenciales

Preferencias

Analíticas y estadísticas

Marketing

Week 9-10: End-to-end test suite for Mautic - Level Up Unlocked!

Avatar: Priyanshi Gaur Priyanshi Gaur

Hi everyone! 

Exciting news – our Codeception test suite for Mautic has successfully landed! We've merged the pull request, marking a significant milestone in our project.
We've successfully completed the tests for the contacts bundle and implemented a separate test database for isolated testing.

Why a Separate Test Database?

In acceptance tests, your tests are interacting with the application through a web server. This means that the test and the application work with the same database. This can be problematic, as tests could potentially modify production data. To avoid this, we've implemented a separate test database for isolated testing. 

Running the Test Suite

Here's how to run the test suite on your local machine:

1. Enable Test Mode: Edit your .env.local file and set the environment to test mode.

# .env.local
APP_ENV=test
APP_DEBUG=1

2. Configure Test Database Credentials: Ensure your .env.test.local file contains the correct credentials for the test database.

# .env.test.local
DB_HOST=db
DB_USER=db
DB_PASSWD=db
DB_NAME=test

3. ddev start

4. Build the test dependencies:

ddev exec bin/codecept build

5. ddev exec bin/codecept run acceptance ContactManagementCest

Join the Testing Community!

The pull request for the test suite has been successfully merged, and you can now run the suite locally.

  • Documentation: Head over to the Mautic documentation for detailed instructions on setting up the testing environment, running tests, and writing your own: https://devdocs.mautic.org/en/5.x/testing/e2e_test_suite.html
  • Contributing: We'd love your help in expanding the test suite! We've already started with the contact bundle, but feel free to pick any area you'd like to contribute to.
  • Slack Channel: Join #automated-testing for discussions, contribution updates, and any assistance you might need.

We already have some fantastic contributors on board, and we'd love for you to join us!

Next week’s focus:

In the coming week, we'll focus on integrating the test suite with GitHub Actions, creating a workflow for automated test execution. We'll also be wrapping up the project shortly.

Thanks for following along! And as always feel free to leave any comments or questions below.

Comentario

Reportar contenido inapropiado

Este contenido no es apropiado?

Motivo:

Cargando los comentarios ...

Inicia sesión o crea una cuenta para añadir tu comentario.

Confirmar

Por favor, inicia la sesión

Puedes acceder con una cuenta externa.

Compartir