What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hi! I got a question regarding testing: is it possible (and senseful) to individually run tests of a

U044S668NPR
U044S668NPR Posts: 17 πŸ§‘πŸ»β€πŸš€ - Cadet

Hi! I got a question regarding testing: is it possible (and senseful) to individually run tests of a module (which lays inside an own repository) when it's not included within some project? I tried e.g. to execute the tests for the sprkyer/cart module but I run into several issues.

Comments

  • UK7KBE2JW
    UK7KBE2JW Posts: 463 πŸ§‘πŸ»β€πŸš€ - Cadet

    Yes you can. you can run it with ./vendor/bin/codeception run -c PATH_TO_CODECEPTION.YML or you also can go into the package directory, run composer update and then run the tests. Could be possible to set up the orm and transfer stuff first. In our packages we use some codeception helper module for generating this stuff for us

  • U044S668NPR
    U044S668NPR Posts: 17 πŸ§‘πŸ»β€πŸš€ - Cadet

    Okay, I tried that but keep getting composer errors. Maybe that's caused by the Spryker modules not being well configured.. πŸ€”

  • U044S668NPR
    U044S668NPR Posts: 17 πŸ§‘πŸ»β€πŸš€ - Cadet

    How do you exactly generate the ORM and transfer stuff?

  • UK7KBE2JW
    UK7KBE2JW Posts: 463 πŸ§‘πŸ»β€πŸš€ - Cadet

    for this we have developed the module fond-of-codeception/spryker

  • UK7KBE2JW
    UK7KBE2JW Posts: 463 πŸ§‘πŸ»β€πŸš€ - Cadet

    you can take a look for example into https://github.com/fond-of-oryx/company-oms-mail-connector

  • UK7KBE2JW
    UK7KBE2JW Posts: 463 πŸ§‘πŸ»β€πŸš€ - Cadet

    in the codeception.yml is it activated

  • U044S668NPR
    U044S668NPR Posts: 17 πŸ§‘πŸ»β€πŸš€ - Cadet

    Thanks a lot for this information!
    But is this really the right way to go, implementing an own logic around this? How does Spryker itself executes the module tests?

  • UK7KBE2JW
    UK7KBE2JW Posts: 463 πŸ§‘πŸ»β€πŸš€ - Cadet

    thats a thing you have to investigate yourself or ask anyone of spryker directly πŸ™‚. Can only tell you how we do this since we have invented our own mono repo and split process.