We (Team & Org.) are new in salesforce development and not sure if our infrastructure setup is right or not.
- We have a set of 3 developers working on one developer sandbox. The project is not yet deployed to production.
- We are using Visual Studio Code/Salesforce DX/Salesforce Extension Pack for our development
- We have also integrated the code (Apex classes and whatever present in default package.xml) from the dev sandbox into our Azure DevOps repo
Problem Statement: Let's say all the three developers are working one same class file and writing 3 different methods which they want to unit test. In VS Code to run the unit test, your code must be deployed to Org. If one of the developers deploy his code to sandbox and start unit testing another developer can not deploy or test his piece, because it will just overwrite in the sandbox.
We can use source control to merge first then deploy, but I think we should push code to source control only after unit testing.
- How should we tackle this issue? We want all the developers to write and unit test first then we can push it to the Azure DevOps and finally deploy to the sandbox. Is it possible? If not what is the better and recommended way?
Thanks in advance!