How are the tests in vendor modules executed ?

JungleBoy Software Engineer Posts: 1 🧑🏻‍🚀 - Cadet
edited November 15 in Spryker Dev Environment

I have some custom modules that I have created and I would like to use them throughout projects, by making them as composer packages.

I was wondering how to bundle the tests inside the composer package. For inspiration I took a look at how the Spryker vendor modules structure the tests. I used the same structure and I can make simple assertion tests work, but if I want to use database for example, by incudling TransactionHelper, then when I run the tests, I get an error:

Could not find config key "PROJECT_NAMESPACES" in "Spryker\Shared\Config\Config"

Curiously, when I try to run the tests in Spryker vendor modules, I get the same error.

I use the usual algorithm for testing:

  1. codecept build
  2. codecept run -c path-to-suite

I see for example that in Availability module there are tests that use product helpers to get a product:

And the codeception.yml files do not have anything out of the ordinary, besides the fact that LocatorHelper has no projectNamespaces defined.

So can anyone explain how the vendor module tests are executed ?