jeudi 28 décembre 2017

Codeception cleanup vs. depends

When working with Codeception Acceptance tests i got to realise the best way is to cleanup the database before every test and make every test independent.

But some Cest Tests depend on each other. So if i write:

/**
 * @depends createObjectBase
 * @___skip     
 */   
 public function createObjectMore(AcceptanceTester $I)
 {

the data created in the DB from the createObjectBase test is gone because of the cleanup. But that data is needed for the createObjectMore test.

I cannot combine them into one test because in reality there are multiple areas with very different tests, so createObjectMore is just a placeholder here.

So whats the best way to handle this?

Aucun commentaire:

Enregistrer un commentaire