This is a question I've had for a little while but been unable to find a satisfying answer for. I had issues running some tests out of the box when run against a version of Magento 2 EE of one deployment mode or the other (and even then, it's taken some finagling). But a thought occured to me that of course it matters, right? You need to be testing against a production environment to... test a production environment. Have I done something drastically wrong in setting up my environment to not be able to run the tests out of the box (here meaning composer installed)?
Hello @robertbrown_rob
This is my opinion when you are doing development, you should keep the store in development mode. Here you need to test and develop while working.
When you are done with the development and all well, then switch to production mode to test with. I assume you must be having one development server for any experiment you do before live website.
There are chances some things work ok in development mode and In production mode, they throw errors.
I hope that makes sense, if any query, you can ask, i will be happy to answer you.
Also, the compilation is one of the important parts, whenever you install a new third party extension, do run the compile command once. (again first in stage website).
You should always use "Development Mode" when you are on development server.
As it saves lot of time of developer.The main advantage of using development mode is that you don't have to run commands everytime when you make changes.
The content got automatically deploy on the development server you just have to flush the cache.
And as you are Production server then you must use the "Production Mode" as at that time your site is much more stable and you don't want your users to see the errors on frontend if you have any.
Thanks