A
A
AlpineMilk2020-06-24 11:05:31
PHP
AlpineMilk, 2020-06-24 11:05:31

Codeception organizing testing of acceptance tests?

The project was created on symfony4recently began to implement tests unitand acceptance. For this, they chose Codeceptionand seleniumfor acceptance tests. Acceptance tests will test the admin panel, which has a lot of pages with lists, adding, filters, and so on. Since acceptance tests test what the user sees, you can’t test lists with data in the admin panel, for example, since the data will change.

How is acceptance testing organized?

I think that you should create another database in which to duplicate the tables and prepare fixtures (test data) for them, and check already against them. Since you will have to create a lot of test data (the project is already large), I decided to first ask you for advice so as not to do too much, which will not be justified.

Tell me how would you do in this case?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Daria Motorina, 2020-06-24
@AlpineMilk

you should create another database in which to duplicate the tables and prepare fixtures for them

this is how they usually do it, to work with real data they still have to be created, in between to store this binding and clean everything after the tests, fixtures and the test database are clearly better and safer, the main thing is to prepare the data well

D
dmitriy, 2020-06-24
@dmitriylanets

Yes, that's right, the database should be a reference one, but it should not contain user dynamic data, only default data.
during testing, test data will be driven there, for example, user registration, etc.
at the end of the tests, the database will be dropped and thus there will be no need to delete the test data.
ps Docker is great for these purposes, after the tests, the container with all the data is deleted.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question