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..
Hello. I have to set shared config value in acceptance tests for Glue. Added the config helper. But
Comments
-
Acceptance tests are basically browser clicking
0 -
you can't set config (or access DB etc.) when doing acceptance tests
0 -
Well, the thing is, the check of config variable happens in the glue layer. So, there is no way to write Glue tests for true/false scenarios, thats sad.
0 -
you can write the test, just not the acceptance test where you will modify the config before running the test like you can with functional or unit tests
0 -
Thought that as well. Didnt find any "inspiration" in vendor for that. All Glue tests seem to be acceptance ones
0 -
Question is do you want to test if glue works or if the logic that glue layer is calling works
0 -
I have to test that if a config var is false, the actions in related Glue bundle dont proceed with resource creation, but just give a response "resource not enabled". As I said, this all happens in Glue, before any client---zed calls take place, as they shouldnt. So, to your question - its first variant.
0 -
if a config var is false, the actions in related Glue bundle dont proceed with resource creation, but just give a response βresource not enabledβ.
This still sounds to me like mixing functional and acceptance tests
- Set/mock config to true/false and check the response code (403) or client response (whatever) - sounds like functional test
- Execute external commands against glue and validate json - is acceptance tests. In this case, all your environment (including config you mention) must be already in place and running. So no way to change it in acceptance test.
0 -
To understand the acceptance test, imagine youβre sitting in front of the browser w/o any access to the code. You can click around and verify results (message appear, image visible, et).
0 -
@UKJSE6T47 Thank you, I know, that ACs are for "click on the browser" and its with functional tests to proceed here. I just ask myself, why there are no func tests for Glue in vendor. Because the actual case I have is just about it, actually. I need to set the config value inside a test and then call a glue action. And all logic I want to test resides inside Glue as well.
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 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