Testing in single sprint involves which environments?
Is it a good practice to test in QA environment and once the testing is done then merging the code in Production environment?
Or it it like QA -> Stage -> Production environment ?
My concern here is if we plan to perform testing in "QA" and "Stage" environments then we may run out of time to perform testing before merging the code into Production.
Why would you run out of time? Can’t the Development Team estimate how much work they can take on, in a Sprint of a given length, for the increment to meet a known “Definition of Done” and be potentially releasable?
Sufficient testing should take place to produce a "Done" releasable increment.
It would be a good idea to adopt a testing strategy that provides enough empirical evidence that a tested increment is indeed ready to be released to production.
Normally that would be on an environment that matches production as closely as possible.