Testing with Spryker


#1

Hello,

I want to write a functional test, as defined by codeception here: https://codeception.com/docs/04-FunctionalTests

I created a test suite along with its codeception.yml file, which enables the required module:

modules:
  enabled:
   - \Helper\Functional

However, the test fails because:

Module \Helper\Functional could not be found and loaded

Is it possible to write functional tests in Spryker. If so, how?


#2

Hello Theo,

if you don’t have the Functional helper then you can’t add it to the enabled ones. This is just an example from codeception.

You can look into your tests/ directories and search for _support/helper dir inside. You will then find some working examples for helpers.

In general, it’s possible to write functional tests for your project code. Facade tests are good exmaples for them. For examples check out the PyzTest namespace.


#3

Hello Rene, thanks for the quick reply.

I looked through some Facade tests, specifically

CalculationWithCalculableObjectFacadeTest
AuthFacadeTest
ProductOptionFacadeAggregatorTest

Are these tests considered functional or acceptance?


#4

Acceptance tests are always make use of the UI e.g. click links by text etc. The facade tests do not test any visible element. We usually put “Acceptance tests” into the Presentation suite of the module under test.

Facade tests are in the Business suite and those can be seen as functional tests.


#5

Okay. Thanks a lot of the info!