improvement on Acceptance Tests
Hello Spryker community,I'm working on acceptance tests for a Spryker project and I'm looking for ways to optimize the test setup and iteration process. Currently, we need to run the following commands before each test run:
docker/sdk boot deploy.ci.acceptance.mariadb.yml -v && docker/sdk up -t -v && docker/sdk testing codecept fixtures && docker/sdk testing console queue:worker:start --stop-when-empty && docker/sdk cli composer dump-autoload -o -a --apcu
Followed by:
docker/sdk testing codecept run
or
docker/sdk testing codecept run -c codeception.acceptance.yml
The initial setup commands are time-consuming as they involve starting the Docker environment and preparing the test fixtures. This becomes especially problematic when we need to make changes to a test and rerun it, as we have to go through the entire setup process again.My questions are:
- Are there any ways to update test code or other related code without having to rerun the entire block of setup commands?
- Can we optimize this process to reduce the time spent on each test iteration?
- Are there any best practices or tools within the Spryker ecosystem to make this process more efficient?
Any insights or suggestions would be greatly appreciated. Thank you!
Answers
-
Hi, @vaisakhpc !
I'm not sure if I got your question right, so will elaborate.
What you described is a perfect flow for CI environment, where you have to run always all tests
Usually, each test prepares all data for it, and thus could be rerun multiple times as a single entity.
If you have several dependent ones, then I highly recommend you grouping them in a Cest file and still making sure that the preparation is done for the whole set of tests.
Some hints for running tests:
- use @group tag for methods and -g to run only this group
- remove not needed folders from the codeception.acceptance.yml or even specify a direct path to the required folder. Make sure it contains its own configuration file.
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 920 Developer Corner
- 780 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 34 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random